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
This commit is contained in:
Greg Ercolano
2012-05-29 13:34:39 +00:00
parent 3bcc267052
commit df5c8cc76f
4 changed files with 81 additions and 46 deletions
+8 -8
View File
@@ -336,7 +336,7 @@ Function {} {open
} {
Fl_Window window {
label tree open
xywh {5 21 1045 580} type Double visible
xywh {5 44 1045 580} type Double visible
} {
Fl_Group tree {
label Tree
@@ -1586,6 +1586,13 @@ tree->redraw();}
tooltip {Sets the default label bg color for newly created items. When set, this overrides the default behavior of using Fl_Tree::color().} xywh {975 477 16 16} box DOWN_BOX labelsize 12 align 7
code0 {item_labelbgcolor_button->color(tree->item_labelbgcolor());}
}
Fl_Button x_item_labelbgcolor_button {
label X
callback {tree->item_labelbgcolor(0xffffffff);
UpdateColorChips();
tree->redraw();}
tooltip {Make the bgcolor 'transparent' (0xffffffff)} xywh {995 477 16 16} labelsize 10 align 16
}
Fl_Button testsuggs_button {
label {Test Suggestions}
callback {const char *helpmsg =
@@ -1650,13 +1657,6 @@ helpwin->resizable(helpdisp);
helpwin->show();} selected
tooltip {Suggestions on how to do tests} xywh {935 554 95 16} labelsize 9
}
Fl_Button x_item_labelbgcolor_button {
label X
callback {tree->item_labelbgcolor(0xffffffff);
UpdateColorChips();
tree->redraw();}
tooltip {Make the bgcolor 'transparent' (0xffffffff)} xywh {995 477 16 16} labelsize 10 align 16
}
}
Fl_Box resizer_box {
xywh {0 263 15 14}