Changeset dbb42c9 in mainline for uspace/lib/ui/private/entry.h


Ignore:
Timestamp:
2021-08-01T14:47:33Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1e242121
Parents:
5de71df
Message:

Scroll entry text when it is long

Whew! This is so much harder than it looks!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/private/entry.h

    r5de71df rdbb42c9  
    4040#include <gfx/coord.h>
    4141#include <gfx/text.h>
     42#include <stdbool.h>
    4243
    4344/** Actual structure of text entry.
     
    5859        /** Text */
    5960        char *text;
     61        /** Current scroll position (in pixels) */
     62        gfx_coord_t scroll_pos;
    6063        /** Cursor position in the text (offset in bytes) */
    6164        unsigned pos;
     
    8184        /** Interior rectangle */
    8285        gfx_rect_t interior_rect;
     86        /** Text rectangle */
     87        gfx_rect_t text_rect;
    8388        /** Text anchor position */
    8489        gfx_coord2_t text_pos;
     90        /** Text anchor X coordinate */
     91        gfx_coord_t anchor_x;
    8592} ui_entry_geom_t;
    8693
     
    94101extern void ui_entry_activate(ui_entry_t *);
    95102extern void ui_entry_deactivate(ui_entry_t *);
     103extern void ui_entry_scroll_update(ui_entry_t *, bool);
    96104
    97105#endif
Note: See TracChangeset for help on using the changeset viewer.