]> git.saurik.com Git - wxWidgets.git/commitdiff
few adaptations to cope with new control.h file
authorUnknown (JL) <nobody@localhost>
Fri, 19 Nov 1999 00:51:56 +0000 (00:51 +0000)
committerUnknown (JL) <nobody@localhost>
Fri, 19 Nov 1999 00:51:56 +0000 (00:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/mac/radiobox.h
src/mac/carbon/radiobox.cpp
src/mac/radiobox.cpp

index 23536ff245fd2ccc7d43031f3e62d190907cb1b3..73119114f04980c1b30b077212c70696bf9ac492 100644 (file)
 WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
 
 // List box item
 WXDLLEXPORT_DATA(extern const char*) wxRadioBoxNameStr;
 
 // List box item
-class WXDLLEXPORT wxBitmap ;
+class  wxBitmap ;
 
 
-class WXDLLEXPORT wxRadioButton ;
+class  wxRadioButton ;
 
 
-class WXDLLEXPORT wxRadioBox: public wxControl
+class  wxRadioBox: public wxControl
 {
        DECLARE_DYNAMIC_CLASS(wxRadioBox)
 public:
 {
        DECLARE_DYNAMIC_CLASS(wxRadioBox)
 public:
@@ -47,7 +47,7 @@ public:
              const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
 
 // Specific functions (in wxWindows2 reference)
              const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr);
 
 // Specific functions (in wxWindows2 reference)
-       void Enable(bool enable);
+       bool Enable(bool enable);
        void Enable(int item, bool enable);
        int FindString(const wxString& s) const;
        wxString GetLabel() const;
        void Enable(int item, bool enable);
        int FindString(const wxString& s) const;
        wxString GetLabel() const;
index d00911c8fd4347471c50f6d0b953ec8db95c24f7..492c93133afb9bd2161adb2700fca191d66fd8c4 100644 (file)
@@ -123,18 +123,20 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
 //-------------------------------------------------------------------------------------
 // Enables or disables the entire radiobox
 
 //-------------------------------------------------------------------------------------
 // Enables or disables the entire radiobox
 
-void wxRadioBox::Enable(bool enable)
+bool wxRadioBox::Enable(bool enable)
 {
        int i;
     wxRadioButton *current;
     
 {
        int i;
     wxRadioButton *current;
     
-    wxControl::Enable(enable);
+    if (!wxControl::Enable(enable))
+       return (false);
 
     current=m_radioButtonCycle;
        for (i=0;i<m_noItems;i++) {
        current->Enable(enable);
        current=current->NextInCycle();
        }
 
     current=m_radioButtonCycle;
        for (i=0;i<m_noItems;i++) {
        current->Enable(enable);
        current=current->NextInCycle();
        }
+    return (true);
 }
 
 //-------------------------------------------------------------------------------------
 }
 
 //-------------------------------------------------------------------------------------
@@ -155,7 +157,6 @@ void wxRadioBox::Enable(int item, bool enable)
        i++;
        current=current->NextInCycle();
        }
        i++;
        current=current->NextInCycle();
        }
-    return current->Enable(enable);
 }
 
 
 }
 
 
@@ -464,7 +465,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
        totHeight = GetNumVer() * (maxHeight + charHeight/2) + charHeight*3/2;
        totWidth  = GetNumHor() * (maxWidth + charWidth) + charWidth;
 
        totHeight = GetNumVer() * (maxHeight + charHeight/2) + charHeight*3/2;
        totWidth  = GetNumHor() * (maxWidth + charWidth) + charWidth;
 
-       wxControl::DoSetSize(x_offset,y_offset,totWidth,totHeight);
+       wxControl::DoSetSize(x_offset,y_offset,totWidth,totHeight,wxSIZE_AUTO);
 
 // arrange radiobuttons
 
 
 // arrange radiobuttons
 
index d00911c8fd4347471c50f6d0b953ec8db95c24f7..492c93133afb9bd2161adb2700fca191d66fd8c4 100644 (file)
@@ -123,18 +123,20 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
 //-------------------------------------------------------------------------------------
 // Enables or disables the entire radiobox
 
 //-------------------------------------------------------------------------------------
 // Enables or disables the entire radiobox
 
-void wxRadioBox::Enable(bool enable)
+bool wxRadioBox::Enable(bool enable)
 {
        int i;
     wxRadioButton *current;
     
 {
        int i;
     wxRadioButton *current;
     
-    wxControl::Enable(enable);
+    if (!wxControl::Enable(enable))
+       return (false);
 
     current=m_radioButtonCycle;
        for (i=0;i<m_noItems;i++) {
        current->Enable(enable);
        current=current->NextInCycle();
        }
 
     current=m_radioButtonCycle;
        for (i=0;i<m_noItems;i++) {
        current->Enable(enable);
        current=current->NextInCycle();
        }
+    return (true);
 }
 
 //-------------------------------------------------------------------------------------
 }
 
 //-------------------------------------------------------------------------------------
@@ -155,7 +157,6 @@ void wxRadioBox::Enable(int item, bool enable)
        i++;
        current=current->NextInCycle();
        }
        i++;
        current=current->NextInCycle();
        }
-    return current->Enable(enable);
 }
 
 
 }
 
 
@@ -464,7 +465,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
        totHeight = GetNumVer() * (maxHeight + charHeight/2) + charHeight*3/2;
        totWidth  = GetNumHor() * (maxWidth + charWidth) + charWidth;
 
        totHeight = GetNumVer() * (maxHeight + charHeight/2) + charHeight*3/2;
        totWidth  = GetNumHor() * (maxWidth + charWidth) + charWidth;
 
-       wxControl::DoSetSize(x_offset,y_offset,totWidth,totHeight);
+       wxControl::DoSetSize(x_offset,y_offset,totWidth,totHeight,wxSIZE_AUTO);
 
 // arrange radiobuttons
 
 
 // arrange radiobuttons