Add missing interface items for Phoenix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-04-12 05:33:29 +00:00
parent c328f9d374
commit 575821fad8
5 changed files with 84 additions and 0 deletions

View File

@@ -106,6 +106,11 @@ public: // public API
wxControl *GetPickerCtrl() wxControl *GetPickerCtrl()
{ return m_picker; } { return m_picker; }
void SetTextCtrl(wxTextCtrl* text)
{ m_text = text; }
void SetPickerCtrl(wxControl* picker)
{ m_picker = picker; }
// methods that derived class must/may override // methods that derived class must/may override
virtual void UpdatePickerFromTextCtrl() = 0; virtual void UpdatePickerFromTextCtrl() = 0;
virtual void UpdateTextCtrlFromPicker() = 0; virtual void UpdateTextCtrlFromPicker() = 0;

View File

@@ -6,6 +6,13 @@
// Licence: wxWindows licence // 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
@@ -46,6 +53,8 @@
class wxColourPickerCtrl : public wxPickerBase class wxColourPickerCtrl : public wxPickerBase
{ {
public: public:
wxColourPickerCtrl();
/** /**
Initializes the object and calls Create() with all the parameters. Initializes the object and calls Create() with all the parameters.
*/ */
@@ -122,6 +131,8 @@ public:
class wxColourPickerEvent : public wxCommandEvent class wxColourPickerEvent : public wxCommandEvent
{ {
public: public:
wxColourPickerEvent();
/** /**
The constructor is not normally used by the user code. The constructor is not normally used by the user code.
*/ */

View File

@@ -6,6 +6,25 @@
// Licence: wxWindows licence // 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
@@ -60,6 +79,8 @@
class wxFilePickerCtrl : public wxPickerBase class wxFilePickerCtrl : public wxPickerBase
{ {
public: public:
wxFilePickerCtrl();
/** /**
Initializes the object and calls Create() with Initializes the object and calls Create() with
all the parameters. all the parameters.
@@ -201,6 +222,8 @@ public:
class wxDirPickerCtrl : public wxPickerBase class wxDirPickerCtrl : public wxPickerBase
{ {
public: public:
wxDirPickerCtrl();
/** /**
Initializes the object and calls Create() with Initializes the object and calls Create() with
all the parameters. all the parameters.
@@ -311,6 +334,8 @@ public:
class wxFileDirPickerEvent : public wxCommandEvent class wxFileDirPickerEvent : public wxCommandEvent
{ {
public: public:
wxFileDirPickerEvent();
/** /**
The constructor is not normally used by the user code. The constructor is not normally used by the user code.
*/ */

View File

@@ -6,6 +6,16 @@
// Licence: wxWindows licence // 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
@@ -49,6 +59,8 @@
class wxFontPickerCtrl : public wxPickerBase class wxFontPickerCtrl : public wxPickerBase
{ {
public: public:
wxFontPickerCtrl();
/** /**
Initializes the object and calls Create() with Initializes the object and calls Create() with
all the parameters. all the parameters.

View File

@@ -6,6 +6,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#define wxPB_USE_TEXTCTRL 0x0002
#define wxPB_SMALL 0x8000
/** /**
@class wxPickerBase @class wxPickerBase
@@ -33,6 +38,20 @@
class wxPickerBase : public wxControl class wxPickerBase : public wxControl
{ {
public: 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. Returns the margin (in pixel) between the picker and the text control.
@@ -138,5 +157,17 @@ public:
This function can be used only when HasTextCtrl() returns @true. This function can be used only when HasTextCtrl() returns @true.
*/ */
void SetTextCtrlProportion(int prop); 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();
}; };