]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxRA_SPECIFY_COLS/ROWS instead of old, deprecated and confusing wxRA_HORIZONTAL...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 3 Jun 2009 22:33:32 +0000 (22:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 3 Jun 2009 22:33:32 +0000 (22:33 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

12 files changed:
include/wx/gtk/radiobox.h
include/wx/gtk1/radiobox.h
include/wx/motif/radiobox.h
include/wx/msw/radiobox.h
include/wx/os2/radiobox.h
include/wx/osx/radiobox.h
samples/controls/controls.cpp
samples/widgets/radiobox.cpp
src/generic/prntdlgg.cpp
src/msw/radiobox.cpp
src/palmos/radiobox.cpp
src/univ/radiobox.cpp

index 89c1d9ee29a30afc10d024a82b15c59457dfed9a..901a09d845d614f5d8990d8b17c9b3e90d4a03c6 100644 (file)
@@ -37,7 +37,7 @@ public:
                int n = 0,
                const wxString choices[] = (const wxString *) NULL,
                int majorDim = 0,
-               long style = wxRA_HORIZONTAL,
+               long style = wxRA_SPECIFY_COLS,
                const wxValidator& val = wxDefaultValidator,
                const wxString& name = wxRadioBoxNameStr)
     {
@@ -53,7 +53,7 @@ public:
                const wxSize& size,
                const wxArrayString& choices,
                int majorDim = 0,
-               long style = wxRA_HORIZONTAL,
+               long style = wxRA_SPECIFY_COLS,
                const wxValidator& val = wxDefaultValidator,
                const wxString& name = wxRadioBoxNameStr)
     {
@@ -70,7 +70,7 @@ public:
                 int n = 0,
                 const wxString choices[] = (const wxString *) NULL,
                 int majorDim = 0,
-                long style = wxRA_HORIZONTAL,
+                long style = wxRA_SPECIFY_COLS,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
     bool Create(wxWindow *parent,
@@ -80,7 +80,7 @@ public:
                 const wxSize& size,
                 const wxArrayString& choices,
                 int majorDim = 0,
-                long style = wxRA_HORIZONTAL,
+                long style = wxRA_SPECIFY_COLS,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
 
index 88db4fbe3e1c176d6e19ccd801c943a17cf163b7..8bbd9323937f43a7cd7226691f2a43417743337f 100644 (file)
@@ -30,7 +30,7 @@ public:
                int n = 0,
                const wxString choices[] = (const wxString *) NULL,
                int majorDim = 1,
-               long style = wxRA_HORIZONTAL,
+               long style = wxRA_SPECIFY_COLS,
                const wxValidator& val = wxDefaultValidator,
                const wxString& name = wxRadioBoxNameStr)
     {
@@ -46,7 +46,7 @@ public:
                const wxSize& size,
                const wxArrayString& choices,
                int majorDim = 1,
-               long style = wxRA_HORIZONTAL,
+               long style = wxRA_SPECIFY_COLS,
                const wxValidator& val = wxDefaultValidator,
                const wxString& name = wxRadioBoxNameStr)
     {
@@ -63,7 +63,7 @@ public:
                 int n = 0,
                 const wxString choices[] = (const wxString *) NULL,
                 int majorDim = 0,
-                long style = wxRA_HORIZONTAL,
+                long style = wxRA_SPECIFY_COLS,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
     bool Create(wxWindow *parent,
@@ -73,7 +73,7 @@ public:
                 const wxSize& size,
                 const wxArrayString& choices,
                 int majorDim = 0,
-                long style = wxRA_HORIZONTAL,
+                long style = wxRA_SPECIFY_COLS,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
 
index 7217192aba686fbf016c4b8a0777415bf5de442b..9b131fcb77386b71ec7560603a048a18baee02ae 100644 (file)
@@ -30,7 +30,7 @@ public:
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                int n = 0, const wxString choices[] = NULL,
-               int majorDim = 0, long style = wxRA_HORIZONTAL,
+               int majorDim = 0, long style = wxRA_SPECIFY_COLS,
                const wxValidator& val = wxDefaultValidator,
                const wxString& name = wxRadioBoxNameStr)
     {
@@ -44,7 +44,7 @@ public:
                const wxPoint& pos,
                const wxSize& size,
                const wxArrayString& choices,
-               int majorDim = 0, long style = wxRA_HORIZONTAL,
+               int majorDim = 0, long style = wxRA_SPECIFY_COLS,
                const wxValidator& val = wxDefaultValidator,
                const wxString& name = wxRadioBoxNameStr)
     {
@@ -60,7 +60,7 @@ public:
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 int n = 0, const wxString choices[] = NULL,
-                int majorDim = 0, long style = wxRA_HORIZONTAL,
+                int majorDim = 0, long style = wxRA_SPECIFY_COLS,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
 
@@ -68,7 +68,7 @@ public:
                 const wxPoint& pos,
                 const wxSize& size,
                 const wxArrayString& choices,
-                int majorDim = 0, long style = wxRA_HORIZONTAL,
+                int majorDim = 0, long style = wxRA_SPECIFY_COLS,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
 
index 1c30012dc35cf0d4371b562a1177003153fa2a9e..01db4da7d86535a845ba29ada48224b42541a4cb 100644 (file)
@@ -32,7 +32,7 @@ public:
                const wxSize& size = wxDefaultSize,
                int n = 0, const wxString choices[] = NULL,
                int majorDim = 0,
-               long style = wxRA_HORIZONTAL,
+               long style = wxRA_SPECIFY_COLS,
                const wxValidator& val = wxDefaultValidator,
                const wxString& name = wxRadioBoxNameStr)
     {
@@ -49,7 +49,7 @@ public:
                const wxSize& size,
                const wxArrayString& choices,
                int majorDim = 0,
-               long style = wxRA_HORIZONTAL,
+               long style = wxRA_SPECIFY_COLS,
                const wxValidator& val = wxDefaultValidator,
                const wxString& name = wxRadioBoxNameStr)
     {
@@ -68,7 +68,7 @@ public:
                 const wxSize& size = wxDefaultSize,
                 int n = 0, const wxString choices[] = NULL,
                 int majorDim = 0,
-                long style = wxRA_HORIZONTAL,
+                long style = wxRA_SPECIFY_COLS,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
     bool Create(wxWindow *parent,
@@ -78,7 +78,7 @@ public:
                 const wxSize& size,
                 const wxArrayString& choices,
                 int majorDim = 0,
-                long style = wxRA_HORIZONTAL,
+                long style = wxRA_SPECIFY_COLS,
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
 
index bb01435cdb5936b66298674b835d1bfe856f01e2..26c289b6a0f81d1a375e0c9d20b9b56035c53f3c 100644 (file)
@@ -28,7 +28,7 @@ public:
                       ,int                nNum = 0
                       ,const wxString     asChoices[] = NULL
                       ,int                nMajorDim = 0
-                      ,long               lStyle = wxRA_HORIZONTAL
+                      ,long               lStyle = wxRA_SPECIFY_COLS
                       ,const wxValidator& rVal = wxDefaultValidator
                       ,const wxString&    rsName = wxRadioBoxNameStr
                      )
@@ -54,7 +54,7 @@ public:
                       ,const wxSize&        rSize
                       ,const wxArrayString& asChoices
                       ,int                  nMajorDim = 0
-                      ,long                 lStyle = wxRA_HORIZONTAL
+                      ,long                 lStyle = wxRA_SPECIFY_COLS
                       ,const wxValidator&   rVal = wxDefaultValidator
                       ,const wxString&      rsName = wxRadioBoxNameStr
                      )
@@ -82,7 +82,7 @@ public:
                 ,int                nNum = 0
                 ,const wxString     asChoices[] = NULL
                 ,int                nMajorDim = 0
-                ,long               lStyle = wxRA_HORIZONTAL
+                ,long               lStyle = wxRA_SPECIFY_COLS
                 ,const wxValidator& rVal = wxDefaultValidator
                 ,const wxString&    rsName = wxRadioBoxNameStr
                );
@@ -94,7 +94,7 @@ public:
                 ,const wxSize&        rSize
                 ,const wxArrayString& asChoices
                 ,int                  nMajorDim = 0
-                ,long                 lStyle = wxRA_HORIZONTAL
+                ,long                 lStyle = wxRA_SPECIFY_COLS
                 ,const wxValidator&   rVal = wxDefaultValidator
                 ,const wxString&      rsName = wxRadioBoxNameStr
                );
index 6890aaafb75265450e130b2b0ad9b8ae6432233b..47652ec4872889257a24c4d6ee9159f526d568d3 100644 (file)
@@ -26,7 +26,7 @@ public:
     inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
              const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
              int n = 0, const wxString choices[] = NULL,
-             int majorDim = 0, long style = wxRA_HORIZONTAL,
+             int majorDim = 0, long style = wxRA_SPECIFY_COLS,
              const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr)
         {
             Create(parent, id, title, pos, size, n, choices, majorDim, style, val, name);
@@ -34,7 +34,7 @@ public:
     inline wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title,
              const wxPoint& pos, const wxSize& size,
              const wxArrayString& choices,
-             int majorDim = 0, long style = wxRA_HORIZONTAL,
+             int majorDim = 0, long style = wxRA_SPECIFY_COLS,
              const wxValidator& val = wxDefaultValidator,
              const wxString& name = wxRadioBoxNameStr)
      {
@@ -45,12 +45,12 @@ public:
     bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
              const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
              int n = 0, const wxString choices[] = NULL,
-             int majorDim = 0, long style = wxRA_HORIZONTAL,
+             int majorDim = 0, long style = wxRA_SPECIFY_COLS,
              const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
     bool Create(wxWindow *parent, wxWindowID id, const wxString& title,
              const wxPoint& pos, const wxSize& size,
              const wxArrayString& choices,
-             int majorDim = 0, long style = wxRA_HORIZONTAL,
+             int majorDim = 0, long style = wxRA_SPECIFY_COLS,
              const wxValidator& val = wxDefaultValidator,
              const wxString& name = wxRadioBoxNameStr);
 
index 9b08f4cb6e4370936cf3d8465bab318784c6942e..565e6cca8d7d706701f377e5ea3438026cd64f7b 100644 (file)
@@ -301,7 +301,7 @@ public:
                const wxSize& size = wxDefaultSize,
                int n = 0, const wxString choices[] = NULL,
                int majorDim = 1,
-               long style = wxRA_HORIZONTAL,
+               long style = wxRA_SPECIFY_COLS,
                const wxValidator& validator = wxDefaultValidator,
                const wxString& name = wxRadioBoxNameStr)
         : wxRadioBox(parent, id, title, pos, size, n, choices, majorDim,
index d0729c6f10c85e9c7be567a14a492f0c47d29b11..ae5444383871490d8b6aa682fc7e0785a4a64ec9 100644 (file)
@@ -122,7 +122,7 @@ protected:
     // ------------
 
     // the check/radio boxes for styles
-    wxCheckBox *m_chkVert;
+    wxCheckBox *m_chkSpecifyRows;
     wxCheckBox *m_chkEnableItem;
     wxCheckBox *m_chkShowItem;
     wxRadioBox *m_radioDir;
@@ -191,7 +191,7 @@ RadioWidgetsPage::RadioWidgetsPage(WidgetsBookCtrl *book,
                   : WidgetsPage(book, imaglist, radio_xpm)
 {
     // init everything
-    m_chkVert = (wxCheckBox *)NULL;
+    m_chkSpecifyRows = (wxCheckBox *)NULL;
     m_chkEnableItem = (wxCheckBox *)NULL;
     m_chkShowItem = (wxCheckBox *)NULL;
 
@@ -213,7 +213,11 @@ void RadioWidgetsPage::CreateContent()
 
     wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
 
-    m_chkVert = CreateCheckBoxAndAddToSizer(sizerLeft, _T("&Vertical layout"));
+    m_chkSpecifyRows = CreateCheckBoxAndAddToSizer
+                       (
+                        sizerLeft,
+                        "Major specifies &rows count"
+                       );
 
     static const wxString layoutDir[] =
     {
@@ -315,7 +319,7 @@ void RadioWidgetsPage::Reset()
     m_textLabel->SetValue(_T("I'm a radiobox"));
     m_textLabelBtns->SetValue(_T("item"));
 
-    m_chkVert->SetValue(false);
+    m_chkSpecifyRows->SetValue(false);
     m_chkEnableItem->SetValue(true);
     m_chkShowItem->SetValue(true);
     m_radioDir->SetSelection(RadioDir_Default);
@@ -364,8 +368,8 @@ void RadioWidgetsPage::CreateRadio()
                                     labelBtn.c_str(), (unsigned long)n + 1);
     }
 
-    int flags = m_chkVert->GetValue() ? wxRA_VERTICAL
-                                      : wxRA_HORIZONTAL;
+    int flags = m_chkSpecifyRows->GetValue() ? wxRA_SPECIFY_ROWS
+                                             : wxRA_SPECIFY_COLS;
 
     flags |= ms_defaultFlags;
 
@@ -491,7 +495,7 @@ void RadioWidgetsPage::OnUpdateUISelection(wxUpdateUIEvent& event)
 void RadioWidgetsPage::OnUpdateUIReset(wxUpdateUIEvent& event)
 {
     // only enable it if something is not set to default
-    bool enable = m_chkVert->GetValue();
+    bool enable = m_chkSpecifyRows->GetValue();
 
     if ( !enable )
     {
index 2265f2ac24cb380331e9f87360ee0ffc9523de9c..9457bffa420e69f7446ef3261cb6b0735ef7a9de 100644 (file)
@@ -229,8 +229,7 @@ void wxGenericPrintDialog::Init(wxWindow * WXUNUSED(parent))
     {
         m_rangeRadioBox = new wxRadioBox(this, wxPRINTID_RANGE, _("Print Range"),
                                          wxDefaultPosition, wxDefaultSize,
-                                         2, choices,
-                                         1, wxRA_VERTICAL);
+                                         2, choices);
         m_rangeRadioBox->SetSelection(1);
 
         mainsizer->Add( m_rangeRadioBox, 0, wxLEFT|wxTOP|wxRIGHT, 10 );
index dcbebc20d53588e15c326afc34c69fca6ab5e5cd..800e82adf9779c16e616f0700d43bc77f27d1718 100644 (file)
@@ -74,10 +74,7 @@ wxBEGIN_FLAGS( wxRadioBoxStyle )
     wxFLAGS_MEMBER(wxHSCROLL)
 
     wxFLAGS_MEMBER(wxRA_SPECIFY_COLS)
-    wxFLAGS_MEMBER(wxRA_HORIZONTAL)
     wxFLAGS_MEMBER(wxRA_SPECIFY_ROWS)
-    wxFLAGS_MEMBER(wxRA_VERTICAL)
-
 wxEND_FLAGS( wxRadioBoxStyle )
 
 IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox, wxControl,"wx/radiobox.h")
index c14bc68425884d4a0eb723e6ec1c1fac3d1d6d1c..2b5f2ce2562fcfb8e1639234dc3a7020d59fcd2d 100644 (file)
@@ -73,10 +73,7 @@ wxBEGIN_FLAGS( wxRadioBoxStyle )
     wxFLAGS_MEMBER(wxHSCROLL)
 
     wxFLAGS_MEMBER(wxRA_SPECIFY_COLS)
-    wxFLAGS_MEMBER(wxRA_HORIZONTAL)
     wxFLAGS_MEMBER(wxRA_SPECIFY_ROWS)
-    wxFLAGS_MEMBER(wxRA_VERTICAL)
-
 wxEND_FLAGS( wxRadioBoxStyle )
 
 IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioBox, wxControl,"wx/radiobox.h")
index 6a3d3f50bd5738afaf786f9fc90815ec612efc92..cff69702fbc40408ffd9a525c94f5ea4da87d15a 100644 (file)
@@ -147,11 +147,11 @@ bool wxRadioBox::Create(wxWindow *parent,
     if ( !(style & (wxRA_LEFTTORIGHT | wxRA_TOPTOBOTTOM)) )
     {
         // horizontal radiobox use left to right layout
-        if ( style & wxRA_HORIZONTAL )
+        if ( style & wxRA_SPECIFY_COLS )
         {
             style |= wxRA_LEFTTORIGHT;
         }
-        else if ( style & wxRA_VERTICAL )
+        else if ( style & wxRA_SPECIFY_ROWS )
         {
             style |= wxRA_TOPTOBOTTOM;
         }
@@ -160,7 +160,7 @@ bool wxRadioBox::Create(wxWindow *parent,
             wxFAIL_MSG( _T("you must specify wxRA_XXX style!") );
 
             // use default
-            style = wxRA_HORIZONTAL | wxRA_LEFTTORIGHT;
+            style = wxRA_SPECIFY_COLS | wxRA_LEFTTORIGHT;
         }
     }