#include </home/zeitlin/src/wx/github/interface/wx/pickerbase.h>
Base abstract class for all pickers which support an auxiliary text control.
This class handles all positioning and sizing of the text control like a an horizontal wxBoxSizer would do, with the text control on the left of the picker button.
The proportion (see wxSizer documentation for more info about proportion values) of the picker control defaults to 1 when there isn't a text control associated (see wxPB_USE_TEXTCTRL
style) and to 0 otherwise.
This class supports the following styles:
Public Member Functions | |
wxPickerBase () | |
virtual | ~wxPickerBase () |
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) |
int | GetInternalMargin () const |
Returns the margin (in pixel) between the picker and the text control. | |
int | GetPickerCtrlProportion () const |
Returns the proportion value of the picker. | |
wxTextCtrl * | GetTextCtrl () |
Returns a pointer to the text control handled by this window or NULL if the wxPB_USE_TEXTCTRL style was not specified when this control was created. | |
wxControl * | GetPickerCtrl () |
Returns the native implementation of the real picker control. | |
int | GetTextCtrlProportion () const |
Returns the proportion value of the text control. | |
bool | HasTextCtrl () const |
Returns true if this window has a valid text control (i.e. | |
bool | IsPickerCtrlGrowable () const |
Returns true if the picker control is growable. | |
bool | IsTextCtrlGrowable () const |
Returns true if the text control is growable. | |
void | SetInternalMargin (int margin) |
Sets the margin (in pixel) between the picker and the text control. | |
void | SetPickerCtrlGrowable (bool grow=true) |
Sets the picker control as growable when grow is true. | |
void | SetPickerCtrlProportion (int prop) |
Sets the proportion value of the picker. | |
void | SetTextCtrlGrowable (bool grow=true) |
Sets the text control as growable when grow is true. | |
void | SetTextCtrlProportion (int prop) |
Sets the proportion value of the text control. | |
void | SetTextCtrl (wxTextCtrl *text) |
void | SetPickerCtrl (wxControl *picker) |
virtual void | UpdatePickerFromTextCtrl ()=0 |
virtual void | UpdateTextCtrlFromPicker ()=0 |
Protected Member Functions | |
virtual long | GetTextCtrlStyle (long style) const |
virtual long | GetPickerStyle (long style) const |
void | PostCreation () |
wxPickerBase::wxPickerBase | ( | ) |
virtual wxPickerBase::~wxPickerBase | ( | ) | [virtual] |
bool wxPickerBase::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 |
||
) |
int wxPickerBase::GetInternalMargin | ( | ) | const |
Returns the margin (in pixel) between the picker and the text control.
This function can be used only when HasTextCtrl() returns true.
wxControl* wxPickerBase::GetPickerCtrl | ( | ) |
Returns the native implementation of the real picker control.
#ifdef __WXMSW__ // wxMSW is one of the platforms where the generic implementation // of wxFilePickerCtrl is used... wxButton *pButt = wx_static_cast(wxButton*, myFilePickerCtrl->GetPickerCtrl()); if (pButt) pButt->SetLabel("Custom browse string"); #endif
int wxPickerBase::GetPickerCtrlProportion | ( | ) | const |
Returns the proportion value of the picker.
virtual long wxPickerBase::GetPickerStyle | ( | long | style | ) | const [protected, virtual] |
wxTextCtrl* wxPickerBase::GetTextCtrl | ( | ) |
Returns a pointer to the text control handled by this window or NULL if the wxPB_USE_TEXTCTRL
style was not specified when this control was created.
int wxPickerBase::GetTextCtrlProportion | ( | ) | const |
Returns the proportion value of the text control.
This function can be used only when HasTextCtrl() returns true.
virtual long wxPickerBase::GetTextCtrlStyle | ( | long | style | ) | const [protected, virtual] |
bool wxPickerBase::HasTextCtrl | ( | ) | const |
Returns true if this window has a valid text control (i.e.
if the wxPB_USE_TEXTCTRL
style was given when creating this control).
bool wxPickerBase::IsPickerCtrlGrowable | ( | ) | const |
Returns true if the picker control is growable.
bool wxPickerBase::IsTextCtrlGrowable | ( | ) | const |
Returns true if the text control is growable.
This function can be used only when HasTextCtrl() returns true.
void wxPickerBase::PostCreation | ( | ) | [protected] |
void wxPickerBase::SetInternalMargin | ( | int | margin | ) |
Sets the margin (in pixel) between the picker and the text control.
This function can be used only when HasTextCtrl() returns true.
void wxPickerBase::SetPickerCtrl | ( | wxControl * | picker | ) |
void wxPickerBase::SetPickerCtrlGrowable | ( | bool | grow = true | ) |
Sets the picker control as growable when grow
is true.
void wxPickerBase::SetPickerCtrlProportion | ( | int | prop | ) |
Sets the proportion value of the picker.
Look at the detailed description of wxPickerBase for more info.
void wxPickerBase::SetTextCtrl | ( | wxTextCtrl * | text | ) |
void wxPickerBase::SetTextCtrlGrowable | ( | bool | grow = true | ) |
Sets the text control as growable when grow
is true.
This function can be used only when HasTextCtrl() returns true.
void wxPickerBase::SetTextCtrlProportion | ( | int | prop | ) |
Sets the proportion value of the text control.
Look at the detailed description of wxPickerBase for more info.
This function can be used only when HasTextCtrl() returns true.
virtual void wxPickerBase::UpdatePickerFromTextCtrl | ( | ) | [pure virtual] |
virtual void wxPickerBase::UpdateTextCtrlFromPicker | ( | ) | [pure virtual] |