notes
This commit is contained in:
parent
3b66e51cc6
commit
5dfbad2399
@ -335,6 +335,18 @@ fn TextSize? Ctx.measure_string(&ctx, String text)
|
|||||||
// character's advance value
|
// character's advance value
|
||||||
// TODO: implement a "reflow" flag to toggle reflow if a character goes out of bounds
|
// TODO: implement a "reflow" flag to toggle reflow if a character goes out of bounds
|
||||||
// TODO: also return the total bounds of the laid out string
|
// TODO: also return the total bounds of the laid out string
|
||||||
|
// TODO: Following improvements
|
||||||
|
// [ ] struct LineInfo which stores the line information, like offset, width and height, during
|
||||||
|
// the measurement stage each line is scanned and pushed to the list, then to layout
|
||||||
|
// simply pop each line. The LineInfo list can be stored on the stack with the tmem allocator
|
||||||
|
// [ ] if the alignment is TOP_LEFT we can simply skip measuring the string, opting to layout
|
||||||
|
// it directly
|
||||||
|
// [ ] implement a macro to fetch and layout each character, this can be used to reduce code
|
||||||
|
// repetition both here and in measure_string
|
||||||
|
// [ ] the cursor position can be determined by a separate function like get_cursor_position()
|
||||||
|
// this way the function can terminate early if the cursor position is found
|
||||||
|
// [ ] implement a function hit_test_string() to get the character position at point, this can
|
||||||
|
// be used to implement mouse interactions, like cursor movement and selection
|
||||||
<*
|
<*
|
||||||
@param [&in] ctx
|
@param [&in] ctx
|
||||||
@param [in] text
|
@param [in] text
|
||||||
|
4
lib/ugui.c3l/src/string.c3
Normal file
4
lib/ugui.c3l/src/string.c3
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
module ugui;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user