X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/acf2ac3757581e8d272d2bdb427a4fc0bbed4cf7..a9102b3671a45d116d781b0c8e90d2e9a84fbdcb:/include/wx/sizer.h diff --git a/include/wx/sizer.h b/include/wx/sizer.h index 11915e11b6..78581ba30c 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -69,6 +69,8 @@ public: wxSizerFlags& Expand() { return Align(wxEXPAND); } wxSizerFlags& Centre() { return Align(wxCENTRE); } wxSizerFlags& Center() { return Centre(); } + wxSizerFlags& Left() { return Align(wxALIGN_LEFT); } + wxSizerFlags& Right() { return Align(wxALIGN_RIGHT); } wxSizerFlags& Border(int direction, int borderInPixels) @@ -621,7 +623,8 @@ class WXDLLEXPORT wxStaticBox; class WXDLLEXPORT wxStaticBoxSizer: public wxBoxSizer { public: - wxStaticBoxSizer( wxStaticBox *box, int orient ); + wxStaticBoxSizer(wxStaticBox *box, int orient); + wxStaticBoxSizer(int orient, wxWindow *win, const wxString& label = wxEmptyString); void RecalcSizes(); wxSize CalcMin(); @@ -642,22 +645,25 @@ private: #endif // wxUSE_STATBOX +#if wxUSE_BUTTON + class WXDLLEXPORT wxStdDialogButtonSizer: public wxBoxSizer { public: - wxStdDialogButtonSizer(); // Constructor just creates a new wxBoxSizer, not much else. // Box sizer orientation is automatically determined here: // vertical for PDAs, horizontal for everything else? + wxStdDialogButtonSizer(); - void AddButton(wxButton *button); // Checks button ID against system IDs and sets one of the pointers below - // to this button. - // Does not do any sizer-related things here. + // to this button. Does not do any sizer-related things here. + void AddButton(wxButton *button); - // Question: what to do for non-supported button IDs? assert? + // Use these if no standard ID can/should be used + void SetAffirmativeButton( wxButton *button ); + void SetNegativeButton( wxButton *button ); + void SetCancelButton( wxButton *button ); - void Finalise(); // All platform-specific code here, checks which buttons exist and add // them to the sizer accordingly. // Note - one potential hack on Mac we could use here, @@ -665,7 +671,8 @@ public: // is set to _("Save") and m_buttonNegative is set to _("Don't Save") // I wouldn't add any other hacks like that into here, // but this one I can see being useful. - + void Realize(); + wxButton *GetAffirmativeButton() const { return m_buttonAffirmative; } wxButton *GetApplyButton() const { return m_buttonApply; } wxButton *GetNegativeButton() const { return m_buttonNegative; } @@ -673,18 +680,19 @@ public: wxButton *GetHelpButton() const { return m_buttonHelp; } protected: - wxButton *m_buttonAffirmative; - // wxID_OK, wxID_YES, wxID_SAVE go here + wxButton *m_buttonAffirmative; // wxID_OK, wxID_YES, wxID_SAVE go here wxButton *m_buttonApply; - wxButton *m_buttonNegative; // wxID_NO + wxButton *m_buttonNegative; // wxID_NO wxButton *m_buttonCancel; wxButton *m_buttonHelp; - + private: DECLARE_CLASS(wxStdDialogButtonSizer) - //DECLARE_NO_COPY_CLASS(wxStdDialogButtonSizer) + DECLARE_NO_COPY_CLASS(wxStdDialogButtonSizer) }; +#endif // wxUSE_BUTTON + #if WXWIN_COMPATIBILITY_2_4 // NB: wxBookCtrlSizer and wxNotebookSizer are deprecated, they // don't do anything. wxBookCtrlBase::DoGetBestSize does the job now.