summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-04-14 20:58:20 +0000
committerManolo Gouy <Manolo>2016-04-14 20:58:20 +0000
commit03e87bb2704155bd45b1eb9f8207ff660bea16d1 (patch)
tree1f75d40dd48893945712751aea4ac8fb7f826a17 /src
parent0e0ad95b22f5500c921a4a93ee26eff725a9455b (diff)
Complete rewriting of Fl_Tree_Prefs.cxx under the driver model.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11606 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Tree_Prefs.cxx14
-rw-r--r--src/drivers/Darwin/Fl_Darwin_System_Driver.H1
2 files changed, 10 insertions, 5 deletions
diff --git a/src/Fl_Tree_Prefs.cxx b/src/Fl_Tree_Prefs.cxx
index 08f124e1c..060d46d4b 100644
--- a/src/Fl_Tree_Prefs.cxx
+++ b/src/Fl_Tree_Prefs.cxx
@@ -81,6 +81,10 @@ Fl_Pixmap *Fl_Darwin_System_Driver::tree_closepixmap() {
return pixmap;
}
+int Fl_Darwin_System_Driver::tree_connector_style() {
+ return FL_TREE_CONNECTOR_NONE;
+}
+
#endif // FL_CFG_WIN_COCOA
const char * const Fl_System_Driver::tree_open_xpm[] = {
@@ -130,6 +134,10 @@ Fl_Pixmap *Fl_System_Driver::tree_closepixmap() {
return pixmap;
}
+int Fl_System_Driver::tree_connector_style() {
+ return FL_TREE_CONNECTOR_DOTTED;
+}
+
/// Sets the default icon to be used as the 'open' icon
/// when items are add()ed to the tree.
@@ -181,11 +189,7 @@ Fl_Tree_Prefs::Fl_Tree_Prefs() {
_labelfgcolor = FL_BLACK;
_labelbgcolor = 0xffffffff; // we use this as 'transparent'
_connectorcolor = Fl_Color(43);
-#ifdef __APPLE__ // PORTME: Fl_Screen_Driver - platform look and feel
- _connectorstyle = FL_TREE_CONNECTOR_NONE;
-#else /* __APPLE__ */
- _connectorstyle = FL_TREE_CONNECTOR_DOTTED;
-#endif /* __APPLE__ */
+ _connectorstyle = (Fl_Tree_Connector)Fl::system_driver()->tree_connector_style();
_openimage = Fl::system_driver()->tree_openpixmap();
_closeimage = Fl::system_driver()->tree_closepixmap();
_userimage = 0;
diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.H b/src/drivers/Darwin/Fl_Darwin_System_Driver.H
index f2434b9a7..7a7651898 100644
--- a/src/drivers/Darwin/Fl_Darwin_System_Driver.H
+++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.H
@@ -67,6 +67,7 @@ public:
static const char * const tree_open_xpm_darwin[]; // used by tree_openpixmap()
virtual Fl_Pixmap *tree_closepixmap();
static const char * const tree_close_xpm_darwin[]; // used by tree_closepixmap()
+ virtual int tree_connector_style();
};
#endif // FL_DARWIN_SYSTEM_DRIVER_H