wxControl *GetPickerCtrl()
{ return m_picker; }
+ void SetTextCtrl(wxTextCtrl* text)
+ { m_text = text; }
+ void SetPickerCtrl(wxControl* picker)
+ { m_picker = picker; }
+
// methods that derived class must/may override
virtual void UpdatePickerFromTextCtrl() = 0;
virtual void UpdateTextCtrlFromPicker() = 0;
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#define wxCLRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
+#define wxCLRP_DEFAULT_STYLE 0
+#define wxCLRP_SHOW_LABEL 0x0008
+
+wxEventType wxEVT_COMMAND_COLOURPICKER_CHANGED;
+
+
/**
@class wxColourPickerCtrl
class wxColourPickerCtrl : public wxPickerBase
{
public:
+ wxColourPickerCtrl();
+
/**
Initializes the object and calls Create() with all the parameters.
*/
class wxColourPickerEvent : public wxCommandEvent
{
public:
+ wxColourPickerEvent();
+
/**
The constructor is not normally used by the user code.
*/
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#define wxFLP_OPEN 0x0400
+#define wxFLP_SAVE 0x0800
+#define wxFLP_OVERWRITE_PROMPT 0x1000
+#define wxFLP_FILE_MUST_EXIST 0x2000
+#define wxFLP_CHANGE_DIR 0x4000
+#define wxFLP_SMALL wxPB_SMALL
+#define wxFLP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
+#define wxFLP_DEFAULT_STYLE (wxFLP_OPEN|wxFLP_FILE_MUST_EXIST)
+
+#define wxDIRP_DIR_MUST_EXIST 0x0008
+#define wxDIRP_CHANGE_DIR 0x0010
+#define wxDIRP_SMALL wxPB_SMALL
+#define wxDIRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
+#define wxDIRP_DEFAULT_STYLE (wxDIRP_DIR_MUST_EXIST)
+
+wxEventType wxEVT_COMMAND_FILEPICKER_CHANGED;
+wxEventType wxEVT_COMMAND_DIRPICKER_CHANGED;
+
+
/**
@class wxFilePickerCtrl
class wxFilePickerCtrl : public wxPickerBase
{
public:
+ wxFilePickerCtrl();
+
/**
Initializes the object and calls Create() with
all the parameters.
class wxDirPickerCtrl : public wxPickerBase
{
public:
+ wxDirPickerCtrl();
+
/**
Initializes the object and calls Create() with
all the parameters.
class wxFileDirPickerEvent : public wxCommandEvent
{
public:
+ wxFileDirPickerEvent();
+
/**
The constructor is not normally used by the user code.
*/
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+
+#define wxFNTP_FONTDESC_AS_LABEL 0x0008
+#define wxFNTP_USEFONT_FOR_LABEL 0x0010
+#define wxFONTBTN_DEFAULT_STYLE (wxFNTP_FONTDESC_AS_LABEL | wxFNTP_USEFONT_FOR_LABEL)
+#define wxFNTP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
+#define wxFNTP_DEFAULT_STYLE (wxFNTP_FONTDESC_AS_LABEL|wxFNTP_USEFONT_FOR_LABEL)
+
+wxEventType wxEVT_COMMAND_FONTPICKER_CHANGED;
+
+
/**
@class wxFontPickerCtrl
class wxFontPickerCtrl : public wxPickerBase
{
public:
+ wxFontPickerCtrl();
+
/**
Initializes the object and calls Create() with
all the parameters.
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+
+#define wxPB_USE_TEXTCTRL 0x0002
+#define wxPB_SMALL 0x8000
+
+
/**
@class wxPickerBase
class wxPickerBase : public wxControl
{
public:
+ wxPickerBase();
+ virtual ~wxPickerBase();
+
+ // if present, intercepts wxPB_USE_TEXTCTRL style and creates the text control
+ // The 3rd argument is the initial wxString to display in the text control
+ bool CreateBase(wxWindow *parent,
+ wxWindowID id,
+ const wxString& text = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = 0,
+ const wxValidator& validator = wxDefaultValidator,
+ const wxString& name = wxButtonNameStr);
+
/**
Returns the margin (in pixel) between the picker and the text control.
This function can be used only when HasTextCtrl() returns @true.
*/
void SetTextCtrlProportion(int prop);
+
+
+ void SetTextCtrl(wxTextCtrl* text);
+ void SetPickerCtrl(wxControl* picker);
+
+ virtual void UpdatePickerFromTextCtrl() = 0;
+ virtual void UpdateTextCtrlFromPicker() = 0;
+
+protected:
+ virtual long GetTextCtrlStyle(long style) const;
+ virtual long GetPickerStyle(long style) const;
+ void PostCreation();
};