]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/colordlg.h
Prevent seg fault for older GTK+
[wxWidgets.git] / include / wx / colordlg.h
index 75e6b83f7d853b260de8f918209ff5e26307f2ac..8fb0ff6af241fa48908285c70ee0e5d5fcf1cf87 100644 (file)
@@ -1,26 +1,41 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wx/colrdlgg.h
+// Purpose:     wxColourDialog
+// Author:      Vadim Zeitiln
+// Modified by:
+// Created:     01/02/97
+// RCS-ID:      $Id$
+// Copyright:   (c) wxWidgets team
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
 #ifndef _WX_COLORDLG_H_BASE_
 #define _WX_COLORDLG_H_BASE_
 
 #ifndef _WX_COLORDLG_H_BASE_
 #define _WX_COLORDLG_H_BASE_
 
-#if defined(__WXMSW__)
-#include "wx/msw/colordlg.h"
-#elif defined(__WXMOTIF__)
-#include "wx/generic/colrdlgg.h"
-#elif defined(__WXGTK__)
-#include "wx/generic/colrdlgg.h"
-#elif defined(__WXQT__)
-#include "wx/generic/colrdlgg.h"
-#elif defined(__WXMAC__)
-#include "wx/generic/colrdlgg.h"
-#elif defined(__WXPM__)
-#include "wx/os2/colordlg.h"
-#elif defined(__WXSTUBS__)
-#include "wx/generic/colrdlgg.h"
-#endif
+#include "wx/defs.h"
+
+#if wxUSE_COLOURDLG
 
 
-#if !defined(__WXMSW__)
-#define wxColourDialog wxGenericColourDialog
-#define sm_classwxColourDialog sm_classwxGenericColourDialog
+#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
+    #include "wx/msw/colordlg.h"
+#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__)
+    #include "wx/mac/colordlg.h"
+#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
+    #include "wx/gtk/colordlg.h"
+#elif defined(__WXPALMOS__)
+    #include "wx/palmos/colordlg.h"
+#else
+    #include "wx/generic/colrdlgg.h"
+
+    #define wxColourDialog wxGenericColourDialog
 #endif
 
 #endif
 
+// get the colour from user and return it
+wxColour WXDLLEXPORT
+wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL,
+                    const wxColour& colInit = wxNullColour, const wxString& caption = wxEmptyString);
+
+#endif // wxUSE_COLOURDLG
+
 #endif
     // _WX_COLORDLG_H_BASE_
 #endif
     // _WX_COLORDLG_H_BASE_