diff options
| author | Matthias Melcher <git@matthiasm.com> | 2021-12-17 18:34:51 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2021-12-17 18:38:26 +0100 |
| commit | 3626e82057e2cb581afbd5495a87c00db7d7c9b8 (patch) | |
| tree | 74c7cb984c9816542895fdd35c026cd29e908256 /fluid/widget_browser.h | |
| parent | ba3041be6c86c05aef1f505a10df8c8b05e7b8de (diff) | |
GitHub #326: browser scrolling should be much improved
Code now convinces browser to rebuild when the tree changes by UI.
When widgets are move, the current widget should always be visible.
It's the responsibility of the UI callback to update the browser.
Diffstat (limited to 'fluid/widget_browser.h')
| -rw-r--r-- | fluid/widget_browser.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fluid/widget_browser.h b/fluid/widget_browser.h index dfcd4db35..f0e68f364 100644 --- a/fluid/widget_browser.h +++ b/fluid/widget_browser.h @@ -41,6 +41,8 @@ class Widget_Browser : public Fl_Browser_ } Fl_Type* pushedtitle; + int saved_h_scroll_; + int saved_v_scroll_; // required routines for Fl_Browser_ subclass: void *item_first() const ; @@ -57,7 +59,10 @@ public: Widget_Browser(int,int,int,int,const char * =NULL); int handle(int); void callback(); - void deleting(Fl_Type *inType) { Fl_Browser_::deleting((void*)inType); } + void save_scroll_position(); + void restore_scroll_position(); + void rebuild(); + void display(Fl_Type *); }; #endif // _FLUID_WIDGET_BROWSER_H |
