- cancel = new wxButton( this, wxID_CANCEL, _("Cancel"),wxDefaultPosition,wxDefaultSize,wxCLIP_SIBLINGS );
- inner_rest->Add( cancel, 0, wxLEFT|wxRIGHT, margin );
+ wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
+ return sizer;
+ }
+#endif // __POCKETPC__
+
+#if wxUSE_BUTTON
+
+ wxSizer* buttonSizer = CreateStdDialogButtonSizer( flags );
+
+ // Mac Human Interface Guidelines recommend not to use static lines as grouping elements
+#if wxUSE_STATLINE && !defined(__WXMAC__)
+ if(!separated)
+ return buttonSizer;
+
+ wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
+ topsizer->Add( new wxStaticLine( this, wxID_ANY ), 0, wxEXPAND | wxBOTTOM, distance );
+ topsizer->Add( buttonSizer, 0, wxEXPAND );
+ return topsizer;
+
+#else // !wxUSE_STATLINE
+
+ wxUnusedVar(separated);
+ wxUnusedVar(distance);
+ return buttonSizer;
+
+#endif // wxUSE_STATLINE/!wxUSE_STATLINE
+
+#else // !wxUSE_BUTTON
+
+ wxUnusedVar(separated);
+ wxUnusedVar(distance);
+ wxBoxSizer* sizer = new wxBoxSizer(wxHORIZONTAL);
+ return sizer;
+
+#endif // wxUSE_BUTTON/!wxUSE_BUTTON
+
+#endif // __SMARTPHONE__/!__SMARTPHONE__
+}
+
+#if wxUSE_BUTTON
+
+wxStdDialogButtonSizer *wxDialogBase::CreateStdDialogButtonSizer( long flags )
+{
+ wxStdDialogButtonSizer *sizer = new wxStdDialogButtonSizer();
+
+ wxButton *ok = NULL;
+ wxButton *yes = NULL;
+ wxButton *no = NULL;
+
+ if (flags & wxOK){
+ ok = new wxButton(this, wxID_OK);
+ sizer->AddButton(ok);
+ }
+
+ if (flags & wxCANCEL){
+ wxButton *cancel = new wxButton(this, wxID_CANCEL);
+ sizer->AddButton(cancel);
+ }
+
+ if (flags & wxYES){
+ yes = new wxButton(this, wxID_YES);
+ sizer->AddButton(yes);
+ }
+
+ if (flags & wxNO){
+ no = new wxButton(this, wxID_NO);
+ sizer->AddButton(no);
+ }
+
+ if (flags & wxHELP){
+ wxButton *help = new wxButton(this, wxID_HELP);
+ sizer->AddButton(help);