Ignore:
File:
1 edited

Legend:

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

    rb433f68 ra130983  
    11/*
    2  * Copyright (c) 2020 Jiri Svoboda
     2 * Copyright (c) 2022 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3737#define _TYPES_GFX_TEXT_H
    3838
     39#include <stdbool.h>
    3940#include <types/gfx/coord.h>
    4041#include <types/gfx/color.h>
     
    4243/** Text horizontal alignment */
    4344typedef enum {
    44         /** Align text left */
     45        /** Align text left (start at anchor point) */
    4546        gfx_halign_left,
    46         /** Align text on the center */
     47        /** Align text on the center (center around anchor point) */
    4748        gfx_halign_center,
    48         /** Align text right */
     49        /** Align text right (end just before anchor point) */
    4950        gfx_halign_right,
    5051        /** Justify text on both left and right edge */
     
    5455/** Text vertical alignment */
    5556typedef enum {
    56         /** Align top */
     57        /** Align top (starts at anchor point) */
    5758        gfx_valign_top,
    58         /** Align center */
     59        /** Align center (centered around anchor point) */
    5960        gfx_valign_center,
    60         /** Align bottom */
     61        /** Align bottom (end just before anchor point) */
    6162        gfx_valign_bottom,
    6263        /** Align to baseline */
     
    6667/** Text formatting */
    6768typedef struct {
     69        /** Text font */
     70        struct gfx_font *font;
    6871        /** Text color */
    6972        gfx_color_t *color;
    7073        /** Horizontal alignment */
    7174        gfx_halign_t halign;
    72         /** Justification width (for gfx_halign_justify) */
    73         gfx_coord_t justify_width;
     75        /** Width available for the text */
     76        gfx_coord_t width;
    7477        /** Vertical alignment */
    7578        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;
    7683} gfx_text_fmt_t;
    7784
Note: See TracChangeset for help on using the changeset viewer.