FLTK logo

[master] b709b2a - Remove FL_CFG_WIN_COCOA preprocessor variable from Fl_Tree_Prefs.cxx

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] b709b2a - Remove FL_CFG_WIN_COCOA preprocessor variable from Fl_Tree_Prefs.cxx "ManoloFLTK" Feb 16, 2021  
 
commit b709b2a2d3451ec48d454a895a459dadf7c184e5
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Tue Feb 16 15:48:50 2021 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Tue Feb 16 15:50:15 2021 +0100

    Remove FL_CFG_WIN_COCOA preprocessor variable from Fl_Tree_Prefs.cxx

 src/Fl_Tree_Prefs.cxx                          | 59 +-------------------------
 src/drivers/Darwin/Fl_Darwin_System_Driver.cxx | 50 ++++++++++++++++++++++
 2 files changed, 51 insertions(+), 58 deletions(-)

diff --git src/Fl_Tree_Prefs.cxx src/Fl_Tree_Prefs.cxx
index a429235..4bfe484 100644
--- src/Fl_Tree_Prefs.cxx
+++ src/Fl_Tree_Prefs.cxx
@@ -18,74 +18,17 @@
 //     https://www.fltk.org/bugs.php
 //
 
-#include "config_lib.h"
+#include <config.h>
 
 #include "Fl_System_Driver.H"
 #include <FL/Fl.H>
 #include <FL/Fl_Pixmap.H>
 #include <FL/Fl_Tree_Prefs.H>
 
-#ifdef FL_CFG_WIN_COCOA
-#include "drivers/Darwin/Fl_Darwin_System_Driver.H"
-#endif
-
 // INTERNAL: BUILT IN OPEN/STOW XPMS
 //    These can be replaced via prefs.openicon()/closeicon()
 //
 
-#ifdef FL_CFG_WIN_COCOA
-
-const char * const Fl_Darwin_System_Driver::tree_open_xpm_darwin[] = {
-  "11 11 2 1",
-  ".  c None",
-  "@  c #000000",
-  "...@.......",
-  "...@@......",
-  "...@@@.....",
-  "...@@@@....",
-  "...@@@@@...",
-  "...@@@@@@..",
-  "...@@@@@...",
-  "...@@@@....",
-  "...@@@.....",
-  "...@@......",
-  "...@......."
-};
-
-const char * const Fl_Darwin_System_Driver::tree_close_xpm_darwin[] = {
-  "11 11 2 1",
-  ".  c None",
-  "@  c #000000",
-  "...........",
-  "...........",
-  "...........",
-  "@@@@@@@@@@@",
-  ".@@@@@@@@@.",
-  "..@@@@@@@..",
-  "...@@@@@...",
-  "....@@@....",
-  ".....@.....",
-  "...........",
-  "..........."
-};
-
-Fl_Pixmap *Fl_Darwin_System_Driver::tree_openpixmap() {
-  static Fl_Pixmap *pixmap = new Fl_Pixmap(tree_open_xpm_darwin);
-  return pixmap;
-}
-
-Fl_Pixmap *Fl_Darwin_System_Driver::tree_closepixmap() {
-  static Fl_Pixmap *pixmap = new Fl_Pixmap(tree_close_xpm_darwin);
-  return pixmap;
-}
-
-int Fl_Darwin_System_Driver::tree_connector_style() {
-  return FL_TREE_CONNECTOR_NONE;
-}
-
-#endif // FL_CFG_WIN_COCOA
-
-
 /**
  \cond DriverDev
  \addtogroup DriverDeveloper
diff --git src/drivers/Darwin/Fl_Darwin_System_Driver.cxx src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
index e9c45d1..f567b34 100644
--- src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
+++ src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
@@ -22,6 +22,8 @@
 #include <FL/filename.H>
 #include <FL/Fl_File_Icon.H>
 #include <FL/Fl_Preferences.H>
+#include <FL/Fl_Tree_Prefs.H>
+#include <FL/Fl_Pixmap.H>
 #include "../Cocoa/Fl_MacOS_Sys_Menu_Bar_Driver.H"
 #include <string.h>
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
@@ -372,3 +374,51 @@ Fl_Sys_Menu_Bar_Driver *Fl_Darwin_System_Driver::sys_menu_bar_driver()
 {
   return Fl_MacOS_Sys_Menu_Bar_Driver::driver();
 }
+
+const char * const Fl_Darwin_System_Driver::tree_open_xpm_darwin[] = {
+  "11 11 2 1",
+  ".  c None",
+  "@  c #000000",
+  "...@.......",
+  "...@@......",
+  "...@@@.....",
+  "...@@@@....",
+  "...@@@@@...",
+  "...@@@@@@..",
+  "...@@@@@...",
+  "...@@@@....",
+  "...@@@.....",
+  "...@@......",
+  "...@......."
+};
+
+const char * const Fl_Darwin_System_Driver::tree_close_xpm_darwin[] = {
+  "11 11 2 1",
+  ".  c None",
+  "@  c #000000",
+  "...........",
+  "...........",
+  "...........",
+  "@@@@@@@@@@@",
+  ".@@@@@@@@@.",
+  "..@@@@@@@..",
+  "...@@@@@...",
+  "....@@@....",
+  ".....@.....",
+  "...........",
+  "..........."
+};
+
+Fl_Pixmap *Fl_Darwin_System_Driver::tree_openpixmap() {
+  static Fl_Pixmap *pixmap = new Fl_Pixmap(tree_open_xpm_darwin);
+  return pixmap;
+}
+
+Fl_Pixmap *Fl_Darwin_System_Driver::tree_closepixmap() {
+  static Fl_Pixmap *pixmap = new Fl_Pixmap(tree_close_xpm_darwin);
+  return pixmap;
+}
+
+int Fl_Darwin_System_Driver::tree_connector_style() {
+  return FL_TREE_CONNECTOR_NONE;
+}
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.