diff options
| author | Greg Ercolano <erco@seriss.com> | 2012-05-29 13:34:39 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2012-05-29 13:34:39 +0000 |
| commit | df5c8cc76f19c7366f0c4b35cb9470e6eea27a90 (patch) | |
| tree | 8e4edd6d7b38b5f317c51009f75a8f451a29f6e3 /FL | |
| parent | 3bcc267052e4b6bacf21db54285df552fec45240 (diff) | |
Fixed some keynav problems:
No focus, hitting down would skip first item
Enter key to toggle was falling through to other widgets
Removing an item that has focus clears item focus (to prevent wild ptr)
Added new methods:
Fl_Tree::get_item_focus()
Fl_Tree::first_visible()
Fl_Tree::last_visible()
Fl_Tree::is_vscroll_visible()
Simplified + fixed Fl_Tree_Item::next_displayed()
Fixed Fl_Tree_Item::visible_r(), was skipping item if it was a closed branch.
tree demo: fixed button ordering for "Test Suggestions" button
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9555 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Tree.H | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/FL/Fl_Tree.H b/FL/Fl_Tree.H index dfa75de90..3ce4eeb77 100644 --- a/FL/Fl_Tree.H +++ b/FL/Fl_Tree.H @@ -366,9 +366,11 @@ public: const Fl_Tree_Item *find_clicked() const; Fl_Tree_Item *item_clicked(); Fl_Tree_Item *first(); + Fl_Tree_Item *first_visible(); Fl_Tree_Item *next(Fl_Tree_Item *item=0); Fl_Tree_Item *prev(Fl_Tree_Item *item=0); Fl_Tree_Item *last(); + Fl_Tree_Item *last_visible(); Fl_Tree_Item *first_selected_item(); Fl_Tree_Item *next_selected_item(Fl_Tree_Item *item=0); @@ -397,6 +399,7 @@ public: int select_only(Fl_Tree_Item *selitem, int docallback=1); int select_all(Fl_Tree_Item *item=0, int docallback=1); void set_item_focus(Fl_Tree_Item *item); + Fl_Tree_Item *get_item_focus() const; int is_selected(Fl_Tree_Item *item) const; int is_selected(const char *path); @@ -473,6 +476,7 @@ public: int is_scrollbar(Fl_Widget *w); int scrollbar_size() const; void scrollbar_size(int size); + int is_vscroll_visible() const; /////////////////////// // callback related |
