wxStdButtonSizer Finalise --> Realize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,7 +9,7 @@ When there aren't interface guidelines defined for a particular platform or tool
|
|||||||
to the Windows implementation.
|
to the Windows implementation.
|
||||||
|
|
||||||
To use this class, first add buttons to the sizer by calling AddButton (or SetAffirmativeButton, SetNegativeButton,
|
To use this class, first add buttons to the sizer by calling AddButton (or SetAffirmativeButton, SetNegativeButton,
|
||||||
or SetCancelButton) and then call Finalise in order to create the actual button layout used. Other than these special
|
or SetCancelButton) and then call Realize in order to create the actual button layout used. Other than these special
|
||||||
operations, this sizer works like any other sizer.
|
operations, this sizer works like any other sizer.
|
||||||
|
|
||||||
If you add a button with wxID\_SAVE, on Mac OS X the button will be renamed to "Save" and
|
If you add a button with wxID\_SAVE, on Mac OS X the button will be renamed to "Save" and
|
||||||
@@ -52,9 +52,9 @@ Adds a button to the wxStdDialogButtonSizer. The button must have one of the fol
|
|||||||
\item wxID\_CONTEXT\_HELP
|
\item wxID\_CONTEXT\_HELP
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
\membersection{wxStdDialogButtonSizer::Finalise}\label{wxstddialogbuttonsizerfinalise}
|
\membersection{wxStdDialogButtonSizer::Realize}\label{wxstddialogbuttonsizerrealize}
|
||||||
|
|
||||||
\func{void}{Finalise}{\void}
|
\func{void}{Realize}{\void}
|
||||||
|
|
||||||
Rearranges the buttons and applies proper spacing between buttons to make them match the platform or toolkit's interface guidelines.
|
Rearranges the buttons and applies proper spacing between buttons to make them match the platform or toolkit's interface guidelines.
|
||||||
|
|
||||||
|
@@ -669,7 +669,7 @@ public:
|
|||||||
// is set to _("Save") and m_buttonNegative is set to _("Don't Save")
|
// is set to _("Save") and m_buttonNegative is set to _("Don't Save")
|
||||||
// I wouldn't add any other hacks like that into here,
|
// I wouldn't add any other hacks like that into here,
|
||||||
// but this one I can see being useful.
|
// but this one I can see being useful.
|
||||||
void Finalise();
|
void Realize();
|
||||||
|
|
||||||
wxButton *GetAffirmativeButton() const { return m_buttonAffirmative; }
|
wxButton *GetAffirmativeButton() const { return m_buttonAffirmative; }
|
||||||
wxButton *GetApplyButton() const { return m_buttonApply; }
|
wxButton *GetApplyButton() const { return m_buttonApply; }
|
||||||
|
@@ -595,7 +595,7 @@ MyDialog::MyDialog(wxWindow *parent, const wxDateTime& dt, int dtpStyle)
|
|||||||
wxStdDialogButtonSizer *sizerBtns = new wxStdDialogButtonSizer;
|
wxStdDialogButtonSizer *sizerBtns = new wxStdDialogButtonSizer;
|
||||||
sizerBtns->AddButton(new wxButton(this, wxID_OK));
|
sizerBtns->AddButton(new wxButton(this, wxID_OK));
|
||||||
sizerBtns->AddButton(new wxButton(this, wxID_CANCEL));
|
sizerBtns->AddButton(new wxButton(this, wxID_CANCEL));
|
||||||
sizerBtns->Finalise();
|
sizerBtns->Realize();
|
||||||
|
|
||||||
wxSizer *sizerText = new wxBoxSizer(wxHORIZONTAL);
|
wxSizer *sizerText = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sizerText->Add(new wxStaticText(this, wxID_ANY, _T("Date in ISO format: ")),
|
sizerText->Add(new wxStaticText(this, wxID_ANY, _T("Date in ISO format: ")),
|
||||||
|
@@ -205,7 +205,7 @@ wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
|
|||||||
sizer->AddButton(help);
|
sizer->AddButton(help);
|
||||||
}
|
}
|
||||||
|
|
||||||
sizer->Finalise();
|
sizer->Realize();
|
||||||
|
|
||||||
if (flags & wxNO_DEFAULT)
|
if (flags & wxNO_DEFAULT)
|
||||||
{
|
{
|
||||||
|
@@ -1728,7 +1728,7 @@ void wxStdDialogButtonSizer::SetCancelButton( wxButton *button )
|
|||||||
m_buttonCancel = button;
|
m_buttonCancel = button;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStdDialogButtonSizer::Finalise()
|
void wxStdDialogButtonSizer::Realize()
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
Add(0, 0, 0, wxLEFT, 6);
|
Add(0, 0, 0, wxLEFT, 6);
|
||||||
|
@@ -193,7 +193,7 @@ class TestValidateDialog(wx.Dialog):
|
|||||||
b.SetDefault()
|
b.SetDefault()
|
||||||
buttons.AddButton(b)
|
buttons.AddButton(b)
|
||||||
buttons.AddButton(wx.Button(self, wx.ID_CANCEL, "Cancel"))
|
buttons.AddButton(wx.Button(self, wx.ID_CANCEL, "Cancel"))
|
||||||
buttons.Finalise()
|
buttons.Realize()
|
||||||
|
|
||||||
border = wx.BoxSizer(wx.VERTICAL)
|
border = wx.BoxSizer(wx.VERTICAL)
|
||||||
border.Add(fgs, 1, wx.GROW|wx.ALL, 25)
|
border.Add(fgs, 1, wx.GROW|wx.ALL, 25)
|
||||||
|
@@ -1270,7 +1270,7 @@ DocStr(wxStdDialogButtonSizer,
|
|||||||
"A special sizer that knows how to order and position standard buttons
|
"A special sizer that knows how to order and position standard buttons
|
||||||
in order to conform to the current platform's standards. You simply
|
in order to conform to the current platform's standards. You simply
|
||||||
need to add each `wx.Button` to the sizer, and be sure to create the
|
need to add each `wx.Button` to the sizer, and be sure to create the
|
||||||
buttons using the standard ID's. Then call `Finalize` and the sizer
|
buttons using the standard ID's. Then call `Realize` and the sizer
|
||||||
will take care of the rest.
|
will take care of the rest.
|
||||||
", "");
|
", "");
|
||||||
|
|
||||||
@@ -1287,7 +1287,7 @@ public:
|
|||||||
method in the base class.", "");
|
method in the base class.", "");
|
||||||
|
|
||||||
DocDeclStr(
|
DocDeclStr(
|
||||||
void , Finalise(),
|
void , Realize(),
|
||||||
"This funciton needs to be called after all the buttons have been added
|
"This funciton needs to be called after all the buttons have been added
|
||||||
to the sizer. It will reorder them and position them in a platform
|
to the sizer. It will reorder them and position them in a platform
|
||||||
specifc manner.", "");
|
specifc manner.", "");
|
||||||
|
@@ -77,7 +77,7 @@ class MultipleChoiceDialog(wx.Dialog):
|
|||||||
btnsizer = wx.StdDialogButtonSizer()
|
btnsizer = wx.StdDialogButtonSizer()
|
||||||
btnsizer.AddButton(ok)
|
btnsizer.AddButton(ok)
|
||||||
btnsizer.AddButton(cancel)
|
btnsizer.AddButton(cancel)
|
||||||
btnsizer.Finalise()
|
btnsizer.Realize()
|
||||||
|
|
||||||
dlgsizer.Add(btnsizer, 0, wx.ALL | wx.ALIGN_RIGHT, 4)
|
dlgsizer.Add(btnsizer, 0, wx.ALL | wx.ALIGN_RIGHT, 4)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user