X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8228b8932abaedadbf9568bb3a1eef3ae25fb2a3..85284ca4b226d9a1ab6bed26c5eaa480543649d5:/src/palmos/radiobox.cpp diff --git a/src/palmos/radiobox.cpp b/src/palmos/radiobox.cpp index 03b015e38c..2b5f2ce256 100644 --- a/src/palmos/radiobox.cpp +++ b/src/palmos/radiobox.cpp @@ -26,20 +26,20 @@ #if wxUSE_RADIOBOX +#include "wx/radiobox.h" + #ifndef WX_PRECOMP #include "wx/bitmap.h" #include "wx/brush.h" - #include "wx/radiobox.h" #include "wx/settings.h" #include "wx/log.h" + #include "wx/radiobut.h" #endif #if wxUSE_TOOLTIPS #include "wx/tooltip.h" #endif // wxUSE_TOOLTIPS -#include "wx/radiobut.h" - // TODO: wxCONSTRUCTOR #if 0 // wxUSE_EXTENDED_RTTI WX_DEFINE_FLAGS( wxRadioBoxStyle ) @@ -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") @@ -112,7 +109,7 @@ void wxRadioBox::Init() m_size = wxSize(0,0); } -size_t wxRadioBox::GetCount() const +unsigned int wxRadioBox::GetCount() const { return m_radios.GetCount(); } @@ -160,9 +157,9 @@ bool wxRadioBox::Create(wxWindow *parent, return false; int i = 0; - for ( int j = 0; j < minor; j++ ) + for ( unsigned int j = 0; j < minor; j++ ) { - for ( int k = 0; k < GetMajorDim(); k++ ) + for ( unsigned int k = 0; k < GetMajorDim(); k++ ) { if(i<n) { @@ -238,15 +235,15 @@ void wxRadioBox::DoMoveWindow(int x, int y, int width, int height) const bool use_cols = HasFlag(wxRA_SPECIFY_COLS); - const size_t n = GetCount(); - size_t minor = n / GetMajorDim(); + const unsigned int n = GetCount(); + unsigned int minor = n / GetMajorDim(); if(n % GetMajorDim() > 0) minor++; - size_t i = 0; - for ( int j = 0; j < minor; j++ ) + unsigned int i = 0; + for ( unsigned int j = 0; j < minor; j++ ) { - for ( int k = 0; k < GetMajorDim(); k++ ) + for ( unsigned int k = 0; k < GetMajorDim(); k++ ) { if(i<n) { @@ -275,7 +272,7 @@ wxPoint wxRadioBox::GetClientAreaOrigin() const return GetPosition(); } -void wxRadioBox::SetString(int item, const wxString& label) +void wxRadioBox::SetString(unsigned int item, const wxString& label) { wxRadioButton *btn = GetRadioButton(item); if(btn) @@ -293,7 +290,7 @@ int wxRadioBox::GetSelection() const } // Find string for position -wxString wxRadioBox::GetString(int item) const +wxString wxRadioBox::GetString(unsigned int item) const { wxRadioButton *btn = GetRadioButton(item); if(btn) @@ -327,13 +324,13 @@ void wxRadioBox::SetFocus() // Enable all subcontrols bool wxRadioBox::Enable(bool enable) { - for(size_t i=0; i<GetCount(); i++) - Enable((int)i, enable); + for(unsigned int i=0; i<GetCount(); i++) + Enable(i, enable); return true; } // Enable a specific button -bool wxRadioBox::Enable(int item, bool enable) +bool wxRadioBox::Enable(unsigned int item, bool enable) { wxRadioButton *btn = GetRadioButton(item); if(btn) @@ -343,13 +340,13 @@ bool wxRadioBox::Enable(int item, bool enable) bool wxRadioBox::Show(bool show) { - for(size_t i=0; i<GetCount(); i++) - Show((int)i, show); + for(unsigned int i=0; i<GetCount(); i++) + Show(i, show); return true; } // Show a specific button -bool wxRadioBox::Show(int item, bool show) +bool wxRadioBox::Show(unsigned int item, bool show) { wxRadioButton *btn = GetRadioButton(item); if(btn)