From d8d07a796ff8e372e1f851d65d96f060dd05e0e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 18 May 2006 15:36:44 +0000 Subject: [PATCH] wxUniv port mentioned instead of native, wxButton ports listed, minor placement fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/widgets/button.cpp | 13 ++++++++++++- samples/widgets/datepick.cpp | 14 +++++++------- samples/widgets/widgets.cpp | 4 ++++ samples/widgets/widgets.h | 4 ++++ 4 files changed, 27 insertions(+), 8 deletions(-) diff --git a/samples/widgets/button.cpp b/samples/widgets/button.cpp index 1056653e38..58c55fa2d5 100644 --- a/samples/widgets/button.cpp +++ b/samples/widgets/button.cpp @@ -155,7 +155,18 @@ END_EVENT_TABLE() // ============================================================================ IMPLEMENT_WIDGETS_PAGE(ButtonWidgetsPage, _T("Button"), - (int)wxPlatform(GENERIC_CTRLS).If(wxMSW,NATIVE_CTRLS) +#if defined(__WXUNIVERSAL__) + UNIVERSAL_CTRLS +#elif defined(__WXMSW__) || \ + defined(__WXMOTIF__) || \ + defined(__WXGTK__) || \ + defined(__WXMAC__) || \ + defined(__WXPM__) || \ + defined(__WXPALMOS__) + NATIVE_CTRLS +#else + GENERIC_CTRLS +#endif ); ButtonWidgetsPage::ButtonWidgetsPage(WidgetsBookCtrl *book, diff --git a/samples/widgets/datepick.cpp b/samples/widgets/datepick.cpp index 89e9173e2e..b9aab44eeb 100644 --- a/samples/widgets/datepick.cpp +++ b/samples/widgets/datepick.cpp @@ -137,17 +137,17 @@ DatePickerWidgetsPage::DatePickerWidgetsPage(WidgetsBookCtrl *book, wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL); - sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Day"), DatePickerPage_Day , &m_day ), - wxALL | wxALIGN_LEFT , 5 ); + sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Day:"), DatePickerPage_Day , &m_day ), + 0, wxALL | wxALIGN_RIGHT , 5 ); - sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Month"), DatePickerPage_Month , &m_month ), - wxALL | wxALIGN_LEFT , 5 ); + sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Month:"), DatePickerPage_Month , &m_month ), + 0, wxALL | wxALIGN_RIGHT , 5 ); - sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Year"), DatePickerPage_Year , &m_year ), - wxALL | wxALIGN_LEFT , 5 ); + sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Year:"), DatePickerPage_Year , &m_year ), + 0, wxALL | wxALIGN_RIGHT , 5 ); sizerLeft->Add( new wxButton( this, wxID_ANY, wxT("&Set date") ), - wxALL , 5 ); + 0, wxALL , 5 ); // right pane wxSizer *sizerRight = new wxBoxSizer(wxHORIZONTAL); diff --git a/samples/widgets/widgets.cpp b/samples/widgets/widgets.cpp index c4c1039a11..1a371f0bd9 100644 --- a/samples/widgets/widgets.cpp +++ b/samples/widgets/widgets.cpp @@ -85,7 +85,11 @@ enum }; const wxChar *WidgetsCategories[MAX_PAGES] = { +#if defined(__WXUNIVERSAL__) + wxT("Universal"), +#else wxT("Native"), +#endif wxT("Generic"), wxT("Pickers"), wxT("Comboboxes"), diff --git a/samples/widgets/widgets.h b/samples/widgets/widgets.h index cb07dde406..0c216bcd7f 100644 --- a/samples/widgets/widgets.h +++ b/samples/widgets/widgets.h @@ -47,7 +47,10 @@ class WidgetsPageInfo; // INTRODUCING NEW PAGES DON'T FORGET TO ADD ENTRIES TO 'WidgetsCategories' enum { + // On wxUniversal-based build (wxX11, wxMGL, wxMSWUniv, wxGTKUniv, etc.) + // 'native' means 'made with wxUniv port renderer' NATIVE_PAGE = 0, + UNIVERSAL_PAGE = NATIVE_PAGE, GENERIC_PAGE, PICKER_PAGE, COMBO_PAGE, @@ -61,6 +64,7 @@ enum enum { NATIVE_CTRLS = 1 << NATIVE_PAGE, + UNIVERSAL_CTRLS = NATIVE_CTRLS, GENERIC_CTRLS = 1 << GENERIC_PAGE, PICKER_CTRLS = 1 << PICKER_PAGE, COMBO_CTRLS = 1 << COMBO_PAGE, -- 2.47.2