Commit graph

74 commits

Author SHA1 Message Date
Emil Ernerfeldt
c22156cd0f [refactor] simplify Widget trait return type to InteractInfo 2020-05-23 12:43:08 +02:00
Emil Ernerfeldt
5c966bdc76 [input] widgets must say if they are interested in click or drags 2020-05-23 12:38:52 +02:00
Emil Ernerfeldt
ee0ad02717 Highlight window frame when you resize it 2020-05-23 11:28:21 +02:00
Emil Ernerfeldt
58a8f743be Optimize and clean up text output 2020-05-20 21:22:42 +02:00
Emil Ernerfeldt
0f0e385ea3 [refactor] collect stuff into new mod paint 2020-05-19 22:28:57 +02:00
Emil Ernerfeldt
f9bb9f71c4 Add button to collapse windows 2020-05-17 12:26:17 +02:00
Emil Ernerfeldt
037b22be7f Simplify and improve the default visual style 2020-05-17 10:21:45 +02:00
Emil Ernerfeldt
ce0e7f4e09 Refactor font layout: introduce y_max for each Line in a Galley 2020-05-16 20:05:52 +02:00
Emil Ernerfeldt
c0e7f947ff Improved text edit with cursor that can be moved with arrow keys 2020-05-16 19:38:46 +02:00
Emil Ernerfeldt
89aa285255 Simplify text layout further with even less allocations 2020-05-16 18:17:35 +02:00
Emil Ernerfeldt
d3a3e4fa73 Refactor text layout: fewer allocations 2020-05-16 17:28:15 +02:00
Emil Ernerfeldt
cdfd42eb3e refactor text layout with a new struct Galley 2020-05-16 11:27:02 +02:00
Emil Ernerfeldt
152e644fb2 Add clock in top right corner using reverse layout in menu bar 2020-05-13 22:56:37 +02:00
Emil Ernerfeldt
d4204f03c0 Refactor: break out Layout to own struct/file 2020-05-13 22:23:33 +02:00
Emil Ernerfeldt
b8675ad67f refactor: move some code around to make place for new Layout 2020-05-13 20:16:59 +02:00
Emil Ernerfeldt
8e0b1c8fca Add example where you can change layout direction and alignment 2020-05-12 23:00:20 +02:00
Emil Ernerfeldt
1dff2ad721 Remove Ui::cursor() function 2020-05-12 22:21:04 +02:00
Emil Ernerfeldt
7a1c97ccfe Simplify and unify queries about available space 2020-05-12 18:21:09 +02:00
Emil Ernerfeldt
71154edf9b Add a fractal clock example to showcase painting performance 2020-05-11 20:21:24 +02:00
Emil Ernerfeldt
4fcea59929 Optimize meshing 2020-05-11 17:08:04 +02:00
Emil Ernerfeldt
34b4c985a2 Add some support for menu bars 2020-05-10 19:03:36 +02:00
Emil Ernerfeldt
274acff47e Better handling of full-width widgets inside of Ui:s with inf max size 2020-05-10 18:59:18 +02:00
Emil Ernerfeldt
3a1d677840 refactor interact style 2020-05-10 08:55:41 +02:00
Emil Ernerfeldt
fa82e8d806 Rename Region to Ui (shorter, sweeter) 2020-05-08 22:42:31 +02:00
Emil Ernerfeldt
702e135f07 Keep window title and collapsing headers on one line 2020-05-08 17:16:32 +02:00
Emil Ernerfeldt
87e3aacf35 enforce and fix a bunch of clippy issues 2020-05-07 10:47:03 +02:00
Emil Ernerfeldt
6aadf4128e Refactor: pass Rect:s by value (cleaner) 2020-05-05 19:12:00 +02:00
Emil Ernerfeldt
45564f952b Kinetic windows 2020-05-03 13:28:47 +02:00
Emil Ernerfeldt
bfbb669d02 Store/restore emigui memory state (window positions, sizes etc) 2020-05-02 11:37:12 +02:00
Emil Ernerfeldt
d52cccde7b Move Slider widgets to own file 2020-05-01 19:24:52 +02:00
Emil Ernerfeldt
f97dcdc9b5 Reorder some functions in Region 2020-05-01 09:35:44 +02:00
Emil Ernerfeldt
b73fbb33d8 Improve size negotiation code.
Better enfocred minimum sizes.
You can now have windows that expand to fit their content.
2020-05-01 02:08:01 +02:00
Emil Ernerfeldt
7cd8ac2bbf Rename Widget::add_to to Widget::ui 2020-04-29 22:01:39 +02:00
Emil Ernerfeldt
bf59455097 Add a bunch of TODOs 2020-04-29 21:58:41 +02:00
Emil Ernerfeldt
14db237b1d Basic text input support 2020-04-29 21:25:49 +02:00
Emil Ernerfeldt
cce048509f Refactor: make Rect members min/max public 2020-04-25 15:45:38 +02:00
Emil Ernerfeldt
4cc6ca7236 Use ..= range arguments to remap functions 2020-04-25 11:11:44 +02:00
Emil Ernerfeldt
663fbda90c Use min..=max syntax for slider ranges 2020-04-25 11:01:57 +02:00
Emil Ernerfeldt
02f3b6dddf std::f32::INFINITY -> f32::INFINITY 2020-04-25 10:52:20 +02:00
Emil Ernerfeldt
a66f4efaac Minor code cleanup and clippy fixes 2020-04-24 18:47:14 +02:00
Emil Ernerfeldt
b39555bb23 Add support for hyperlinks 2020-04-23 19:15:17 +02:00
Emil Ernerfeldt
b4ea51f0f9 Sliders: use title as id if available with scroll position as fallback
This fixes the sliders in the style window
2020-04-23 09:27:08 +02:00
Emil Ernerfeldt
fd8180cea4 Fix left alignment of widgets and tweak style slightly 2020-04-23 00:23:29 +02:00
Emil Ernerfeldt
104f2191a0 Improve Widget code, and make sure it paints within the given bounds 2020-04-22 19:39:51 +02:00
Emil Ernerfeldt
700c93b8e3 Add Rect left/right/top/bottom accessors 2020-04-22 19:38:38 +02:00
Emil Ernerfeldt
d941c5830d Unify style for buttons and collapsing headers 2020-04-22 19:03:38 +02:00
Emil Ernerfeldt
e9bdadb1da Some visual tweaks 2020-04-21 16:50:56 +02:00
Emil Ernerfeldt
864eae2081 Separate clip_rect and desired_rect in Region 2020-04-21 07:42:33 +02:00
Emil Ernerfeldt
472e0b9afe Refactor Region: remember region rectangle
This will be used as a clip rectangle for generated paint commands.
2020-04-20 00:48:54 +02:00
Emil Ernerfeldt
7f85b2623b Draw separator between window title and its contents 2020-04-19 23:51:38 +02:00