]> git.saurik.com Git - wxWidgets.git/commitdiff
wxUniv port mentioned instead of native, wxButton ports listed, minor placement fixes.
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 18 May 2006 15:36:44 +0000 (15:36 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 18 May 2006 15:36:44 +0000 (15:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/widgets/button.cpp
samples/widgets/datepick.cpp
samples/widgets/widgets.cpp
samples/widgets/widgets.h

index 1056653e389a70b9e7e81886ba62ac7efa78c06b..58c55fa2d59443d0c63bb81c2dae7b1599dd063d 100644 (file)
@@ -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,
index 89e9173e2ef83c8d6dd37d91e9f15689bbdd0605..b9aab44eebaf67953b144f93b5a8fc94fd5b3e79 100644 (file)
@@ -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);
index c4c1039a11670f15960becdb148ca4df3d922963..1a371f0bd9f5ba4dbee78c7cea91f72130f5d32a 100644 (file)
@@ -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"),
index cb07dde40667863a3fb4bc9dca7d7c7ae1d33de6..0c216bcd7fb1c0034151fb5f45da4cd610ffd225 100644 (file)
@@ -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,