Author: greg.ercolano
Date: 2012-04-22 07:21:08 -0700 (Sun, 22 Apr 2012)
New Revision: 9380
Log:
o doc fixes
o new calc_item_height() -> const
o Added a needed ABI ifdef
Modified:
branches/branch-1.3/FL/Fl_Tree.H
branches/branch-1.3/FL/Fl_Tree_Item.H
branches/branch-1.3/FL/Fl_Tree_Prefs.H
branches/branch-1.3/src/Fl_Tree.cxx
branches/branch-1.3/src/Fl_Tree_Item.cxx
Modified: branches/branch-1.3/FL/Fl_Tree.H
===================================================================
--- branches/branch-1.3/FL/Fl_Tree.H 2012-04-22 13:55:17 UTC (rev 9379)
+++ branches/branch-1.3/FL/Fl_Tree.H 2012-04-22 14:21:08 UTC (rev 9380)
@@ -312,8 +312,10 @@
void usericonmarginleft(int val);
int labelmarginleft() const;
void labelmarginleft(int val);
+#if FLTK_ABI_VERSION >= 10302
int widgetmarginleft() const;
void widgetmarginleft(int val);
+#endif
int connectorwidth() const;
void connectorwidth(int val);
Fl_Image* usericon() const;
Modified: branches/branch-1.3/FL/Fl_Tree_Item.H
===================================================================
--- branches/branch-1.3/FL/Fl_Tree_Item.H 2012-04-22 13:55:17 UTC (rev
9379)
+++ branches/branch-1.3/FL/Fl_Tree_Item.H 2012-04-22 14:21:08 UTC (rev
9380)
@@ -86,7 +86,7 @@
int y() const { return(_xywh[1]); }
int w() const { return(_xywh[2]); }
int h() const { return(_xywh[3]); }
- int calc_item_height(const Fl_Tree_Prefs &prefs);
+ int calc_item_height(const Fl_Tree_Prefs &prefs) const;
void draw(int X, int &Y, int W, Fl_Widget *tree, Fl_Tree_Item *itemfocus,
const Fl_Tree_Prefs &prefs, int lastchild=1);
void show_self(const char *indent = "") const;
void label(const char *val);
Modified: branches/branch-1.3/FL/Fl_Tree_Prefs.H
===================================================================
--- branches/branch-1.3/FL/Fl_Tree_Prefs.H 2012-04-22 13:55:17 UTC (rev
9379)
+++ branches/branch-1.3/FL/Fl_Tree_Prefs.H 2012-04-22 14:21:08 UTC (rev
9380)
@@ -5,6 +5,8 @@
#ifndef FL_TREE_PREFS_H
#define FL_TREE_PREFS_H
+#include <FL/Fl.H> // needed for ABI version features (via Enumerations.H)
+
//////////////////////
// FL/Fl_Tree_Prefs.H
//////////////////////
@@ -70,16 +72,16 @@
};
#if FLTK_ABI_VERSION >= 10302
-/// \enum Fl_Tree_Item_Select_Mode
+/// \enum Fl_Tree_Item_Reselect_Mode
/// Defines the ways an item can be (re) selected.
///
enum Fl_Tree_Item_Reselect_Mode {
FL_TREE_SELECTABLE_ONCE=0, ///< item can only be selected once (default)
- FL_TREE_SELECTABLE_ALWAYS, ///< needed for new RESELECT feature
+ FL_TREE_SELECTABLE_ALWAYS, ///< enables FL_TREE_REASON_RESELECTED events
for callbacks
};
/// \enum Fl_Tree_Item_Draw_Mode
-/// Tree display style for items.
+/// Controls how item's labels and widget()s are drawn in the tree.
///
enum Fl_Tree_Item_Draw_Mode {
FL_TREE_ITEM_DRAW_WIDGET_ONLY=0, ///< if widget() defined, draw it in
place of the label (default)
Modified: branches/branch-1.3/src/Fl_Tree.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Tree.cxx 2012-04-22 13:55:17 UTC (rev 9379)
+++ branches/branch-1.3/src/Fl_Tree.cxx 2012-04-22 14:21:08 UTC (rev 9380)
@@ -1857,12 +1857,14 @@
/// case FL_TREE_REASON_OPENED: ..item was opened..
/// case FL_TREE_REASON_CLOSED: ..item was closed..
/// case FL_TREE_REASON_SELECTED: ..item was selected..
-/// case FL_TREE_REASON_RELECTED: ..item was reselected
(double-clicked, etc)..
+/// case FL_TREE_REASON_RESELECTED: ..item was reselected
(double-clicked, etc)..
/// case FL_TREE_REASON_DESELECTED: ..item was deselected..
/// }
/// }
/// \endcode
///
+/// \see item_reselect_mode() -- enables FL_TREE_REASON_RESELECTED events
+///
Fl_Tree_Reason Fl_Tree::callback_reason() const {
return(_callback_reason);
}
Modified: branches/branch-1.3/src/Fl_Tree_Item.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Tree_Item.cxx 2012-04-22 13:55:17 UTC (rev
9379)
+++ branches/branch-1.3/src/Fl_Tree_Item.cxx 2012-04-22 14:21:08 UTC (rev
9380)
@@ -558,7 +558,7 @@
}
/// Return the item's 'visible' height
-int Fl_Tree_Item::calc_item_height(const Fl_Tree_Prefs &prefs) {
+int Fl_Tree_Item::calc_item_height(const Fl_Tree_Prefs &prefs) const {
if ( ! _visible ) return(0);
int H = 0;
if ( _label ) {
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit