summaryrefslogtreecommitdiff
path: root/FL/Fl_Tree_Prefs.H
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2011-01-30 20:22:06 +0000
committerGreg Ercolano <erco@seriss.com>2011-01-30 20:22:06 +0000
commit2c5006563f893723f0f224d7b3115e5fd03272ca (patch)
treeb23c1eb923d31727f60470607e08ecfef4e476cc /FL/Fl_Tree_Prefs.H
parent31db787583e1b862d1e26acc542a294a9c31fd0e (diff)
Fl_Tree API breaking changes (we haven't released 1.3.0 yet..):
Fl_Tree::labelsize() -> item_labelsize() -- TO AVOID COLLISION WITH Fl_Widget::labelsize()! Fl_Tree::labelfont() -> item_labelfont() -- TO AVOID COLLISION WITH Fl_Widget::labelfont()! Fl_Tree_Prefs (internal) changes: Fl_Tree_Prefs::fgcolor() -> labelfgcolor() -- for consistency with above Fl_Tree_Prefs::bgcolor() -> labelbgcolor() -- for consistency with above Fl_Tree_Prefs::selectcolor() removed -- uses Fl_Widget::selection_color() instead Fl_Tree_Prefs::inactivecolor() removed -- was unused; inactive color procedurally calculated Other Fl_Tree mods: o Fixed bug with select_all(item) and deselect_all(item) (they were not limiting themselves to children of specified item) o Fixed bug with item not drawing in its /own/ bgcolor when item selected o Fl_Tree uses the Fl_Widget::selection_color() o All methods that deal with 'font types' changed int -> Fl_Font o All methods that deal with 'font sizes' changed int -> Fl_Fontsize o Added needed methods to Fl_Tree for accessing colors: item_labelfgcolor() -- access default fg color used for new items item_labelbgcolor() -- access default bg color used for new items tree_connectorcolor() -- access the connector line color o Small doxygen comment adjustments and general clarifications o test/tree demo modified to include testing of new label color methods, cleanup git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8340 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Tree_Prefs.H')
-rw-r--r--FL/Fl_Tree_Prefs.H62
1 files changed, 22 insertions, 40 deletions
diff --git a/FL/Fl_Tree_Prefs.H b/FL/Fl_Tree_Prefs.H
index 59773c3b8..81868263c 100644
--- a/FL/Fl_Tree_Prefs.H
+++ b/FL/Fl_Tree_Prefs.H
@@ -83,8 +83,8 @@ enum Fl_Tree_Select {
/// instead of trying to accessing tree's preferences settings directly.
///
class FL_EXPORT Fl_Tree_Prefs {
- int _labelfont; // label's font face
- int _labelsize; // label's font size
+ Fl_Font _labelfont; // label's font face
+ Fl_Fontsize _labelsize; // label's font size
int _margintop; // --
int _marginleft; // |- tree's margins
//int _marginright; // |
@@ -95,10 +95,8 @@ class FL_EXPORT Fl_Tree_Prefs {
int _connectorwidth; // connector width (right of open/close icon)
int _linespacing; // vertical space between lines
// Colors
- Fl_Color _fgcolor; // label's foreground color
- Fl_Color _bgcolor; // background color
- Fl_Color _selectcolor; // selection color
- Fl_Color _inactivecolor; // inactive color
+ Fl_Color _labelfgcolor; // label's foreground color
+ Fl_Color _labelbgcolor; // background color
Fl_Color _connectorcolor; // connector dotted line color
Fl_Tree_Connector _connectorstyle; // connector line style
Fl_Image *_openimage; // the 'open' icon [+]
@@ -116,19 +114,19 @@ public:
// Labels
////////////////////////////
/// Return the label's font.
- inline int labelfont() const {
+ inline Fl_Font labelfont() const {
return(_labelfont);
}
/// Set the label's font to \p val.
- inline void labelfont(int val) {
+ inline void labelfont(Fl_Font val) {
_labelfont = val;
}
/// Return the label's size in pixels.
- inline int labelsize() const {
+ inline Fl_Fontsize labelsize() const {
return(_labelsize);
}
/// Set the label's size in pixels to \p val.
- inline void labelsize(int val) {
+ inline void labelsize(Fl_Fontsize val) {
_labelsize = val;
}
@@ -204,50 +202,34 @@ public:
// Colors and Styles
////////////////////////////
/// Get the default label foreground color
- inline Fl_Color fgcolor() const {
- return(_fgcolor);
+ inline Fl_Color labelfgcolor() const {
+ return(_labelfgcolor);
}
/// Set the default label foreground color
- inline void fgcolor(Fl_Color val) {
- _fgcolor = val;
+ inline void labelfgcolor(Fl_Color val) {
+ _labelfgcolor = val;
}
/// Get the default label background color
- inline Fl_Color bgcolor() const {
- return(_bgcolor);
+ inline Fl_Color labelbgcolor() const {
+ return(_labelbgcolor);
}
/// Set the default label background color
- inline void bgcolor(Fl_Color val) {
- _bgcolor = val;
+ inline void labelbgcolor(Fl_Color val) {
+ _labelbgcolor = val;
}
- /// Get the default selection color
- inline Fl_Color selectcolor() const {
- return(_selectcolor);
- }
- /// Set the default selection color
- inline void selectcolor(Fl_Color val) {
- _selectcolor = val;
- }
- /// Get the default inactive color
- inline Fl_Color inactivecolor() const {
- return(_inactivecolor);
- }
- /// Set the default inactive color
- inline void inactivecolor(Fl_Color val) {
- _inactivecolor = val;
- }
- /// Get the connector color; the color used for tree connection lines
+ /// Get the connector color used for tree connection lines.
inline Fl_Color connectorcolor() const {
return(_connectorcolor);
}
- /// Set the connector color; the color used for tree connection lines
+ /// Set the connector color used for tree connection lines.
inline void connectorcolor(Fl_Color val) {
_connectorcolor = val;
}
- /// Get the connector style
+ /// Get the connector style.
inline Fl_Tree_Connector connectorstyle() const {
return(_connectorstyle);
}
- /// Set the connector style
+ /// Set the connector style.
inline void connectorstyle(Fl_Tree_Connector val) {
_connectorstyle = val;
}
@@ -255,11 +237,11 @@ public:
inline void connectorstyle(int val) {
_connectorstyle = Fl_Tree_Connector(val);
}
- /// Get the tree connection line's width
+ /// Get the tree connection line's width.
inline int connectorwidth() const {
return(_connectorwidth);
}
- /// Set the tree connection line's width
+ /// Set the tree connection line's width.
inline void connectorwidth(int val) {
_connectorwidth = val;
}