Changeset ca2680d in mainline for uspace/lib/ui/include


Ignore:
Timestamp:
2022-03-07T21:07:02Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
96c6a00
Parents:
4583015
Message:

Rendering UI text with highlighted accelerators

Location:
uspace/lib/ui/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/include/types/ui/paint.h

    r4583015 rca2680d  
    3636#ifndef _UI_TYPES_PAINT_H
    3737#define _UI_TYPES_PAINT_H
     38
     39#include <gfx/color.h>
     40#include <gfx/font.h>
    3841
    3942/** Filled circle parts */
     
    8184} ui_box_style_t;
    8285
     86/** UI text formatting */
     87typedef struct {
     88        /** Text font */
     89        gfx_font_t *font;
     90        /** Standard color */
     91        gfx_color_t *color;
     92        /** Highlight color */
     93        gfx_color_t *hgl_color;
     94        /** Horizontal alignment */
     95        gfx_halign_t halign;
     96        /** Justification width (for gfx_halign_justify) */
     97        gfx_coord_t justify_width;
     98        /** Vertical alignment */
     99        gfx_valign_t valign;
     100} ui_text_fmt_t;
     101
    83102#endif
    84103
  • uspace/lib/ui/include/ui/paint.h

    r4583015 rca2680d  
    5959extern errno_t ui_paint_text_hbrace(ui_resource_t *, gfx_rect_t *,
    6060    ui_box_style_t, gfx_color_t *);
     61extern void ui_text_fmt_init(ui_text_fmt_t *);
     62extern gfx_coord_t ui_text_width(gfx_font_t *, const char *);
     63extern errno_t ui_paint_text(gfx_coord2_t *, ui_text_fmt_t *, const char *);
    6164
    6265#endif
Note: See TracChangeset for help on using the changeset viewer.