Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gfxfont/include/types/gfx/text.h

    ra130983 rb433f68  
    11/*
    2  * Copyright (c) 2022 Jiri Svoboda
     2 * Copyright (c) 2020 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3737#define _TYPES_GFX_TEXT_H
    3838
    39 #include <stdbool.h>
    4039#include <types/gfx/coord.h>
    4140#include <types/gfx/color.h>
     
    4342/** Text horizontal alignment */
    4443typedef enum {
    45         /** Align text left (start at anchor point) */
     44        /** Align text left */
    4645        gfx_halign_left,
    47         /** Align text on the center (center around anchor point) */
     46        /** Align text on the center */
    4847        gfx_halign_center,
    49         /** Align text right (end just before anchor point) */
     48        /** Align text right */
    5049        gfx_halign_right,
    5150        /** Justify text on both left and right edge */
     
    5554/** Text vertical alignment */
    5655typedef enum {
    57         /** Align top (starts at anchor point) */
     56        /** Align top */
    5857        gfx_valign_top,
    59         /** Align center (centered around anchor point) */
     58        /** Align center */
    6059        gfx_valign_center,
    61         /** Align bottom (end just before anchor point) */
     60        /** Align bottom */
    6261        gfx_valign_bottom,
    6362        /** Align to baseline */
     
    6766/** Text formatting */
    6867typedef struct {
    69         /** Text font */
    70         struct gfx_font *font;
    7168        /** Text color */
    7269        gfx_color_t *color;
    7370        /** Horizontal alignment */
    7471        gfx_halign_t halign;
    75         /** Width available for the text */
    76         gfx_coord_t width;
     72        /** Justification width (for gfx_halign_justify) */
     73        gfx_coord_t justify_width;
    7774        /** Vertical alignment */
    7875        gfx_valign_t valign;
    79         /** Abbreviate the text with ellipsis if it does not fit @c width */
    80         bool abbreviate;
    81         /** Underline */
    82         bool underline;
    8376} gfx_text_fmt_t;
    8477
Note: See TracChangeset for help on using the changeset viewer.