#if wxUSE_COLOURPICKERCTRL
-#include "wx/control.h"
#include "wx/pickerbase.h"
// event handler for our picker
void OnColourChange(wxColourPickerEvent &);
+protected:
virtual long GetPickerStyle(long style) const
{ return (style & wxCLRP_SHOW_LABEL); }
-protected:
-
// true if the next UpdateTextCtrl() call is to ignore
bool m_bIgnoreNextTextCtrlUpdate;
#include "wx/defs.h"
-
#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
-#include "wx/control.h"
#include "wx/pickerbase.h"
-#include "wx/filedlg.h"
#include "wx/filename.h"
-
+class WXDLLIMPEXP_CORE wxDialog;
class WXDLLIMPEXP_CORE wxFileDirPickerEvent;
extern WXDLLEXPORT_DATA(const wxChar) wxFilePickerWidgetLabel[];
return true;
}
- // extracts the style for our picker from wxFileDirPickerCtrlBase's style
- long GetPickerStyle(long style) const
- {
- return (style & (wxFLP_OPEN|wxFLP_SAVE|wxFLP_OVERWRITE_PROMPT|
- wxFLP_FILE_MUST_EXIST|wxFLP_CHANGE_DIR));
- }
-
bool CheckPath(const wxString &path) const
{
return HasFlag(wxFLP_SAVE) || wxFileName::FileExists(path);
wxEventType GetEventType() const
{ return wxEVT_COMMAND_FILEPICKER_CHANGED; }
+protected:
+ // extracts the style for our picker from wxFileDirPickerCtrlBase's style
+ long GetPickerStyle(long style) const
+ {
+ return (style & (wxFLP_OPEN|wxFLP_SAVE|wxFLP_OVERWRITE_PROMPT|
+ wxFLP_FILE_MUST_EXIST|wxFLP_CHANGE_DIR));
+ }
+
private:
DECLARE_DYNAMIC_CLASS(wxFilePickerCtrl)
};
return true;
}
- // extracts the style for our picker from wxFileDirPickerCtrlBase's style
- long GetPickerStyle(long style) const
- { return (style & (wxDIRP_DIR_MUST_EXIST|wxDIRP_CHANGE_DIR)); }
-
bool CheckPath(const wxString &path) const
{ if (HasFlag(wxDIRP_DIR_MUST_EXIST)) return wxFileName::DirExists(path); else return true; }
wxEventType GetEventType() const
{ return wxEVT_COMMAND_DIRPICKER_CHANGED; }
+protected:
+ // extracts the style for our picker from wxFileDirPickerCtrlBase's style
+ long GetPickerStyle(long style) const
+ { return (style & (wxDIRP_DIR_MUST_EXIST|wxDIRP_CHANGE_DIR)); }
+
private:
DECLARE_DYNAMIC_CLASS(wxDirPickerCtrl)
};
#if wxUSE_FONTPICKERCTRL
-#include "wx/control.h"
#include "wx/pickerbase.h"
virtual wxString Font2String(const wxFont &font);
virtual wxFont String2Font(const wxString &font);
+protected:
+
// extracts the style for our picker from wxFontPickerCtrl's style
long GetPickerStyle(long style) const
{ return (style & (wxFNTP_FONTDESC_AS_LABEL|wxFNTP_USEFONT_FOR_LABEL)); }
-protected:
-
// true if the next UpdateTextCtrl() call is to ignore
bool m_bIgnoreNextTextCtrlUpdate;
#define _WX_FILEDIRPICKER_H_
#include "wx/button.h"
-#include "wx/filename.h"
#include "wx/filedlg.h"
#include "wx/dirdlg.h"
return p;
}
+ wxEventType GetEventType() const
+ { return wxEVT_COMMAND_FILEPICKER_CHANGED; }
+
+protected:
void UpdateDialogPath(wxDialog *p)
{ wxStaticCast(p, wxFileDialog)->SetPath(m_path); }
void UpdatePathFromDialog(wxDialog *p)
{ m_path = wxStaticCast(p, wxFileDialog)->GetPath(); }
- wxEventType GetEventType() const
- { return wxEVT_COMMAND_FILEPICKER_CHANGED; }
private:
DECLARE_DYNAMIC_CLASS(wxGenericFileButton)
GetDialogStyle());
}
+ wxEventType GetEventType() const
+ { return wxEVT_COMMAND_DIRPICKER_CHANGED; }
+
+protected:
void UpdateDialogPath(wxDialog *p)
{ wxStaticCast(p, wxDirDialog)->SetPath(m_path); }
void UpdatePathFromDialog(wxDialog *p)
{ m_path = wxStaticCast(p, wxDirDialog)->GetPath(); }
- wxEventType GetEventType() const
- { return wxEVT_COMMAND_DIRPICKER_CHANGED; }
private:
DECLARE_DYNAMIC_CLASS(wxGenericDirButton)
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxColourPickerWidgetNameStr);
+protected:
void UpdateColour();
-
public: // used by the GTK callback only
GdkColor *GetGdkColor() const
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxFontPickerWidgetNameStr);
+protected:
void UpdateFont();
#ifndef _WX_PICKERBASE_H_BASE_
#define _WX_PICKERBASE_H_BASE_
-#include "wx/defs.h"
-#include "wx/button.h"
-#include "wx/textctrl.h"
+#include "wx/control.h"
+
+class WXDLLIMPEXP_CORE wxTextCtrl;
+
+extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
// ----------------------------------------------------------------------------
// wxPickerBase is the base class for the picker controls which support
int maxW = wxDefaultCoord, int maxH = wxDefaultCoord,
int incW = wxDefaultCoord, int incH = wxDefaultCoord );
+protected:
void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO);
#include "wx/clrpicker.h"
+#include "wx/textctrl.h"
// ============================================================================
#if wxUSE_FONTPICKERCTRL
#include "wx/fontpicker.h"
+
+#include "wx/textctrl.h"
#include "wx/fontenum.h"
#include "wx/tokenzr.h"
#include "wx/pickerbase.h"
+#include "wx/textctrl.h"
// ============================================================================
// implementation
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/window.h"
-#endif //WX_PRECOMP
+#if wxUSE_COLOURPICKERCTRL
#include "wx/clrpicker.h"
+
#include "wx/colordlg.h"
// implementation
// ============================================================================
-#if wxUSE_COLOURPICKERCTRL
-
wxColourData wxGenericColourButton::ms_data;
IMPLEMENT_DYNAMIC_CLASS(wxGenericColourButton, wxButton)
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/window.h"
-#endif //WX_PRECOMP
+#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
#include "wx/filepicker.h"
-#include "wx/filedlg.h"
// ============================================================================
// implementation
// ============================================================================
-#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
-
IMPLEMENT_DYNAMIC_CLASS(wxGenericFileButton, wxButton)
IMPLEMENT_DYNAMIC_CLASS(wxGenericDirButton, wxButton)
#pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/window.h"
-#endif //WX_PRECOMP
+#if wxUSE_FONTPICKERCTRL
#include "wx/fontpicker.h"
+
#include "wx/fontdlg.h"
// implementation
// ============================================================================
-#if wxUSE_FONTPICKERCTRL
-
wxFontData wxGenericFontButton::ms_data;
IMPLEMENT_DYNAMIC_CLASS(wxGenericFontButton, wxButton)
#include "wx/clrpicker.h"
-#include "wx/gtk/private.h"
-
-#include <gdk/gdk.h>
#include <gtk/gtk.h>
// ============================================================================
#include "wx/filepicker.h"
-#include "wx/gtk/private.h"
+#include "wx/tooltip.h"
-#if wxUSE_TOOLTIPS
- #include "wx/tooltip.h"
-#endif
-
-#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <unistd.h> // chdir
#include "wx/fontutil.h" // for wxNativeFontInfo
#include "wx/gtk/private.h"
-#include <gdk/gdk.h>
-#include <gtk/gtk.h>
-
// ============================================================================
// implementation
// ============================================================================