]> git.saurik.com Git - wxWidgets.git/commitdiff
replaced all int/size_t indices in wxControlWithItems API with unsigned int (committi...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 23 Mar 2006 22:05:23 +0000 (22:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 23 Mar 2006 22:05:23 +0000 (22:05 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

112 files changed:
docs/changes.txt
docs/latex/wx/checklst.tex
docs/latex/wx/choice.tex
docs/latex/wx/ctrlsub.tex
docs/latex/wx/radiobox.tex
docs/latex/wx/treectrl.tex
include/wx/checklst.h
include/wx/cocoa/checklst.h
include/wx/cocoa/choice.h
include/wx/cocoa/combobox.h
include/wx/cocoa/listbox.h
include/wx/cocoa/radiobox.h
include/wx/ctrlsub.h
include/wx/gtk/checklst.h
include/wx/gtk/choice.h
include/wx/gtk/combobox.h
include/wx/gtk/listbox.h
include/wx/gtk/radiobox.h
include/wx/gtk1/checklst.h
include/wx/gtk1/choice.h
include/wx/gtk1/combobox.h
include/wx/gtk1/listbox.h
include/wx/gtk1/radiobox.h
include/wx/listbox.h
include/wx/mac/carbon/checklst.h
include/wx/mac/carbon/choice.h
include/wx/mac/carbon/combobox.h
include/wx/mac/carbon/listbox.h
include/wx/mac/carbon/radiobox.h
include/wx/mac/classic/checklst.h
include/wx/mac/classic/choice.h
include/wx/mac/classic/combobox.h
include/wx/mac/classic/listbox.h
include/wx/mac/classic/radiobox.h
include/wx/motif/checklst.h
include/wx/motif/choice.h
include/wx/motif/combobox.h
include/wx/motif/listbox.h
include/wx/motif/radiobox.h
include/wx/msw/checklst.h
include/wx/msw/choice.h
include/wx/msw/listbox.h
include/wx/msw/radiobox.h
include/wx/msw/wince/checklst.h
include/wx/msw/wince/choicece.h
include/wx/os2/checklst.h
include/wx/os2/choice.h
include/wx/os2/listbox.h
include/wx/os2/radiobox.h
include/wx/palmos/checklst.h
include/wx/palmos/choice.h
include/wx/palmos/listbox.h
include/wx/palmos/radiobox.h
include/wx/radiobox.h
include/wx/univ/checklst.h
include/wx/univ/combobox.h
include/wx/univ/listbox.h
include/wx/univ/radiobox.h
samples/widgets/combobox.cpp
src/cocoa/checklst.mm
src/cocoa/choice.mm
src/cocoa/combobox.mm
src/cocoa/listbox.mm
src/cocoa/radiobox.mm
src/common/ctrlsub.cpp
src/common/lboxcmn.cpp
src/common/radiocmn.cpp
src/gtk/checklst.cpp
src/gtk/choice.cpp
src/gtk/combobox.cpp
src/gtk/listbox.cpp
src/gtk/radiobox.cpp
src/gtk1/checklst.cpp
src/gtk1/choice.cpp
src/gtk1/combobox.cpp
src/gtk1/listbox.cpp
src/gtk1/radiobox.cpp
src/mac/carbon/checklst.cpp
src/mac/carbon/choice.cpp
src/mac/carbon/combobox.cpp
src/mac/carbon/combobxc.cpp
src/mac/carbon/listbox.cpp
src/mac/carbon/radiobox.cpp
src/mac/classic/checklst.cpp
src/mac/classic/choice.cpp
src/mac/classic/combobox.cpp
src/mac/classic/listbox.cpp
src/mac/classic/radiobox.cpp
src/motif/checklst.cpp
src/motif/choice.cpp
src/motif/combobox.cpp
src/motif/combobox_native.cpp
src/motif/listbox.cpp
src/motif/radiobox.cpp
src/msw/checklst.cpp
src/msw/choice.cpp
src/msw/listbox.cpp
src/msw/radiobox.cpp
src/msw/wince/checklst.cpp
src/msw/wince/choicece.cpp
src/os2/checklst.cpp
src/os2/choice.cpp
src/os2/listbox.cpp
src/os2/radiobox.cpp
src/palmos/checklst.cpp
src/palmos/choice.cpp
src/palmos/listbox.cpp
src/palmos/radiobox.cpp
src/univ/checklst.cpp
src/univ/combobox.cpp
src/univ/listbox.cpp
src/univ/radiobox.cpp

index d7d6427cde4dffee81e54598467fc69c0d8e262f..d8fcd463b4b2fb33d8a7c7b010f31db4fa750dae 100644 (file)
@@ -45,11 +45,11 @@ All:
 - Added support for wxLongLong in wx stream classes (Mark Junker).
 - wxSOCKET_REUSEADDR can be used with wxSocketClient.
 - Overloaded Connect() and SetLocal() methods for binding to local address/port.
-- All GetCount() methods now return size_t and not int.
-- Albanian translation added (Besnik Bleta).
-- Assert messages now show the function in which assert failed.
-- wxApp::OnAssertFailure() should now be used instead the old wxApp::OnAssert().
-- Fixed several bugs in wxDateTime::ParseDate().
+- All GetCount() methods now return unsigned int and not int
+- Albanian translation added (Besnik Bleta)
+- Assert messages now show the function in which assert failed
+- wxApp::OnAssertFailure() should now be used instead the old wxApp::OnAssert()
+- Fixed several bugs in wxDateTime::ParseDate()
 
 All (GUI):
 
index 4fceff32ec33353d5314bab7b28644182f55c747..8098222dc6e9700a9c926cd360f4f764072815aa 100644 (file)
@@ -1,3 +1,14 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name:        checklst.tex
+%% Purpose:     wxCheckListBox documentation
+%% Author:      wxWidgets Team
+%% Modified by:
+%% Created:
+%% RCS-ID:      $Id$
+%% Copyright:   (c) wxWidgets Team
+%% License:     wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 \section{\class{wxCheckListBox}}\label{wxchecklistbox}
 
 A checklistbox is like a listbox, but allows items to be checked or unchecked.
@@ -107,12 +118,10 @@ wxEVT\_COMMAND\_CHECKLISTBOX\_TOGGLE being emitted.
 
 \membersection{wxCheckListBox::IsChecked}\label{wxchecklistboxischecked}
 
-\constfunc{bool}{IsChecked}{\param{int}{ item}}
+\constfunc{bool}{IsChecked}{\param{unsigned int}{ item}}
 
 Returns true if the given item is checked, false otherwise.
 
 \wxheading{Parameters}
 
 \docparam{item}{Index of item whose check status is to be returned.}
-
-
index f810c735a0801ebadb591fec524443fa05f4729f..43ec4d0ae64d8521fc356e8992df817e51edb3ea 100644 (file)
@@ -1,3 +1,14 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Name:        treectrl.tex
+%% Purpose:     wxChoice documentation
+%% Author:      wxWidgets Team
+%% Modified by:
+%% Created:
+%% RCS-ID:      $Id$
+%% Copyright:   (c) wxWidgets Team
+%% License:     wxWindows license
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 \section{\class{wxChoice}}\label{wxchoice}
 
 A choice item is used to select one of a list of strings. Unlike a
@@ -113,17 +124,6 @@ Destructor, destroying the choice item.
 Creates the choice for two-step construction. See \helpref{wxChoice::wxChoice}{wxchoicector}.
 
 
-\membersection{wxChoice::Delete}\label{wxchoicedelete}
-
-\func{void}{Delete}{\param{int }{n}}
-
-Deletes the item with the given index from the control.
-
-\wxheading{Parameters}
-
-\docparam{n}{The item to delete.}
-
-
 \membersection{wxChoice::GetColumns}\label{wxchoicegetcolumns}
 
 \constfunc{int}{GetColumns}{\void}
@@ -147,7 +147,7 @@ That is, while the dropdown list is shown, it returns the currently selected
 item in it. When it is not shown, its result is the same as for the other
 function.
 
-\newsince{2.6.2} (before this version 
+\newsince{2.6.2} (before this version
 \helpref{GetSelection}{wxcontrolwithitemsgetselection} itself behaved like
 this).
 
@@ -166,4 +166,3 @@ Sets the number of columns in this choice item.
 
 This is implemented for Motif only and doesn't do anything under other
 platforms.
-
index 032f4b9af4952096a935c176c22e176e81358f9e..517e3f58301f95e65e4f09a1c381f5d25454ec27 100644 (file)
@@ -88,7 +88,7 @@ by the control.
 
 \membersection{wxControlWithItems::Delete}\label{wxcontrolwithitemsdelete}
 
-\func{void}{Delete}{\param{int}{ n}}
+\func{void}{Delete}{\param{unsigned int}{ n}}
 
 Deletes an item from the control. The client data associated with the item
 will be also deleted if it is owned by the control.
@@ -125,7 +125,7 @@ not found.
 
 \membersection{wxControlWithItems::GetClientData}\label{wxcontrolwithitemsgetclientdata}
 
-\constfunc{void *}{GetClientData}{\param{int}{ n}}
+\constfunc{void *}{GetClientData}{\param{unsigned int}{ n}}
 
 Returns a pointer to the client data associated with the given item (if any).
 It is an error to call this function for a control which doesn't have untyped
@@ -143,7 +143,7 @@ A pointer to the client data, or {\tt NULL} if not present.
 
 \membersection{wxControlWithItems::GetClientObject}\label{wxcontrolwithitemsgetclientobject}
 
-\constfunc{wxClientData *}{GetClientObject}{\param{int}{ n}}
+\constfunc{wxClientData *}{GetClientObject}{\param{unsigned int}{ n}}
 
 Returns a pointer to the client data associated with the given item (if any).
 It is an error to call this function for a control which doesn't have typed
@@ -161,7 +161,7 @@ A pointer to the client data, or {\tt NULL} if not present.
 
 \membersection{wxControlWithItems::GetCount}\label{wxcontrolwithitemsgetcount}
 
-\constfunc{size\_t}{GetCount}{\void}
+\constfunc{unsigned int}{GetCount}{\void}
 
 Returns the number of items in the control.
 
@@ -195,7 +195,7 @@ with {\tt wxLB\_MULTIPLE} style.
 
 \membersection{wxControlWithItems::GetString}\label{wxcontrolwithitemsgetstring}
 
-\constfunc{wxString}{GetString}{\param{int}{ n}}
+\constfunc{wxString}{GetString}{\param{unsigned int}{ n}}
 
 Returns the label of the item with the given index.
 
@@ -222,14 +222,14 @@ selected.
 
 \membersection{wxControlWithItems::Insert}\label{wxcontrolwithitemsinsert}
 
-\func{int}{Insert}{\param{const wxString\& }{ item}, \param{int }{pos}}
+\func{int}{Insert}{\param{const wxString\& }{ item}, \param{unsigned int }{pos}}
 
 Inserts the item into the list before pos.
 Not valid for {\tt wxLB\_SORT} or {\tt wxCB\_SORT} styles, use Append instead.
 
-\func{int}{Insert}{\param{const wxString\& }{ item}, \param{int }{pos}, \param{void *}{clientData}}
+\func{int}{Insert}{\param{const wxString\& }{ item}, \param{unsigned int }{pos}, \param{void *}{clientData}}
 
-\func{int}{Insert}{\param{const wxString\& }{ item}, \param{int }{pos}, \param{wxClientData *}{clientData}}
+\func{int}{Insert}{\param{const wxString\& }{ item}, \param{unsigned int }{pos}, \param{wxClientData *}{clientData}}
 
 Inserts the item into the list before pos, associating the given, typed or
 untyped, client data pointer with the item.
@@ -282,7 +282,7 @@ multiple selection.
 
 \membersection{wxControlWithItems::SetClientData}\label{wxcontrolwithitemssetclientdata}
 
-\func{void}{SetClientData}{\param{int}{ n}, \param{void *}{data}}
+\func{void}{SetClientData}{\param{unsigned int}{ n}, \param{void *}{data}}
 
 Associates the given untyped client data pointer with the given item. Note that
 it is an error to call this function if any typed client data pointers had been
@@ -297,7 +297,7 @@ associated with the control items before.
 
 \membersection{wxControlWithItems::SetClientObject}\label{wxcontrolwithitemssetclientobject}
 
-\func{void}{SetClientObject}{\param{int}{ n}, \param{wxClientData *}{data}}
+\func{void}{SetClientObject}{\param{unsigned int}{ n}, \param{wxClientData *}{data}}
 
 Associates the given typed client data pointer with the given item: the
 {\it data} object will be deleted when the item is deleted (either explicitly
@@ -336,7 +336,7 @@ deselect any other items in the controls which support multiple selections.
 
 \membersection{wxControlWithItems::SetString}\label{wxcontrolwithitemssetstring}
 
-\func{void}{SetString}{\param{int}{ n}, \param{const wxString\& }{ string}}
+\func{void}{SetString}{\param{unsigned int}{ n}, \param{const wxString\& }{ string}}
 
 Sets the label for the given item.
 
index 12e7d2858765948f8da713ec7c42f8eeaa91d294..6dd954b8a330f4c3dbfd7c282ada93b997a3b1ad 100644 (file)
@@ -149,7 +149,7 @@ for further details.
 
 Enables or disables the entire radiobox.
 
-\func{virtual bool}{Enable}{\param{int}{ n}, \param{bool}{ enable = {\tt true}}}
+\func{virtual bool}{Enable}{\param{unsigned int}{ n}, \param{bool}{ enable = {\tt true}}}
 
 Enables or disables an individual button in the radiobox.
 
@@ -188,7 +188,7 @@ Finds a button matching the given string, returning the position if found, or
 
 \membersection{wxRadioBox::GetColumnCount}\label{wxradioboxgetcolumncount}
 
-\constfunc{int}{GetColumnCount}{\void}
+\constfunc{unsigned int}{GetColumnCount}{\void}
 
 Returns the number of columns in the radiobox.
 
@@ -218,7 +218,7 @@ implements the following methods:\par
 
 \membersection{wxRadioBox::GetRowCount}\label{wxradioboxgetrowcount}
 
-\constfunc{int}{GetRowCount}{\void}
+\constfunc{unsigned int}{GetRowCount}{\void}
 
 Returns the number of rows in the radiobox.
 
@@ -239,7 +239,7 @@ Returns the selected string.
 
 \membersection{wxRadioBox::GetString}\label{wxradioboxgetstring}
 
-\constfunc{wxString}{GetString}{\param{int}{ n}}
+\constfunc{wxString}{GetString}{\param{unsigned int}{ n}}
 
 Returns the label for the button at the given position.
 
@@ -250,7 +250,7 @@ Returns the label for the button at the given position.
 
 \membersection{wxRadioBox::IsItemEnabled}\label{wxradioboxisitemenabled}
 
-\constfunc{bool}{IsItemEnabled}{\void}
+\constfunc{bool}{IsItemEnabled}{\param{unsigned int}{ n}}
 
 Returns \true if the item is enabled or \false if it was disabled using
 \helpref{Enable(n, false)}{wxradioboxenable}.
@@ -258,10 +258,14 @@ Returns \true if the item is enabled or \false if it was disabled using
 {\bf Platform note:} Currently only implemented in wxMSW, wxGTK and wxUniversal
 and always returns \true in the other ports.
 
+\wxheading{Parameters}
+
+\docparam{n}{The zero-based button position.}
+
 
 \membersection{wxRadioBox::IsItemShown}\label{wxradioboxisitemshown}
 
-\constfunc{bool}{IsItemShown}{\void}
+\constfunc{bool}{IsItemShown}{\param{unsigned int}{ n}}
 
 Returns \true if the item is currently shown or \false if it was hidden using
 \helpref{Show(n, false)}{wxradioboxshow}.
@@ -272,6 +276,10 @@ if the entire radiobox is not currently shown.
 {\bf Platform note:} Currently only implemented in wxMSW, wxGTK and wxUniversal
 and always returns \true in the other ports.
 
+\wxheading{Parameters}
+
+\docparam{n}{The zero-based button position.}
+
 
 \membersection{wxRadioBox::SetLabel}\label{wxradioboxsetlabel}
 
@@ -325,7 +333,7 @@ a wxEVT\_COMMAND\_RADIOBOX\_SELECTED event to get emitted.
 
 Shows or hides the entire radiobox.
 
-\func{virtual bool}{Show}{\param{int}{ item}, \param{const bool}{ show = {\tt true}}}
+\func{virtual bool}{Show}{\param{unsigned int}{ item}, \param{const bool}{ show = {\tt true}}}
 
 Shows or hides individual buttons.
 
index 8147946ad98cee94e83e25fa0773b2297aa7b686..0351701970ed4a75c8546a1080e7d17ef7407f84 100644 (file)
@@ -362,7 +362,7 @@ This function is only available in the generic version.
 
 \membersection{wxTreeCtrl::GetChildrenCount}\label{wxtreectrlgetchildrencount}
 
-\constfunc{size\_t}{GetChildrenCount}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ recursively = {\tt true}}}
+\constfunc{unsigned int}{GetChildrenCount}{\param{const wxTreeItemId\&}{ item}, \param{bool}{ recursively = {\tt true}}}
 
 Returns the number of items in the branch. If {\it recursively} is {\tt true}, returns the total number
 of descendants, otherwise only one level of children is counted.
@@ -370,7 +370,7 @@ of descendants, otherwise only one level of children is counted.
 
 \membersection{wxTreeCtrl::GetCount}\label{wxtreectrlgetcount}
 
-\constfunc{size\_t}{GetCount}{\void}
+\constfunc{unsigned int}{GetCount}{\void}
 
 Returns the number of items in the control.
 
@@ -631,7 +631,7 @@ this style.
 
 \membersection{wxTreeCtrl::GetSelections}\label{wxtreectrlgetselections}
 
-\constfunc{size\_t}{GetSelections}{\param{wxArrayTreeItemIds\& }{selection}}
+\constfunc{unsigned int}{GetSelections}{\param{wxArrayTreeItemIds\& }{selection}}
 
 Fills the array of tree items passed in with the currently selected items. This
 function can be called only if the control has the wxTR\_MULTIPLE style.
index f976b0c1f4da787d394ca550c0faeb13b369d432..d30003320eb22accb1ea99a7709f885978d40a47 100644 (file)
@@ -32,8 +32,8 @@ public:
     wxCheckListBoxBase() { }
 
     // check list box specific methods
-    virtual bool IsChecked(size_t item) const = 0;
-    virtual void Check(size_t item, bool check = true) = 0;
+    virtual bool IsChecked(unsigned int item) const = 0;
+    virtual void Check(unsigned int item, bool check = true) = 0;
 
     DECLARE_NO_COPY_CLASS(wxCheckListBoxBase)
 };
index 0e6507d163fdb03eb1940d767b8da8bb6977eb0b..1f0075286881f46fb31808630a45fca8c233b114 100644 (file)
@@ -4,9 +4,9 @@
 // Author:      David Elliott
 // Modified by:
 // Created:     2003/03/16
-// RCS-ID:      $Id:
+// RCS-ID:      $Id$
 // Copyright:   (c) 2003 David Elliott
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef __WX_COCOA_CHECKLST_H__
@@ -73,8 +73,8 @@ protected:
 // ------------------------------------------------------------------------
 public:
     // check list box specific methods
-    virtual bool IsChecked(size_t item) const;
-    virtual void Check(size_t item, bool check = TRUE);
+    virtual bool IsChecked(unsigned int item) const;
+    virtual void Check(unsigned int item, bool check = true);
 };
 
 #endif // __WX_COCOA_CHECKLST_H__
index a6c53ef892847da644fc0d287bda9578ce7d03ca..ae177c71da1c970838e797dab9caf4e8f91131f0 100644 (file)
@@ -81,19 +81,19 @@ protected:
 // ------------------------------------------------------------------------
 public:
     virtual void Clear();
-    virtual void Delete(int);
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int) const;
-    virtual void SetString(int, const wxString&);
+    virtual void Delete(unsigned int n);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int) const;
+    virtual void SetString(unsigned int pos, const wxString&);
     virtual int FindString(const wxString& s, bool bCase = false) const;
     virtual int GetSelection() const;
     virtual int DoAppend(const wxString&);
-    virtual int DoInsert(const wxString&, int);
-    virtual void DoSetItemClientData(int, void*);
-    virtual void* DoGetItemClientData(int) const;
-    virtual void DoSetItemClientObject(int, wxClientData*);
-    virtual wxClientData* DoGetItemClientObject(int) const;
-    virtual void SetSelection(int);
+    virtual int DoInsert(const wxString&, unsigned int pos);
+    virtual void DoSetItemClientData(unsigned int, void*);
+    virtual void* DoGetItemClientData(unsigned int) const;
+    virtual void DoSetItemClientObject(unsigned int, wxClientData*);
+    virtual wxClientData* DoGetItemClientObject(unsigned int) const;
+    virtual void SetSelection(int pos);
 protected:
     wxSortedArrayString *m_sortedStrings;
     wxArrayPtrVoid m_itemsClientData;
index cc1dc9ab6fde103c6e9bf5692950ca7d682ff9b0..cc262de82dd67551e780113fd69c1e960faf196b 100644 (file)
@@ -102,23 +102,23 @@ protected:
 // ------------------------------------------------------------------------
 public:
     // wxCombobox methods
-    virtual void SetSelection(int);
+    virtual void SetSelection(int pos);
     // Overlapping methods
     virtual wxString GetStringSelection();
     // wxItemContainer
     virtual void Clear();
-    virtual void Delete(int);
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int) const;
-    virtual void SetString(int, const wxString&);
+    virtual void Delete(unsigned int n);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int) const;
+    virtual void SetString(unsigned int pos, const wxString&);
     virtual int FindString(const wxString& s, bool bCase = false) const;
     virtual int GetSelection() const;
     virtual int DoAppend(const wxString&);
-    virtual int DoInsert(const wxString&, int);
-    virtual void DoSetItemClientData(int, void*);
-    virtual void* DoGetItemClientData(int) const;
-    virtual void DoSetItemClientObject(int, wxClientData*);
-    virtual wxClientData* DoGetItemClientObject(int) const;
+    virtual int DoInsert(const wxString&, unsigned int pos);
+    virtual void DoSetItemClientData(unsigned int, void*);
+    virtual void* DoGetItemClientData(unsigned int) const;
+    virtual void DoSetItemClientObject(unsigned int, wxClientData*);
+    virtual wxClientData* DoGetItemClientObject(unsigned int) const;
     // wxComboBoxBase pure virtuals
     virtual wxString GetValue() const
     {   return wxTextCtrl::GetValue(); }
index d5cf9502f4ac537b2c63f4c6305b8b6d8c96f122..0002435bbcaedeb6e5951bc6c6bb76bb8ba69357 100644 (file)
@@ -84,7 +84,7 @@ public:
     virtual bool IsSelected(int n) const;
     virtual int GetSelections(wxArrayInt& aSelections) const;
 protected:
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
     virtual void DoSetFirstItem(int n);
     virtual void DoSetSelection(int n, bool select);
@@ -93,20 +93,20 @@ protected:
 public:
     // deleting items
     virtual void Clear();
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
     // accessing strings
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
     virtual int FindString(const wxString& s, bool bCase = false) const;
     // selection
     virtual int GetSelection() const;
 protected:
     virtual int DoAppend(const wxString& item);
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 };
 
 #endif // __WX_COCOA_LISTBOX_H__
index 0faacf6ccdbe271ebb0c9b67f1baba30d67a38b3..9caf5afcf1a120c085f484d8aeeda3221892c5aa 100644 (file)
@@ -85,12 +85,12 @@ public:
     virtual void SetSelection(int n);
     virtual int GetSelection() const;
     // string access
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& label);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& label);
     // change the individual radio button state
-    virtual bool Enable(int n, bool enable = true);
-    virtual bool Show(int n, bool show = true);
+    virtual bool Enable(unsigned int n, bool enable = true);
+    virtual bool Show(unsigned int n, bool show = true);
 protected:
     virtual wxSize DoGetBestSize() const;
 };
index 216ab3ab4ac2933d869d9af271d383438011cc4e..d27f0102ed5de6336591f2c568466b93f4c7e216 100644 (file)
@@ -38,24 +38,24 @@ public:
     // accessing strings
     // -----------------
 
-    virtual size_t GetCount() const = 0;
+    virtual unsigned int GetCount() const = 0;
     bool IsEmpty() const { return GetCount() == 0; }
 
-    virtual wxString GetString(int n) const = 0;
+    virtual wxString GetString(unsigned int n) const = 0;
     wxArrayString GetStrings() const;
-    virtual void SetString(int n, const wxString& s) = 0;
+    virtual void SetString(unsigned int n, const wxString& s) = 0;
 
     // finding string natively is either case sensitive or insensitive
     // but never both so fall back to this base version for not
     // supported search type
     virtual int FindString(const wxString& s, bool bCase = false) const
     {
-        size_t count = GetCount();
+        unsigned int count = GetCount();
 
-        for ( size_t i = 0; i < count ; ++i )
+        for ( unsigned int i = 0; i < count ; ++i )
         {
             if (GetString(i).IsSameAs( s , bCase ))
-                return i;
+                return (int)i;
         }
 
         return wxNOT_FOUND;
@@ -82,9 +82,8 @@ public:
 protected:
 
     // check that the index is valid
-    // FIXME: once api will move to size_t, drop >= 0 check
-    inline bool IsValid(int n) const { return n >= 0 && (size_t)n < GetCount(); }
-    inline bool IsValidInsert(int n) const { return n >= 0 && (size_t)n <= GetCount(); }
+    inline bool IsValid(unsigned int n) const { return n < GetCount(); }
+    inline bool IsValidInsert(unsigned int n) const { return n <= GetCount(); }
 };
 
 class WXDLLEXPORT wxItemContainer : public wxItemContainerImmutable
@@ -110,26 +109,26 @@ public:
     // append several items at once to the control
     void Append(const wxArrayString& strings);
 
-    int Insert(const wxString& item, int pos)
+    int Insert(const wxString& item, unsigned int pos)
         { return DoInsert(item, pos); }
-    int Insert(const wxString& item, int pos, void *clientData);
-    int Insert(const wxString& item, int pos, wxClientData *clientData);
+    int Insert(const wxString& item, unsigned int pos, void *clientData);
+    int Insert(const wxString& item, unsigned int pos, wxClientData *clientData);
 
     // deleting items
     // --------------
 
     virtual void Clear() = 0;
-    virtual void Delete(int n) = 0;
+    virtual void Delete(unsigned int n) = 0;
 
     // misc
     // ----
 
     // client data stuff
-    void SetClientData(int n, void* clientData);
-    void* GetClientData(int n) const;
+    void SetClientData(unsigned int n, void* clientData);
+    void* GetClientData(unsigned int n) const;
 
-    void SetClientObject(int n, wxClientData* clientData);
-    wxClientData* GetClientObject(int n) const;
+    void SetClientObject(unsigned int n, wxClientData* clientData);
+    wxClientData* GetClientObject(unsigned int n) const;
 
     bool HasClientObjectData() const
         { return m_clientDataItemsType == wxClientData_Object; }
@@ -138,12 +137,12 @@ public:
 
 protected:
     virtual int DoAppend(const wxString& item) = 0;
-    virtual int DoInsert(const wxString& item, int pos) = 0;
+    virtual int DoInsert(const wxString& item, unsigned int pos) = 0;
 
-    virtual void DoSetItemClientData(int n, void* clientData) = 0;
-    virtual void* DoGetItemClientData(int n) const = 0;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData) = 0;
-    virtual wxClientData* DoGetItemClientObject(int n) const = 0;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData) = 0;
+    virtual void* DoGetItemClientData(unsigned int n) const = 0;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData) = 0;
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const = 0;
 
     // the type of the client data for the items
     wxClientDataType m_clientDataItemsType;
@@ -162,13 +161,13 @@ protected:
         { wxControl::SetClientObject(data); }                              \
     wxClientData *GetClientObject() const                                  \
         { return wxControl::GetClientObject(); }                           \
-    void SetClientData(int n, void* clientData)                            \
+    void SetClientData(unsigned int n, void* clientData)                   \
         { wxItemContainer::SetClientData(n, clientData); }                 \
-    void* GetClientData(int n) const                                       \
+    void* GetClientData(unsigned int n) const                              \
         { return wxItemContainer::GetClientData(n); }                      \
-    void SetClientObject(int n, wxClientData* clientData)                  \
+    void SetClientObject(unsigned int n, wxClientData* clientData)         \
         { wxItemContainer::SetClientObject(n, clientData); }               \
-    wxClientData* GetClientObject(int n) const                             \
+    wxClientData* GetClientObject(unsigned int n) const                    \
         { return wxItemContainer::GetClientObject(n); }
 
 class WXDLLEXPORT wxControlWithItems : public wxControl, public wxItemContainer
index 42f7cfd34509076dd4931674815db56c37cdeb0e..057a0388f3ef2621ea31293b0cdf0109c3f7afd6 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        checklst.h
+// Name:        wx/gtk/checklst.h
 // Purpose:     wxCheckListBox class
 // Author:      Robert Roebling
 // Modified by:
@@ -52,11 +52,11 @@ public:
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxListBoxNameStr);
 
-    bool IsChecked( int index ) const;
-    void Check( int index, bool check = TRUE );
+    bool IsChecked(unsigned int index) const;
+    void Check(unsigned int index, bool check = true);
 
     int GetItemHeight() const;
-    
+
 #if wxUSE_NATIVEGTKCHECKLIST
     void DoCreateCheckList();
 #endif
index 1ae716df6f19488b4b25d14fc1120bf98d3b2c28..12d9a3a5fb719ac3b1b7501bd09a4819edac5192 100644 (file)
@@ -62,17 +62,17 @@ public:
             const wxString& name = wxChoiceNameStr );
 
     // implement base class pure virtuals
-    void Delete(int n);
+    void Delete(unsigned int n);
     void Clear();
 
     int GetSelection() const;
     int GetCurrentSelection() const { return GetSelection(); }
-    void SetSelection( int n );
+    void SetSelection(int n);
 
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
     virtual int FindString(const wxString& s, bool bCase = false) const;
-    wxString GetString( int n ) const;
-    void SetString( int n, const wxString& string );
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& string);
 
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
@@ -84,18 +84,18 @@ protected:
 
     void DoApplyWidgetStyle(GtkRcStyle *style);
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
 
-    virtual void DoSetItemClientData( int n, void* clientData );
-    virtual void* DoGetItemClientData( int n ) const;
-    virtual void DoSetItemClientObject( int n, wxClientData* clientData );
-    virtual wxClientData* DoGetItemClientObject( int n ) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     virtual wxSize DoGetBestSize() const;
 
 private:
     // common part of Create() and DoAppend()
-    int GtkAddHelper(GtkWidget *menu, size_t pos, const wxString& item);
+    int GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& item);
 
     // this array is only used for controls with wxCB_SORT style, so only
     // allocate it if it's needed (hence using pointer)
index 5852b7403c825966b58e2017c24570729daf25c9..a98cc3eb79329005120fb9738966a6895ec44a00 100644 (file)
@@ -81,16 +81,16 @@ public:
            const wxString& name = wxComboBoxNameStr);
 
     void Clear();
-    void Delete( int n );
+    void Delete(unsigned int n);
 
     virtual int FindString(const wxString& s, bool bCase = false) const;
     int GetSelection() const;
     int GetCurrentSelection() const;
-    wxString GetString( int n ) const;
+    virtual wxString GetString(unsigned int n) const;
     wxString GetStringSelection() const;
-    virtual size_t GetCount() const;
-    void SetSelection( int n );
-    void SetString(int n, const wxString &text);
+    virtual unsigned int GetCount() const;
+    virtual void SetSelection(int n);
+    virtual void SetString(unsigned int n, const wxString &text);
 
     wxString GetValue() const;
     void SetValue(const wxString& value);
@@ -160,12 +160,12 @@ public:
 protected:
     void DoApplyWidgetStyle(GtkRcStyle *style);
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
 
-    virtual void DoSetItemClientData( int n, void* clientData );
-    virtual void* DoGetItemClientData( int n ) const;
-    virtual void DoSetItemClientObject( int n, wxClientData* clientData );
-    virtual wxClientData* DoGetItemClientObject( int n ) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     virtual wxSize DoGetBestSize() const;
 
index 92df4f24974feec87dd8f88582536a003ebfe6b8..00adce243d8f0a4ee89711a59656b51df184c8e6 100644 (file)
@@ -63,11 +63,11 @@ public:
 
     // implement base class pure virtuals
     virtual void Clear();
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
     virtual int FindString(const wxString& s, bool bCase = false) const;
 
     virtual bool IsSelected(int n) const;
@@ -99,20 +99,20 @@ public:
 
     struct _GtkTreeEntry* GtkGetEntry(int pos) const;
     void GtkInsertItems(const wxArrayString& items,
-                        void** clientData, size_t pos);
+                        void** clientData, unsigned int pos);
     void GtkSetSelection(int n, const bool select, const bool blockEvent);
 
 protected:
     virtual wxSize DoGetBestSize() const;
     virtual void DoSetSelection(int n, bool select);
     virtual int DoAppend(const wxString& item);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
     virtual void DoSetFirstItem(int n);
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
     virtual int DoListHitTest(const wxPoint& point) const;
 
     void DoApplyWidgetStyle(GtkRcStyle *style);
index d2d9104b7448e943f452f97772c90681592dfbeb..1f2fb13bf5cf192601f9e3e47597c55cd82ae6aa 100644 (file)
@@ -81,21 +81,21 @@ public:
 
 
     // implement wxItemContainerImmutable methods
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
 
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
 
     virtual void SetSelection(int n);
     virtual int GetSelection() const;
 
 
     // implement wxRadioBoxBase methods
-    virtual bool Show(int n, bool show = true);
-    virtual bool Enable(int n, bool enable = true);
+    virtual bool Show(unsigned int n, bool show = true);
+    virtual bool Enable(unsigned int n, bool enable = true);
 
-    virtual bool IsItemEnabled(int n) const;
-    virtual bool IsItemShown(int n) const;
+    virtual bool IsItemEnabled(unsigned int n) const;
+    virtual bool IsItemShown(unsigned int n) const;
 
 
     // override some base class methods to operate on radiobox itself too
index 3bd0b0f1c01d8ed7079f367b3526d1293be3c93b..ba0368baae01f61f2c39725440ae3a2068f90928 100644 (file)
@@ -48,8 +48,8 @@ public:
             const wxValidator& validator = wxDefaultValidator,
             const wxString& name = wxListBoxNameStr);
 
-    bool IsChecked( int index ) const;
-    void Check( int index, bool check = TRUE );
+    bool IsChecked(unsigned int index) const;
+    void Check(unsigned int index, bool check = true);
 
     int GetItemHeight() const;
 
index 55acb8d49abe9dd9502abd797fb20ce8d4f1193b..7369005ed9cc532700e0a0a090f8090e70dd2fda 100644 (file)
@@ -62,17 +62,17 @@ public:
             const wxString& name = wxChoiceNameStr );
 
     // implement base class pure virtuals
-    void Delete(int n);
+    void Delete(unsigned int n);
     void Clear();
 
     int GetSelection() const;
     int GetCurrentSelection() const { return GetSelection(); }
-    void SetSelection( int n );
+    virtual void SetSelection(int n);
 
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
     virtual int FindString(const wxString& s, bool bCase = false) const;
-    wxString GetString( int n ) const;
-    void SetString( int n, const wxString& string );
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& string);
 
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
@@ -82,12 +82,12 @@ protected:
 
     void DoApplyWidgetStyle(GtkRcStyle *style);
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
 
-    virtual void DoSetItemClientData( int n, void* clientData );
-    virtual void* DoGetItemClientData( int n ) const;
-    virtual void DoSetItemClientObject( int n, wxClientData* clientData );
-    virtual wxClientData* DoGetItemClientObject( int n ) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     virtual wxSize DoGetBestSize() const;
 
@@ -95,7 +95,7 @@ protected:
 
 private:
     // common part of Create() and DoAppend()
-    int GtkAddHelper(GtkWidget *menu, size_t pos, const wxString& item);
+    int GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& item);
 
     // this array is only used for controls with wxCB_SORT style, so only
     // allocate it if it's needed (hence using pointer)
index a3a3d2a178cc675d76d4f3671188ebf4ef995949..2e85af60cfc82b929b6c60171fae5d6a5b470f33 100644 (file)
@@ -81,16 +81,16 @@ public:
            const wxString& name = wxComboBoxNameStr);
 
     void Clear();
-    void Delete( int n );
+    void Delete(unsigned int n);
 
     virtual int FindString(const wxString& s, bool bCase = false) const;
     int GetSelection() const;
     int GetCurrentSelection() const;
-    wxString GetString( int n ) const;
+    virtual wxString GetString(unsigned int n) const;
     wxString GetStringSelection() const;
-    virtual size_t GetCount() const;
-    void SetSelection( int n );
-    void SetString(int n, const wxString &text);
+    virtual unsigned int GetCount() const;
+    virtual void SetSelection(int n);
+    virtual void SetString(unsigned int n, const wxString &text);
 
     wxString GetValue() const;
     void SetValue(const wxString& value);
@@ -160,12 +160,12 @@ public:
 
 protected:
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
 
-    virtual void DoSetItemClientData( int n, void* clientData );
-    virtual void* DoGetItemClientData( int n ) const;
-    virtual void DoSetItemClientObject( int n, wxClientData* clientData );
-    virtual wxClientData* DoGetItemClientObject( int n ) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     virtual wxSize DoGetBestSize() const;
 
index 92b6e8203e8175d4001132d08cc3a639715c051d..7f9768d4a87ee67d3805ece013f0a3a13c1a8bd4 100644 (file)
@@ -68,11 +68,11 @@ public:
 
     // implement base class pure virtuals
     virtual void Clear();
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
     virtual int FindString(const wxString& s, bool bCase = false) const;
 
     virtual bool IsSelected(int n) const;
@@ -81,15 +81,15 @@ public:
     virtual int GetSelections(wxArrayInt& aSelections) const;
 
     virtual int DoAppend(const wxString& item);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
 
     virtual void DoSetFirstItem(int n);
 
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     static wxVisualAttributes
     GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
index a2fc5ece739ceff1586f756d6bc2f50e41c6cb7a..88db4fbe3e1c176d6e19ccd801c943a17cf163b7 100644 (file)
@@ -81,21 +81,21 @@ public:
 
 
     // implement wxItemContainerImmutable methods
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
 
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
 
     virtual void SetSelection(int n);
     virtual int GetSelection() const;
 
 
     // implement wxRadioBoxBase methods
-    virtual bool Show(int n, bool show = true);
-    virtual bool Enable(int n, bool enable = true);
+    virtual bool Show(unsigned int n, bool show = true);
+    virtual bool Enable(unsigned int n, bool enable = true);
 
-    virtual bool IsItemEnabled(int n) const;
-    virtual bool IsItemShown(int n) const;
+    virtual bool IsItemEnabled(unsigned int n) const;
+    virtual bool IsItemShown(unsigned int n) const;
 
 
     // override some base class methods to operate on radiobox itself too
index d22b0f47d3ddb839616f67c5a6ca36097e748c7c..219eccff3837298db7e483fe84d3d99c27a5c997 100644 (file)
@@ -44,15 +44,15 @@ public:
 
     // all generic methods are in wxControlWithItems, except for the following
     // ones which are not yet implemented by wxChoice/wxComboBox
-    void Insert(const wxString& item, int pos)
+    void Insert(const wxString& item, unsigned int pos)
         { DoInsert(item, pos); }
-    void Insert(const wxString& item, int pos, void *clientData)
+    void Insert(const wxString& item, unsigned int pos, void *clientData)
         { DoInsert(item, pos); SetClientData(pos, clientData); }
-    void Insert(const wxString& item, int pos, wxClientData *clientData)
+    void Insert(const wxString& item, unsigned int pos, wxClientData *clientData)
         { DoInsert(item, pos); SetClientObject(pos, clientData); }
 
-    void InsertItems(int nItems, const wxString *items, int pos);
-    void InsertItems(const wxArrayString& items, int pos)
+    void InsertItems(unsigned int nItems, const wxString *items, unsigned int pos);
+    void InsertItems(const wxArrayString& items, unsigned int pos)
         { DoInsertItems(items, pos); }
 
     void Set(int n, const wxString* items, void **clientData = NULL);
@@ -113,11 +113,11 @@ public:
 protected:
     // NB: due to wxGTK implementation details, DoInsert() is implemented
     //     using DoInsertItems() and not the other way round
-    virtual int DoInsert(const wxString& item, int pos)
+    virtual int DoInsert(const wxString& item, unsigned int pos)
         { InsertItems(1, &item, pos); return pos; }
 
     // to be implemented in derived classes
-    virtual void DoInsertItems(const wxArrayString& items, int pos) = 0;
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos) = 0;
     virtual void DoSetItems(const wxArrayString& items, void **clientData) = 0;
 
     virtual void DoSetFirstItem(int n) = 0;
index 1334905f47b2c02ad21502093e54444a0bfa43af..a98604bcdc68430c1eb870fa547dfd3997140a36 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        checklst.h
+// Name:        wx/mac/carbon/checklst.h
 // Purpose:     wxCheckListBox class - a listbox with checkable items
 //              Note: this is an optional class.
 // Author:      Stefan Csomor
 #ifndef _WX_CHECKLST_H_
 #define _WX_CHECKLST_H_
 
-#if !defined(__MWERKS__) && !defined(__UNIX__)
-typedef   unsigned int  size_t;
-#endif
-
 class WXDLLEXPORT wxCheckListBox : public wxCheckListBoxBase
 {
   DECLARE_DYNAMIC_CLASS(wxCheckListBox)
@@ -70,19 +66,19 @@ public:
                 const wxString& name = wxListBoxNameStr);
 
     // items may be checked
-    bool  IsChecked(size_t uiIndex) const;
-    void  Check(size_t uiIndex, bool bCheck = TRUE);
+    bool  IsChecked(unsigned int uiIndex) const;
+    void  Check(unsigned int uiIndex, bool bCheck = true);
 
 
     // override all methods which add/delete items to update m_checks array as
     // well
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
     // the array containing the checked status of the items
     wxArrayInt m_checks;
 
 protected:
     virtual int DoAppend(const wxString& item);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
     virtual void DoClear();
     // common part of all ctors
index 3dbe9c23af1bcc6ccd977286a6f2bd3f81ba41f9..aa7fd46ac3b1320863fd63137c56899b31c0158d 100644 (file)
@@ -69,28 +69,28 @@ public:
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxChoiceNameStr);
 
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
     virtual void Clear();
 
-    virtual size_t GetCount() const ;
+    virtual unsigned int GetCount() const ;
     virtual int GetSelection() const ;
     virtual void SetSelection(int n);
     int GetCurrentSelection() const { return GetSelection(); }
 
     virtual int FindString(const wxString& s, bool bCase = false) const;
-    virtual wxString GetString(int n) const ;
-    virtual void SetString( int , const wxString& s ) ;
+    virtual wxString GetString(unsigned int n) const ;
+    virtual void SetString(unsigned int pos, const wxString& s);
     virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
 
 protected:
     virtual wxSize DoGetBestSize() const ;
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
 
-    virtual void DoSetItemClientData( int n, void* clientData );
-    virtual void* DoGetItemClientData( int n ) const;
-    virtual void DoSetItemClientObject( int n, wxClientData* clientData );
-    virtual wxClientData* DoGetItemClientObject( int n ) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     // free all memory we have (used by Clear() and dtor)
     // prevent collision with some BSD definitions of macro Free()
index f9007107bb32344bc0b5c466e50a8aef142c1545..1622c07a18fccf4809eeab1b75bf092c4011d212 100644 (file)
@@ -85,16 +85,16 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
            const wxString& name = wxComboBoxNameStr);
 
     // List functions
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
     virtual void Clear();
 
     virtual int GetSelection() const;
     int GetCurrentSelection() const { return GetSelection(); }
     virtual void SetSelection(int n);
     virtual int FindString(const wxString& s, bool bCase = false) const;
-    virtual wxString GetString(int n) const;
+    virtual wxString GetString(unsigned int n) const;
     virtual wxString GetStringSelection() const;
-    virtual void SetString(int n, const wxString& s);
+    virtual void SetString(unsigned int n, const wxString& s);
 
     // Text field functions
     virtual wxString GetValue() const;
@@ -114,7 +114,7 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
     virtual void SetEditable(bool editable);
     virtual bool IsEditable() const;
 
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
 
     virtual void Undo();
     virtual void Redo();
@@ -143,12 +143,12 @@ protected:
     virtual void DoMoveWindow(int x, int y, int width, int height);
 
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
 
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void * DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData * DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void * DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData * DoGetItemClientObject(unsigned int n) const;
 
     // the subcontrols
     wxComboBoxText*     m_text;
index 090fc5b728be4d83b0d80a03e5831b33e717eac7..a0521f0e4039fa213aa133d37616404c3e54ac84 100644 (file)
@@ -75,11 +75,11 @@ public:
 
     // implement base class pure virtuals
     virtual void Clear();
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
     virtual int FindString(const wxString& s, bool bCase = false) const;
 
     virtual bool IsSelected(int n) const;
@@ -105,13 +105,13 @@ public:
 protected:
     virtual void DoSetSelection(int n, bool select);
     virtual int DoAppend(const wxString& item);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
     virtual void DoSetFirstItem(int n);
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
     virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
     virtual int DoListHitTest(const wxPoint& point) const;
 
@@ -132,7 +132,7 @@ protected:
     // prevent collision with some BSD definitions of macro Free()
     void FreeData();
 
-    size_t m_noItems;
+    unsigned int m_noItems;
     int m_selected;
     bool m_suppressSelection ;
     wxString  m_typeIn ;
index 0f5d7d53ac1b3d6668873d08d0b988bdf92a7661..016e42ebd79dc2707f57c9ed601e52bbf68f7f3b 100644 (file)
@@ -58,13 +58,13 @@ public:
     virtual void SetSelection(int item);
     virtual int GetSelection() const;
 
-    virtual size_t GetCount() const { return m_noItems; } ;
+    virtual unsigned int GetCount() const { return m_noItems; }
 
-    virtual wxString GetString(int item) const;
-    virtual void SetString(int item, const wxString& label) ;
+    virtual wxString GetString(unsigned int item) const;
+    virtual void SetString(unsigned int item, const wxString& label);
 
-    virtual bool Enable(int item, bool enable = true);
-    virtual bool Show(int item, bool show = true);
+    virtual bool Enable(unsigned int item, bool enable = true);
+    virtual bool Show(unsigned int item, bool show = true);
 
     virtual bool Enable(bool enable = true);
     virtual wxString GetLabel() const;
@@ -84,7 +84,7 @@ public:
 protected:
     wxRadioButton    *m_radioButtonCycle;
 
-    size_t            m_noItems;
+    unsigned int      m_noItems;
     int               m_noRowsOrCols;
 
 // Internal functions
index 8c256fda1a5fb0438128fb2b40bb6cdc460593c3..3d4912fddf6cd04b7b172fd3a2cce13e07d2e794 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        checklst.h
+// Name:        wx/mac/classic/checklst.h
 // Purpose:     wxCheckListBox class - a listbox with checkable items
 //              Note: this is an optional class.
 // Author:      Stefan Csomor
 #ifndef _WX_CHECKLST_H_
 #define _WX_CHECKLST_H_
 
-#if !defined(__MWERKS__) && !defined(__UNIX__)
-typedef   unsigned int  size_t;
-#endif
-
 class WXDLLEXPORT wxCheckListBox : public wxCheckListBoxBase
 {
   DECLARE_DYNAMIC_CLASS(wxCheckListBox)
@@ -70,8 +66,8 @@ public:
                 const wxString& name = wxListBoxNameStr);
 
   // items may be checked
-  bool  IsChecked(size_t uiIndex) const;
-  void  Check(size_t uiIndex, bool bCheck = TRUE);
+  bool  IsChecked(unsigned int uiIndex) const;
+  void  Check(unsigned int uiIndex, bool bCheck = true);
   void OnChar(wxKeyEvent& event) ;
   void OnLeftClick(wxMouseEvent& event) ;
 
@@ -85,10 +81,10 @@ public:
 
     // override all methods which add/delete items to update m_checks array as
     // well
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 protected:
     virtual int DoAppend(const wxString& item);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
     virtual void DoClear();
     // common part of all ctors
index 8a2fa8ae0c0dc23354f58387a84e3923aa529f95..652a15cce53f9385d02d3c86490108ebed2745f5 100644 (file)
@@ -71,26 +71,26 @@ public:
 
     // implement base class pure virtuals
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
-    virtual void Delete(int n);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
+    virtual void Delete(unsigned int n);
     virtual void Clear();
 
-    virtual size_t GetCount() const ;
+    virtual unsigned int GetCount() const ;
     virtual int GetSelection() const ;
     virtual void SetSelection(int n);
 
-    virtual wxString GetString(int n) const ;
-    virtual void SetString( int , const wxString& s ) ;
+    virtual wxString GetString(unsigned int n) const ;
+    virtual void SetString(unsigned int pos, const wxString& s);
     void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
 
 protected:
     virtual wxSize DoGetBestSize() const ;
 
 public: // for wxComboBox only
-    virtual void DoSetItemClientData( int n, void* clientData );
-    virtual void* DoGetItemClientData( int n ) const;
-    virtual void DoSetItemClientObject( int n, wxClientData* clientData );
-    virtual wxClientData* DoGetItemClientObject( int n ) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData );
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
 protected:
     // free all memory we have (used by Clear() and dtor)
index 278606b73aea8fcc79ac1def3cbd997c7f705eae..d0b20cfb8a52502652b6f62e367ec724c05c06cb 100644 (file)
@@ -78,15 +78,15 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
            const wxString& name = wxComboBoxNameStr);
 
     // List functions
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
     virtual void Clear();
 
     virtual int GetSelection() const ;
     virtual void SetSelection(int n);
     virtual int FindString(const wxString& s, bool bCase = false) const;
-    virtual wxString GetString(int n) const ;
+    virtual wxString GetString(unsigned int n) const ;
     virtual wxString GetStringSelection() const ;
-    virtual void SetString(int n, const wxString& s) ;
+    virtual void SetString(unsigned int n, const wxString& s);
 
     // Text field functions
     virtual wxString GetValue() const ;
@@ -104,7 +104,7 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
     virtual void Remove(long from, long to);
     virtual void SetSelection(long from, long to);
     virtual void SetEditable(bool editable);
-    virtual size_t GetCount() const { return m_choice->GetCount() ; }
+    virtual unsigned int GetCount() const { return m_choice->GetCount() ; }
 
     virtual bool IsEditable() const ;
 
@@ -124,12 +124,12 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
 
 protected:
     virtual int DoAppend(const wxString& item) ;
-    virtual int DoInsert(const wxString& item, int pos) ;
+    virtual int DoInsert(const wxString& item, unsigned int pos) ;
 
-    virtual void DoSetItemClientData(int n, void* clientData) ;
-    virtual void* DoGetItemClientData(int n) const ;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData) ;
-    virtual wxClientData* DoGetItemClientObject(int n) const ;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const ;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const ;
 
     void FreeData();
 
index 3e77885df7ccd25367fb0330e75f62639e7cbc9f..b6a52434e01794987e5c48cc51c470f9ac218143 100644 (file)
@@ -85,11 +85,11 @@ public:
 
     // implement base class pure virtuals
     virtual void Clear();
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
     virtual int FindString(const wxString& s, bool bCase = false) const;
 
     virtual bool IsSelected(int n) const;
@@ -98,15 +98,15 @@ public:
     virtual int GetSelections(wxArrayInt& aSelections) const;
 
     virtual int DoAppend(const wxString& item);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
 
     virtual void DoSetFirstItem(int n);
 
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
     virtual void       DoSetSize(int x, int y,int width, int height,int sizeFlags = wxSIZE_AUTO ) ;
 
     // wxCheckListBox support
@@ -156,7 +156,7 @@ protected:
     // prevent collision with some BSD definitions of macro Free()
     void FreeData();
 
-    size_t m_noItems;
+    unsigned int m_noItems;
     int m_selected;
     wxString  m_typeIn ;
     long      m_lastTypeIn ;
index 4f184209ce736d760cc6d7207c3003978c95a100..fc40c6aa5c18d853793780b14b96a2cde0f5ebf3 100644 (file)
@@ -58,13 +58,13 @@ public:
     virtual void SetSelection(int item);
     virtual int GetSelection() const;
 
-    virtual size_t GetCount() const { return m_noItems; } ;
+    virtual unsigned int GetCount() const { return m_noItems; }
 
-    virtual wxString GetString(int item) const;
-    virtual void SetString(int item, const wxString& label) ;
+    virtual wxString GetString(unsigned int item) const;
+    virtual void SetString(unsigned int item, const wxString& label);
 
-    virtual bool Enable(int item, bool enable = true);
-    virtual bool Show(int item, bool show = true);
+    virtual bool Enable(unsigned int item, bool enable = true);
+    virtual bool Show(unsigned int item, bool show = true);
 
     virtual bool Enable(bool enable = true);
     virtual wxString GetLabel() const;
@@ -84,7 +84,7 @@ public:
 protected:
     wxRadioButton    *m_radioButtonCycle;
 
-    size_t            m_noItems;
+    unsigned int      m_noItems;
     int               m_noRowsOrCols;
 
 // Internal functions
index 3577dcc551bb5a617681b7f08957aaa80a2e663b..78bb9821801d2e6fdb0879a556738f18030a7a87 100644 (file)
@@ -56,16 +56,16 @@ public:
         const wxString& name = wxListBoxNameStr);
 
     // items may be checked
-    bool IsChecked(size_t uiIndex) const;
-    void Check(size_t uiIndex, bool bCheck = true);
+    bool IsChecked(unsigned int uiIndex) const;
+    void Check(unsigned int uiIndex, bool bCheck = true);
 
     // override base class functions
     virtual int DoAppend(const wxString& item);
     virtual int FindString(const wxString& s, bool bCase = false) const;
-    virtual void SetString(int n, const wxString& s);
-    virtual wxString GetString(int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
+    virtual wxString GetString(unsigned int n) const;
 
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
 private:
     void DoToggleItem( int item, int x );
index 731a3b8f94562e88e6fbf5cac0d7885da49c8ad3..34d562dc7413945a222092c5c9f987b20ee1681d 100644 (file)
@@ -71,18 +71,18 @@ public:
         const wxString& name = wxChoiceNameStr);
 
     // implementation of wxControlWithItems
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual int DoInsert(const wxString& item, unsigned int pos);
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
     virtual int GetSelection() const;
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
     virtual void Clear();
-    virtual void SetString(int n, const wxString& s);
-    virtual wxString GetString(int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
+    virtual wxString GetString(unsigned int n) const;
 
     // implementation of wxChoiceBase
     virtual void SetSelection(int n);
@@ -112,7 +112,7 @@ protected:
     // common part of all contructors
     void Init();
 
-    size_t        m_noStrings;
+    unsigned int  m_noStrings;
     WXWidget      m_menuWidget;
     WXWidget      m_buttonWidget;
     wxWidgetArray m_widgetArray;
index eb5cc9cc3467944c2a198fbb3b8308df3c5a5087..fcdf4094f9e5df51579f4525430b02887bf0d705 100644 (file)
@@ -71,14 +71,14 @@ public:
 
     // implementation of wxControlWithItems
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
-    virtual void Delete(int n);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
+    virtual void Delete(unsigned int n);
     virtual void Clear();
     virtual int GetSelection() const ;
     virtual void SetSelection(int n);
     virtual int FindString(const wxString& s, bool bCase = false) const;
-    virtual wxString GetString(int n) const ;
-    virtual void SetString(int n, const wxString& s);
+    virtual wxString GetString(unsigned int n) const ;
+    virtual void SetString(unsigned int n, const wxString& s);
 
     // Text field functions
     virtual wxString GetValue() const ;
index 002c80de5243cb3408ac9ed15ce7c8e80e10a40b..c0c4d1b56ff9e17856c25c6438cc8c25c9e6796b 100644 (file)
@@ -66,22 +66,22 @@ public:
     ~wxListBox();
 
     // implementation of wxControlWithItems
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
     virtual int DoAppend(const wxString& item);
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
     virtual int GetSelection() const;
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
     virtual int FindString(const wxString& s, bool bCase = false) const;
     virtual void Clear();
-    virtual void SetString(int n, const wxString& s);
-    virtual wxString GetString(int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
+    virtual wxString GetString(unsigned int n) const;
 
     // implementation of wxListBoxbase
     virtual void DoSetSelection(int n, bool select);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
     virtual void DoSetFirstItem(int n);
     virtual int GetSelections(wxArrayInt& aSelections) const;
@@ -101,7 +101,7 @@ public:
 protected:
     virtual wxSize DoGetBestSize() const;
 
-    size_t m_noItems;
+    unsigned int m_noItems;
 
     // List mapping positions->client data
     wxClientDataDictionary m_clientDataDict;
index 6284a8033c1c1d769112458b33ed6785d793734c..f85602f8f895bc35798b5ad65a67ece18bb8baa0 100644 (file)
@@ -72,19 +72,19 @@ public:
                 const wxValidator& val = wxDefaultValidator,
                 const wxString& name = wxRadioBoxNameStr);
 
-    void SetSelection(int N);
+    virtual void SetSelection(int n);
     int GetSelection() const;
 
-    void SetString(int item, const wxString& label) ;
-    wxString GetString(int item) const;
+    virtual void SetString(unsigned int item, const wxString& label);
+    virtual wxString GetString(unsigned int item) const;
     virtual bool Enable(bool enable = true);
-    virtual bool Enable(int item, bool enable = true);
-    virtual bool Show(int item, bool show = true);
+    virtual bool Enable(unsigned int item, bool enable = true);
+    virtual bool Show(unsigned int item, bool show = true);
     virtual bool Show(bool show = true);
 
     virtual wxString GetStringSelection() const;
     virtual bool SetStringSelection(const wxString& s);
-    virtual size_t GetCount() const { return m_noItems; } ;
+    virtual unsigned int GetCount() const { return m_noItems; } ;
     void Command(wxCommandEvent& event);
 
     int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; }
@@ -103,7 +103,7 @@ protected:
                            int width, int height,
                            int sizeFlags = wxSIZE_AUTO);
 
-    size_t            m_noItems;
+    unsigned int      m_noItems;
     int               m_noRowsOrCols;
     int               m_selectedButton;
 
index 23665f2793eeff216171c041e82407ac1b79fd76..e347ba14fe7653cc484cfe92f8b9df62d344c119 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        checklst.h
+// Name:        wx/msw/checklst.h
 // Purpose:     wxCheckListBox class - a listbox with checkable items
 // Author:      Vadim Zeitlin
 // Modified by:
@@ -56,13 +56,13 @@ public:
                 const wxString& name = wxListBoxNameStr);
 
   // override base class virtuals
-  virtual void Delete(int n);
+  virtual void Delete(unsigned int n);
 
   virtual bool SetFont( const wxFont &font );
 
   // items may be checked
-  virtual bool IsChecked(size_t uiIndex) const;
-  virtual void Check(size_t uiIndex, bool bCheck = true);
+  virtual bool IsChecked(unsigned int uiIndex) const;
+  virtual void Check(unsigned int uiIndex, bool bCheck = true);
 
   // return the index of the item at this position or wxNOT_FOUND
   int HitTest(const wxPoint& pt) const { return DoHitTestItem(pt.x, pt.y); }
index f5f10b665efa86f4ce89ff8cec7b36bbc02f4f8d..a2ca0163678316b0ff2b1705ced8a90d0173f5cf 100644 (file)
@@ -66,17 +66,17 @@ public:
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxChoiceNameStr);
 
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
     virtual void Clear();
 
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
     virtual int GetSelection() const;
     virtual int GetCurrentSelection() const;
     virtual void SetSelection(int n);
 
     virtual int FindString(const wxString& s, bool bCase = false) const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
 
     // MSW only
     virtual bool MSWCommand(WXUINT param, WXWORD id);
@@ -90,12 +90,12 @@ protected:
     void Init() { m_lastAcceptedSelection = wxID_NONE; }
 
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
     virtual void DoMoveWindow(int x, int y, int width, int height);
-    virtual void DoSetItemClientData( int n, void* clientData );
-    virtual void* DoGetItemClientData( int n ) const;
-    virtual void DoSetItemClientObject( int n, wxClientData* clientData );
-    virtual wxClientData* DoGetItemClientObject( int n ) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     // MSW implementation
     virtual wxSize DoGetBestSize() const;
index 0e9cf02d40e1b8e72b49620e45bd911b5c08ead6..bd32aa84017f6cb9e58af8e8a207832023d83055 100644 (file)
@@ -79,11 +79,11 @@ public:
 
     // implement base class pure virtuals
     virtual void Clear();
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
     virtual int FindString(const wxString& s, bool bCase = false) const;
 
     virtual bool IsSelected(int n) const;
@@ -135,19 +135,19 @@ public:
 protected:
     virtual void DoSetSelection(int n, bool select);
     virtual int DoAppend(const wxString& item);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
     virtual void DoSetFirstItem(int n);
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
     virtual int DoListHitTest(const wxPoint& point) const;
 
     // free memory (common part of Clear() and dtor)
     void Free();
 
-    size_t m_noItems;
+    unsigned int m_noItems;
     int m_selected;
 
     virtual wxSize DoGetBestSize() const;
index d2861471265f7a144a8f74c18337bcadd9243a31..c02598fa6ca3e5ca393f9c8e3cbd62c4ac35c0ff 100644 (file)
@@ -85,13 +85,13 @@ public:
     // implement the radiobox interface
     virtual void SetSelection(int n);
     virtual int GetSelection() const { return m_selectedButton; }
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& label);
-    virtual bool Enable(int n, bool enable = true);
-    virtual bool Show(int n, bool show = true);
-    virtual bool IsItemEnabled(int n) const;
-    virtual bool IsItemShown(int n) const;
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& label);
+    virtual bool Enable(unsigned int n, bool enable = true);
+    virtual bool Show(unsigned int n, bool show = true);
+    virtual bool IsItemEnabled(unsigned int n) const;
+    virtual bool IsItemShown(unsigned int n) const;
 
     // override some base class methods
     virtual bool Show(bool show = true);
index 5cc5ff0fbeed35377326edd0b437e06f0d863e4b..01f0c233194b29317b05e1bfef8a1640a329e248 100644 (file)
@@ -50,20 +50,20 @@ public:
                 const wxString& name = wxListBoxNameStr);
 
     // override base class virtuals
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 
     // items may be checked
-    virtual bool IsChecked(size_t uiIndex) const;
-    virtual void Check(size_t uiIndex, bool bCheck = true);
+    virtual bool IsChecked(unsigned int uiIndex) const;
+    virtual void Check(unsigned int uiIndex, bool bCheck = true);
 
     // public interface derived from wxListBox and lower classes
     virtual void Clear();
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
     virtual int GetSelection() const;
     virtual int GetSelections(wxArrayInt& aSelections) const;
-    virtual wxString GetString(int n) const;
+    virtual wxString GetString(unsigned int n) const;
     virtual bool IsSelected(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual void SetString(unsigned int n, const wxString& s);
 
     // Implementation
     virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
@@ -73,12 +73,12 @@ protected:
 
     // protected interface derived from wxListBox and lower classes
     virtual int DoAppend(const wxString& item);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual wxClientData* DoGetItemClientObject(int n) const;
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetFirstItem(int n);
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
     virtual void DoSetSelection(int n, bool select);
     // convert our styles to Windows
index 027837225a3984a6a46b52fda893939b388c4587..60558e4d08bbdb26bf64612a6bf55cd63220feea 100644 (file)
@@ -79,17 +79,17 @@ public:
 
     // implement base class pure virtuals
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
-    virtual void Delete(int n);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
+    virtual void Delete(unsigned int n);
     virtual void Clear() ;
 
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
     virtual int GetSelection() const;
     virtual void SetSelection(int n);
 
     virtual int FindString(const wxString& s, bool bCase = false) const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
 
     // get the subclassed window proc of the buddy list of choices
     WXFARPROC GetBuddyWndProc() const { return m_wndProcBuddy; }
@@ -100,10 +100,10 @@ public:
     virtual bool MSWCommand(WXUINT param, WXWORD id);
 
 protected:
-    virtual void DoSetItemClientData( int n, void* clientData );
-    virtual void* DoGetItemClientData( int n ) const;
-    virtual void DoSetItemClientObject( int n, wxClientData* clientData );
-    virtual wxClientData* DoGetItemClientObject( int n ) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     // MSW implementation
     virtual void DoGetPosition(int *x, int *y) const;
index c689208517fa1652f6c0bb8e0385b93ab2b3e3a2..2a23c9645d5ca98f90ed5f662d7d5c15fcc6591c 100644 (file)
@@ -49,17 +49,15 @@ public:
     //
     // Override base class virtuals
     //
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 
     virtual bool SetFont(const wxFont &rFont);
 
     //
     // Items may be checked
     //
-    bool IsChecked(size_t uiIndex) const;
-    void Check( size_t uiIndex
-               ,bool   bCheck = true
-              );
+    bool IsChecked(unsigned int uiIndex) const;
+    void Check(unsigned int uiIndex, bool bCheck = true);
 
     //
     // Accessors
@@ -74,7 +72,7 @@ protected:
     virtual wxOwnerDrawn* CreateItem(size_t n);
     virtual long          OS2OnMeasure(WXMEASUREITEMSTRUCT* pItem);
 
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
 
     //
     // Pressing space or clicking the check box toggles the item
@@ -83,7 +81,7 @@ protected:
     void OnLeftClick(wxMouseEvent& rEvent);
 
 private:
-    size_t                          m_nItemHeight;  // height of checklistbox items (the same for all)
+    size_t m_nItemHeight;  // height of checklistbox items (the same for all)
 
     DECLARE_DYNAMIC_CLASS(wxCheckListBox)
     DECLARE_EVENT_TABLE()
index 4040e66663bc3bc90f73b26149e2f3d2974d3a52..6f7feec581205d3afc06c528425e76117049783c 100644 (file)
@@ -90,18 +90,16 @@ public:
     // Implement base class virtuals
     //
     virtual int      DoAppend(const wxString& rsItem);
-    virtual int      DoInsert(const wxString& rsItem, int pos);
-    virtual void     Delete(int n);
+    virtual int      DoInsert(const wxString& rsItem, unsigned int pos);
+    virtual void     Delete(unsigned int n);
     virtual void     Clear(void);
 
-    virtual size_t   GetCount() const;
-    virtual int      GetSelection(void) const ;
+    virtual unsigned int GetCount() const;
+    virtual int      GetSelection(void) const;
     virtual void     SetSelection(int n);
 
-    virtual wxString GetString(int n) const ;
-    virtual void     SetString( int n
-                               ,const wxString& rsStr
-                              );
+    virtual wxString GetString(unsigned int n) const;
+    virtual void     SetString(unsigned int n, const wxString& rsStr);
 
     //
     // OS2 only
@@ -115,14 +113,10 @@ public:
                                   );
 
 protected:
-    virtual void          DoSetItemClientData( int   n
-                                              ,void* pClientData
-                                             );
-    virtual void*         DoGetItemClientData(int n) const;
-    virtual void          DoSetItemClientObject( int           n
-                                                ,wxClientData* pClientData
-                                               );
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* pClientData);
+    virtual void*         DoGetItemClientData(unsigned int n) const;
+    virtual void          DoSetItemClientObject(unsigned int n, wxClientData* pClientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
     virtual wxSize        DoGetBestSize(void) const;
     virtual void          DoSetSize( int nX
                                     ,int nY
index 01070daa9e22d37e22e4c31111a488612a5f16ef..aad4af0780d3af91febedd953ffdbf2f548bddcd 100644 (file)
@@ -104,11 +104,11 @@ public:
     // Implement base class pure virtuals
     //
     virtual void          Clear(void);
-    virtual void          Delete(int n);
+    virtual void          Delete(unsigned int n);
 
-    virtual size_t        GetCount() const;
-    virtual wxString      GetString(int n) const;
-    virtual void          SetString(int n, const wxString& rsString);
+    virtual unsigned int  GetCount() const;
+    virtual wxString      GetString(unsigned int n) const;
+    virtual void          SetString(unsigned int n, const wxString& rsString);
 
     virtual bool          IsSelected(int n) const;
     virtual void          DoSetSelection(int  n, bool bSelect);
@@ -116,21 +116,17 @@ public:
     virtual int           GetSelections(wxArrayInt& raSelections) const;
 
     virtual int           DoAppend(const wxString& rsItem);
-    virtual void          DoInsertItems( const wxArrayString& raItems, int rPos );
+    virtual void          DoInsertItems( const wxArrayString& raItems, unsigned int rPos );
     virtual void          DoSetItems( const wxArrayString& raItems
                                      ,void **              ppClientData
                                     );
 
     virtual void          DoSetFirstItem(int n);
 
-    virtual void          DoSetItemClientData( int   n
-                                              ,void* pClientData
-                                             );
-    virtual void*         DoGetItemClientData(int n) const;
-    virtual void          DoSetItemClientObject( int           n
-                                                ,wxClientData* pClientData
-                                               );
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void          DoSetItemClientData(unsigned int n, void* pClientData);
+    virtual void*         DoGetItemClientData(unsigned int n) const;
+    virtual void          DoSetItemClientObject(unsigned int n, wxClientData* pClientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     //
     // wxCheckListBox support
@@ -154,8 +150,8 @@ protected:
     bool                  HasMultipleSelection(void) const;
     virtual wxSize        DoGetBestSize(void) const;
 
-    size_t  m_nNumItems;
-    int     m_nSelected;
+    unsigned int          m_nNumItems;
+    int                   m_nSelected;
 
 #if wxUSE_OWNER_DRAWN
     //
index 24419a2803d7cb018adc482d11da2ea024f70955..196bbbbc0bd8793c6491c147dd2af73b1894180f 100644 (file)
@@ -102,7 +102,7 @@ public:
     void Command(wxCommandEvent& rEvent);
     bool ContainsHWND(WXHWND hWnd) const;
     virtual bool Enable(bool bEnable = true);
-    virtual bool Enable(int  nItem, bool bEnable = true);
+    virtual bool Enable(unsigned int nItem, bool bEnable = true);
 
     virtual WXHBRUSH OnCtlColor( WXHDC    hDC
                                 ,WXHWND   hWnd
@@ -115,7 +115,7 @@ public:
                                 ,WXWORD wId
                                );
     void             SendNotificationEvent(void);
-    virtual bool     Show(int  nItem, bool bShow = true);
+    virtual bool     Show(unsigned int nItem, bool bShow = true);
     virtual bool     Show(bool bShow = true);
     MRESULT          WindowProc( WXUINT   uMsg
                                 ,WXWPARAM wParam
@@ -125,24 +125,20 @@ public:
 
 
 
-           virtual size_t   GetCount() const;
+           virtual unsigned int GetCount() const;
     inline         WXHWND*  GetRadioButtons(void) const { return m_ahRadioButtons; }
                    int      GetSelection(void) const;
-                   void     GetSize( int* pnX
-                                    ,int* pnY
-                                   ) const;
+                   void     GetSize(int* pnX, int* pnY) const;
     inline         int      GetSizeFlags(void) const { return m_nSizeFlags; }
-                   wxString GetString(int nIndex) const;
+           virtual wxString GetString(unsigned int nIndex) const;
            virtual wxString GetStringSelection(void) const;
 
     inline         void     SetButtonFont(const wxFont& rFont) { SetFont(rFont); }
                    void     SetFocus(void);
            virtual bool     SetFont(const wxFont& rFont);
     inline         void     SetLabelFont(const wxFont& WXUNUSED(font)) {};
-                   void     SetSelection(int nIndex);
-           virtual void     SetString( int             nNum
-                                      ,const wxString& rsLabel
-                                     );
+           virtual void     SetSelection(int nIndex);
+           virtual void     SetString(unsigned int nNum, const wxString& rsLabel);
     virtual bool SetStringSelection(const wxString& rsStr);
 
     virtual void SetLabel(const wxString& rsLabel)
@@ -175,7 +171,7 @@ protected:
 
 private:
 
-    size_t  m_nNoItems;
+    unsigned int m_nNoItems;
 
     DECLARE_DYNAMIC_CLASS(wxRadioBox)
 }; // end of wxRadioBox
index 254a355b182e648415064491dc48e85a2eff2f75..0c28425e25fb84edb237d22e31c5c9ee1f0466cb 100644 (file)
@@ -56,13 +56,13 @@ public:
                 const wxString& name = wxListBoxNameStr);
 
   // override base class virtuals
-  virtual void Delete(int n);
+  virtual void Delete(unsigned int n);
 
   virtual bool SetFont( const wxFont &font );
 
   // items may be checked
-  virtual bool IsChecked(size_t uiIndex) const;
-  virtual void Check(size_t uiIndex, bool bCheck = TRUE);
+  virtual bool IsChecked(unsigned int uiIndex) const;
+  virtual void Check(unsigned int uiIndex, bool bCheck = true);
 
   // return the index of the item at this position or wxNOT_FOUND
   int HitTest(const wxPoint& pt) const { return DoHitTestItem(pt.x, pt.y); }
@@ -85,7 +85,7 @@ protected:
   void OnLeftClick(wxMouseEvent& event);
 
 private:
-  size_t    m_nItemHeight;  // height of checklistbox items (the same for all)
+  size_t m_nItemHeight;  // height of checklistbox items (the same for all)
 
   DECLARE_EVENT_TABLE()
   DECLARE_DYNAMIC_CLASS_NO_COPY(wxCheckListBox)
index d4054dada7fb12b5431f1bd1b0dd49ff0dde0edd..e978c2d869b3d4843cf608137350641bb9c7e140 100644 (file)
@@ -65,16 +65,16 @@ public:
 
     // implement base class pure virtuals
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
-    virtual void Delete(int n);
+    virtual int DoInsert(const wxString& item, unsigned int pos);
+    virtual void Delete(unsigned int n);
     virtual void Clear();
 
-    virtual size_t GetCount() const;
+    virtual unsigned int GetCount() const;
     virtual int GetSelection() const;
     virtual void SetSelection(int n);
 
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
 
     // MSW only
     virtual bool MSWCommand(WXUINT param, WXWORD id);
@@ -82,10 +82,10 @@ public:
 
 protected:
     virtual void DoMoveWindow(int x, int y, int width, int height);
-    virtual void DoSetItemClientData( int n, void* clientData );
-    virtual void* DoGetItemClientData( int n ) const;
-    virtual void DoSetItemClientObject( int n, wxClientData* clientData );
-    virtual wxClientData* DoGetItemClientObject( int n ) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     // MSW implementation
     virtual wxSize DoGetBestSize() const;
index ec32855dc639b8fc22c0a05d1b4ff4330ca5cc3a..6275079fff952461a827c3e09bb0b2316b4a2b35 100644 (file)
@@ -79,11 +79,11 @@ public:
 
     // implement base class pure virtuals
     virtual void Clear();
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
 
     virtual bool IsSelected(int n) const;
     virtual void DoSetSelection(int n, bool select);
@@ -91,15 +91,15 @@ public:
     virtual int GetSelections(wxArrayInt& aSelections) const;
 
     virtual int DoAppend(const wxString& item);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
 
     virtual void DoSetFirstItem(int n);
 
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     // wxCheckListBox support
 #if wxUSE_OWNER_DRAWN
index c36c9893179cbc01c2ea4fcbc2d42fed7debea84..16cccd278daa0c541cb1c1a25ae62ee723f29f00 100644 (file)
@@ -88,15 +88,15 @@ public:
     // implement the radiobox interface
     virtual void SetSelection(int n);
     virtual int GetSelection() const;
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& label);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& label);
 
     virtual bool Enable(bool enable = true);
-    virtual bool Enable(int n, bool enable = true);
+    virtual bool Enable(unsigned int n, bool enable = true);
 
     virtual bool Show(bool show = true);
-    virtual bool Show(int n, bool show = true);
+    virtual bool Show(unsigned int n, bool show = true);
 
     virtual void SetLabel(const wxString& label);
     virtual wxString GetLabel();
index 0cbb947156cf542dafbbacb65899ee21851edb3a..41e7014aae766e48bfdd00d01061450ce717b437 100644 (file)
@@ -28,17 +28,17 @@ class WXDLLEXPORT wxRadioBoxBase : public wxItemContainerImmutable
 {
 public:
     // change/query the individual radio button state
-    virtual bool Enable(int n, bool enable = true) = 0;
-    virtual bool Show(int n, bool show = true) = 0;
+    virtual bool Enable(unsigned int n, bool enable = true) = 0;
+    virtual bool Show(unsigned int n, bool show = true) = 0;
 
     // NB: these functions are stubbed here for now but should become pure
     //     virtual once all ports implement them
-    virtual bool IsItemEnabled(int WXUNUSED(n)) const { return true; }
-    virtual bool IsItemShown(int WXUNUSED(n)) const { return true; }
+    virtual bool IsItemEnabled(unsigned int WXUNUSED(n)) const { return true; }
+    virtual bool IsItemShown(unsigned int WXUNUSED(n)) const { return true; }
 
     // return number of columns/rows in this radiobox
-    int GetColumnCount() const { return m_numCols; }
-    int GetRowCount() const { return m_numRows; }
+    unsigned int GetColumnCount() const { return m_numCols; }
+    unsigned int GetRowCount() const { return m_numRows; }
 
     // return the item above/below/to the left/right of the given one
     int GetNextItem(int item, wxDirection dir, long style) const;
@@ -60,21 +60,21 @@ protected:
 
     // return the number of items in major direction (which depends on whether
     // we have wxRA_SPECIFY_COLS or wxRA_SPECIFY_ROWS style)
-    int GetMajorDim() const { return m_majorDim; }
+    unsigned int GetMajorDim() const { return m_majorDim; }
 
     // sets m_majorDim and also updates m_numCols/Rows
     //
     // the style parameter should be the style of the radiobox itself
-    void SetMajorDim(int majorDim, long style);
+    void SetMajorDim(unsigned int majorDim, long style);
 
 
 private:
     // the number of elements in major dimension (i.e. number of columns if
     // wxRA_SPECIFY_COLS or the number of rows if wxRA_SPECIFY_ROWS) and also
     // the number of rows/columns calculated from it
-    int m_majorDim,
-        m_numCols,
-        m_numRows;
+    unsigned int m_majorDim,
+                 m_numCols,
+                 m_numRows;
 };
 
 #if defined(__WXUNIVERSAL__)
index 9f901de08eb317220e8537f4c33c91dc7fd51016..619ab94038f1adfea26f178ae4a522b0e9423223 100644 (file)
@@ -70,8 +70,8 @@ public:
                 const wxString& name = wxListBoxNameStr);
 
     // implement check list box methods
-    virtual bool IsChecked(size_t item) const;
-    virtual void Check(size_t item, bool check = true);
+    virtual bool IsChecked(unsigned int item) const;
+    virtual void Check(unsigned int item, bool check = true);
 
     // and input handling
     virtual bool PerformAction(const wxControlAction& action,
@@ -80,11 +80,11 @@ public:
 
     // override all methods which add/delete items to update m_checks array as
     // well
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 
 protected:
     virtual int DoAppend(const wxString& item);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
     virtual void DoClear();
 
@@ -122,4 +122,3 @@ public:
 };
 
 #endif // _WX_UNIV_CHECKLST_H_
-
index 9230e4dbe05f3103fd566578373dae49de340f07..8c9eb4fcdc5ee0f19553cadbfe6483a017df1947 100644 (file)
@@ -293,10 +293,10 @@ public:
 
     // wxControlWithItems methods
     virtual void Clear();
-    virtual void Delete(int n);
-    virtual size_t GetCount() const;
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& s);
+    virtual void Delete(unsigned int n);
+    virtual unsigned int GetCount() const;
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& s);
     virtual int FindString(const wxString& s, bool bCase = false) const;
     virtual void SetSelection(int n);
     virtual int GetSelection() const;
@@ -305,11 +305,11 @@ public:
 
 protected:
     virtual int DoAppend(const wxString& item);
-    virtual int DoInsert(const wxString& item, int pos);
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual int DoInsert(const wxString& item, unsigned int pos);
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
     // common part of all ctors
     void Init();
index a82785f5ba15e6d9eed998f6dfd72df2d5ff3bc8..837095cc864638f6fe8b8548cdf53add3e1800f8 100644 (file)
@@ -97,13 +97,13 @@ public:
 
     // implement the listbox interface defined by wxListBoxBase
     virtual void Clear();
-    virtual void Delete(int n);
+    virtual void Delete(unsigned int n);
 
-    virtual size_t GetCount() const
-        { return m_strings->GetCount(); }
-    virtual wxString GetString(int n) const
+    virtual unsigned int GetCount() const
+        { return (unsigned int)m_strings->GetCount(); }
+    virtual wxString GetString(unsigned int n) const
         { return m_strings->Item(n); }
-    virtual void SetString(int n, const wxString& s);
+    virtual void SetString(unsigned int n, const wxString& s);
     virtual int FindString(const wxString& s, bool bCase = false) const
         { return m_strings->Index(s, bCase); }
 
@@ -116,15 +116,15 @@ protected:
     virtual void DoSetSelection(int n, bool select);
     virtual int DoAppendOnly(const wxString& item);
     virtual int DoAppend(const wxString& item);
-    virtual void DoInsertItems(const wxArrayString& items, int pos);
+    virtual void DoInsertItems(const wxArrayString& items, unsigned int pos);
     virtual void DoSetItems(const wxArrayString& items, void **clientData);
 
     virtual void DoSetFirstItem(int n);
 
-    virtual void DoSetItemClientData(int n, void* clientData);
-    virtual void* DoGetItemClientData(int n) const;
-    virtual void DoSetItemClientObject(int n, wxClientData* clientData);
-    virtual wxClientData* DoGetItemClientObject(int n) const;
+    virtual void DoSetItemClientData(unsigned int n, void* clientData);
+    virtual void* DoGetItemClientData(unsigned int n) const;
+    virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData);
+    virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
 
 public:
     // override some more base class methods
index 1220b5722ba5d6a60b0c2e34ab849f335e8ec567..17b4f8951b37040f731aabeb5ef7db01cad6d7b8 100644 (file)
@@ -84,16 +84,17 @@ public:
     virtual void SetSelection(int n);
     virtual int GetSelection() const;
 
-    virtual size_t GetCount() const { return m_buttons.GetCount(); }
+    virtual unsigned int GetCount() const
+        { return (unsigned int)m_buttons.GetCount(); }
 
-    virtual wxString GetString(int n) const;
-    virtual void SetString(int n, const wxString& label);
+    virtual wxString GetString(unsigned int n) const;
+    virtual void SetString(unsigned int n, const wxString& label);
 
-    virtual bool Enable(int n, bool enable = true);
-    virtual bool Show(int n, bool show = true);
+    virtual bool Enable(unsigned int n, bool enable = true);
+    virtual bool Show(unsigned int n, bool show = true);
 
-    virtual bool IsItemEnabled(int n) const;
-    virtual bool IsItemShown(int n) const;
+    virtual bool IsItemEnabled(unsigned int n) const;
+    virtual bool IsItemShown(unsigned int n) const;
 
     // we also override the wxControl methods to avoid virtual function hiding
     virtual bool Enable(bool enable = true);
index 9f7046a89bd62212c1b4583981aa91f80328bff6..f973500bb2fe91558c08ad4262bde73240abe82a 100644 (file)
@@ -362,8 +362,8 @@ void ComboboxWidgetsPage::CreateCombo()
     wxArrayString items;
     if ( m_combobox )
     {
-        int count = m_combobox->GetCount();
-        for ( int n = 0; n < count; n++ )
+        unsigned int count = m_combobox->GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             items.Add(m_combobox->GetString(n));
         }
@@ -377,8 +377,8 @@ void ComboboxWidgetsPage::CreateCombo()
                                 0, NULL,
                                 flags);
 
-    size_t count = items.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    unsigned int count = items.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_combobox->Append(items[n]);
     }
@@ -415,7 +415,7 @@ void ComboboxWidgetsPage::OnButtonDelete(wxCommandEvent& WXUNUSED(event))
 {
     unsigned long n;
     if ( !m_textDelete->GetValue().ToULong(&n) ||
-            (n >= (unsigned)m_combobox->GetCount()) )
+            (n >= m_combobox->GetCount()) )
     {
         return;
     }
@@ -426,7 +426,7 @@ void ComboboxWidgetsPage::OnButtonDelete(wxCommandEvent& WXUNUSED(event))
 void ComboboxWidgetsPage::OnButtonDeleteSel(wxCommandEvent& WXUNUSED(event))
 {
     int sel = m_combobox->GetSelection();
-    if ( sel != -1 )
+    if ( sel != wxNOT_FOUND )
     {
         m_combobox->Delete(sel);
     }
index f3a68f99ac2ed46ac6fb1195cf9fcce04fa911b9..80dbda3c3d1b122671b3d80f0a0b0244eb0e76ca 100644 (file)
@@ -1,12 +1,12 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        cocoa/checklst.mm
+// Name:        src/cocoa/checklst.mm
 // Purpose:     wxCheckListBox
 // Author:      David Elliott
 // Modified by:
 // Created:     2003/03/18
-// RCS-ID:      $Id
+// RCS-ID:      $Id$
 // Copyright:   (c) 2003 David Elliott
-// Licence:    wxWidgets licence
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/wxprec.h"
@@ -58,13 +58,13 @@ wxCheckListBox::~wxCheckListBox()
 {
 }
 
-bool wxCheckListBox::IsChecked(size_t item) const
+bool wxCheckListBox::IsChecked(unsigned int item) const
 {
     return false;
 }
 
 
-void wxCheckListBox::Check(size_t item, bool check)
+void wxCheckListBox::Check(unsigned int item, bool check)
 {
 }
 
index 8f15536bd57fe06ea997b4a726efc88de24127c1..266a2bdbbc424349ec8339ef87613bfdad0385a0 100644 (file)
@@ -78,7 +78,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID winid,
         {
             m_sortedStrings->Add(choices[i]);
         }
-        for(size_t i=0; i < m_sortedStrings->GetCount(); i++)
+        for(unsigned int i=0; i < m_sortedStrings->GetCount(); i++)
         {
             [nsmenu addItemWithTitle:wxNSStringWithWxString(
                     m_sortedStrings->Item(i))
@@ -113,7 +113,7 @@ wxChoice::~wxChoice()
 
     if(HasClientObjectData())
     {
-        for(size_t i=0; i < m_itemsClientData.GetCount(); i++)
+        for(unsigned int i=0; i < m_itemsClientData.GetCount(); i++)
             delete (wxClientData*)m_itemsClientData.Item(i);
     }
     m_itemsClientData.Clear();
@@ -139,14 +139,14 @@ void wxChoice::Clear()
         m_sortedStrings->Clear();
     if(HasClientObjectData())
     {
-        for(size_t i=0; i < m_itemsClientData.GetCount(); i++)
+        for(unsigned int i=0; i < m_itemsClientData.GetCount(); i++)
             delete (wxClientData*)m_itemsClientData.Item(i);
     }
     m_itemsClientData.Clear();
     [(NSPopUpButton*)m_cocoaNSView removeAllItems];
 }
 
-void wxChoice::Delete(int n)
+void wxChoice::Delete(unsigned int n)
 {
     if(m_sortedStrings)
         m_sortedStrings->RemoveAt(n);
@@ -156,18 +156,18 @@ void wxChoice::Delete(int n)
     [(NSPopUpButton*)m_cocoaNSView removeItemAtIndex:n];
 }
 
-size_t wxChoice::GetCount() const
+unsigned int wxChoice::GetCount() const
 {
-    return (size_t)[(NSPopUpButton*)m_cocoaNSView numberOfItems];
+    return (unsigned int)[(NSPopUpButton*)m_cocoaNSView numberOfItems];
 }
 
-wxString wxChoice::GetString(int n) const
+wxString wxChoice::GetString(unsigned int n) const
 {
     wxAutoNSAutoreleasePool pool;
     return wxStringWithNSString([(NSPopUpButton*)m_cocoaNSView itemTitleAtIndex:n]);
 }
 
-void wxChoice::SetString(int n, const wxString& title)
+void wxChoice::SetString(unsigned int n, const wxString& title)
 {
     NSMenuItem *item = [(NSPopUpButton*)m_cocoaNSView itemAtIndex:n];
     [item setTitle:wxNSStringWithWxString(title)];
@@ -207,7 +207,7 @@ int wxChoice::DoAppend(const wxString& title)
     return [nsmenu indexOfItem:item];
 }
 
-int wxChoice::DoInsert(const wxString& title, int pos)
+int wxChoice::DoInsert(const wxString& title, unsigned int pos)
 {
     if(m_sortedStrings)
         return DoAppend(title);
@@ -218,22 +218,22 @@ int wxChoice::DoInsert(const wxString& title, int pos)
     return [nsmenu indexOfItem:item];
 }
 
-void wxChoice::DoSetItemClientData(int n, void *data)
+void wxChoice::DoSetItemClientData(unsigned int n, void *data)
 {
     m_itemsClientData.Item(n) = data;
 }
 
-void* wxChoice::DoGetItemClientData(int n) const
+void* wxChoice::DoGetItemClientData(unsigned int n) const
 {
     return m_itemsClientData.Item(n);
 }
 
-void wxChoice::DoSetItemClientObject(int n, wxClientData *data)
+void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData *data)
 {
     m_itemsClientData.Item(n) = data;
 }
 
-wxClientData* wxChoice::DoGetItemClientObject(int n) const
+wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData*)m_itemsClientData.Item(n);
 }
index 9be77501acda5c54c921d86df919f19e0dc93162..fcfed2c0a5fb376e5098d4208921698376f3212b 100644 (file)
@@ -255,23 +255,23 @@ void wxComboBox::Clear()
     m_Datas.Clear();
 }
 
-void wxComboBox::Delete(int nIndex)
+void wxComboBox::Delete(unsigned int n)
 {
-    [GetNSComboBox() removeItemAtIndex:nIndex];
-    m_Datas.RemoveAt(nIndex);
+    [GetNSComboBox() removeItemAtIndex:n];
+    m_Datas.RemoveAt(n);
 }
 
-size_t wxComboBox::GetCount() const
+unsigned int wxComboBox::GetCount() const
 {
-    return (size_t)[GetNSComboBox() numberOfItems];
+    return (unsigned int)[GetNSComboBox() numberOfItems];
 }
 
-wxString wxComboBox::GetString(int nIndex) const
+wxString wxComboBox::GetString(unsigned int nIndex) const
 {
     return wxStringWithNSString([GetNSComboBox() itemObjectValueAtIndex:nIndex]);
 }
 
-void wxComboBox::SetString(int nIndex, const wxString& szString)
+void wxComboBox::SetString(unsigned int nIndex, const wxString& szString)
 {
     wxAutoNSAutoreleasePool pool;
     //FIXME:  There appears to be no "set item data" method - maybe
@@ -299,30 +299,30 @@ int wxComboBox::DoAppend(const wxString& szItem)
     return [GetNSComboBox() numberOfItems];
 }
 
-int wxComboBox::DoInsert(const wxString& szItem, int nIndex)
+int wxComboBox::DoInsert(const wxString& szItem, unsigned int nIndex)
 {
     m_Datas.Insert(NULL, nIndex);
     wxAutoNSAutoreleasePool pool;
     [GetNSComboBox() insertItemWithObjectValue:wxNSStringWithWxString(szItem) atIndex:nIndex];
-    return nIndex;
+    return (int)nIndex;
 }
 
-void wxComboBox::DoSetItemClientData(int nIndex, void* pData)
+void wxComboBox::DoSetItemClientData(unsigned int nIndex, void* pData)
 {
     m_Datas[nIndex] = pData;
 }
 
-void* wxComboBox::DoGetItemClientData(int nIndex) const
+void* wxComboBox::DoGetItemClientData(unsigned int nIndex) const
 {
     return m_Datas[nIndex];
 }
 
-void wxComboBox::DoSetItemClientObject(int nIndex, wxClientData* pClientData)
+void wxComboBox::DoSetItemClientObject(unsigned int nIndex, wxClientData* pClientData)
 {
     m_Datas[nIndex] = (void*) pClientData;
 }
 
-wxClientData* wxComboBox::DoGetItemClientObject(int nIndex) const
+wxClientData* wxComboBox::DoGetItemClientObject(unsigned int nIndex) const
 {
     return (wxClientData*) m_Datas[nIndex];
 }
index 78ac4571811fe23289c1f6d08bbde993ab7c2e9f..37eb935a7b481283b8b344b5550d0240c8b8bf18 100644 (file)
@@ -168,7 +168,7 @@ int wxListBox::GetSelections(wxArrayInt& aSelections) const
     return [GetNSTableView() numberOfSelectedRows];
 }
 
-void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxAutoNSAutoreleasePool pool;
 
@@ -189,7 +189,7 @@ void wxListBox::DoSetItems(const wxArrayString& items, void **clientData)
     [m_cocoaItems removeAllObjects];
     m_itemClientData.Clear();
     // Provide the data
-    for(size_t i=0; i < items.GetCount(); i++)
+    for(unsigned int i=0; i < items.GetCount(); i++)
     {
         [m_cocoaItems addObject: wxNSStringWithWxString(items[i])];
         m_itemClientData.Add(clientData[i]);
@@ -216,7 +216,7 @@ void wxListBox::Clear()
     [GetNSTableView() reloadData];
 }
 
-void wxListBox::Delete(int n)
+void wxListBox::Delete(unsigned int n)
 {
     [m_cocoaItems removeObjectAtIndex:n];
     m_itemClientData.RemoveAt(n);
@@ -224,17 +224,17 @@ void wxListBox::Delete(int n)
 }
 
     // accessing strings
-size_t wxListBox::GetCount() const
+unsigned int wxListBox::GetCount() const
 {
-    return (size_t)[m_cocoaItems count];
+    return (unsigned int)[m_cocoaItems count];
 }
 
-wxString wxListBox::GetString(int n) const
+wxString wxListBox::GetString(unsigned int n) const
 {
     return wxStringWithNSString([m_cocoaItems objectAtIndex:n]);
 }
 
-void wxListBox::SetString(int n, const wxString& s)
+void wxListBox::SetString(unsigned int n, const wxString& s)
 {
     wxAutoNSAutoreleasePool pool;
     [m_cocoaItems removeObjectAtIndex:n];
@@ -264,22 +264,22 @@ int wxListBox::DoAppend(const wxString& item)
     return [m_cocoaItems count];
 }
 
-void wxListBox::DoSetItemClientData(int n, void* clientData)
+void wxListBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
     m_itemClientData[n] = clientData;
 }
 
-void* wxListBox::DoGetItemClientData(int n) const
+void* wxListBox::DoGetItemClientData(unsigned int n) const
 {
     return m_itemClientData[n];
 }
 
-void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxListBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     m_itemClientData[n] = (void*) clientData;
 }
 
-wxClientData* wxListBox::DoGetItemClientObject(int n) const
+wxClientData* wxListBox::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData*) m_itemClientData[n];
 }
index aa699a7e2d949cc3fe8d9bea46ab030e56c9dd29..f7476c27182e19b8c66b5c561b97c3f03d688576 100644 (file)
@@ -76,28 +76,28 @@ int wxRadioBox::GetSelection() const
 }
 
     // string access
-size_t wxRadioBox::GetCount() const
+unsigned int wxRadioBox::GetCount() const
 {
     return 0;
 }
 
-wxString wxRadioBox::GetString(int n) const
+wxString wxRadioBox::GetString(unsigned int n) const
 {
     return wxEmptyString;
 }
 
-void wxRadioBox::SetString(int n, const wxString& label)
+void wxRadioBox::SetString(unsigned int n, const wxString& label)
 {
 }
 
     // change the individual radio button state
-bool wxRadioBox::Enable(int n, bool enable)
+bool wxRadioBox::Enable(unsigned int n, bool enable)
 {
     // TODO
     return false;
 }
 
-bool wxRadioBox::Show(int n, bool show)
+bool wxRadioBox::Show(unsigned int n, bool show)
 {
     // TODO
     return false;
index df087db26825b8eb10b9dedb5e01d8188b8117a4..d2bc3e8ef26e4b26978bf83d05d5e8f0813118ba 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        common/ctrlsub.cpp
+// Name:        src/common/ctrlsub.cpp
 // Purpose:     wxItemContainer implementation
 // Author:      Vadim Zeitlin
 // Modified by:
@@ -49,9 +49,10 @@ wxItemContainerImmutable::~wxItemContainerImmutable()
 wxString wxItemContainerImmutable::GetStringSelection() const
 {
     wxString s;
+
     int sel = GetSelection();
-    if ( sel != -1 )
-        s = GetString(sel);
+    if ( sel != wxNOT_FOUND )
+        s = GetString((unsigned int)sel);
 
     return s;
 }
@@ -71,9 +72,9 @@ wxArrayString wxItemContainerImmutable::GetStrings() const
 {
     wxArrayString result;
 
-    const size_t count = GetCount();
+    const unsigned int count = GetCount();
     result.Alloc(count);
-    for ( size_t n = 0; n < count; n++ )
+    for ( unsigned int n = 0; n < count; n++ )
         result.Add(GetString(n));
 
     return result;
@@ -94,14 +95,14 @@ wxItemContainer::~wxItemContainer()
 
 void wxItemContainer::Append(const wxArrayString& strings)
 {
-    size_t count = strings.GetCount();
+    const size_t count = strings.GetCount();
     for ( size_t n = 0; n < count; n++ )
     {
         Append(strings[n]);
     }
 }
 
-int wxItemContainer::Insert(const wxString& item, int pos, void *clientData)
+int wxItemContainer::Insert(const wxString& item, unsigned int pos, void *clientData)
 {
     int n = DoInsert(item, pos);
     if ( n != wxNOT_FOUND )
@@ -110,8 +111,7 @@ int wxItemContainer::Insert(const wxString& item, int pos, void *clientData)
     return n;
 }
 
-int
-wxItemContainer::Insert(const wxString& item, int pos, wxClientData *clientData)
+int wxItemContainer::Insert(const wxString& item, unsigned int pos, wxClientData *clientData)
 {
     int n = DoInsert(item, pos);
     if ( n != wxNOT_FOUND )
@@ -124,7 +124,7 @@ wxItemContainer::Insert(const wxString& item, int pos, wxClientData *clientData)
 // client data
 // ----------------------------------------------------------------------------
 
-void wxItemContainer::SetClientObject(int n, wxClientData *data)
+void wxItemContainer::SetClientObject(unsigned int n, wxClientData *data)
 {
     wxASSERT_MSG( m_clientDataItemsType != wxClientData_Void,
                   wxT("can't have both object and void client data") );
@@ -147,7 +147,7 @@ void wxItemContainer::SetClientObject(int n, wxClientData *data)
     DoSetItemClientObject(n, data);
 }
 
-wxClientData *wxItemContainer::GetClientObject(int n) const
+wxClientData *wxItemContainer::GetClientObject(unsigned int n) const
 {
     wxASSERT_MSG( m_clientDataItemsType == wxClientData_Object,
                   wxT("this window doesn't have object client data") );
@@ -155,7 +155,7 @@ wxClientData *wxItemContainer::GetClientObject(int n) const
     return DoGetItemClientObject(n);
 }
 
-void wxItemContainer::SetClientData(int n, void *data)
+void wxItemContainer::SetClientData(unsigned int n, void *data)
 {
     wxASSERT_MSG( m_clientDataItemsType != wxClientData_Object,
                   wxT("can't have both object and void client data") );
@@ -164,7 +164,7 @@ void wxItemContainer::SetClientData(int n, void *data)
     m_clientDataItemsType = wxClientData_Void;
 }
 
-void *wxItemContainer::GetClientData(int n) const
+void *wxItemContainer::GetClientData(unsigned int n) const
 {
     wxASSERT_MSG( m_clientDataItemsType == wxClientData_Void,
                   wxT("this window doesn't have void client data") );
index 3943d96c4a2aabf4d1bd414388ff9e3e346fb486..02d5c94b8125d3cf1e94f4c0d7c5b5c36d754e18 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        common/lboxcmn.cpp
+// Name:        src/common/lboxcmn.cpp
 // Purpose:     wxListBox class methods common to all platforms
 // Author:      Vadim Zeitlin
 // Modified by:
@@ -45,10 +45,10 @@ wxListBoxBase::~wxListBoxBase()
 // adding items
 // ----------------------------------------------------------------------------
 
-void wxListBoxBase::InsertItems(int nItems, const wxString *items, int pos)
+void wxListBoxBase::InsertItems(unsigned int nItems, const wxString *items, unsigned int pos)
 {
     wxArrayString aItems;
-    for ( int n = 0; n < nItems; n++ )
+    for ( unsigned int n = 0; n < nItems; n++ )
     {
         aItems.Add(items[n]);
     }
index 0d2851632fc5bd9e2c75d49156f1d87b192535f2..32adee107ad468dddbe0ede761182327cbaf13f4 100644 (file)
@@ -34,7 +34,7 @@
 // implementation
 // ============================================================================
 
-void wxRadioBoxBase::SetMajorDim(int majorDim, long style)
+void wxRadioBoxBase::SetMajorDim(unsigned int majorDim, long style)
 {
     wxCHECK_RET( majorDim != 0, _T("major radiobox dimension can't be 0") );
 
index 169e56785b24b63d70af67d6abc780a1c7fce70c..f74635e4e01b55ebe30e9f389dcecefdb8aa51d3 100644 (file)
@@ -101,16 +101,16 @@ void wxCheckListBox::DoCreateCheckList()
     gtk_tree_view_append_column(m_treeview, column);
 }
 
-bool wxCheckListBox::IsChecked( int index ) const
+bool wxCheckListBox::IsChecked(unsigned int index) const
 {
-    wxCHECK_MSG( m_treeview != NULL, FALSE, wxT("invalid checklistbox") );
+    wxCHECK_MSG( m_treeview != NULL, false, wxT("invalid checklistbox") );
 
     GtkTreeIter iter;
     gboolean res = gtk_tree_model_iter_nth_child(
                         GTK_TREE_MODEL(m_liststore),
                         &iter, NULL, //NULL = parent = get first
                         index
-                                                );
+                   );
     if(!res)
         return false;
 
@@ -123,7 +123,7 @@ bool wxCheckListBox::IsChecked( int index ) const
     return g_value_get_boolean(&value) == TRUE ? true : false;
 }
 
-void wxCheckListBox::Check( int index, bool check )
+void wxCheckListBox::Check(unsigned int index, bool check)
 {
     wxCHECK_RET( m_treeview != NULL, wxT("invalid checklistbox") );
 
@@ -132,7 +132,7 @@ void wxCheckListBox::Check( int index, bool check )
                         GTK_TREE_MODEL(m_liststore),
                         &iter, NULL, //NULL = parent = get first
                         index
-                                                );
+                   );
     if(!res)
         return;
 
index d1478144ebb6c278f762bb2bbe14e1d3e050e05e..011468f47eb322ab599734cd5ad3df63a7c36756 100644 (file)
@@ -120,7 +120,7 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
 
     GtkWidget *menu = gtk_menu_new();
 
-    for (size_t i = 0; i < (size_t)n; i++)
+    for (unsigned int i = 0; i < (unsigned int)n; i++)
     {
         GtkAddHelper(menu, i, choices[i]);
     }
@@ -151,27 +151,27 @@ int wxChoice::DoAppend( const wxString &item )
     return GtkAddHelper(menu, GetCount(), item);
 }
 
-int wxChoice::DoInsert( const wxString &item, int pos )
+int wxChoice::DoInsert(const wxString &item, unsigned int pos)
 {
     wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid choice control") );
     wxCHECK_MSG( IsValidInsert(pos), -1, wxT("invalid index"));
 
-    if ((size_t)pos == GetCount())
+    if (pos == GetCount())
         return DoAppend(item);
 
     GtkWidget *menu = gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) );
 
     // if the item to insert is at or before the selection, and the selection is valid
-    if ((pos <= m_selection_hack) && (m_selection_hack != wxNOT_FOUND))
+    if (((int)pos <= m_selection_hack) && (m_selection_hack != wxNOT_FOUND))
     {
         // move the selection forward one
         m_selection_hack++;
     }
 
-    return GtkAddHelper(menu, (size_t)pos, item);
+    return GtkAddHelper(menu, pos, item);
 }
 
-void wxChoice::DoSetItemClientData( int n, void* clientData )
+void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid choice control") );
 
@@ -181,7 +181,7 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
     node->SetData( (wxObject*) clientData );
 }
 
-void* wxChoice::DoGetItemClientData( int n ) const
+void* wxChoice::DoGetItemClientData(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid choice control") );
 
@@ -191,7 +191,7 @@ void* wxChoice::DoGetItemClientData( int n ) const
     return node->GetData();
 }
 
-void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid choice control") );
 
@@ -203,7 +203,7 @@ void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
     node->SetData( (wxObject*) clientData );
 }
 
-wxClientData* wxChoice::DoGetItemClientObject( int n ) const
+wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, (wxClientData*) NULL, wxT("invalid choice control") );
 
@@ -243,23 +243,23 @@ void wxChoice::Clear()
     m_selection_hack = wxNOT_FOUND;
 }
 
-void wxChoice::Delete( int n )
+void wxChoice::Delete(unsigned int n)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );
     wxCHECK_RET( IsValid(n), _T("invalid index in wxChoice::Delete") );
 
     // VZ: apparently GTK+ doesn't have a built-in function to do it (not even
     //     in 2.0), hence this dumb implementation -- still better than nothing
-    size_t i;
-    const size_t count = GetCount();
+    unsigned int i;
+    const unsigned int count = GetCount();
 
     // if the item to delete is before the selection, and the selection is valid
-    if ((n < m_selection_hack) && (m_selection_hack != wxNOT_FOUND))
+    if (((int)n < m_selection_hack) && (m_selection_hack != wxNOT_FOUND))
     {
         // move the selection back one
         m_selection_hack--;
     }
-    else if (n == m_selection_hack)
+    else if ((int)n == m_selection_hack)
     {
         // invalidate the selection
         m_selection_hack = wxNOT_FOUND;
@@ -275,7 +275,7 @@ void wxChoice::Delete( int n )
     items.Alloc(count);
     for ( i = 0; i < count; i++ )
     {
-        if ( i != (size_t)n )
+        if ( i != n )
         {
             items.Add(GetString(i));
             if ( hasClientData )
@@ -357,12 +357,12 @@ int wxChoice::GetSelection() const
 
 }
 
-void wxChoice::SetString( int n, const wxString& str )
+void wxChoice::SetString(unsigned int n, const wxString& str)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );
 
     GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
-    int count = 0;
+    unsigned int count = 0;
     GList *child = menu_shell->children;
     while (child)
     {
@@ -386,12 +386,12 @@ void wxChoice::SetString( int n, const wxString& str )
     }
 }
 
-wxString wxChoice::GetString( int n ) const
+wxString wxChoice::GetString(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid choice") );
 
     GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
-    int count = 0;
+    unsigned int count = 0;
     GList *child = menu_shell->children;
     while (child)
     {
@@ -417,12 +417,12 @@ wxString wxChoice::GetString( int n ) const
     return wxEmptyString;
 }
 
-size_t wxChoice::GetCount() const
+unsigned int wxChoice::GetCount() const
 {
     wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid choice") );
 
     GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
-    size_t count = 0;
+    unsigned int count = 0;
     GList *child = menu_shell->children;
     while (child)
     {
@@ -440,7 +440,7 @@ void wxChoice::SetSelection( int n )
     gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp );
 
     // set the local selection variable manually
-    if ((n >= 0) && (n < (int)GetCount()))
+    if ((n >= 0) && ((unsigned int)n < GetCount()))
     {
         // a valid selection has been made
         m_selection_hack = n;
@@ -487,13 +487,13 @@ void wxChoice::DoApplyWidgetStyle(GtkRcStyle *style)
 #pragma message disable unscomzer
 #endif
 
-int wxChoice::GtkAddHelper(GtkWidget *menu, size_t pos, const wxString& item)
+int wxChoice::GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& item)
 {
-    wxCHECK_MSG((pos>=0) && (pos<=m_clientList.GetCount()), -1, wxT("invalid index"));
+    wxCHECK_MSG(pos<=m_clientList.GetCount(), -1, wxT("invalid index"));
 
     GtkWidget *menu_item = gtk_menu_item_new_with_label( wxGTK_CONV( item ) );
 
-    size_t index;
+    unsigned int index;
     if ( m_strings )
     {
         // sorted control, need to insert at the correct index
@@ -569,8 +569,8 @@ wxSize wxChoice::DoGetBestSize() const
     if ( m_widget )
     {
         int width;
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
             if ( width > ret.x )
index 1fa5e3336d2ae64a64adb3933a61632e3a2ebcff..9f631e21d887d4ce376d060c358835660ce509d9 100644 (file)
@@ -447,7 +447,7 @@ int wxComboBox::DoAppend( const wxString &item )
         EnableEvents();
     }
 
-    const size_t count = GetCount();
+    const unsigned int count = GetCount();
 
     if ( m_clientDataList.GetCount() < count )
         m_clientDataList.Append( (wxObject*) NULL );
@@ -459,7 +459,7 @@ int wxComboBox::DoAppend( const wxString &item )
     return count - 1;
 }
 
-int wxComboBox::DoInsert( const wxString &item, int pos )
+int wxComboBox::DoInsert(const wxString &item, unsigned int pos)
 {
     wxCHECK_MSG( !(GetWindowStyle() & wxCB_SORT), -1,
                     wxT("can't insert into sorted list"));
@@ -467,9 +467,9 @@ int wxComboBox::DoInsert( const wxString &item, int pos )
     wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid combobox") );
     wxCHECK_MSG( IsValidInsert(pos), -1, wxT("invalid index") );
 
-    size_t count = GetCount();
+    unsigned int count = GetCount();
 
-    if ((size_t)pos == count)
+    if (pos == count)
         return Append(item);
 
 #ifdef __WXGTK24__
@@ -515,7 +515,7 @@ int wxComboBox::DoInsert( const wxString &item, int pos )
     return pos;
 }
 
-void wxComboBox::DoSetItemClientData( int n, void* clientData )
+void wxComboBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
 
@@ -525,7 +525,7 @@ void wxComboBox::DoSetItemClientData( int n, void* clientData )
     node->SetData( (wxObject*) clientData );
 }
 
-void* wxComboBox::DoGetItemClientData( int n ) const
+void* wxComboBox::DoGetItemClientData(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid combobox") );
 
@@ -534,7 +534,7 @@ void* wxComboBox::DoGetItemClientData( int n ) const
     return node ? node->GetData() : NULL;
 }
 
-void wxComboBox::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxComboBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
 
@@ -546,7 +546,7 @@ void wxComboBox::DoSetItemClientObject( int n, wxClientData* clientData )
     node->SetData( (wxObject*) clientData );
 }
 
-wxClientData* wxComboBox::DoGetItemClientObject( int n ) const
+wxClientData* wxComboBox::DoGetItemClientObject(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, (wxClientData*)NULL, wxT("invalid combobox") );
 
@@ -565,8 +565,8 @@ void wxComboBox::Clear()
     if (!gtk_check_version(2,4,0))
     {
         GtkComboBox* combobox = GTK_COMBO_BOX( m_widget );
-        const size_t count = GetCount();
-        for (size_t i = 0; i < count; i++)
+        const unsigned int count = GetCount();
+        for (unsigned int i = 0; i < count; i++)
             gtk_combo_box_remove_text( combobox, 0 );
     }
     else // GTK+ < 2.4.0
@@ -592,7 +592,7 @@ void wxComboBox::Clear()
     InvalidateBestSize();
 }
 
-void wxComboBox::Delete( int n )
+void wxComboBox::Delete(unsigned int n)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
 
@@ -641,7 +641,7 @@ void wxComboBox::Delete( int n )
     InvalidateBestSize();
 }
 
-void wxComboBox::SetString(int n, const wxString &text)
+void wxComboBox::SetString(unsigned int n, const wxString &text)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
 
@@ -783,7 +783,7 @@ int wxComboBox::GetCurrentSelection() const
     return -1;
 }
 
-wxString wxComboBox::GetString( int n ) const
+wxString wxComboBox::GetString(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid combobox") );
 
@@ -836,7 +836,7 @@ wxString wxComboBox::GetStringSelection() const
         int sel = gtk_combo_box_get_active( combobox );
         if (sel == -1)
             return wxEmptyString;
-        return GetString( sel );
+        return GetString(sel);
     }
     else
 #endif
@@ -858,7 +858,7 @@ wxString wxComboBox::GetStringSelection() const
     return wxEmptyString;
 }
 
-size_t wxComboBox::GetCount() const
+unsigned int wxComboBox::GetCount() const
 {
     wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid combobox") );
 
@@ -871,7 +871,7 @@ size_t wxComboBox::GetCount() const
         gtk_tree_model_get_iter_first( model, &iter );
         if (!gtk_list_store_iter_is_valid(GTK_LIST_STORE(model), &iter ))
             return 0;
-        size_t ret = 1;
+        unsigned int ret = 1;
         while (gtk_tree_model_iter_next( model, &iter ))
             ret++;
         return ret;
@@ -882,8 +882,12 @@ size_t wxComboBox::GetCount() const
         GtkWidget *list = GTK_COMBO(m_widget)->list;
 
         GList *child = GTK_LIST(list)->children;
-        size_t count = 0;
-        while (child) { count++; child = child->next; }
+        unsigned int count = 0;
+        while (child)
+        {
+            count++;
+            child = child->next;
+        }
         return count;
     }
 
@@ -1347,10 +1351,10 @@ wxSize wxComboBox::DoGetBestSize() const
     if ( m_widget )
     {
         int width;
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
-            GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
+            GetTextExtent(GetString(n), &width, NULL, NULL, NULL );
             if ( width > ret.x )
                 ret.x = width;
         }
index cd8381475d619449c8a77b5b83543ac9e5c5ee48..f3c5f07d2e3ae7ec97fdd55731db855dcc5b3117 100644 (file)
@@ -591,7 +591,7 @@ wxListBox::~wxListBox()
 // ----------------------------------------------------------------------------
 
 void wxListBox::GtkInsertItems(const wxArrayString& items,
-                               void** clientData, size_t pos)
+                               void** clientData, unsigned int pos)
 {
     wxCHECK_RET( m_treeview != NULL, wxT("invalid listbox") );
 
@@ -599,8 +599,8 @@ void wxListBox::GtkInsertItems(const wxArrayString& items,
 
     // Create and set column ids and GValues
 
-    size_t nNum = items.GetCount();
-    size_t nCurCount = wxListBox::GetCount();
+    unsigned int nNum = items.GetCount();
+    unsigned int nCurCount = wxListBox::GetCount();
     wxASSERT_MSG(pos <= nCurCount, wxT("Invalid index passed to wxListBox"));
 
     GtkTreeIter* pIter = NULL; // append by default
@@ -620,7 +620,7 @@ void wxListBox::GtkInsertItems(const wxArrayString& items,
         pIter = &iter;
     }
 
-    for (size_t i = 0; i < nNum; ++i)
+    for (unsigned int i = 0; i < nNum; ++i)
     {
         wxString label = items[i];
 
@@ -660,17 +660,17 @@ void wxListBox::GtkInsertItems(const wxArrayString& items,
     }
 }
 
-void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxCHECK_RET( IsValidInsert(pos), wxT("invalid index in wxListBox::InsertItems") );
 
-    GtkInsertItems(items, NULL, (size_t)pos);
+    GtkInsertItems(items, NULL, pos);
 }
 
 int wxListBox::DoAppend( const wxString& item )
 {
     // Call DoInsertItems
-    int nWhere = (int)wxListBox::GetCount();
+    unsigned int nWhere = wxListBox::GetCount();
     wxArrayString aItems;
     aItems.Add(item);
     wxListBox::DoInsertItems(aItems, nWhere);
@@ -697,7 +697,7 @@ void wxListBox::Clear()
     gtk_list_store_clear( m_liststore ); /* well, THAT was easy :) */
 }
 
-void wxListBox::Delete( int n )
+void wxListBox::Delete(unsigned int n)
 {
     wxCHECK_RET( m_treeview != NULL, wxT("invalid listbox") );
 
@@ -708,7 +708,7 @@ void wxListBox::Delete( int n )
                         GTK_TREE_MODEL(m_liststore),
                         &iter, NULL, //NULL = parent = get first
                         n
-                                                );
+                   );
 
     wxCHECK_RET( res, wxT("wrong listbox index") );
 
@@ -749,9 +749,9 @@ struct _GtkTreeEntry* wxListBox::GtkGetEntry(int n) const
 // client data
 // ----------------------------------------------------------------------------
 
-void* wxListBox::DoGetItemClientData( int n ) const
+void* wxListBox::DoGetItemClientData(unsigned int n) const
 {
-    wxCHECK_MSG( n >= 0 && (size_t)n < wxListBox::GetCount(), NULL,
+    wxCHECK_MSG( IsValid(n), NULL,
                  wxT("Invalid index passed to GetItemClientData") );
 
     GtkTreeEntry* entry = GtkGetEntry(n);
@@ -762,14 +762,14 @@ void* wxListBox::DoGetItemClientData( int n ) const
     return userdata;
 }
 
-wxClientData* wxListBox::DoGetItemClientObject( int n ) const
+wxClientData* wxListBox::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData*) wxListBox::DoGetItemClientData(n);
 }
 
-void wxListBox::DoSetItemClientData( int n, void* clientData )
+void wxListBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
-    wxCHECK_RET( n >= 0 && (size_t)n < wxListBox::GetCount(),
+    wxCHECK_RET( IsValid(n),
                  wxT("Invalid index passed to SetItemClientData") );
 
     GtkTreeEntry* entry = GtkGetEntry(n);
@@ -779,7 +779,7 @@ void wxListBox::DoSetItemClientData( int n, void* clientData )
     g_object_unref(G_OBJECT(entry));
 }
 
-void wxListBox::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxListBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     // wxItemContainer already deletes data for us
     wxListBox::DoSetItemClientData(n, (void*) clientData);
@@ -789,7 +789,7 @@ void wxListBox::DoSetItemClientObject( int n, wxClientData* clientData )
 // string list access
 // ----------------------------------------------------------------------------
 
-void wxListBox::SetString( int n, const wxString &string )
+void wxListBox::SetString(unsigned int n, const wxString &string)
 {
     wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetString") );
     wxCHECK_RET( m_treeview != NULL, wxT("invalid listbox") );
@@ -816,12 +816,12 @@ void wxListBox::SetString( int n, const wxString &string )
 
     wxArrayString aItems;
     aItems.Add(label);
-    GtkInsertItems(aItems, &userdata, (size_t)n);
+    GtkInsertItems(aItems, &userdata, n);
     if (bWasSelected)
         wxListBox::GtkSetSelection(n, true, true);
 }
 
-wxString wxListBox::GetString( int n ) const
+wxString wxListBox::GetString(unsigned int n) const
 {
     wxCHECK_MSG( m_treeview != NULL, wxEmptyString, wxT("invalid listbox") );
 
@@ -842,11 +842,11 @@ wxString wxListBox::GetString( int n ) const
     return label;
 }
 
-size_t wxListBox::GetCount() const
+unsigned int wxListBox::GetCount() const
 {
     wxCHECK_MSG( m_treeview != NULL, 0, wxT("invalid listbox") );
 
-    return (size_t)gtk_tree_model_iter_n_children(GTK_TREE_MODEL(m_liststore), NULL);
+    return (unsigned int)gtk_tree_model_iter_n_children(GTK_TREE_MODEL(m_liststore), NULL);
 }
 
 int wxListBox::FindString( const wxString &item, bool bCase ) const
@@ -854,9 +854,9 @@ int wxListBox::FindString( const wxString &item, bool bCase ) const
     wxCHECK_MSG( m_treeview != NULL, wxNOT_FOUND, wxT("invalid listbox") );
 
     //Sort of hackish - maybe there is a faster way
-    size_t nCount = wxListBox::GetCount();
+    unsigned int nCount = wxListBox::GetCount();
 
-    for(size_t i = 0; i < nCount; ++i)
+    for(unsigned int i = 0; i < nCount; ++i)
     {
         if( item.IsSameAs( wxListBox::GetString(i), bCase ) )
             return (int)i;
@@ -1095,13 +1095,13 @@ wxSize wxListBox::DoGetBestSize() const
 
     // Get the visible area of the tree view (limit to the 10th item
     // so that it isn't too big)
-    size_t count = GetCount();
+    unsigned int count = GetCount();
     if (count)
     {
         int wLine;
 
         // Find the widest line
-        for(size_t i = 0; i < count; i++) {
+        for(unsigned int i = 0; i < count; i++) {
             wxString str(GetString(i));
             GetTextExtent(str, &wLine, NULL);
             lbWidth = wxMax(lbWidth, wLine);
@@ -1119,8 +1119,8 @@ wxSize wxListBox::DoGetBestSize() const
         }
 #endif
 
-    // don't make the listbox too tall (limit height to around 10 items) but don't
-    // make it too small neither
+        // don't make the listbox too tall (limit height to around 10 items) but don't
+        // make it too small neither
         lbHeight = (cy+4) * wxMin(wxMax(count, 3), 10);
     }
 
index 1e903f7fdd563644bdfe2347fe96d2fa57755d76..07394f9b9efe2904f1bdfb63c0d1a89ffa29376c 100644 (file)
@@ -213,8 +213,8 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
     SetMajorDim(majorDim == 0 ? n : majorDim, style);
 
 
-    int num_of_cols = GetColumnCount();
-    int num_of_rows = GetRowCount();
+    unsigned int num_of_cols = GetColumnCount();
+    unsigned int num_of_rows = GetRowCount();
 
     GtkRadioButton *m_radio = (GtkRadioButton*) NULL;
 
@@ -226,7 +226,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
 
     wxString label;
     GSList *radio_button_group = (GSList *) NULL;
-    for (int i = 0; i < n; i++)
+    for (unsigned int i = 0; i < n; i++)
     {
         if ( i != 0 )
             radio_button_group = gtk_radio_button_get_group( GTK_RADIO_BUTTON(m_radio) );
@@ -381,7 +381,7 @@ int wxRadioBox::GetSelection(void) const
     return wxNOT_FOUND;
 }
 
-wxString wxRadioBox::GetString( int n ) const
+wxString wxRadioBox::GetString(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid radiobox") );
 
@@ -403,7 +403,7 @@ void wxRadioBox::SetLabel( const wxString& label )
     GTKSetLabelForFrame(GTK_FRAME(m_widget), label);
 }
 
-void wxRadioBox::SetString( int item, const wxString& label )
+void wxRadioBox::SetString(unsigned int item, const wxString& label)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
 
@@ -435,7 +435,7 @@ bool wxRadioBox::Enable( bool enable )
     return true;
 }
 
-bool wxRadioBox::Enable( int item, bool enable )
+bool wxRadioBox::Enable(unsigned int item, bool enable)
 {
     wxCHECK_MSG( m_widget != NULL, false, wxT("invalid radiobox") );
 
@@ -452,7 +452,7 @@ bool wxRadioBox::Enable( int item, bool enable )
     return true;
 }
 
-bool wxRadioBox::IsItemEnabled(int item) const
+bool wxRadioBox::IsItemEnabled(unsigned int item) const
 {
     wxCHECK_MSG( m_widget != NULL, false, wxT("invalid radiobox") );
 
@@ -467,7 +467,7 @@ bool wxRadioBox::IsItemEnabled(int item) const
     return GTK_WIDGET_SENSITIVE(GTK_WIDGET(button));
 }
 
-bool wxRadioBox::Show( int item, bool show )
+bool wxRadioBox::Show(unsigned int item, bool show)
 {
     wxCHECK_MSG( m_widget != NULL, false, wxT("invalid radiobox") );
 
@@ -485,7 +485,7 @@ bool wxRadioBox::Show( int item, bool show )
     return true;
 }
 
-bool wxRadioBox::IsItemShown(int item) const
+bool wxRadioBox::IsItemShown(unsigned int item) const
 {
     wxCHECK_MSG( m_widget != NULL, false, wxT("invalid radiobox") );
 
@@ -498,7 +498,7 @@ bool wxRadioBox::IsItemShown(int item) const
     return GTK_WIDGET_VISIBLE(GTK_WIDGET(button));
 }
 
-size_t wxRadioBox::GetCount() const
+unsigned int wxRadioBox::GetCount() const
 {
     return m_boxes.GetCount();
 }
index 9ca0fc0b7a5552d837bd2919e0be69ca5e1091e4..cb46643608f8ed70f7f55c9c20118caeeb61e433 100644 (file)
@@ -55,7 +55,7 @@ wxCheckListBox::wxCheckListBox(wxWindow *parent, wxWindowID id,
                        style, validator, name );
 }
 
-bool wxCheckListBox::IsChecked( int index ) const
+bool wxCheckListBox::IsChecked(unsigned int index) const
 {
     wxCHECK_MSG( m_list != NULL, false, wxT("invalid checklistbox") );
 
@@ -74,7 +74,7 @@ bool wxCheckListBox::IsChecked( int index ) const
     return false;
 }
 
-void wxCheckListBox::Check( int index, bool check )
+void wxCheckListBox::Check(unsigned int index, bool check )
 {
     wxCHECK_RET( m_list != NULL, wxT("invalid checklistbox") );
 
index 0912181bcc7abe41dae5503f068e1819f1bcf430..80300657bbfa1214dc04d37b67b654c1dce506c1 100644 (file)
@@ -133,7 +133,7 @@ bool wxChoice::Create( wxWindow *parent, wxWindowID id,
 
     GtkWidget *menu = gtk_menu_new();
 
-    for (size_t i = 0; i < (size_t)n; i++)
+    for (unsigned int i = 0; i < n; i++)
     {
         GtkAddHelper(menu, i, choices[i]);
     }
@@ -164,27 +164,27 @@ int wxChoice::DoAppend( const wxString &item )
     return GtkAddHelper(menu, GetCount(), item);
 }
 
-int wxChoice::DoInsert( const wxString &item, int pos )
+int wxChoice::DoInsert( const wxString &item, unsigned int pos )
 {
     wxCHECK_MSG( m_widget != NULL, -1, wxT("invalid choice control") );
     wxCHECK_MSG( IsValidInsert(pos), -1, wxT("invalid index"));
 
-    if ((size_t)pos == GetCount())
+    if (pos == GetCount())
         return DoAppend(item);
 
     GtkWidget *menu = gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) );
 
     // if the item to insert is at or before the selection, and the selection is valid
-    if ((pos <= m_selection_hack) && (m_selection_hack != wxNOT_FOUND))
+    if (((int)pos <= m_selection_hack) && (m_selection_hack != wxNOT_FOUND))
     {
         // move the selection forward one
         m_selection_hack++;
     }
 
-    return GtkAddHelper(menu, (size_t)pos, item);
+    return GtkAddHelper(menu, pos, item);
 }
 
-void wxChoice::DoSetItemClientData( int n, void* clientData )
+void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid choice control") );
 
@@ -194,7 +194,7 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
     node->SetData( (wxObject*) clientData );
 }
 
-void* wxChoice::DoGetItemClientData( int n ) const
+void* wxChoice::DoGetItemClientData(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid choice control") );
 
@@ -204,7 +204,7 @@ void* wxChoice::DoGetItemClientData( int n ) const
     return node->GetData();
 }
 
-void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid choice control") );
 
@@ -216,7 +216,7 @@ void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
     node->SetData( (wxObject*) clientData );
 }
 
-wxClientData* wxChoice::DoGetItemClientObject( int n ) const
+wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, (wxClientData*) NULL, wxT("invalid choice control") );
 
@@ -256,24 +256,24 @@ void wxChoice::Clear()
     m_selection_hack = wxNOT_FOUND;
 }
 
-void wxChoice::Delete( int n )
+void wxChoice::Delete(unsigned int n)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );
 
     // VZ: apparently GTK+ doesn't have a built-in function to do it (not even
     //     in 2.0), hence this dumb implementation -- still better than nothing
-    int i;
-    size_t count = GetCount();
+    unsigned int i;
+    unsigned int count = GetCount();
 
     wxCHECK_RET( IsValid(n), _T("invalid index in wxChoice::Delete") );
 
     // if the item to delete is before the selection, and the selection is valid
-    if ((n < m_selection_hack) && (m_selection_hack != wxNOT_FOUND))
+    if (((int)n < m_selection_hack) && (m_selection_hack != wxNOT_FOUND))
     {
         // move the selection back one
         m_selection_hack--;
     }
-    else if (n == m_selection_hack)
+    else if ((int)n == m_selection_hack)
     {
         // invalidate the selection
         m_selection_hack = wxNOT_FOUND;
@@ -287,7 +287,7 @@ void wxChoice::Delete( int n )
     wxArrayString items;
     wxArrayPtrVoid itemsData;
     items.Alloc(count);
-    for ( i = 0; (size_t)i < count; i++ )
+    for ( i = 0; i < count; i++ )
     {
         if ( i != n )
         {
@@ -320,7 +320,7 @@ void wxChoice::Delete( int n )
 
     Clear();
 
-    for ( i = 0; (size_t)i < count - 1; i++ )
+    for ( i = 0; i < count - 1; i++ )
     {
         Append(items[i]);
 
@@ -372,12 +372,12 @@ int wxChoice::GetSelection() const
 
 }
 
-void wxChoice::SetString( int n, const wxString& str )
+void wxChoice::SetString(unsigned int n, const wxString& str )
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid choice") );
 
     GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
-    int count = 0;
+    unsigned int count = 0;
     GList *child = menu_shell->children;
     while (child)
     {
@@ -401,12 +401,12 @@ void wxChoice::SetString( int n, const wxString& str )
     }
 }
 
-wxString wxChoice::GetString( int n ) const
+wxString wxChoice::GetString(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid choice") );
 
     GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
-    int count = 0;
+    unsigned int count = 0;
     GList *child = menu_shell->children;
     while (child)
     {
@@ -432,12 +432,12 @@ wxString wxChoice::GetString( int n ) const
     return wxEmptyString;
 }
 
-size_t wxChoice::GetCount() const
+unsigned int wxChoice::GetCount() const
 {
     wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid choice") );
 
     GtkMenuShell *menu_shell = GTK_MENU_SHELL( gtk_option_menu_get_menu( GTK_OPTION_MENU(m_widget) ) );
-    size_t count = 0;
+    unsigned int count = 0;
     GList *child = menu_shell->children;
     while (child)
     {
@@ -455,7 +455,7 @@ void wxChoice::SetSelection( int n )
     gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp );
 
     // set the local selection variable manually
-    if ((n >= 0) && ((size_t)n < GetCount()))
+    if (IsValid((unsigned int)n))
     {
         // a valid selection has been made
         m_selection_hack = n;
@@ -498,7 +498,7 @@ void wxChoice::DoApplyWidgetStyle(GtkRcStyle *style)
     }
 }
 
-int wxChoice::GtkAddHelper(GtkWidget *menu, size_t pos, const wxString& item)
+int wxChoice::GtkAddHelper(GtkWidget *menu, unsigned int pos, const wxString& item)
 {
     wxCHECK_MSG(pos<=m_clientList.GetCount(), -1, wxT("invalid index"));
 
@@ -575,10 +575,10 @@ wxSize wxChoice::DoGetBestSize() const
     if ( m_widget )
     {
         int width;
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
-            GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
+            GetTextExtent(GetString(n), &width, NULL, NULL, NULL );
             if ( width > ret.x )
                 ret.x = width;
         }
index aa879cab6f2f6b28b6fc3b5fe490ed2e3d833042..38ddd035fa815221ffc8a19ba43c0c47d6f0d6ea 100644 (file)
@@ -347,7 +347,7 @@ int wxComboBox::DoAppend( const wxString &item )
 
     gtk_widget_show( list_item );
 
-    const size_t count = GetCount();
+    const unsigned int count = GetCount();
 
     if ( m_clientDataList.GetCount() < count )
         m_clientDataList.Append( (wxObject*) NULL );
@@ -361,7 +361,7 @@ int wxComboBox::DoAppend( const wxString &item )
     return count - 1;
 }
 
-int wxComboBox::DoInsert( const wxString &item, int pos )
+int wxComboBox::DoInsert( const wxString &item, unsigned int pos )
 {
     wxCHECK_MSG( !(GetWindowStyle() & wxCB_SORT), -1,
                     wxT("can't insert into sorted list"));
@@ -370,7 +370,7 @@ int wxComboBox::DoInsert( const wxString &item, int pos )
 
     wxCHECK_MSG( IsValidInsert(pos), -1, wxT("invalid index") );
 
-    if ((size_t)pos == GetCount())
+    if (pos == GetCount())
         return Append(item);
 
     DisableEvents();
@@ -393,7 +393,7 @@ int wxComboBox::DoInsert( const wxString &item, int pos )
 
     gtk_widget_show( list_item );
 
-    const size_t count = GetCount();
+    const unsigned int count = GetCount();
 
     if ( m_clientDataList.GetCount() < count )
         m_clientDataList.Insert( pos, (wxObject*) NULL );
@@ -407,7 +407,7 @@ int wxComboBox::DoInsert( const wxString &item, int pos )
     return pos;
 }
 
-void wxComboBox::DoSetItemClientData( int n, void* clientData )
+void wxComboBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
 
@@ -417,7 +417,7 @@ void wxComboBox::DoSetItemClientData( int n, void* clientData )
     node->SetData( (wxObject*) clientData );
 }
 
-void* wxComboBox::DoGetItemClientData( int n ) const
+void* wxComboBox::DoGetItemClientData(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid combobox") );
 
@@ -426,7 +426,7 @@ void* wxComboBox::DoGetItemClientData( int n ) const
     return node ? node->GetData() : NULL;
 }
 
-void wxComboBox::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxComboBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
 
@@ -438,7 +438,7 @@ void wxComboBox::DoSetItemClientObject( int n, wxClientData* clientData )
     node->SetData( (wxObject*) clientData );
 }
 
-wxClientData* wxComboBox::DoGetItemClientObject( int n ) const
+wxClientData* wxComboBox::DoGetItemClientObject(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, (wxClientData*)NULL, wxT("invalid combobox") );
 
@@ -472,7 +472,7 @@ void wxComboBox::Clear()
     InvalidateBestSize();
 }
 
-void wxComboBox::Delete( int n )
+void wxComboBox::Delete(unsigned int n)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
 
@@ -509,7 +509,7 @@ void wxComboBox::Delete( int n )
     InvalidateBestSize();
 }
 
-void wxComboBox::SetString(int n, const wxString &text)
+void wxComboBox::SetString(unsigned int n, const wxString &text)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
 
@@ -583,7 +583,7 @@ int wxComboBox::GetCurrentSelection() const
     return wxNOT_FOUND;
 }
 
-wxString wxComboBox::GetString( int n ) const
+wxString wxComboBox::GetString(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid combobox") );
 
@@ -625,14 +625,14 @@ wxString wxComboBox::GetStringSelection() const
     return wxEmptyString;
 }
 
-size_t wxComboBox::GetCount() const
+unsigned int wxComboBox::GetCount() const
 {
     wxCHECK_MSG( m_widget != NULL, 0, wxT("invalid combobox") );
 
     GtkWidget *list = GTK_COMBO(m_widget)->list;
 
     GList *child = GTK_LIST(list)->children;
-    size_t count = 0;
+    unsigned int count = 0;
     while (child) { count++; child = child->next; }
     return count;
 }
@@ -929,10 +929,10 @@ wxSize wxComboBox::DoGetBestSize() const
     if ( m_widget )
     {
         int width;
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
-            GetTextExtent( GetString(n), &width, NULL, NULL, NULL );
+            GetTextExtent(GetString(n), &width, NULL, NULL, NULL );
             if ( width > ret.x )
                 ret.x = width;
         }
index f22c1ad7972cffcfe6d34ba40f11b0ab0b3ec98a..260122e33c6722e84468fe125f440236d2202e3d 100644 (file)
@@ -573,7 +573,7 @@ wxListBox::~wxListBox()
 // adding items
 // ----------------------------------------------------------------------------
 
-void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
 
@@ -593,12 +593,12 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
 
     wxCHECK_RET( pos <= length, wxT("invalid index in wxListBox::InsertItems") );
 
-    size_t nItems = items.GetCount();
+    unsigned int nItems = items.GetCount();
     int index;
 
     if (m_strings)
     {
-        for (size_t n = 0; n < nItems; n++)
+        for (unsigned int n = 0; n < nItems; n++)
         {
             index = m_strings->Add( items[n] );
 
@@ -619,7 +619,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
     {
         if (pos == length)
         {
-            for ( size_t n = 0; n < nItems; n++ )
+            for ( unsigned int n = 0; n < nItems; n++ )
             {
                 GtkAddItem( items[n] );
 
@@ -629,7 +629,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
         else
         {
             wxList::compatibility_iterator node = m_clientList.Item( pos );
-            for ( size_t n = 0; n < nItems; n++ )
+            for ( unsigned int n = 0; n < nItems; n++ )
             {
                 GtkAddItem( items[n], pos+n );
 
@@ -757,8 +757,8 @@ void wxListBox::DoSetItems( const wxArrayString& items,
 
     if ( clientData )
     {
-        size_t count = items.GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = items.GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             SetClientData(n, clientData[n]);
         }
@@ -799,7 +799,7 @@ void wxListBox::Clear()
         m_strings->Clear();
 }
 
-void wxListBox::Delete( int n )
+void wxListBox::Delete(unsigned int n)
 {
     wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
 
@@ -831,7 +831,7 @@ void wxListBox::Delete( int n )
 // client data
 // ----------------------------------------------------------------------------
 
-void wxListBox::DoSetItemClientData( int n, void* clientData )
+void wxListBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid listbox control") );
 
@@ -841,7 +841,7 @@ void wxListBox::DoSetItemClientData( int n, void* clientData )
     node->SetData( (wxObject*) clientData );
 }
 
-void* wxListBox::DoGetItemClientData( int n ) const
+void* wxListBox::DoGetItemClientData(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid listbox control") );
 
@@ -851,7 +851,7 @@ void* wxListBox::DoGetItemClientData( int n ) const
     return node->GetData();
 }
 
-void wxListBox::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxListBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid listbox control") );
 
@@ -863,7 +863,7 @@ void wxListBox::DoSetItemClientObject( int n, wxClientData* clientData )
     node->SetData( (wxObject*) clientData );
 }
 
-wxClientData* wxListBox::DoGetItemClientObject( int n ) const
+wxClientData* wxListBox::DoGetItemClientObject(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, (wxClientData*) NULL, wxT("invalid listbox control") );
 
@@ -898,7 +898,7 @@ wxString wxListBox::GetRealLabel(GList *item) const
     return str;
 }
 
-void wxListBox::SetString( int n, const wxString &string )
+void wxListBox::SetString(unsigned int n, const wxString &string)
 {
     wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
 
@@ -923,7 +923,7 @@ void wxListBox::SetString( int n, const wxString &string )
     }
 }
 
-wxString wxListBox::GetString( int n ) const
+wxString wxListBox::GetString(unsigned int n) const
 {
     wxCHECK_MSG( m_list != NULL, wxEmptyString, wxT("invalid listbox") );
 
@@ -938,7 +938,7 @@ wxString wxListBox::GetString( int n ) const
     return wxEmptyString;
 }
 
-size_t wxListBox::GetCount() const
+unsigned int wxListBox::GetCount() const
 {
     wxCHECK_MSG( m_list != NULL, 0, wxT("invalid listbox") );
 
@@ -1216,7 +1216,7 @@ wxSize wxListBox::DoGetBestSize() const
     int wLine;
 
     // Find the widest line
-    for(size_t i = 0; i < GetCount(); i++) {
+    for(unsigned int i = 0; i < GetCount(); i++) {
         wxString str(GetString(i));
         GetTextExtent(str, &wLine, NULL);
         lbWidth = wxMax(lbWidth, wLine);
index 066daa51af66ba4d14a6294cbffe9b86cdd3dc08..8b980c12f7bd635373f24ee9f34f95d53c74b5fa 100644 (file)
@@ -206,8 +206,8 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
     SetMajorDim(majorDim == 0 ? n : majorDim, style);
 
 
-    int num_of_cols = GetColumnCount();
-    int num_of_rows = GetRowCount();
+    unsigned int num_of_cols = GetColumnCount();
+    unsigned int num_of_rows = GetRowCount();
 
     GtkRadioButton *m_radio = (GtkRadioButton*) NULL;
 
@@ -290,7 +290,7 @@ wxRadioBox::~wxRadioBox()
     }
 }
 
-bool wxRadioBox::Show( bool show )
+bool wxRadioBox::Show(bool show)
 {
     wxCHECK_MSG( m_widget != NULL, false, wxT("invalid radiobox") );
 
@@ -375,7 +375,7 @@ int wxRadioBox::GetSelection(void) const
     return wxNOT_FOUND;
 }
 
-wxString wxRadioBox::GetString( int n ) const
+wxString wxRadioBox::GetString(unsigned int n) const
 {
     wxCHECK_MSG( m_widget != NULL, wxEmptyString, wxT("invalid radiobox") );
 
@@ -397,7 +397,7 @@ void wxRadioBox::SetLabel( const wxString& label )
     GTKSetLabelForFrame(GTK_FRAME(m_widget), label);
 }
 
-void wxRadioBox::SetString( int item, const wxString& label )
+void wxRadioBox::SetString(unsigned int item, const wxString& label)
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid radiobox") );
 
@@ -429,7 +429,7 @@ bool wxRadioBox::Enable( bool enable )
     return true;
 }
 
-bool wxRadioBox::Enable( int item, bool enable )
+bool wxRadioBox::Enable(unsigned int item, bool enable)
 {
     wxCHECK_MSG( m_widget != NULL, false, wxT("invalid radiobox") );
 
@@ -446,7 +446,7 @@ bool wxRadioBox::Enable( int item, bool enable )
     return true;
 }
 
-bool wxRadioBox::IsItemEnabled(int item) const
+bool wxRadioBox::IsItemEnabled(unsigned int item) const
 {
     wxCHECK_MSG( m_widget != NULL, false, wxT("invalid radiobox") );
 
@@ -461,7 +461,7 @@ bool wxRadioBox::IsItemEnabled(int item) const
     return GTK_WIDGET_SENSITIVE(GTK_WIDGET(button));
 }
 
-bool wxRadioBox::Show( int item, bool show )
+bool wxRadioBox::Show(unsigned int item, bool show)
 {
     wxCHECK_MSG( m_widget != NULL, false, wxT("invalid radiobox") );
 
@@ -479,7 +479,7 @@ bool wxRadioBox::Show( int item, bool show )
     return true;
 }
 
-bool wxRadioBox::IsItemShown(int item) const
+bool wxRadioBox::IsItemShown(unsigned int item) const
 {
     wxCHECK_MSG( m_widget != NULL, false, wxT("invalid radiobox") );
 
@@ -492,7 +492,7 @@ bool wxRadioBox::IsItemShown(int item) const
     return GTK_WIDGET_VISIBLE(GTK_WIDGET(button));
 }
 
-size_t wxRadioBox::GetCount() const
+unsigned int wxRadioBox::GetCount() const
 {
     return m_boxes.GetCount();
 }
index ddff65a4a36351ba18dc05986fab31ff6618bd93..9930e5773ceb774e1fdf3902ecaa0339cab89e70 100644 (file)
@@ -153,7 +153,7 @@ static pascal OSStatus ListBoxGetSetItemData(
                     int i = itemID - 1;
                     if ((i >= 0) && (i < (int)list->GetCount()))
                     {
-                        verify_noerr( ::SetDataBrowserItemDataButtonValue( itemData, list->IsChecked( i ) ? kThemeButtonOn : kThemeButtonOff ) );
+                        verify_noerr( ::SetDataBrowserItemDataButtonValue( itemData, list->IsChecked(i) ? kThemeButtonOn : kThemeButtonOff ) );
                         err = noErr;
                     }
                 }
@@ -184,7 +184,7 @@ static pascal OSStatus ListBoxGetSetItemData(
                     if ((i >= 0) && (i < (int)list->GetCount()))
                     {
                         // we have to change this behind the back, since Check() would be triggering another update round
-                        bool newVal = !list->IsChecked( i );
+                        bool newVal = !list->IsChecked(i);
                         verify_noerr( ::SetDataBrowserItemDataButtonValue( itemData, newVal ? kThemeButtonOn : kThemeButtonOff ) );
                         err = noErr;
                         list->m_checks[i] = newVal;
@@ -336,17 +336,17 @@ bool wxCheckListBox::Create(
 // wxCheckListBox functions
 // ----------------------------------------------------------------------------
 
-bool wxCheckListBox::IsChecked(size_t item) const
+bool wxCheckListBox::IsChecked(unsigned int item) const
 {
-    wxCHECK_MSG( item < m_checks.GetCount(), false,
+    wxCHECK_MSG( IsValid(item), false,
                  wxT("invalid index in wxCheckListBox::IsChecked") );
 
     return m_checks[item] != 0;
 }
 
-void wxCheckListBox::Check(size_t item, bool check)
+void wxCheckListBox::Check(unsigned int item, bool check)
 {
-    wxCHECK_RET( item < m_checks.GetCount(),
+    wxCHECK_RET( IsValid(item),
                  wxT("invalid index in wxCheckListBox::Check") );
 
     bool isChecked = m_checks[item] != 0;
@@ -365,9 +365,9 @@ void wxCheckListBox::Check(size_t item, bool check)
 // methods forwarded to wxCheckListBox
 // ----------------------------------------------------------------------------
 
-void wxCheckListBox::Delete(int n)
+void wxCheckListBox::Delete(unsigned int n)
 {
-    wxCHECK_RET( (size_t)n < GetCount(), wxT("invalid index in wxCheckListBox::Delete") );
+    wxCHECK_RET( IsValid(n), wxT("invalid index in wxCheckListBox::Delete") );
 
     wxListBox::Delete( n );
     m_checks.RemoveAt( n );
@@ -383,12 +383,12 @@ int wxCheckListBox::DoAppend(const wxString& item)
     return pos;
 }
 
-void wxCheckListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxCheckListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxListBox::DoInsertItems( items, pos );
 
-    size_t count = items.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    unsigned int count = items.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_checks.Insert( false, pos + n );
     }
@@ -399,8 +399,8 @@ void wxCheckListBox::DoSetItems(const wxArrayString& items, void **clientData)
     // call it first as it does DoClear()
     wxListBox::DoSetItems( items, clientData );
 
-    size_t count = items.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    unsigned int count = items.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_checks.Add( false );
     }
index 531ac02dee734ee1bca3c280cc4a568f404b8501..d5575233dc75862ad25e2d3443c0c8be3f164f25 100644 (file)
@@ -26,7 +26,7 @@ wxChoice::~wxChoice()
 {
     if ( HasClientObjectData() )
     {
-        size_t i, max = GetCount();
+        unsigned int i, max = GetCount();
 
         for ( i = 0; i < max; ++i )
             delete GetClientObject( i );
@@ -108,7 +108,7 @@ int wxChoice::DoAppend( const wxString& item )
 {
 #if wxUSE_STL
     wxArrayString::iterator insertPoint;
-    size_t index;
+    unsigned int index;
 
     if (GetWindowStyle() & wxCB_SORT)
     {
@@ -123,7 +123,7 @@ int wxChoice::DoAppend( const wxString& item )
 
     m_strings.insert( insertPoint, item );
 #else
-    size_t index = m_strings.Add( item );
+    unsigned int index = m_strings.Add( item );
 #endif
 
     m_datas.Insert( NULL , index );
@@ -134,12 +134,12 @@ int wxChoice::DoAppend( const wxString& item )
     return index;
 }
 
-int wxChoice::DoInsert( const wxString& item, int pos )
+int wxChoice::DoInsert( const wxString& item, unsigned int pos )
 {
     wxCHECK_MSG( !(GetWindowStyle() & wxCB_SORT), -1, wxT("wxChoice::DoInsert: can't insert into sorted list") );
     wxCHECK_MSG( IsValidInsert(pos), -1, wxT("wxChoice::DoInsert: invalid index") );
 
-    if ((size_t)pos == GetCount())
+    if (pos == GetCount())
         return DoAppend( item );
 
     UMAInsertMenuItem( MAC_WXHMENU( m_macPopUpMenuHandle ), item, m_font.GetEncoding(), pos );
@@ -151,7 +151,7 @@ int wxChoice::DoInsert( const wxString& item, int pos )
     return pos;
 }
 
-void wxChoice::Delete( int n )
+void wxChoice::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n) , wxT("wxChoice::Delete: invalid index") );
 
@@ -167,7 +167,7 @@ void wxChoice::Delete( int n )
 void wxChoice::Clear()
 {
     FreeData();
-    for ( size_t i = 0 ; i < GetCount() ; i++ )
+    for ( unsigned int i = 0 ; i < GetCount() ; i++ )
     {
         ::DeleteMenuItem( MAC_WXHMENU(m_macPopUpMenuHandle) , 1 ) ;
     }
@@ -181,8 +181,8 @@ void wxChoice::FreeData()
 {
     if ( HasClientObjectData() )
     {
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             delete GetClientObject( n );
         }
@@ -206,7 +206,7 @@ void wxChoice::SetSelection( int n )
 // string list functions
 // ----------------------------------------------------------------------------
 
-size_t wxChoice::GetCount() const
+unsigned int wxChoice::GetCount() const
 {
     return m_strings.GetCount() ;
 }
@@ -216,7 +216,7 @@ int wxChoice::FindString( const wxString& s, bool bCase ) const
     return m_strings.Index( s , bCase ) ;
 }
 
-void wxChoice::SetString( int n, const wxString& s )
+void wxChoice::SetString(unsigned int n, const wxString& s)
 {
     wxCHECK_RET( IsValid(n), wxT("wxChoice::SetString(): invalid index") );
 
@@ -226,7 +226,7 @@ void wxChoice::SetString( int n, const wxString& s )
     UMASetMenuItemText( MAC_WXHMENU(m_macPopUpMenuHandle) , n + 1 , s , wxFont::GetDefaultEncoding() ) ;
 }
 
-wxString wxChoice::GetString( int n ) const
+wxString wxChoice::GetString(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), wxEmptyString, wxT("wxChoice::GetString(): invalid index") );
 
@@ -236,26 +236,26 @@ wxString wxChoice::GetString( int n ) const
 // ----------------------------------------------------------------------------
 // client data
 // ----------------------------------------------------------------------------
-void wxChoice::DoSetItemClientData( int n, void* clientData )
+void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
 {
     wxCHECK_RET( IsValid(n), wxT("wxChoice::DoSetItemClientData: invalid index") );
 
     m_datas[n] = (char*)clientData ;
 }
 
-void * wxChoice::DoGetItemClientData( int n ) const
+void * wxChoice::DoGetItemClientData(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), NULL, wxT("wxChoice::DoGetClientData: invalid index") );
 
     return (void *)m_datas[n];
 }
 
-void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
-    DoSetItemClientData( n, clientData ) ;
+    DoSetItemClientData(n, clientData);
 }
 
-wxClientData* wxChoice::DoGetItemClientObject( int n ) const
+wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData*)DoGetItemClientData( n ) ;
 }
@@ -312,9 +312,9 @@ wxSize wxChoice::DoGetBestSize() const
         }
 
         // Find the widest line
-        for(size_t i = 0; i < GetCount(); i++)
+        for(unsigned int i = 0; i < GetCount(); i++)
         {
-            wxString str( GetString( i ) );
+            wxString str(GetString(i));
 
 #if wxUSE_UNICODE
             Point bounds = { 0, 0 } ;
index 754b1ea50075bb33fd1e24c540f0289e8b4997af..38ff2771cb785a417f036a087e1aec8f470d6944 100644 (file)
@@ -410,7 +410,7 @@ wxString wxComboBox::GetValue() const
     return result;
 }
 
-size_t wxComboBox::GetCount() const
+unsigned int wxComboBox::GetCount() const
 {
     return m_choice->GetCount() ;
 }
@@ -506,27 +506,27 @@ int wxComboBox::DoAppend(const wxString& item)
     return m_choice->DoAppend( item ) ;
 }
 
-int wxComboBox::DoInsert(const wxString& item, int pos)
+int wxComboBox::DoInsert(const wxString& item, unsigned int pos)
 {
     return m_choice->DoInsert( item , pos ) ;
 }
 
-void wxComboBox::DoSetItemClientData(int n, void* clientData)
+void wxComboBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
     return m_choice->DoSetItemClientData( n , clientData ) ;
 }
 
-void* wxComboBox::DoGetItemClientData(int n) const
+void* wxComboBox::DoGetItemClientData(unsigned int n) const
 {
     return m_choice->DoGetItemClientData( n ) ;
 }
 
-void wxComboBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxComboBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
-    return m_choice->DoSetItemClientObject( n , clientData ) ;
+    return m_choice->DoSetItemClientObject(n, clientData);
 }
 
-wxClientData* wxComboBox::DoGetItemClientObject(int n) const
+wxClientData* wxComboBox::DoGetItemClientObject(unsigned int n) const
 {
     return m_choice->DoGetItemClientObject( n ) ;
 }
@@ -535,15 +535,15 @@ void wxComboBox::FreeData()
 {
     if ( HasClientObjectData() )
     {
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             SetClientObject( n, NULL );
         }
     }
 }
 
-void wxComboBox::Delete(int n)
+void wxComboBox::Delete(unsigned int n)
 {
     // force client object deletion
     if( HasClientObjectData() )
@@ -567,7 +567,7 @@ void wxComboBox::SetSelection(int n)
     m_choice->SetSelection( n );
 
     if ( m_text != NULL )
-        m_text->SetValue( GetString( n ) );
+        m_text->SetValue(GetString(n));
 }
 
 int wxComboBox::FindString(const wxString& s, bool bCase) const
@@ -575,7 +575,7 @@ int wxComboBox::FindString(const wxString& s, bool bCase) const
     return m_choice->FindString( s, bCase );
 }
 
-wxString wxComboBox::GetString(int n) const
+wxString wxComboBox::GetString(unsigned int n) const
 {
     return m_choice->GetString( n );
 }
@@ -583,15 +583,15 @@ wxString wxComboBox::GetString(int n) const
 wxString wxComboBox::GetStringSelection() const
 {
     int sel = GetSelection();
-    if (sel > -1)
-        return wxString(this->GetString (sel));
+    if (sel != wxNOT_FOUND)
+        return wxString(this->GetString((unsigned int)sel));
     else
         return wxEmptyString;
 }
 
-void wxComboBox::SetString(int n, const wxString& s)
+void wxComboBox::SetString(unsigned int n, const wxString& s)
 {
-    m_choice->SetString( n , s ) ;
+    m_choice->SetString( n , s );
 }
 
 bool wxComboBox::IsEditable() const
index abb642fcdeab6b72b306f7d37bc5571a068600c5..21d3953922e88ac0ddcbece6e24d0f348fa4d90a 100644 (file)
@@ -561,7 +561,7 @@ int wxComboBox::DoAppend(const wxString& item)
 #endif
 }
 
-int wxComboBox::DoInsert(const wxString& item, int pos)
+int wxComboBox::DoInsert(const wxString& item, unsigned int pos)
 {
 #if USE_HICOMBOBOX
     HIComboBoxInsertTextItemAtIndex( *m_peer, (CFIndex)pos, wxMacCFStringHolder(item, m_font.GetEncoding()) );
@@ -574,7 +574,7 @@ int wxComboBox::DoInsert(const wxString& item, int pos)
 #endif
 }
 
-void wxComboBox::DoSetItemClientData(int n, void* clientData)
+void wxComboBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
 #if USE_HICOMBOBOX
     return; //TODO
@@ -583,7 +583,7 @@ void wxComboBox::DoSetItemClientData(int n, void* clientData)
 #endif
 }
 
-void* wxComboBox::DoGetItemClientData(int n) const
+void* wxComboBox::DoGetItemClientData(unsigned int n) const
 {
 #if USE_HICOMBOBOX
     return NULL; //TODO
@@ -592,7 +592,7 @@ void* wxComboBox::DoGetItemClientData(int n) const
 #endif
 }
 
-void wxComboBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxComboBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
 #if USE_HICOMBOBOX
     return; //TODO
@@ -601,7 +601,7 @@ void wxComboBox::DoSetItemClientObject(int n, wxClientData* clientData)
 #endif
 }
 
-wxClientData* wxComboBox::DoGetItemClientObject(int n) const
+wxClientData* wxComboBox::DoGetItemClientObject(unsigned int n) const
 {
 #if USE_HICOMBOBOX
     return NULL;
@@ -612,25 +612,25 @@ wxClientData* wxComboBox::DoGetItemClientObject(int n) const
 
 void wxComboBox::FreeData()
 {
-    if ( HasClientObjectData() )
+    if (HasClientObjectData())
     {
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             SetClientObject( n, NULL );
         }
     }
 }
 
-int wxComboBox::GetCount() const {
+unsigned int wxComboBox::GetCount() const {
 #if USE_HICOMBOBOX
-    return (int) HIComboBoxGetItemCount( *m_peer );
+    return (unsigned int) HIComboBoxGetItemCount( *m_peer );
 #else
     return m_choice->GetCount() ;
 #endif
 }
 
-void wxComboBox::Delete(int n)
+void wxComboBox::Delete(unsigned int n)
 {
 #if USE_HICOMBOBOX
     HIComboBoxRemoveItemAtIndex( *m_peer, (CFIndex)n );
@@ -672,7 +672,7 @@ void wxComboBox::SetSelection(int n)
 
     if ( m_text != NULL )
     {
-        m_text->SetValue( GetString( n ) );
+        m_text->SetValue(GetString(n));
     }
 #endif
 }
@@ -680,9 +680,9 @@ void wxComboBox::SetSelection(int n)
 int wxComboBox::FindString(const wxString& s, bool bCase) const
 {
 #if USE_HICOMBOBOX
-    for( int i = 0 ; i < GetCount() ; i++ )
+    for( unsigned int i = 0 ; i < GetCount() ; i++ )
     {
-        if ( GetString( i ).IsSameAs(s, bCase) )
+        if (GetString(i).IsSameAs(s, bCase) )
             return i ;
     }
     return wxNOT_FOUND ;
@@ -691,7 +691,7 @@ int wxComboBox::FindString(const wxString& s, bool bCase) const
 #endif
 }
 
-wxString wxComboBox::GetString(int n) const
+wxString wxComboBox::GetString(unsigned int n) const
 {
 #if USE_HICOMBOBOX
     CFStringRef itemText;
@@ -708,14 +708,14 @@ wxString wxComboBox::GetStringSelection() const
     return wxMacCFStringHolder(m_peer->GetData<CFStringRef>(kHIComboBoxEditTextPart,kControlEditTextCFStringTag)).AsString() ;
 #else
     int sel = GetSelection ();
-    if (sel > -1)
-        return wxString(this->GetString (sel));
+    if (sel != wxNOT_FOUND)
+        return wxString(this->GetString((unsigned int)sel));
     else
         return wxEmptyString;
 #endif
 }
 
-void wxComboBox::SetString(int n, const wxString& s)
+void wxComboBox::SetString(unsigned int n, const wxString& s)
 {
 #if USE_HICOMBOBOX
     verify_noerr ( HIComboBoxInsertTextItemAtIndex( *m_peer, (CFIndex) n,
index 93701b90f872bb8981f8539b4163ef1655b37bfe..ca7866655a79d706f76b52ed0607188745779405 100644 (file)
@@ -326,7 +326,7 @@ void wxListBox::FreeData()
 {
     if ( HasClientObjectData() )
     {
-        for ( size_t n = 0; n < m_noItems; n++ )
+        for ( unsigned int n = 0; n < m_noItems; n++ )
         {
             delete GetClientObject( n );
         }
@@ -345,7 +345,7 @@ void wxListBox::DoSetFirstItem(int n)
     MacScrollTo( n ) ;
 }
 
-void wxListBox::Delete(int n)
+void wxListBox::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n),
                  wxT("invalid index in wxListBox::Delete") );
@@ -364,7 +364,7 @@ int wxListBox::DoAppend(const wxString& item)
 {
     InvalidateBestSize();
 
-    size_t index = m_noItems ;
+    unsigned int index = m_noItems ;
     m_stringArray.Add( item ) ;
     m_dataArray.Add( NULL );
     m_noItems++;
@@ -377,7 +377,7 @@ int wxListBox::DoAppend(const wxString& item)
 void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
 {
     Clear() ;
-    size_t n = choices.GetCount();
+    unsigned int n = choices.GetCount();
 
     for ( size_t i = 0 ; i < n ; ++i )
     {
@@ -397,7 +397,7 @@ int wxListBox::FindString(const wxString& s, bool bCase) const
         Str255 s1 , s2 ;
         wxMacStringToPascal( search , s2 ) ;
 
-        for ( size_t i = 0 ; i < m_noItems ; ++ i )
+        for ( unsigned int i = 0 ; i < m_noItems ; ++ i )
         {
             wxMacStringToPascal( m_stringArray[i].Left( len ) , s1 ) ;
 
@@ -410,9 +410,9 @@ int wxListBox::FindString(const wxString& s, bool bCase) const
             wxString st = s ;
             st.MakeLower() ;
 
-            for ( size_t i = 0 ; i < m_noItems ; ++i )
+            for ( unsigned int i = 0 ; i < m_noItems ; ++i )
             {
-                if ( GetString( i ).Lower().Matches(st) )
+                if (GetString(i).Lower().Matches(st) )
                     return (int)i ;
             }
         }
@@ -423,7 +423,7 @@ int wxListBox::FindString(const wxString& s, bool bCase) const
 
         wxMacStringToPascal( s , s2 ) ;
 
-        for ( size_t i = 0 ; i < m_noItems ; ++ i )
+        for ( unsigned int i = 0 ; i < m_noItems ; ++ i )
         {
             wxMacStringToPascal( m_stringArray[i] , s1 ) ;
 
@@ -463,33 +463,33 @@ bool wxListBox::IsSelected(int n) const
     return MacIsSelected( n ) ;
 }
 
-void *wxListBox::DoGetItemClientData(int n) const
+void *wxListBox::DoGetItemClientData(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), NULL, wxT("invalid index in wxListBox::GetClientData"));
 
-    wxASSERT_MSG( m_dataArray.GetCount() >= (size_t) n , wxT("invalid client_data array") ) ;
+    wxASSERT_MSG( m_dataArray.GetCount() >= (unsigned int) n , wxT("invalid client_data array") ) ;
 
     return (void *)m_dataArray[n];
 }
 
-wxClientData *wxListBox::DoGetItemClientObject(int n) const
+wxClientData *wxListBox::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *) DoGetItemClientData( n ) ;
 }
 
-void wxListBox::DoSetItemClientData(int n, void *clientData)
+void wxListBox::DoSetItemClientData(unsigned int n, void *clientData)
 {
     wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetClientData") );
 
-    wxASSERT_MSG( m_dataArray.GetCount() >= (size_t) n , wxT("invalid client_data array") ) ;
+    wxASSERT_MSG( m_dataArray.GetCount() >= (unsigned int) n , wxT("invalid client_data array") ) ;
 
-    if ( m_dataArray.GetCount() > (size_t) n )
+    if ( m_dataArray.GetCount() > (unsigned int) n )
         m_dataArray[n] = (char*)clientData ;
     else
         m_dataArray.Add( (char*)clientData ) ;
 }
 
-void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxListBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     DoSetItemClientData(n, clientData);
 }
@@ -507,7 +507,7 @@ int wxListBox::GetSelection() const
 }
 
 // Find string for position
-wxString wxListBox::GetString(int n) const
+wxString wxListBox::GetString(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), wxEmptyString,
                  wxT("invalid index in wxListBox::GetString") );
@@ -515,16 +515,16 @@ wxString wxListBox::GetString(int n) const
     return m_stringArray[n]  ;
 }
 
-void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxCHECK_RET( IsValidInsert(pos),
         wxT("invalid index in wxListBox::InsertItems") );
 
     InvalidateBestSize();
 
-    size_t nItems = items.GetCount();
+    unsigned int nItems = items.GetCount();
 
-    for ( size_t i = 0 ; i < nItems ; i++ )
+    for ( unsigned int i = 0 ; i < nItems ; i++ )
     {
         m_stringArray.Insert( items[i] , pos + i ) ;
         m_dataArray.Insert( NULL , pos + i ) ;
@@ -533,7 +533,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
     }
 }
 
-void wxListBox::SetString(int n, const wxString& s)
+void wxListBox::SetString(unsigned int n, const wxString& s)
 {
     m_stringArray[n] = s ;
     MacSet( n , s ) ;
@@ -563,9 +563,9 @@ wxSize wxListBox::DoGetBestSize() const
         }
 
         // Find the widest line
-        for (size_t i = 0; i < GetCount(); i++)
+        for (unsigned int i = 0; i < GetCount(); i++)
         {
-            wxString str( GetString( i ) );
+            wxString str(GetString(i));
 
 #if wxUSE_UNICODE
             Point bounds = {0, 0} ;
@@ -603,7 +603,7 @@ wxSize wxListBox::DoGetBestSize() const
     return wxSize( lbWidth, lbHeight );
 }
 
-size_t wxListBox::GetCount() const
+unsigned int wxListBox::GetCount() const
 {
     return m_noItems;
 }
@@ -638,7 +638,7 @@ void wxListBox::MacDelete( int n )
     UInt32 id = m_noItems + 1 ;
 
     verify_noerr( m_peer->RemoveItems( kDataBrowserNoItem , 1 , (UInt32*) &id , kDataBrowserItemNoProperty ) ) ;
-    for ( size_t i = 0 ; i < selectionBefore.GetCount() ; ++i )
+    for ( unsigned int i = 0 ; i < selectionBefore.GetCount() ; ++i )
     {
         int current = selectionBefore[i] ;
         if ( current == n )
@@ -737,7 +737,7 @@ bool wxListBox::MacIsSelected( int n ) const
 
 int wxListBox::MacGetSelection() const
 {
-    for ( size_t i = 0 ; i < GetCount() ; ++i )
+    for ( unsigned int i = 0 ; i < GetCount() ; ++i )
     {
         if ( m_peer->IsItemSelected( i + 1 ) )
             return i ;
@@ -956,7 +956,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
                 event.SetClientObject( GetClientObject( n ) );
             else if ( HasClientUntypedData() )
                 event.SetClientData( GetClientData( n ) );
-            event.SetString( GetString( n ) );
+            event.SetString(GetString(n));
         }
         else
         {
@@ -988,8 +988,8 @@ void wxListBox::OnChar(wxKeyEvent& event)
                     event.SetClientObject( GetClientObject( line ) );
                 else if ( HasClientUntypedData() )
                     event.SetClientData( GetClientData( line ) );
-                event.SetString( GetString( line ) );
-                event.SetInt( line );
+                event.SetString(GetString(line));
+                event.SetInt(line);
 
                 GetEventHandler()->ProcessEvent(event);
             }
index 7b8e0b9e7fd619e542032f32fdf617756a40f1aa..930080feb0f617c899a86f3250c6d58daf1b3aeb 100644 (file)
@@ -32,10 +32,10 @@ void wxRadioBox::OnRadioButton( wxCommandEvent &outer )
     {
         wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, m_windowId );
         int i = GetSelection() ;
-        event.SetInt( i );
-        event.SetString( GetString( i ) );
+        event.SetInt(i);
+        event.SetString(GetString(i));
         event.SetEventObject( this );
-        ProcessCommand( event );
+        ProcessCommand(event);
     }
 }
 
@@ -97,7 +97,7 @@ bool wxRadioBox::Create( wxWindow *parent,
 
     int i;
 
-    m_noItems = (size_t)n;
+    m_noItems = (unsigned int)n;
     m_noRowsOrCols = majorDim;
     m_radioButtonCycle = NULL;
 
@@ -150,7 +150,7 @@ bool wxRadioBox::Enable(bool enable)
         return false;
 
     current = m_radioButtonCycle;
-    for (size_t i = 0; i < m_noItems; i++)
+    for (unsigned int i = 0; i < m_noItems; i++)
     {
         current->Enable( enable );
         current = current->NextInCycle();
@@ -161,16 +161,13 @@ bool wxRadioBox::Enable(bool enable)
 
 // Enables or disables an given button
 //
-bool wxRadioBox::Enable(int item, bool enable)
+bool wxRadioBox::Enable(unsigned int item, bool enable)
 {
-    int i;
-    wxRadioButton *current;
-
     if (!IsValid( item ))
         return false;
 
-    i = 0;
-    current = m_radioButtonCycle;
+    unsigned int i = 0;
+    wxRadioButton *current = m_radioButtonCycle;
     while (i != item)
     {
         i++;
@@ -189,15 +186,14 @@ wxString wxRadioBox::GetLabel() const
 
 // Returns the label for the given button
 //
-wxString wxRadioBox::GetString(int item) const
+wxString wxRadioBox::GetString(unsigned int item) const
 {
-    int i;
     wxRadioButton *current;
 
     if (!IsValid( item ))
         return wxEmptyString;
 
-    i = 0;
+    unsigned int i = 0;
     current = m_radioButtonCycle;
     while (i != item)
     {
@@ -235,16 +231,13 @@ void wxRadioBox::SetLabel(const wxString& label)
 
 // Sets the label of a given button
 //
-void wxRadioBox::SetString(int item,const wxString& label)
+void wxRadioBox::SetString(unsigned int item,const wxString& label)
 {
-    int i;
-    wxRadioButton *current;
-
     if (!IsValid( item ))
         return;
 
-    i = 0;
-    current = m_radioButtonCycle;
+    unsigned int i = 0;
+    wxRadioButton *current = m_radioButtonCycle;
     while (i != item)
     {
         i++;
@@ -283,7 +276,7 @@ bool wxRadioBox::Show(bool show)
     wxRadioButton *current;
 
     current = m_radioButtonCycle;
-    for (size_t i=0; i<m_noItems; i++)
+    for (unsigned int i=0; i<m_noItems; i++)
     {
         current->Show( show );
         current = current->NextInCycle();
@@ -296,16 +289,13 @@ bool wxRadioBox::Show(bool show)
 
 // Shows or hides the given button
 //
-bool wxRadioBox::Show(int item, bool show)
+bool wxRadioBox::Show(unsigned int item, bool show)
 {
-    int i;
-    wxRadioButton *current;
-
     if (!IsValid( item ))
         return false;
 
-    i = 0;
-    current = m_radioButtonCycle;
+    unsigned int i = 0;
+    wxRadioButton *current = m_radioButtonCycle;
     while (i != item)
     {
         i++;
@@ -383,9 +373,9 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
 
     maxWidth = -1;
     maxHeight = -1;
-    for (size_t i = 0 ; i < m_noItems; i++)
+    for (unsigned int i = 0 ; i < m_noItems; i++)
     {
-        GetTextExtent( GetString( i ), &eachWidth[i], &eachHeight[i] );
+        GetTextExtent(GetString(i), &eachWidth[i], &eachHeight[i] );
         eachWidth[i] = (int)(eachWidth[i] + RADIO_SIZE);
         eachHeight[i] = (int)((3 * eachHeight[i]) / 2);
 
@@ -473,9 +463,9 @@ wxSize wxRadioBox::DoGetBestSize() const
     maxWidth = -1;
     maxHeight = -1;
 
-    for (size_t i = 0 ; i < m_noItems; i++)
+    for (unsigned int i = 0 ; i < m_noItems; i++)
     {
-        GetTextExtent( GetString( i ), &eachWidth, &eachHeight, NULL, NULL, &font );
+        GetTextExtent(GetString(i), &eachWidth, &eachHeight, NULL, NULL, &font );
         eachWidth  = (int)(eachWidth + RADIO_SIZE);
         eachHeight = (int)((3 * eachHeight) / 2);
         if (maxWidth < eachWidth)
index b0cd769cfc24fa4af57ec15b1de0a9e8fa8e4da6..96a18ed14303f4baf1ef89aef82c87fa9b15ddc0 100644 (file)
@@ -310,7 +310,7 @@ bool wxCheckListBox::Create(wxWindow *parent,
 // wxCheckListBox functions
 // ----------------------------------------------------------------------------
 
-bool wxCheckListBox::IsChecked(size_t item) const
+bool wxCheckListBox::IsChecked(unsigned int item) const
 {
     wxCHECK_MSG( IsValid(item), false,
                  _T("invalid index in wxCheckListBox::IsChecked") );
@@ -318,7 +318,7 @@ bool wxCheckListBox::IsChecked(size_t item) const
     return m_checks[item] != 0;
 }
 
-void wxCheckListBox::Check(size_t item, bool check)
+void wxCheckListBox::Check(unsigned int item, bool check)
 {
     wxCHECK_RET( IsValid(item),
                  _T("invalid index in wxCheckListBox::Check") );
@@ -337,7 +337,7 @@ void wxCheckListBox::Check(size_t item, bool check)
 // methods forwarded to wxListBox
 // ----------------------------------------------------------------------------
 
-void wxCheckListBox::Delete(int n)
+void wxCheckListBox::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n), _T("invalid index in wxListBox::Delete") );
 
@@ -358,12 +358,12 @@ int wxCheckListBox::DoAppend(const wxString& item)
     return pos;
 }
 
-void wxCheckListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxCheckListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxListBox::DoInsertItems(items, pos);
 
-    size_t count = items.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    unsigned int count = items.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_checks.Insert(false, pos + n);
     }
@@ -374,8 +374,8 @@ void wxCheckListBox::DoSetItems(const wxArrayString& items, void **clientData)
     // call it first as it does DoClear()
     wxListBox::DoSetItems(items, clientData);
 
-    size_t count = items.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    unsigned int count = items.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_checks.Add(false);
     }
index d31d3e9b43abb86875962b7f6595f73ab57760ed..cfbd7aa4a849acb201f27c0378a43309ae484170 100644 (file)
@@ -25,7 +25,7 @@ wxChoice::~wxChoice()
 {
     if ( HasClientObjectData() )
     {
-        size_t i, max = GetCount();
+        unsigned int i, max = GetCount();
 
         for ( i = 0; i < max; ++i )
             delete GetClientObject(i);
@@ -96,7 +96,7 @@ int wxChoice::DoAppend(const wxString& item)
     return index ;
 }
 
-int wxChoice::DoInsert(const wxString& item, int pos)
+int wxChoice::DoInsert(const wxString& item, unsigned int pos)
 {
     wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list"));
     wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index"));
@@ -112,7 +112,7 @@ int wxChoice::DoInsert(const wxString& item, int pos)
     return pos ;
 }
 
-void wxChoice::Delete(int n)
+void wxChoice::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n), wxT("invalid item index in wxChoice::Delete") );
     if ( HasClientObjectData() )
@@ -128,7 +128,7 @@ void wxChoice::Delete(int n)
 void wxChoice::Clear()
 {
     FreeData();
-    for ( int i = 0 ; i < GetCount() ; i++ )
+    for ( unsigned int i = 0 ; i < GetCount() ; i++ )
     {
         ::DeleteMenuItem( MAC_WXHMENU(m_macPopUpMenuHandle) , 1 ) ;
     }
@@ -141,8 +141,8 @@ void wxChoice::FreeData()
 {
     if ( HasClientObjectData() )
     {
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             delete GetClientObject(n);
         }
@@ -166,12 +166,12 @@ void wxChoice::SetSelection(int n)
 // string list functions
 // ----------------------------------------------------------------------------
 
-size_t wxChoice::GetCount() const
+unsigned int wxChoice::GetCount() const
 {
     return m_strings.GetCount() ;
 }
 
-void wxChoice::SetString(int n, const wxString& s)
+void wxChoice::SetString(unsigned int n, const wxString& s)
 {
     wxFAIL_MSG(wxT("wxChoice::SetString() not yet implemented"));
 #if 0 // should do this, but no Insert() so far
@@ -180,7 +180,7 @@ void wxChoice::SetString(int n, const wxString& s)
 #endif
 }
 
-wxString wxChoice::GetString(int n) const
+wxString wxChoice::GetString(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), wxEmptyString,
                     _T("wxChoice::GetString(): invalid index") );
@@ -191,27 +191,27 @@ wxString wxChoice::GetString(int n) const
 // ----------------------------------------------------------------------------
 // client data
 // ----------------------------------------------------------------------------
-void wxChoice::DoSetItemClientData( int n, void* clientData )
+void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
 {
-    wxCHECK_RET( n >= 0 && (size_t)n < m_datas.GetCount(),
+    wxCHECK_RET( n >= 0 && (unsigned int)n < m_datas.GetCount(),
                  wxT("invalid index in wxChoice::SetClientData") );
 
     m_datas[n] = (char*) clientData ;
 }
 
-void *wxChoice::DoGetItemClientData(int n) const
+void *wxChoice::DoGetItemClientData(unsigned int n) const
 {
-    wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL,
+    wxCHECK_MSG( n >= 0 && (unsigned int)n < m_datas.GetCount(), NULL,
                  wxT("invalid index in wxChoice::GetClientData") );
     return (void *)m_datas[n];
 }
 
-void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     DoSetItemClientData(n, clientData);
 }
 
-wxClientData* wxChoice::DoGetItemClientObject( int n ) const
+wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *)DoGetItemClientData(n);
 }
@@ -259,7 +259,7 @@ wxSize wxChoice::DoGetBestSize() const
             ::TextFace( 0 ) ;
         }
         // Find the widest line
-        for(int i = 0; i < GetCount(); i++) {
+        for(unsigned int i = 0; i < GetCount(); i++) {
             wxString str(GetString(i));
         #if wxUSE_UNICODE
             Point bounds={0,0} ;
index 16612c1f81cd63c74dde5a22743214e81c189a3b..d81d07e32b7d9eb33a8d7e65a6e026107c6c4da5 100644 (file)
@@ -134,7 +134,7 @@ public:
 protected:
     void OnChoice( wxCommandEvent& e )
     {
-        wxString    s = e.GetString();
+        wxString s = e.GetString();
 
         m_cb->DelegateChoice( s );
         wxCommandEvent event2(wxEVT_COMMAND_COMBOBOX_SELECTED, m_cb->GetId() );
@@ -308,7 +308,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
 
 wxString wxComboBox::GetValue() const
 {
-    wxString        result;
+    wxString result;
 
     if ( m_text == NULL )
     {
@@ -420,27 +420,27 @@ int wxComboBox::DoAppend(const wxString& item)
     return m_choice->DoAppend( item ) ;
 }
 
-int wxComboBox::DoInsert(const wxString& item, int pos)
+int wxComboBox::DoInsert(const wxString& item, unsigned int pos)
 {
     return m_choice->DoInsert( item , pos ) ;
 }
 
-void wxComboBox::DoSetItemClientData(int n, void* clientData)
+void wxComboBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
     return m_choice->DoSetItemClientData( n , clientData ) ;
 }
 
-void* wxComboBox::DoGetItemClientData(int n) const
+void* wxComboBox::DoGetItemClientData(unsigned int n) const
 {
     return m_choice->DoGetItemClientData( n ) ;
 }
 
-void wxComboBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxComboBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
-    return m_choice->DoSetItemClientObject( n , clientData ) ;
+    return m_choice->DoSetItemClientObject(n , clientData);
 }
 
-wxClientData* wxComboBox::DoGetItemClientObject(int n) const
+wxClientData* wxComboBox::DoGetItemClientObject(unsigned int n) const
 {
     return m_choice->DoGetItemClientObject( n ) ;
 }
@@ -449,15 +449,15 @@ void wxComboBox::FreeData()
 {
     if ( HasClientObjectData() )
     {
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             SetClientObject( n, NULL );
         }
     }
 }
 
-void wxComboBox::Delete(int n)
+void wxComboBox::Delete(unsigned int n)
 {
     // force client object deletion
     if( HasClientObjectData() )
@@ -482,7 +482,7 @@ void wxComboBox::SetSelection(int n)
 
     if ( m_text != NULL )
     {
-        m_text->SetValue( GetString( n ) );
+        m_text->SetValue(GetString(n));
     }
 }
 
@@ -491,7 +491,7 @@ int wxComboBox::FindString(const wxString& s, bool bCase ) const
     return m_choice->FindString( s , bCase );
 }
 
-wxString wxComboBox::GetString(int n) const
+wxString wxComboBox::GetString(unsigned int n) const
 {
     return m_choice->GetString( n );
 }
@@ -499,15 +499,16 @@ wxString wxComboBox::GetString(int n) const
 wxString wxComboBox::GetStringSelection() const
 {
     int sel = GetSelection ();
-    if (sel > -1)
-        return wxString(this->GetString (sel));
+
+    if (sel != wxNOT_FOUND)
+        return wxString(this->GetString((unsigned int)sel));
     else
         return wxEmptyString;
 }
 
-void wxComboBox::SetString(int n, const wxString& s)
+void wxComboBox::SetString(unsigned int n, const wxString& s)
 {
-    m_choice->SetString( n , s ) ;
+    m_choice->SetString( n , s );
 }
 
 bool wxComboBox::IsEditable() const
index cdd1f889d33b828a6b85f53fe9cb5ef2a22c07d9..02f93f5c8d4de7e9105785073d5dc8e3b4383a23 100644 (file)
@@ -343,7 +343,7 @@ void wxListBox::FreeData()
 #endif // wxUSE_OWNER_DRAWN
     if ( HasClientObjectData() )
     {
-        for ( size_t n = 0; n < m_noItems; n++ )
+        for ( unsigned int n = 0; n < m_noItems; n++ )
         {
             delete GetClientObject(n);
         }
@@ -376,32 +376,32 @@ void wxListBox::DoSetFirstItem(int N)
     MacScrollTo( N ) ;
 }
 
-void wxListBox::Delete(int N)
+void wxListBox::Delete(unsigned int n)
 {
-    wxCHECK_RET( IsValid(N),
+    wxCHECK_RET( IsValid(n),
                  wxT("invalid index in wxListBox::Delete") );
 
 #if wxUSE_OWNER_DRAWN
-    delete m_aItems[N];
-    m_aItems.RemoveAt(N);
+    delete m_aItems[n];
+    m_aItems.RemoveAt(n);
 #else // !wxUSE_OWNER_DRAWN
     if ( HasClientObjectData() )
     {
-        delete GetClientObject(N);
+        delete GetClientObject(n);
     }
 #endif // wxUSE_OWNER_DRAWN/!wxUSE_OWNER_DRAWN
-    m_stringArray.RemoveAt( N ) ;
-    m_dataArray.RemoveAt( N ) ;
-    m_noItems --;
+    m_stringArray.RemoveAt(n) ;
+    m_dataArray.RemoveAt(n) ;
+    m_noItems--;
 
-    MacDelete( N ) ;
+    MacDelete(n) ;
 }
 
 int wxListBox::DoAppend(const wxString& item)
 {
     InvalidateBestSize();
 
-    size_t index = m_noItems ;
+    unsigned int index = m_noItems ;
     m_stringArray.Add( item ) ;
     m_dataArray.Add( NULL );
     m_noItems ++;
@@ -435,7 +435,7 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
 #if wxUSE_OWNER_DRAWN
     if ( m_windowStyle & wxLB_OWNERDRAW ) {
         // first delete old items
-        size_t ui = m_aItems.Count();
+        unsigned int ui = m_aItems.Count();
         while ( ui-- != 0 ) {
             delete m_aItems[ui];
             m_aItems[ui] = NULL;
@@ -467,7 +467,7 @@ int wxListBox::FindString(const wxString& s, bool bCase) const
         Str255 s1 , s2 ;
         wxMacStringToPascal( search , s2 ) ;
 
-        for ( size_t i = 0 ; i < m_noItems ; ++ i )
+        for ( unsigned int i = 0 ; i < m_noItems ; ++ i )
         {
             wxMacStringToPascal( m_stringArray[i].Left( len ) , s1 ) ;
 
@@ -478,9 +478,9 @@ int wxListBox::FindString(const wxString& s, bool bCase) const
         {
             wxString st = s ;
             st.MakeLower() ;
-            for ( size_t i = 0 ; i < m_noItems ; ++i )
+            for ( unsigned int i = 0 ; i < m_noItems ; ++i )
             {
-                if ( GetString(i).Lower().Matches(st) )
+                if (GetString(i).Lower().Matches(st))
                     return (int)i ;
             }
         }
@@ -492,7 +492,7 @@ int wxListBox::FindString(const wxString& s, bool bCase) const
 
         wxMacStringToPascal( s , s2 ) ;
 
-        for ( size_t i = 0 ; i < m_noItems ; ++ i )
+        for ( unsigned int i = 0 ; i < m_noItems ; ++ i )
         {
             wxMacStringToPascal( m_stringArray[i] , s1 ) ;
 
@@ -529,22 +529,22 @@ bool wxListBox::IsSelected(int N) const
     return MacIsSelected( N ) ;
 }
 
-void *wxListBox::DoGetItemClientData(int N) const
+void *wxListBox::DoGetItemClientData(unsigned int n) const
 {
-    wxCHECK_MSG( IsValid(N), NULL,
+    wxCHECK_MSG( IsValid(n), NULL,
         wxT("invalid index in wxListBox::GetClientData"));
 
-    return (void *)m_dataArray[N];
+    return (void *)m_dataArray[n];
 }
 
-wxClientData *wxListBox::DoGetItemClientObject(int N) const
+wxClientData *wxListBox::DoGetItemClientObject(unsigned int n) const
 {
-    return (wxClientData *) DoGetItemClientData( N ) ;
+    return (wxClientData *) DoGetItemClientData( n ) ;
 }
 
-void wxListBox::DoSetItemClientData(int N, void *Client_data)
+void wxListBox::DoSetItemClientData(unsigned int n, void *Client_data)
 {
-    wxCHECK_RET( IsValid(N),
+    wxCHECK_RET( IsValid(n),
         wxT("invalid index in wxListBox::SetClientData") );
 
 #if wxUSE_OWNER_DRAWN
@@ -555,11 +555,11 @@ void wxListBox::DoSetItemClientData(int N, void *Client_data)
         wxFAIL_MSG(wxT("Can't use client data with owner-drawn listboxes"));
     }
 #endif // wxUSE_OWNER_DRAWN
-    wxASSERT_MSG( m_dataArray.GetCount() >= (size_t) N , wxT("invalid client_data array") ) ;
+    wxASSERT_MSG( m_dataArray.GetCount() >= (unsigned int) n , wxT("invalid client_data array") ) ;
 
-    if ( m_dataArray.GetCount() > (size_t) N )
+    if ( m_dataArray.GetCount() > (size_t) n )
     {
-        m_dataArray[N] = (char*) Client_data ;
+        m_dataArray[n] = (char*) Client_data ;
     }
     else
     {
@@ -567,7 +567,7 @@ void wxListBox::DoSetItemClientData(int N, void *Client_data)
     }
 }
 
-void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxListBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     DoSetItemClientData(n, clientData);
 }
@@ -585,21 +585,21 @@ int wxListBox::GetSelection() const
 }
 
 // Find string for position
-wxString wxListBox::GetString(int N) const
+wxString wxListBox::GetString(unsigned int n) const
 {
-    return m_stringArray[N]  ;
+    return m_stringArray[n]  ;
 }
 
-void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxCHECK_RET( IsValidInsert(pos),
         wxT("invalid index in wxListBox::InsertItems") );
 
     InvalidateBestSize();
 
-    size_t nItems = items.GetCount();
+    unsigned int nItems = items.GetCount();
 
-    for ( size_t i = 0 ; i < nItems ; i++ )
+    for ( unsigned int i = 0 ; i < nItems ; i++ )
     {
         m_stringArray.Insert( items[i] , pos + i ) ;
         m_dataArray.Insert( NULL , pos + i ) ;
@@ -609,10 +609,10 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
     m_noItems += nItems;
 }
 
-void wxListBox::SetString(int N, const wxString& s)
+void wxListBox::SetString(unsigned int n, const wxString& s)
 {
-    m_stringArray[N] = s ;
-    MacSet( N , s ) ;
+    m_stringArray[n] = s;
+    MacSet(n, s);
 }
 
 wxSize wxListBox::DoGetBestSize() const
@@ -638,7 +638,7 @@ wxSize wxListBox::DoGetBestSize() const
         }
 
         // Find the widest line
-        for(int i = 0; i < GetCount(); i++) {
+        for(unsigned int i = 0; i < GetCount(); i++) {
             wxString str(GetString(i));
         #if wxUSE_UNICODE
             Point bounds={0,0} ;
@@ -671,7 +671,7 @@ wxSize wxListBox::DoGetBestSize() const
     return wxSize(lbWidth, lbHeight);
 }
 
-size_t wxListBox::GetCount() const
+unsigned int wxListBox::GetCount() const
 {
     return m_noItems;
 }
@@ -899,7 +899,7 @@ void wxListBox::MacDoClick()
             event.SetClientObject( GetClientObject(n) );
         else if ( HasClientUntypedData() )
             event.SetClientData( GetClientData(n) );
-        event.SetString( GetString(n) );
+        event.SetString(GetString(n));
     }
     else
     {
@@ -980,7 +980,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
                 event.SetClientObject( GetClientObject(n) );
             else if ( HasClientUntypedData() )
                 event.SetClientData( GetClientData(n) );
-            event.SetString( GetString(n) );
+            event.SetString(GetString(n));
         }
         else
         {
@@ -1012,7 +1012,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
                     event.SetClientObject( GetClientObject( line ) );
                 else if ( HasClientUntypedData() )
                     event.SetClientData( GetClientData(line) );
-                event.SetString( GetString(line) );
+                event.SetString(GetString(line));
 
                 event.SetInt(line);
 
index 869d0c9b4482702a28211f02e183c783bd38cc5e..52cfa6c4bac75a4305b4ac5f1fa4a7cb6ff94d56 100644 (file)
@@ -39,7 +39,7 @@ void wxRadioBox::OnRadioButton( wxCommandEvent &outer )
         wxCommandEvent event(wxEVT_COMMAND_RADIOBOX_SELECTED, m_windowId);
         int i = GetSelection() ;
         event.SetInt( i );
-        event.SetString( GetString( i ) );
+        event.SetString(GetString(i));
         event.SetEventObject( this );
         ProcessCommand(event);
     }
@@ -111,7 +111,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
 
     int i;
 
-    m_noItems = (size_t)n;
+    m_noItems = (unsigned int)n;
     m_noRowsOrCols = majorDim;
     m_radioButtonCycle = NULL;
 
@@ -155,13 +155,12 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
 
 bool wxRadioBox::Enable(bool enable)
 {
-    wxRadioButton *current;
-
     if (!wxControl::Enable(enable))
         return false;
 
-    current = m_radioButtonCycle;
-    for (size_t i = 0; i < m_noItems; i++) {
+    wxRadioButton *current = m_radioButtonCycle;
+    for (unsigned int i = 0; i < m_noItems; i++)
+    {
         current->Enable(enable);
         current = current->NextInCycle();
     }
@@ -169,21 +168,19 @@ bool wxRadioBox::Enable(bool enable)
 }
 
 //-------------------------------------------------------------------------------------
-//         Â¥ Enable(int, bool)
+//         Â¥ Enable(unsigned int, bool)
 //-------------------------------------------------------------------------------------
 // Enables or disables an given button
 
-bool wxRadioBox::Enable(int item, bool enable)
+bool wxRadioBox::Enable(unsigned int item, bool enable)
 {
-    int i;
-    wxRadioButton *current;
-
     if (!IsValid(item))
         return false;
 
-    i = 0;
-    current = m_radioButtonCycle;
-    while (i != item) {
+    unsigned int i = 0;
+    wxRadioButton *current = m_radioButtonCycle;
+    while (i != item)
+    {
         i++;
         current = current->NextInCycle();
     }
@@ -205,15 +202,14 @@ wxString wxRadioBox::GetLabel() const
 //-------------------------------------------------------------------------------------
 // Returns the label for the given button
 
-wxString wxRadioBox::GetString(int item) const
+wxString wxRadioBox::GetString(unsigned int item) const
 {
-    int i;
     wxRadioButton *current;
 
     if (!IsValid(item))
         return wxEmptyString;
 
-    i = 0;
+    unsigned int i = 0;
     current = m_radioButtonCycle;
     while (i != item) {
         i++;
@@ -265,16 +261,15 @@ void wxRadioBox::SetLabel(const wxString& label)
 //-------------------------------------------------------------------------------------
 // Sets the label of a given button
 
-void wxRadioBox::SetString(int item,const wxString& label)
+void wxRadioBox::SetString(unsigned int item,const wxString& label)
 {
-    int i;
-    wxRadioButton *current;
-
     if (!IsValid(item))
         return;
-    i=0;
-    current=m_radioButtonCycle;
-    while (i!=item) {
+
+    unsigned int i=0;
+    wxRadioButton *current=m_radioButtonCycle;
+    while (i!=item)
+    {
         i++;
         current=current->NextInCycle();
     }
@@ -316,7 +311,7 @@ bool wxRadioBox::Show(bool show)
     wxControl::Show(show);
 
     current=m_radioButtonCycle;
-    for (size_t i=0; i<m_noItems; i++)
+    for (unsigned int i=0; i<m_noItems; i++)
     {
         current->Show(show);
         current=current->NextInCycle();
@@ -325,19 +320,17 @@ bool wxRadioBox::Show(bool show)
 }
 
 //-------------------------------------------------------------------------------------
-//         Â¥ Show(int, bool)
+//         Â¥ Show(unsigned int, bool)
 //-------------------------------------------------------------------------------------
 // Shows or hides the given button
 
-bool wxRadioBox::Show(int item, bool show)
+bool wxRadioBox::Show(unsigned int item, bool show)
 {
-    int i;
-    wxRadioButton *current;
-
     if (!IsValid(item))
         return false;
-    i=0;
-    current=m_radioButtonCycle;
+
+    unsigned int i = 0;
+    wxRadioButton *current=m_radioButtonCycle;
     while (i!=item) {
         i++;
         current=current->NextInCycle();
@@ -385,7 +378,7 @@ void wxRadioBox::SetFocus()
 
 void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
 {
-    size_t i;
+    unsigned int i;
     wxRadioButton *current;
 
     // define the position
@@ -504,7 +497,7 @@ wxSize wxRadioBox::DoGetBestSize() const
     maxWidth = -1;
     maxHeight = -1;
 
-    for (size_t i = 0 ; i < m_noItems; i++)
+    for (unsigned int i = 0 ; i < m_noItems; i++)
     {
         GetTextExtent(GetString(i), &eachWidth, &eachHeight);
         eachWidth  = (int)(eachWidth + RADIO_SIZE) ;
index b2e28eb366ab6ea370b1536e4d4c50841cf1b912..8b8ee7ef6e3b64006dc2b8df269363667952fa88 100644 (file)
@@ -16,6 +16,8 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_CHECKLISTBOX
+
 #include "wx/defs.h"
 
 #include "wx/checklst.h"
@@ -116,12 +118,12 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
 // check items
 // -----------
 
-bool wxCheckListBox::IsChecked(size_t uiIndex) const
+bool wxCheckListBox::IsChecked(unsigned int uiIndex) const
 {
     return ::IsChecked(wxListBox::GetString(uiIndex));
 }
 
-void wxCheckListBox::Check(size_t uiIndex, bool bCheck)
+void wxCheckListBox::Check(unsigned int uiIndex, bool bCheck)
 {
     wxString label = wxListBox::GetString(uiIndex);
     if(::IsChecked(label) == bCheck) return;
@@ -145,7 +147,7 @@ void wxCheckListBox::DoToggleItem( int n, int x )
         event.SetInt(n);
         event.SetExtraLong(true);
         event.SetEventObject(this);
-        event.SetString( GetString( n ) );
+        event.SetString(GetString(n));
 
         GetEventHandler()->ProcessEvent(event);
     }
@@ -170,17 +172,17 @@ int wxCheckListBox::FindString(const wxString& s, bool bCase) const
     return min;
 }
 
-void wxCheckListBox::SetString(int n, const wxString& s)
+void wxCheckListBox::SetString(unsigned int n, const wxString& s)
 {
-    wxListBox::SetString( n, Prefix(IsChecked(n)) + s );
+    wxListBox::SetString(n, Prefix(IsChecked(n)) + s);
 }
 
-wxString wxCheckListBox::GetString(int n) const
+wxString wxCheckListBox::GetString(unsigned int n) const
 {
     return wxListBox::GetString(n).substr(4);
 }
 
-void wxCheckListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxCheckListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxArrayString copy;
     CopyStringsAddingPrefix(items, copy);
@@ -193,3 +195,5 @@ void wxCheckListBox::DoSetItems(const wxArrayString& items, void **clientData)
     CopyStringsAddingPrefix(items, copy);
     wxListBox::DoSetItems(copy, clientData);
 }
+
+#endif // wxUSE_CHECKLISTBOX
index 2ffba977d6dad225e500ebaaad3ebb0702e047cc..04531704eee9215de01e5e1b5d5df092c916ea99 100644 (file)
@@ -187,10 +187,10 @@ static inline wxChar* MYcopystring(const wxChar* s)
     return wxStrcpy(copy, s);
 }
 
-int wxChoice::DoInsert(const wxString& item, int pos)
+int wxChoice::DoInsert(const wxString& item, unsigned int pos)
 {
 #ifndef XmNpositionIndex
-    wxCHECK_MSG( (size_t)pos == GetCount(), -1, wxT("insert not implemented"));
+    wxCHECK_MSG( pos == GetCount(), -1, wxT("insert not implemented"));
 #endif
     Widget w = XtVaCreateManagedWidget (wxStripMenuCodes(item),
 #if wxUSE_GADGETS
@@ -236,10 +236,10 @@ int wxChoice::DoInsert(const wxString& item, int pos)
 
 int wxChoice::DoAppend(const wxString& item)
 {
-    return DoInsert(item, (int)GetCount());
+    return DoInsert(item, GetCount());
 }
 
-void wxChoice::Delete(int n)
+void wxChoice::Delete(unsigned int n)
 {
     Widget w = (Widget)m_widgetArray[n];
     XtRemoveCallback(w, XmNactivateCallback, (XtCallbackProc)wxChoiceCallback,
@@ -249,13 +249,13 @@ void wxChoice::Delete(int n)
     m_clientDataDict.Delete(n, HasClientObjectData());
 
     XtDestroyWidget(w);
-    m_noStrings --;
+    m_noStrings--;
 }
 
 void wxChoice::Clear()
 {
     m_stringList.Clear ();
-    size_t i;
+    unsigned int i;
     for (i = 0; i < m_noStrings; i++)
     {
         XtRemoveCallback((Widget) m_widgetArray[i],
@@ -337,7 +337,7 @@ void wxChoice::SetSelection(int n)
     m_inSetValue = false;
 }
 
-wxString wxChoice::GetString(int n) const
+wxString wxChoice::GetString(unsigned int n) const
 {
     wxStringList::compatibility_iterator node = m_stringList.Item(n);
     if (node)
@@ -384,7 +384,7 @@ void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags)
 
     if (width > -1)
     {
-        size_t i;
+        unsigned int i;
         for (i = 0; i < m_noStrings; i++)
             XtVaSetValues ((Widget) m_widgetArray[i],
                            XmNwidth, actualWidth,
@@ -395,7 +395,7 @@ void wxChoice::DoSetSize(int x, int y, int width, int height, int sizeFlags)
     if (height > -1)
     {
 #if 0
-        size_t i;
+        unsigned int i;
         for (i = 0; i < m_noStrings; i++)
             XtVaSetValues ((Widget) m_widgetArray[i],
                            XmNheight, actualHeight,
@@ -462,7 +462,7 @@ void wxChoice::ChangeFont(bool keepOriginalSize)
                        fontTag, m_font.GetFontTypeC(dpy),
                        NULL);
 
-        for( size_t i = 0; i < m_noStrings; ++i )
+        for( unsigned int i = 0; i < m_noStrings; ++i )
             XtVaSetValues( (Widget)m_widgetArray[i],
                            fontTag, m_font.GetFontTypeC(dpy),
                            NULL );
@@ -480,7 +480,7 @@ void wxChoice::ChangeBackgroundColour()
     wxDoChangeBackgroundColour(m_formWidget, m_backgroundColour);
     wxDoChangeBackgroundColour(m_buttonWidget, m_backgroundColour);
     wxDoChangeBackgroundColour(m_menuWidget, m_backgroundColour);
-    size_t i;
+    unsigned int i;
     for (i = 0; i < m_noStrings; i++)
         wxDoChangeBackgroundColour(m_widgetArray[i], m_backgroundColour);
 }
@@ -490,38 +490,38 @@ void wxChoice::ChangeForegroundColour()
     wxDoChangeForegroundColour(m_formWidget, m_foregroundColour);
     wxDoChangeForegroundColour(m_buttonWidget, m_foregroundColour);
     wxDoChangeForegroundColour(m_menuWidget, m_foregroundColour);
-    size_t i;
+    unsigned int i;
     for (i = 0; i < m_noStrings; i++)
         wxDoChangeForegroundColour(m_widgetArray[i], m_foregroundColour);
 }
 
-size_t wxChoice::GetCount() const
+unsigned int wxChoice::GetCount() const
 {
     return m_noStrings;
 }
 
-void wxChoice::DoSetItemClientData(int n, void* clientData)
+void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
 {
     m_clientDataDict.Set(n, (wxClientData*)clientData, false);
 }
 
-void* wxChoice::DoGetItemClientData(int n) const
+void* wxChoice::DoGetItemClientData(unsigned int n) const
 {
     return (void*)m_clientDataDict.Get(n);
 }
 
-void wxChoice::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     // don't delete, wxItemContainer does that for us
     m_clientDataDict.Set(n, clientData, false);
 }
 
-wxClientData* wxChoice::DoGetItemClientObject(int n) const
+wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
 {
     return m_clientDataDict.Get(n);
 }
 
-void wxChoice::SetString(int WXUNUSED(n), const wxString& WXUNUSED(s))
+void wxChoice::SetString(unsigned int WXUNUSED(n), const wxString& WXUNUSED(s))
 {
     wxFAIL_MSG( wxT("wxChoice::SetString not implemented") );
 }
index 49a8f87dbe05516d7cf3564d86078873da4e1c32..956dfd73392f1c4db3f5d5b7b46567d472870fef 100644 (file)
@@ -49,7 +49,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id,
     if( !CreateControl( parent, id, pos, size, style, validator, name ) )
         return false;
 
-    m_noStrings = (size_t)n;
+    m_noStrings = n;
 
     Widget parentWidget = (Widget) parent->GetClientWidget();
 
@@ -144,7 +144,7 @@ void wxComboBox::SetValue(const wxString& value)
     m_inSetValue = false;
 }
 
-void wxComboBox::SetString(int WXUNUSED(n), const wxString& WXUNUSED(s))
+void wxComboBox::SetString(unsigned int WXUNUSED(n), const wxString& WXUNUSED(s))
 {
     wxFAIL_MSG( wxT("wxComboBox::SetString only implemented for Motif 2.0") );
 }
@@ -159,7 +159,7 @@ int wxComboBox::DoAppend(const wxString& item)
     return GetCount() - 1;
 }
 
-int wxComboBox::DoInsert(const wxString& item, int pos)
+int wxComboBox::DoInsert(const wxString& item, unsigned int pos)
 {
     wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list"));
     wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index"));
@@ -176,7 +176,7 @@ int wxComboBox::DoInsert(const wxString& item, int pos)
     return pos;
 }
 
-void wxComboBox::Delete(int n)
+void wxComboBox::Delete(unsigned int n)
 {
     XmComboBoxDeletePos((Widget) m_mainWidget, n+1);
     wxStringList::Node *node = m_stringList.Item(n);
@@ -213,7 +213,7 @@ int wxComboBox::GetSelection (void) const
         return sel - 1;
 }
 
-wxString wxComboBox::GetString(int n) const
+wxString wxComboBox::GetString(unsigned int n) const
 {
     wxStringList::Node *node = m_stringList.Item(n);
     if (node)
index fa3204e23873661306c68227b326ec1298795f2f..f65ae3d8eadf91e0fd85950db28d6ddc29485ed5 100644 (file)
@@ -179,7 +179,7 @@ wxString wxComboBox::GetValue() const
     return str;
 }
 
-void wxComboBox::SetString(int n, const wxString& s)
+void wxComboBox::SetString(unsigned int n, const wxString& s)
 {
     wxXmString text(s);
     Widget listBox = GetXmList(this);
@@ -213,12 +213,12 @@ int wxComboBox::DoAppend(const wxString& item)
     return GetCount() - 1;
 }
 
-int wxComboBox::DoInsert(const wxString& item, int pos)
+int wxComboBox::DoInsert(const wxString& item, unsigned int pos)
 {
     wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list"));
     wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index"));
 
-    if ((size_t)pos == GetCount())
+    if (pos == GetCount())
         return DoAppend(item);
 
     wxXmString str( item.c_str() );
@@ -229,7 +229,7 @@ int wxComboBox::DoInsert(const wxString& item, int pos)
     return GetCount() - 1;
 }
 
-void wxComboBox::Delete(int n)
+void wxComboBox::Delete(unsigned int n)
 {
 #ifdef LESSTIF_VERSION
     XmListDeletePos (GetXmList(this), n + 1);
@@ -269,7 +269,7 @@ void wxComboBox::SetSelection (int n)
     SetValue(GetString(n));
 #else
 #if 0
-    wxXmString str( GetString(n).c_str() );
+    wxXmString str(GetString(n).c_str());
     XmComboBoxSelectItem((Widget) m_mainWidget, str());
 #endif
     XtVaSetValues( (Widget)m_mainWidget,
@@ -285,7 +285,7 @@ int wxComboBox::GetSelection (void) const
     return wxDoGetSelectionInList( GetXmList( this ) );
 }
 
-wxString wxComboBox::GetString(int n) const
+wxString wxComboBox::GetString(unsigned int n) const
 {
     return wxDoGetStringInList( GetXmList(this), n );
 }
index 8eba4cd13a2d5bcf46fbf3dcf4a7764b1bbc2fb7..cc73babadf8faa5cf63d15769bb1d53bb27661d7 100644 (file)
@@ -89,7 +89,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
                                    validator, name ) )
         return false;
 
-    m_noItems = (size_t)n;
+    m_noItems = (unsigned int)n;
     m_backgroundColour = * wxWHITE;
 
     Widget parentWidget = (Widget) parent->GetClientWidget();
@@ -204,7 +204,7 @@ void wxListBox::DoSetFirstItem( int N )
     XmListSetPos ((Widget) m_mainWidget, N + 1);
 }
 
-void wxListBox::Delete(int N)
+void wxListBox::Delete(unsigned int n)
 {
     wxSizeKeeper sk( this );
     Widget listBox = (Widget) m_mainWidget;
@@ -214,13 +214,13 @@ void wxListBox::Delete(int N)
     if (managed)
         XtUnmanageChild (listBox);
 
-    XmListDeletePos (listBox, N + 1);
+    XmListDeletePos (listBox, n + 1);
 
     if (managed)
         XtManageChild (listBox);
 
     sk.Restore();
-    m_clientDataDict.Delete(N, HasClientObjectData());
+    m_clientDataDict.Delete(n, HasClientObjectData());
     m_noItems --;
 }
 
@@ -265,7 +265,7 @@ void wxListBox::DoSetItems(const wxArrayString& items, void** clientData)
     if (managed)
         XtUnmanageChild (listBox);
     XmString *text = new XmString[items.GetCount()];
-    size_t i;
+    unsigned int i;
     for (i = 0; i < items.GetCount(); ++i)
         text[i] = wxStringToXmString (items[i]);
 
@@ -390,24 +390,24 @@ bool wxListBox::IsSelected(int N) const
     return false;
 }
 
-void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxListBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     m_clientDataDict.Set(n, clientData, false);
 }
 
-wxClientData* wxListBox::DoGetItemClientObject(int n) const
+wxClientData* wxListBox::DoGetItemClientObject(unsigned int n) const
 {
     return m_clientDataDict.Get(n);
 }
 
-void *wxListBox::DoGetItemClientData(int N) const
+void *wxListBox::DoGetItemClientData(unsigned int n) const
 {
-    return (void*)m_clientDataDict.Get(N);
+    return (void*)m_clientDataDict.Get(n);
 }
 
-void wxListBox::DoSetItemClientData(int N, void *Client_data)
+void wxListBox::DoSetItemClientData(unsigned int n, void *Client_data)
 {
-    m_clientDataDict.Set(N, (wxClientData*)Client_data, false);
+    m_clientDataDict.Set(n, (wxClientData*)Client_data, false);
 }
 
 // Return number of selections and an array of selected integers
@@ -477,12 +477,12 @@ wxString wxDoGetStringInList( Widget listBox, int n )
         return wxEmptyString;
 }
 
-wxString wxListBox::GetString( int n ) const
+wxString wxListBox::GetString(unsigned int n) const
 {
     return wxDoGetStringInList( (Widget)m_mainWidget, n );
 }
 
-void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxSizeKeeper sk( this );
     Widget listBox = (Widget) m_mainWidget;
@@ -493,7 +493,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
         XtUnmanageChild(listBox);
 
     XmString *text = new XmString[items.GetCount()];
-    size_t i;
+    unsigned int i;
     // Steve Hammes: Motif 1.1 compatibility
     // #if XmVersion > 1100
     // Corrected by Sergey Krasnov from Steve Hammes' code
@@ -525,7 +525,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
     m_noItems += items.GetCount();
 }
 
-void wxListBox::SetString(int N, const wxString& s)
+void wxListBox::SetString(unsigned int n, const wxString& s)
 {
     wxSizeKeeper sk( this );
     Widget listBox = (Widget) m_mainWidget;
@@ -534,8 +534,8 @@ void wxListBox::SetString(int N, const wxString& s)
 
     // delete the item and add it again.
     // FIXME isn't there a way to change it in place?
-    XmListDeletePos (listBox, N+1);
-    XmListAddItem (listBox, text(), N+1);
+    XmListDeletePos (listBox, n+1);
+    XmListAddItem (listBox, text(), n+1);
 
     sk.Restore();
 }
@@ -666,7 +666,7 @@ void wxListBox::ChangeForegroundColour()
     */
 }
 
-size_t wxListBox::GetCount() const
+unsigned int wxListBox::GetCount() const
 {
     return m_noItems;
 }
index b529840be59e3f009aa7d842cf4a35011da875d0..a341e977a8eb8ad50acba30538279f33c5b2896b 100644 (file)
@@ -59,7 +59,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
     if( !CreateControl( parent, id, pos, size, style, val, name ) )
         return false;
 
-    m_noItems = (size_t)n;
+    m_noItems = (unsigned int)n;
     m_noRowsOrCols = majorDim;
 
     SetMajorDim(majorDim == 0 ? n : majorDim, style);
@@ -168,12 +168,12 @@ wxRadioBox::~wxRadioBox()
     m_mainWidget = (WXWidget) 0;
 }
 
-void wxRadioBox::SetString(int item, const wxString& label)
+void wxRadioBox::SetString(unsigned int item, const wxString& label)
 {
     if (!IsValid(item))
         return;
 
-    Widget widget = (Widget) m_radioButtons[item];
+    Widget widget = (Widget)m_radioButtons[item];
     if (!label.empty())
     {
         wxString label1(wxStripMenuCodes(label));
@@ -197,8 +197,8 @@ void wxRadioBox::SetSelection(int n)
 
     XmToggleButtonSetState ((Widget) m_radioButtons[n], True, False);
 
-    for (size_t i = 0; i < m_noItems; i++)
-        if (i != (size_t)n)
+    for (unsigned int i = 0; i < m_noItems; i++)
+        if (i != (unsigned int)n)
             XmToggleButtonSetState ((Widget) m_radioButtons[i], False, False);
 
     m_inSetValue = false;
@@ -211,7 +211,7 @@ int wxRadioBox::GetSelection() const
 }
 
 // Find string for position
-wxString wxRadioBox::GetString(int n) const
+wxString wxRadioBox::GetString(unsigned int n) const
 {
     if (!IsValid(n))
         return wxEmptyString;
@@ -243,7 +243,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
 }
 
 // Enable a specific button
-bool wxRadioBox::Enable(int n, bool enable)
+bool wxRadioBox::Enable(unsigned int n, bool enable)
 {
     if (!IsValid(n))
         return false;
@@ -258,7 +258,7 @@ bool wxRadioBox::Enable(bool enable)
     if ( !wxControl::Enable(enable) )
         return false;
 
-    for (size_t i = 0; i < m_noItems; i++)
+    for (unsigned int i = 0; i < m_noItems; i++)
         XtSetSensitive ((Widget) m_radioButtons[i], (Boolean) enable);
 
     return true;
@@ -271,7 +271,7 @@ bool wxRadioBox::Show(bool show)
 }
 
 // Show a specific button
-bool wxRadioBox::Show(int n, bool show)
+bool wxRadioBox::Show(unsigned int n, bool show)
 {
   // This method isn't complete, and we try do do our best...
   // It's main purpose isn't for allowing Show/Unshow dynamically,
@@ -305,8 +305,8 @@ bool wxRadioBox::Show(int n, bool show)
 wxString wxRadioBox::GetStringSelection () const
 {
     int sel = GetSelection ();
-    if (sel > -1)
-        return this->GetString (sel);
+    if (sel != wxNOT_FOUND)
+        return this->GetString((unsigned int)sel);
     else
         return wxEmptyString;
 }
@@ -333,7 +333,7 @@ void wxRadioBox::ChangeFont(bool keepOriginalSize)
 {
     wxWindow::ChangeFont(keepOriginalSize);
 
-    for (size_t i = 0; i < m_noItems; i++)
+    for (unsigned int i = 0; i < m_noItems; i++)
     {
         WXWidget radioButton = m_radioButtons[i];
 
@@ -349,7 +349,7 @@ void wxRadioBox::ChangeBackgroundColour()
 
     int selectPixel = wxBLACK->AllocColour(XtDisplay((Widget)m_mainWidget));
 
-    for (size_t i = 0; i < m_noItems; i++)
+    for (unsigned int i = 0; i < m_noItems; i++)
     {
         WXWidget radioButton = m_radioButtons[i];
 
@@ -365,7 +365,7 @@ void wxRadioBox::ChangeForegroundColour()
 {
     wxWindow::ChangeForegroundColour();
 
-    for (size_t i = 0; i < m_noItems; i++)
+    for (unsigned int i = 0; i < m_noItems; i++)
     {
         WXWidget radioButton = m_radioButtons[i];
 
@@ -381,7 +381,7 @@ void wxRadioBoxCallback (Widget w, XtPointer clientData,
 
   wxRadioBox *item = (wxRadioBox *) clientData;
   int sel = -1;
-  size_t i;
+  unsigned int i;
   const wxWidgetArray& buttons = item->GetRadioButtons();
   for (i = 0; i < item->GetCount(); i++)
     if (((Widget)buttons[i]) == w)
index b40783e67a16b2b10bc80635f2bdde0d62613a59..91c20b20b01d9be8aab3a184790a1a1b510b8233 100644 (file)
@@ -126,44 +126,44 @@ class wxCheckListBoxItem : public wxOwnerDrawn
 {
 friend class WXDLLEXPORT wxCheckListBox;
 public:
-  // ctor
-  wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex);
+    // ctor
+    wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex);
 
-  // drawing functions
-  virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat);
+    // drawing functions
+    virtual bool OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODStatus stat);
 
-  // simple accessors and operations
-  bool IsChecked() const { return m_bChecked; }
+    // simple accessors and operations
+    bool IsChecked() const { return m_bChecked; }
 
-  void Check(bool bCheck);
-  void Toggle() { Check(!IsChecked()); }
+    void Check(bool bCheck);
+    void Toggle() { Check(!IsChecked()); }
 
-  void SendEvent();
+    void SendEvent();
 
 private:
-  bool            m_bChecked;
-  wxCheckListBox *m_pParent;
-  size_t          m_nIndex;
+    bool            m_bChecked;
+    wxCheckListBox *m_pParent;
+    size_t    m_nIndex;
 
-  DECLARE_NO_COPY_CLASS(wxCheckListBoxItem)
+    DECLARE_NO_COPY_CLASS(wxCheckListBoxItem)
 };
 
 wxCheckListBoxItem::wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex)
                   : wxOwnerDrawn(wxEmptyString, true)   // checkable
 {
-  m_bChecked = false;
-  m_pParent  = pParent;
-  m_nIndex   = nIndex;
-
-  // we don't initialize m_nCheckHeight/Width vars because it's
-  // done in OnMeasure while they are used only in OnDraw and we
-  // know that there will always be OnMeasure before OnDraw
-
-  // fix appearance for check list boxes: they don't look quite the same as
-  // menu icons
-  SetMarginWidth(::GetSystemMetrics(SM_CXMENUCHECK) -
-                    2*wxSystemSettings::GetMetric(wxSYS_EDGE_X) + 1);
-  SetBackgroundColour(pParent->GetBackgroundColour());
+    m_bChecked = false;
+    m_pParent  = pParent;
+    m_nIndex   = nIndex;
+
+    // we don't initialize m_nCheckHeight/Width vars because it's
+    // done in OnMeasure while they are used only in OnDraw and we
+    // know that there will always be OnMeasure before OnDraw
+
+    // fix appearance for check list boxes: they don't look quite the same as
+    // menu icons
+    SetMarginWidth(::GetSystemMetrics(SM_CXMENUCHECK) -
+                      2*wxSystemSettings::GetMetric(wxSYS_EDGE_X) + 1);
+    SetBackgroundColour(pParent->GetBackgroundColour());
 }
 
 bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc,
@@ -335,22 +335,22 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
 // misc overloaded methods
 // -----------------------
 
-void wxCheckListBox::Delete(int N)
+void wxCheckListBox::Delete(unsigned int n)
 {
-    wxCHECK_RET( IsValid(N),
+    wxCHECK_RET( IsValid(n),
                  wxT("invalid index in wxListBox::Delete") );
 
-    wxListBox::Delete(N);
+    wxListBox::Delete(n);
 
     // free memory
-    delete m_aItems[N];
+    delete m_aItems[n];
 
-    m_aItems.RemoveAt(N);
+    m_aItems.RemoveAt(n);
 }
 
 bool wxCheckListBox::SetFont( const wxFont &font )
 {
-    size_t i;
+    unsigned int i;
     for ( i = 0; i < m_aItems.GetCount(); i++ )
         m_aItems[i]->SetFont(font);
 
@@ -391,16 +391,16 @@ bool wxCheckListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item)
 // check items
 // -----------
 
-bool wxCheckListBox::IsChecked(size_t uiIndex) const
+bool wxCheckListBox::IsChecked(unsigned int uiIndex) const
 {
-    wxCHECK_MSG( uiIndex < (size_t)GetCount(), false, _T("bad wxCheckListBox index") );
+    wxCHECK_MSG( IsValid(uiIndex), false, _T("bad wxCheckListBox index") );
 
     return GetItem(uiIndex)->IsChecked();
 }
 
-void wxCheckListBox::Check(size_t uiIndex, bool bCheck)
+void wxCheckListBox::Check(unsigned int uiIndex, bool bCheck)
 {
-    wxCHECK_RET( uiIndex < (size_t)GetCount(), _T("bad wxCheckListBox index") );
+    wxCHECK_RET( IsValid(uiIndex), _T("bad wxCheckListBox index") );
 
     GetItem(uiIndex)->Check(bCheck);
 }
@@ -494,21 +494,24 @@ void wxCheckListBox::OnKeyDown(wxKeyEvent& event)
 
 void wxCheckListBox::OnLeftClick(wxMouseEvent& event)
 {
-  // clicking on the item selects it, clicking on the checkmark toggles
-  if ( event.GetX() <= wxOwnerDrawn::GetDefaultMarginWidth() ) {
-    int nItem = HitTest(event.GetX(), event.GetY());
-
-    if ( nItem != wxNOT_FOUND ) {
-      wxCheckListBoxItem *item = GetItem(nItem);
-      item->Toggle();
-      item->SendEvent();
+    // clicking on the item selects it, clicking on the checkmark toggles
+    if ( event.GetX() <= wxOwnerDrawn::GetDefaultMarginWidth() )
+    {
+        int nItem = HitTest(event.GetX(), event.GetY());
+
+        if ( nItem != wxNOT_FOUND )
+        {
+            wxCheckListBoxItem *item = GetItem(nItem);
+            item->Toggle();
+            item->SendEvent();
+        }
+        //else: it's not an error, just click outside of client zone
+    }
+    else
+    {
+        // implement default behaviour: clicking on the item selects it
+        event.Skip();
     }
-    //else: it's not an error, just click outside of client zone
-  }
-  else {
-    // implement default behaviour: clicking on the item selects it
-    event.Skip();
-  }
 }
 
 int wxCheckListBox::DoHitTestItem(wxCoord x, wxCoord y) const
@@ -521,7 +524,7 @@ int wxCheckListBox::DoHitTestItem(wxCoord x, wxCoord y) const
                               MAKELPARAM(x, y)
                              );
 
-  return nItem >= (int)m_noItems ? wxNOT_FOUND : nItem;
+    return nItem >= (int)m_noItems ? wxNOT_FOUND : nItem;
 }
 
 
index be319a91325c1affe5bbf68800ec1823f9b044ca..6319f4ae2e9fb7ba83281bddc7419309be8f85f1 100644 (file)
@@ -236,7 +236,7 @@ int wxChoice::DoAppend(const wxString& item)
     return n;
 }
 
-int wxChoice::DoInsert(const wxString& item, int pos)
+int wxChoice::DoInsert(const wxString& item, unsigned int pos)
 {
     wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list"));
     wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index"));
@@ -256,7 +256,7 @@ int wxChoice::DoInsert(const wxString& item, int pos)
     return n;
 }
 
-void wxChoice::Delete(int n)
+void wxChoice::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n), wxT("invalid item index in wxChoice::Delete") );
 
@@ -289,8 +289,8 @@ void wxChoice::Free()
 {
     if ( HasClientObjectData() )
     {
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             delete GetClientObject(n);
         }
@@ -326,9 +326,9 @@ void wxChoice::SetSelection(int n)
 // string list functions
 // ----------------------------------------------------------------------------
 
-size_t wxChoice::GetCount() const
+unsigned int wxChoice::GetCount() const
 {
-    return (size_t)SendMessage(GetHwnd(), CB_GETCOUNT, 0, 0);
+    return (unsigned int)SendMessage(GetHwnd(), CB_GETCOUNT, 0, 0);
 }
 
 int wxChoice::FindString(const wxString& s, bool bCase) const
@@ -336,11 +336,11 @@ int wxChoice::FindString(const wxString& s, bool bCase) const
 #if defined(__WATCOMC__) && defined(__WIN386__)
     // For some reason, Watcom in WIN386 mode crashes in the CB_FINDSTRINGEXACT message.
     // wxChoice::Do it the long way instead.
-    size_t count = GetCount();
-    for ( size_t i = 0; i < count; i++ )
+    unsigned int count = GetCount();
+    for ( unsigned int i = 0; i < count; i++ )
     {
         // as CB_FINDSTRINGEXACT is case insensitive, be case insensitive too
-        if ( GetString(i).IsSameAs(s, bCase) )
+        if (GetString(i).IsSameAs(s, bCase))
             return i;
     }
 
@@ -350,10 +350,10 @@ int wxChoice::FindString(const wxString& s, bool bCase) const
    //passed to SendMessage, so we have to do it ourselves in that case
    if ( s.empty() )
    {
-       size_t count = GetCount();
-       for ( size_t i = 0; i < count; i++ )
+       unsigned int count = GetCount();
+       for ( unsigned int i = 0; i < count; i++ )
        {
-         if ( GetString(i).empty() )
+         if (GetString(i).empty())
              return i;
        }
 
@@ -374,7 +374,7 @@ int wxChoice::FindString(const wxString& s, bool bCase) const
 #endif // Watcom/!Watcom
 }
 
-void wxChoice::SetString(int n, const wxString& s)
+void wxChoice::SetString(unsigned int n, const wxString& s)
 {
     wxCHECK_RET( IsValid(n), wxT("invalid item index in wxChoice::SetString") );
 
@@ -404,7 +404,7 @@ void wxChoice::SetString(int n, const wxString& s)
     InvalidateBestSize();
 }
 
-wxString wxChoice::GetString(int n) const
+wxString wxChoice::GetString(unsigned int n) const
 {
     int len = (int)::SendMessage(GetHwnd(), CB_GETLBTEXTLEN, n, 0);
 
@@ -430,7 +430,7 @@ wxString wxChoice::GetString(int n) const
 // client data
 // ----------------------------------------------------------------------------
 
-void wxChoice::DoSetItemClientData( int n, void* clientData )
+void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
 {
     if ( ::SendMessage(GetHwnd(), CB_SETITEMDATA,
                        n, (LPARAM)clientData) == CB_ERR )
@@ -439,7 +439,7 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
     }
 }
 
-void* wxChoice::DoGetItemClientData( int n ) const
+void* wxChoice::DoGetItemClientData(unsigned int n) const
 {
     LPARAM rc = SendMessage(GetHwnd(), CB_GETITEMDATA, n, 0);
     if ( rc == CB_ERR )
@@ -453,12 +453,12 @@ void* wxChoice::DoGetItemClientData( int n ) const
     return (void *)rc;
 }
 
-void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     DoSetItemClientData(n, clientData);
 }
 
-wxClientData* wxChoice::DoGetItemClientObject( int n ) const
+wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *)DoGetItemClientData(n);
 }
@@ -516,7 +516,7 @@ void wxChoice::DoSetSize(int x, int y,
     {
         // don't make the drop down list too tall, arbitrarily limit it to 40
         // items max and also don't leave it empty
-        size_t nItems = GetCount();
+        unsigned int nItems = GetCount();
         if ( !nItems )
             nItems = 9;
         else if ( nItems > 24 )
@@ -595,8 +595,8 @@ wxSize wxChoice::DoGetBestSize() const
 {
     // find the widest string
     int wChoice = 0;
-    const size_t nItems = GetCount();
-    for ( size_t i = 0; i < nItems; i++ )
+    const unsigned int nItems = GetCount();
+    for ( unsigned int i = 0; i < nItems; i++ )
     {
         int wLine;
         GetTextExtent(GetString(i), &wLine, NULL);
index d688e9ae922a10cc0692a9ea078798b2a8082508..578f993b1a78713498d28ea7b9e82242bb180770 100644 (file)
@@ -256,9 +256,9 @@ void wxListBox::DoSetFirstItem(int N)
     SendMessage(GetHwnd(), LB_SETTOPINDEX, (WPARAM)N, (LPARAM)0);
 }
 
-void wxListBox::Delete(int N)
+void wxListBox::Delete(unsigned int n)
 {
-    wxCHECK_RET( IsValid(N),
+    wxCHECK_RET( IsValid(n),
                  wxT("invalid index in wxListBox::Delete") );
 
     // for owner drawn objects, the data is used for storing wxOwnerDrawn
@@ -268,10 +268,10 @@ void wxListBox::Delete(int N)
 #endif // !wxUSE_OWNER_DRAWN
         if ( HasClientObjectData() )
         {
-            delete GetClientObject(N);
+            delete GetClientObject(n);
         }
 
-    SendMessage(GetHwnd(), LB_DELETESTRING, N, 0);
+    SendMessage(GetHwnd(), LB_DELETESTRING, n, 0);
     m_noItems--;
 
     SetHorizontalExtent(wxEmptyString);
@@ -312,7 +312,7 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
     ListBox_ResetContent(GetHwnd());
 
     m_noItems = choices.GetCount();
-    size_t i;
+    unsigned int i;
     for (i = 0; i < m_noItems; i++)
     {
         ListBox_AddString(GetHwnd(), choices[i]);
@@ -328,7 +328,7 @@ void wxListBox::DoSetItems(const wxArrayString& choices, void** clientData)
         WX_CLEAR_ARRAY(m_aItems);
 
         // then create new ones
-        for ( size_t ui = 0; ui < m_noItems; ui++ ) {
+        for ( unsigned int ui = 0; ui < m_noItems; ui++ ) {
             wxOwnerDrawn *pNewItem = CreateLboxItem(ui);
             pNewItem->SetName(choices[ui]);
             m_aItems.Add(pNewItem);
@@ -384,7 +384,7 @@ void wxListBox::Free()
 #endif // wxUSE_OWNER_DRAWN
     if ( HasClientObjectData() )
     {
-        for ( size_t n = 0; n < m_noItems; n++ )
+        for ( unsigned int n = 0; n < m_noItems; n++ )
         {
             delete GetClientObject(n);
         }
@@ -414,12 +414,12 @@ bool wxListBox::IsSelected(int N) const
     return SendMessage(GetHwnd(), LB_GETSEL, N, 0) == 0 ? false : true;
 }
 
-wxClientData* wxListBox::DoGetItemClientObject(int n) const
+wxClientData* wxListBox::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *)DoGetItemClientData(n);
 }
 
-void *wxListBox::DoGetItemClientData(int n) const
+void *wxListBox::DoGetItemClientData(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), NULL,
                  wxT("invalid index in wxListBox::GetClientData") );
@@ -427,12 +427,12 @@ void *wxListBox::DoGetItemClientData(int n) const
     return (void *)SendMessage(GetHwnd(), LB_GETITEMDATA, n, 0);
 }
 
-void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxListBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     DoSetItemClientData(n, clientData);
 }
 
-void wxListBox::DoSetItemClientData(int n, void *clientData)
+void wxListBox::DoSetItemClientData(unsigned int n, void *clientData)
 {
     wxCHECK_RET( IsValid(n),
                  wxT("invalid index in wxListBox::SetClientData") );
@@ -504,28 +504,28 @@ int wxListBox::GetSelection() const
 }
 
 // Find string for position
-wxString wxListBox::GetString(int N) const
+wxString wxListBox::GetString(unsigned int n) const
 {
-    wxCHECK_MSG( IsValid(N), wxEmptyString,
+    wxCHECK_MSG( IsValid(n), wxEmptyString,
                  wxT("invalid index in wxListBox::GetString") );
 
-    int len = ListBox_GetTextLen(GetHwnd(), N);
+    int len = ListBox_GetTextLen(GetHwnd(), n);
 
     // +1 for terminating NUL
     wxString result;
-    ListBox_GetText(GetHwnd(), N, (wxChar*)wxStringBuffer(result, len + 1));
+    ListBox_GetText(GetHwnd(), n, (wxChar*)wxStringBuffer(result, len + 1));
 
     return result;
 }
 
 void
-wxListBox::DoInsertItems(const wxArrayString& items, int pos)
+wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxCHECK_RET( IsValidInsert(pos),
                  wxT("invalid index in wxListBox::InsertItems") );
 
-    int nItems = items.GetCount();
-    for ( int i = 0; i < nItems; i++ )
+    unsigned int nItems = items.GetCount();
+    for ( unsigned int i = 0; i < nItems; i++ )
     {
         int idx = ListBox_InsertString(GetHwnd(), i + pos, items[i]);
 
@@ -561,55 +561,55 @@ int wxListBox::DoListHitTest(const wxPoint& point) const
     return HIWORD(lRes) ? wxNOT_FOUND : lRes;
 }
 
-void wxListBox::SetString(int N, const wxString& s)
+void wxListBox::SetString(unsigned int n, const wxString& s)
 {
-    wxCHECK_RET( IsValid(N),
+    wxCHECK_RET( IsValid(n),
                  wxT("invalid index in wxListBox::SetString") );
 
     // remember the state of the item
-    bool wasSelected = IsSelected(N);
+    bool wasSelected = IsSelected(n);
 
     void *oldData = NULL;
     wxClientData *oldObjData = NULL;
     if ( m_clientDataItemsType == wxClientData_Void )
-        oldData = GetClientData(N);
+        oldData = GetClientData(n);
     else if ( m_clientDataItemsType == wxClientData_Object )
-        oldObjData = GetClientObject(N);
+        oldObjData = GetClientObject(n);
 
     // delete and recreate it
-    SendMessage(GetHwnd(), LB_DELETESTRING, N, 0);
+    SendMessage(GetHwnd(), LB_DELETESTRING, n, 0);
 
-    int newN = N;
-    if ( N == (int)(m_noItems - 1) )
+    int newN = n;
+    if ( n == (m_noItems - 1) )
         newN = -1;
 
     ListBox_InsertString(GetHwnd(), newN, s);
 
     // restore the client data
     if ( oldData )
-        SetClientData(N, oldData);
+        SetClientData(n, oldData);
     else if ( oldObjData )
-        SetClientObject(N, oldObjData);
+        SetClientObject(n, oldObjData);
 
 #if wxUSE_OWNER_DRAWN
     if ( m_windowStyle & wxLB_OWNERDRAW )
     {
         // update item's text
-        m_aItems[N]->SetName(s);
+        m_aItems[n]->SetName(s);
 
         // reassign the item's data
-        ListBox_SetItemData(GetHwnd(), N, m_aItems[N]);
+        ListBox_SetItemData(GetHwnd(), n, m_aItems[n]);
     }
 #endif  //USE_OWNER_DRAWN
 
     // we may have lost the selection
     if ( wasSelected )
-        Select(N);
+        Select(n);
 
     InvalidateBestSize();
 }
 
-size_t wxListBox::GetCount() const
+unsigned int wxListBox::GetCount() const
 {
     return m_noItems;
 }
@@ -658,7 +658,7 @@ void wxListBox::SetHorizontalExtent(const wxString& s)
 
         GetTextMetrics(dc, &lpTextMetric);
 
-        for (size_t i = 0; i < m_noItems; i++)
+        for (unsigned int i = 0; i < m_noItems; i++)
         {
             wxString str = GetString(i);
             SIZE extentXY;
@@ -680,7 +680,7 @@ wxSize wxListBox::DoGetBestSize() const
     // find the widest string
     int wLine;
     int wListbox = 0;
-    for ( size_t i = 0; i < m_noItems; i++ )
+    for (unsigned int i = 0; i < m_noItems; i++)
     {
         wxString str(GetString(i));
         GetTextExtent(str, &wLine, NULL);
@@ -745,7 +745,7 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
         else if ( HasClientUntypedData() )
             event.SetClientData( GetClientData(n) );
 
-        event.SetString( GetString(n) );
+        event.SetString(GetString(n));
         event.SetExtraLong( HasMultipleSelection() ? IsSelected(n) : true );
     }
 
index d8f693b08973ba954730395bdbf90e84d6caa228..b3a6b7f03db39982639c43a8fef2c93d81865c5d 100644 (file)
@@ -269,8 +269,8 @@ bool wxRadioBox::MSWCommand(WXUINT cmd, WXWORD id)
 
         int selectedButton = wxNOT_FOUND;
 
-        const size_t count = GetCount();
-        for ( size_t i = 0; i < count; i++ )
+        const unsigned int count = GetCount();
+        for ( unsigned int i = 0; i < count; i++ )
         {
             if ( id == wxGetWindowId((*m_radioButtons)[i]) )
             {
@@ -314,7 +314,7 @@ void wxRadioBox::SendNotificationEvent()
 {
     wxCommandEvent event(wxEVT_COMMAND_RADIOBOX_SELECTED, m_windowId);
     event.SetInt( m_selectedButton );
-    event.SetString( GetString(m_selectedButton) );
+    event.SetString(GetString(m_selectedButton));
     event.SetEventObject( this );
     ProcessCommand(event);
 }
@@ -323,12 +323,12 @@ void wxRadioBox::SendNotificationEvent()
 // simple accessors
 // ----------------------------------------------------------------------------
 
-size_t wxRadioBox::GetCount() const
+unsigned int wxRadioBox::GetCount() const
 {
     return m_radioButtons->GetCount();
 }
 
-void wxRadioBox::SetString(int item, const wxString& label)
+void wxRadioBox::SetString(unsigned int item, const wxString& label)
 {
     wxCHECK_RET( IsValid(item), wxT("invalid radiobox index") );
 
@@ -355,7 +355,7 @@ void wxRadioBox::SetSelection(int N)
 }
 
 // Find string for position
-wxString wxRadioBox::GetString(int item) const
+wxString wxRadioBox::GetString(unsigned int item) const
 {
     wxCHECK_MSG( IsValid(item), wxEmptyString,
                  wxT("invalid radiobox index") );
@@ -374,7 +374,7 @@ void wxRadioBox::SetFocus()
 }
 
 // Enable a specific button
-bool wxRadioBox::Enable(int item, bool enable)
+bool wxRadioBox::Enable(unsigned int item, bool enable)
 {
     wxCHECK_MSG( IsValid(item), false,
                  wxT("invalid item in wxRadioBox::Enable()") );
@@ -384,7 +384,7 @@ bool wxRadioBox::Enable(int item, bool enable)
     return (ret == 0) != enable;
 }
 
-bool wxRadioBox::IsItemEnabled(int item) const
+bool wxRadioBox::IsItemEnabled(unsigned int item) const
 {
     wxCHECK_MSG( IsValid(item), false,
                  wxT("invalid item in wxRadioBox::IsItemEnabled()") );
@@ -393,7 +393,7 @@ bool wxRadioBox::IsItemEnabled(int item) const
 }
 
 // Show a specific button
-bool wxRadioBox::Show(int item, bool show)
+bool wxRadioBox::Show(unsigned int item, bool show)
 {
     wxCHECK_MSG( IsValid(item), false,
                  wxT("invalid item in wxRadioBox::Show()") );
@@ -409,7 +409,7 @@ bool wxRadioBox::Show(int item, bool show)
     return changed;
 }
 
-bool wxRadioBox::IsItemShown(int item) const
+bool wxRadioBox::IsItemShown(unsigned int item) const
 {
     wxCHECK_MSG( IsValid(item), false,
                  wxT("invalid item in wxRadioBox::IsItemShown()") );
@@ -432,8 +432,8 @@ wxSize wxRadioBox::GetMaxButtonSize() const
     // calculate the max button size
     int widthMax = 0,
         heightMax = 0;
-    const size_t count = GetCount();
-    for ( size_t i = 0 ; i < count; i++ )
+    const unsigned int count = GetCount();
+    for ( unsigned int i = 0 ; i < count; i++ )
     {
         int width, height;
         if ( m_radioWidth[i] < 0 )
@@ -565,8 +565,8 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
     int startX = x_offset;
     int startY = y_offset;
 
-    const size_t count = GetCount();
-    for ( size_t i = 0; i < count; i++ )
+    const unsigned int count = GetCount();
+    for (unsigned int i = 0; i < count; i++)
     {
         // the last button in the row may be wider than the other ones as the
         // radiobox may be wider than the sum of the button widths (as it
@@ -576,7 +576,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
         {
             // item is the last in its row if it is a multiple of the number of
             // columns or if it is just the last item
-            size_t n = i + 1;
+            unsigned int n = i + 1;
             isLastInTheRow = ((n % GetMajorDim()) == 0) || (n == count);
         }
         else // wxRA_SPECIFY_ROWS
@@ -651,8 +651,8 @@ WXHRGN wxRadioBox::MSWGetRegionWithoutChildren()
     ::GetWindowRect(GetHwnd(), &rc);
     HRGN hrgn = ::CreateRectRgn(rc.left, rc.top, rc.right + 1, rc.bottom + 1);
 
-    const size_t count = GetCount();
-    for ( size_t i = 0; i < count; ++i )
+    const unsigned int count = GetCount();
+    for ( unsigned int i = 0; i < count; ++i )
     {
         // don't clip out hidden children
         if ( !IsItemShown(i) )
index 0c4a31c52759a6607109b5eb25c5e27893ce96e5..b0044c84439f0409b7339624a475988040b56e68 100644 (file)
@@ -154,7 +154,7 @@ void wxCheckListBox::OnSize(wxSizeEvent& event)
 // misc overloaded methods
 // -----------------------
 
-void wxCheckListBox::Delete(int n)
+void wxCheckListBox::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid( n ), _T("invalid index in wxCheckListBox::Delete") );
 
@@ -168,7 +168,7 @@ void wxCheckListBox::Delete(int n)
 // check items
 // -----------
 
-bool wxCheckListBox::IsChecked(size_t uiIndex) const
+bool wxCheckListBox::IsChecked(unsigned int uiIndex) const
 {
     wxCHECK_MSG( IsValid( uiIndex ), false,
                  _T("invalid index in wxCheckListBox::IsChecked") );
@@ -176,7 +176,7 @@ bool wxCheckListBox::IsChecked(size_t uiIndex) const
     return (ListView_GetCheckState(((HWND)GetHWND()), uiIndex) != 0);
 }
 
-void wxCheckListBox::Check(size_t uiIndex, bool bCheck)
+void wxCheckListBox::Check(unsigned int uiIndex, bool bCheck)
 {
     wxCHECK_RET( IsValid( uiIndex ),
                  _T("invalid index in wxCheckListBox::Check") );
@@ -189,7 +189,7 @@ void wxCheckListBox::Check(size_t uiIndex, bool bCheck)
 
 void wxCheckListBox::Clear()
 {
-    int n = (int)GetCount();
+    unsigned int n = GetCount();
 
     while ( n > 0 )
     {
@@ -203,15 +203,15 @@ void wxCheckListBox::Clear()
                  _T("broken wxCheckListBox::Clear()") );
 }
 
-size_t wxCheckListBox::GetCount() const
+unsigned int wxCheckListBox::GetCount() const
 {
-    return (size_t)ListView_GetItemCount( (HWND)GetHWND() );
+    return (unsigned int)ListView_GetItemCount( (HWND)GetHWND() );
 }
 
 int wxCheckListBox::GetSelection() const
 {
     int i;
-    for (i = 0; (size_t)i < GetCount(); i++)
+    for (i = 0; (unsigned int)i < GetCount(); i++)
     {
         int selState = ListView_GetItemState(GetHwnd(), i, LVIS_SELECTED);
         if (selState == LVIS_SELECTED)
@@ -224,7 +224,7 @@ int wxCheckListBox::GetSelection() const
 int wxCheckListBox::GetSelections(wxArrayInt& aSelections) const
 {
     int i;
-    for (i = 0; (size_t)i < GetCount(); i++)
+    for (i = 0; (unsigned int)i < GetCount(); i++)
     {
         int selState = ListView_GetItemState(GetHwnd(), i, LVIS_SELECTED);
         if (selState == LVIS_SELECTED)
@@ -234,7 +234,7 @@ int wxCheckListBox::GetSelections(wxArrayInt& aSelections) const
     return aSelections.GetCount();
 }
 
-wxString wxCheckListBox::GetString(int n) const
+wxString wxCheckListBox::GetString(unsigned int n) const
 {
     const int bufSize = 513;
     wxChar buf[bufSize];
@@ -250,7 +250,7 @@ bool wxCheckListBox::IsSelected(int n) const
     return (selState == LVIS_SELECTED);
 }
 
-void wxCheckListBox::SetString(int n, const wxString& s)
+void wxCheckListBox::SetString(unsigned int n, const wxString& s)
 {
     wxCHECK_RET( IsValid( n ),
                  _T("invalid index in wxCheckListBox::SetString") );
@@ -273,22 +273,22 @@ int wxCheckListBox::DoAppend(const wxString& item)
     return ret;
 }
 
-void* wxCheckListBox::DoGetItemClientData(int n) const
+void* wxCheckListBox::DoGetItemClientData(unsigned int n) const
 {
     return m_itemsClientData.Item(n);
 }
 
-wxClientData* wxCheckListBox::DoGetItemClientObject(int n) const
+wxClientData* wxCheckListBox::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *)DoGetItemClientData(n);
 }
 
-void wxCheckListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxCheckListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxCHECK_RET( IsValidInsert( pos ),
                  wxT("invalid index in wxListBox::InsertItems") );
 
-    for( size_t i = 0; i < items.GetCount(); i++ )
+    for( unsigned int i = 0; i < items.GetCount(); i++ )
     {
         LVITEM newItem;
         wxZeroMemory(newItem);
@@ -311,12 +311,12 @@ void wxCheckListBox::DoSetFirstItem(int n)
     ListView_Scroll( (HWND)GetHWND(), 0, ppt.y );
 }
 
-void wxCheckListBox::DoSetItemClientData(int n, void* clientData)
+void wxCheckListBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
     m_itemsClientData.Item(n) = clientData;
 }
 
-void wxCheckListBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxCheckListBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     DoSetItemClientData(n, clientData);
 }
@@ -325,7 +325,7 @@ void wxCheckListBox::DoSetItems(const wxArrayString& items, void **clientData)
 {
     ListView_SetItemCount( GetHwnd(), GetCount() + items.GetCount() );
 
-    for( size_t i = 0; i < items.GetCount(); i++ )
+    for( unsigned int i = 0; i < items.GetCount(); i++ )
     {
         int pos = Append(items[i]);
         if( pos >= 0 && clientData )
index fba1e4d019e3a86039b6f07ffc0eba1a9d8d49c4..36b29d1027c920c198562fc42fc6f760aed7ec39 100644 (file)
@@ -345,7 +345,7 @@ int wxChoice::DoAppend(const wxString& item)
     return n;
 }
 
-int wxChoice::DoInsert(const wxString& item, int pos)
+int wxChoice::DoInsert(const wxString& item, unsigned int pos)
 {
     wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into choice"));
     wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index"));
@@ -359,7 +359,7 @@ int wxChoice::DoInsert(const wxString& item, int pos)
     return n;
 }
 
-void wxChoice::Delete(int n)
+void wxChoice::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n), wxT("invalid item index in wxChoice::Delete") );
 
@@ -382,8 +382,8 @@ void wxChoice::Free()
 {
     if ( HasClientObjectData() )
     {
-        size_t count = GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             delete GetClientObject(n);
         }
@@ -408,9 +408,9 @@ void wxChoice::SetSelection(int n)
 // string list functions
 // ----------------------------------------------------------------------------
 
-size_t wxChoice::GetCount() const
+unsigned int wxChoice::GetCount() const
 {
-    return (size_t)::SendMessage(GetBuddyHwnd(), LB_GETCOUNT, 0, 0);
+    return (unsigned int)::SendMessage(GetBuddyHwnd(), LB_GETCOUNT, 0, 0);
 }
 
 int wxChoice::FindString(const wxString& s, bool bCase) const
@@ -425,7 +425,7 @@ int wxChoice::FindString(const wxString& s, bool bCase) const
     return pos == LB_ERR ? wxNOT_FOUND : pos;
 }
 
-void wxChoice::SetString(int n, const wxString& s)
+void wxChoice::SetString(unsigned int n, const wxString& s)
 {
     wxCHECK_RET( IsValid(n),
                  wxT("invalid item index in wxChoice::SetString") );
@@ -454,7 +454,7 @@ void wxChoice::SetString(int n, const wxString& s)
     //else: it's already NULL by default
 }
 
-wxString wxChoice::GetString(int n) const
+wxString wxChoice::GetString(unsigned int n) const
 {
     int len = (int)::SendMessage(GetBuddyHwnd(), LB_GETTEXTLEN, n, 0);
 
@@ -480,7 +480,7 @@ wxString wxChoice::GetString(int n) const
 // client data
 // ----------------------------------------------------------------------------
 
-void wxChoice::DoSetItemClientData( int n, void* clientData )
+void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
 {
     if ( ::SendMessage(GetHwnd(), LB_SETITEMDATA,
                        n, (LPARAM)clientData) == LB_ERR )
@@ -489,7 +489,7 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
     }
 }
 
-void* wxChoice::DoGetItemClientData( int n ) const
+void* wxChoice::DoGetItemClientData(unsigned int n) const
 {
     LPARAM rc = ::SendMessage(GetHwnd(), LB_GETITEMDATA, n, 0);
     if ( rc == LB_ERR )
@@ -503,12 +503,12 @@ void* wxChoice::DoGetItemClientData( int n ) const
     return (void *)rc;
 }
 
-void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     DoSetItemClientData(n, clientData);
 }
 
-wxClientData* wxChoice::DoGetItemClientObject( int n ) const
+wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *)DoGetItemClientData(n);
 }
index 3bb67b387b54e44cf895cbfcefce7e07bc4458bc..8d2d55ee5526e3915e268828378d2ecbd1d8d5af 100644 (file)
@@ -58,9 +58,7 @@ public:
     //
     // ctor
     //
-    wxCheckListBoxItem( wxCheckListBox* pParent,
-                        size_t          nIndex
-                      );
+    wxCheckListBoxItem(wxCheckListBox* pParent, size_t nIndex);
 
     //
     // Drawing functions
@@ -86,8 +84,7 @@ private:
 
 
 
-wxCheckListBoxItem::wxCheckListBoxItem ( wxCheckListBox* pParent,
-                                         size_t nIndex)
+wxCheckListBoxItem::wxCheckListBoxItem(wxCheckListBox* pParent, size_t nIndex)
                    :wxOwnerDrawn( wxEmptyString, true /* checkable */ )
 {
     m_bChecked = false;
@@ -184,7 +181,7 @@ bool wxCheckListBoxItem::OnDrawItem ( wxDC& rDc,
 //
 // Change the state of the item and redraw it
 //
-void wxCheckListBoxItem::Check ( bool bCheck )
+void wxCheckListBoxItem::Check( bool bCheck )
 {
     m_bChecked = bCheck;
 
@@ -270,7 +267,7 @@ wxCheckListBox::wxCheckListBox ( wxWindow* pParent,
             lStyle | wxLB_OWNERDRAW, rVal, rsName );
 } // end of wxCheckListBox::wxCheckListBox
 
-void wxCheckListBox::Delete( int n )
+void wxCheckListBox::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n),
                  wxT("invalid index in wxCheckListBox::Delete") );
@@ -283,12 +280,12 @@ void wxCheckListBox::Delete( int n )
     m_aItems.RemoveAt(n);
 } // end of wxCheckListBox::Delete
 
-void wxCheckListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxCheckListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     // pos is validated in wxListBox
     wxListBox::DoInsertItems( items, pos );
-    int n = items.GetCount();
-    for (int i = 0; i < n; i++)
+    unsigned int n = items.GetCount();
+    for (unsigned int i = 0; i < n; i++)
     {
         wxOwnerDrawn* pNewItem = CreateItem((size_t)(pos + i));
 
@@ -304,7 +301,7 @@ void wxCheckListBox::DoInsertItems(const wxArrayString& items, int pos)
 
 bool wxCheckListBox::SetFont ( const wxFont& rFont )
 {
-    for (size_t i = 0; i < m_aItems.GetCount(); i++)
+    for (unsigned int i = 0; i < m_aItems.GetCount(); i++)
         m_aItems[i]->SetFont(rFont);
     wxListBox::SetFont(rFont);
     return true;
@@ -320,7 +317,7 @@ bool wxCheckListBox::SetFont ( const wxFont& rFont )
 //
 // Create a check list box item
 //
-wxOwnerDrawn* wxCheckListBox::CreateItem ( size_t nIndex )
+wxOwnerDrawn* wxCheckListBox::CreateItem(size_t nIndex)
 {
     wxCheckListBoxItem* pItem = new wxCheckListBoxItem( this, nIndex );
     return pItem;
@@ -360,12 +357,12 @@ long wxCheckListBox::OS2OnMeasure ( WXMEASUREITEMSTRUCT* pItem )
 // Check items
 // -----------
 //
-bool wxCheckListBox::IsChecked ( size_t uiIndex) const
+bool wxCheckListBox::IsChecked(unsigned int uiIndex) const
 {
     return GetItem(uiIndex)->IsChecked();
 } // end of wxCheckListBox::IsChecked
 
-void wxCheckListBox::Check ( size_t uiIndex, bool bCheck )
+void wxCheckListBox::Check(unsigned int uiIndex, bool bCheck)
 {
     GetItem(uiIndex)->Check(bCheck);
 } // end of wxCheckListBox::Check
index a6264e0f8d79befcaf66b4c03e6096a750eb553e..498e5cd427508a34a48c3a4323819dad747b33db 100644 (file)
@@ -123,12 +123,12 @@ int wxChoice::DoAppend(
     return nIndex;
 } // end of wxChoice::DoAppend
 
-int wxChoice::DoInsert( const wxString& rsItem, int pos )
+int wxChoice::DoInsert( const wxString& rsItem, unsigned int pos )
 {
     wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list"));
     wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index"));
 
-    if ((size_t)pos == GetCount())
+    if (pos == GetCount())
         return DoAppend(rsItem);
 
     int  nIndex;
@@ -146,7 +146,7 @@ int wxChoice::DoInsert( const wxString& rsItem, int pos )
     return nIndex;
 } // end of wxChoice::DoInsert
 
-void wxChoice::Delete( int n )
+void wxChoice::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n), wxT("invalid item index in wxChoice::Delete") );
     ::WinSendMsg(GetHwnd(), LM_DELETEITEM, (MPARAM)n, (MPARAM)0);
@@ -182,12 +182,12 @@ void wxChoice::SetSelection(
 // string list functions
 // ----------------------------------------------------------------------------
 
-size_t wxChoice::GetCount() const
+unsigned int wxChoice::GetCount() const
 {
-    return((size_t)LONGFROMMR(::WinSendMsg(GetHwnd(), LM_QUERYITEMCOUNT, (MPARAM)0, (MPARAM)0)));
+    return((unsigned int)LONGFROMMR(::WinSendMsg(GetHwnd(), LM_QUERYITEMCOUNT, (MPARAM)0, (MPARAM)0)));
 } // end of wxChoice::GetCount
 
-void wxChoice::SetString( int n, const wxString& rsStr )
+void wxChoice::SetString(unsigned int n, const wxString& rsStr)
 {
     LONG  nIndexType = 0;
     void* pData;
@@ -215,13 +215,11 @@ void wxChoice::SetString( int n, const wxString& rsStr )
 
     if (pData)
     {
-        DoSetItemClientData( n
-                            ,pData
-                           );
+        DoSetItemClientData(n, pData);
     }
 } // end of wxChoice::SetString
 
-wxString wxChoice::GetString(int n) const
+wxString wxChoice::GetString(unsigned int n) const
 {
     int      nLen = 0;
     wxString sStr = wxEmptyString;
@@ -246,35 +244,23 @@ wxString wxChoice::GetString(int n) const
 // client data
 // ----------------------------------------------------------------------------
 
-void wxChoice::DoSetItemClientData(
-  int                               n
-, void*                             pClientData
-)
+void wxChoice::DoSetItemClientData(unsigned int n, void* pClientData)
 {
     ::WinSendMsg(GetHwnd(), LM_SETITEMHANDLE, (MPARAM)n, MPFROMP(pClientData));
 } // end of wxChoice::DoSetItemClientData
 
-void* wxChoice::DoGetItemClientData( int n ) const
+void* wxChoice::DoGetItemClientData(unsigned int n) const
 {
-    MRESULT                         rc = 0L;
-
-    rc = ::WinSendMsg(GetHwnd(), LM_QUERYITEMHANDLE, (MPARAM)n, (MPARAM)0);
+    MRESULT rc = ::WinSendMsg(GetHwnd(), LM_QUERYITEMHANDLE, (MPARAM)n, (MPARAM)0);
     return((void*)rc);
-} // end of wxChoice::DoSetItemClientData
+} // end of wxChoice::DoGetItemClientData
 
-void wxChoice::DoSetItemClientObject(
-  int                               n
-, wxClientData*                     pClientData
-)
+void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* pClientData)
 {
-    DoSetItemClientData( n
-                        ,pClientData
-                       );
+    DoSetItemClientData(n, pClientData);
 } // end of wxChoice::DoSetItemClientObject
 
-wxClientData* wxChoice::DoGetItemClientObject(
-  int                               n
-) const
+wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *)DoGetItemClientData(n);
 } // end of wxChoice::DoGetItemClientObject
@@ -315,9 +301,9 @@ wxSize wxChoice::DoGetBestSize() const
     int    nCy;
     wxFont vFont = (wxFont)GetFont();
 
-    const size_t nItems = GetCount();
+    const unsigned int nItems = GetCount();
 
-    for (size_t i = 0; i < nItems; i++)
+    for (unsigned int i = 0; i < nItems; i++)
     {
         wxString sStr(GetString(i));
         GetTextExtent( sStr, &nLineWidth, NULL );
@@ -341,12 +327,10 @@ wxSize wxChoice::DoGetBestSize() const
     //
     // Choice drop-down list depends on number of items (limited to 10)
     //
-    size_t                          nStrings = nItems == 0 ? 10 : wxMin(10, nItems) + 1;
-    int                             nChoiceHeight = EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * nStrings;
+    size_t nStrings = nItems == 0 ? 10 : wxMin(10, nItems) + 1;
+    int    nChoiceHeight = EDIT_HEIGHT_FROM_CHAR_HEIGHT(nCy) * nStrings;
 
-    return wxSize( nChoiceWidth
-                  ,nChoiceHeight
-                 );
+    return wxSize(nChoiceWidth, nChoiceHeight);
 } // end of wxChoice::DoGetBestSize
 
 MRESULT wxChoice::OS2WindowProc(
@@ -397,9 +381,9 @@ void wxChoice::Free()
 {
     if (HasClientObjectData())
     {
-        const size_t nCount = GetCount();
+        const unsigned int nCount = GetCount();
 
-        for (size_t n = 0; n < nCount; n++)
+        for (unsigned int n = 0; n < nCount; n++)
         {
             delete GetClientObject(n);
         }
index 4a057dea63afee9ad72f9085dcc9e98e296e54ac..b8adb5cec74ef61c9c924499ec88f88b22d3a83a 100644 (file)
@@ -252,22 +252,22 @@ void wxListBox::DoSetFirstItem(int N)
     ::WinSendMsg(GetHwnd(), LM_SETTOPINDEX, MPFROMLONG(N), (MPARAM)0);
 } // end of wxListBox::DoSetFirstItem
 
-void wxListBox::Delete(int N)
+void wxListBox::Delete(unsigned int n)
 {
-    wxCHECK_RET( IsValid(N),
+    wxCHECK_RET( IsValid(n),
                  wxT("invalid index in wxListBox::Delete") );
 
 #if wxUSE_OWNER_DRAWN
-    delete m_aItems[N];
-    m_aItems.RemoveAt(N);
+    delete m_aItems[n];
+    m_aItems.RemoveAt(n);
 #else // !wxUSE_OWNER_DRAWN
     if (HasClientObjectData())
     {
-        delete GetClientObject(N);
+        delete GetClientObject(n);
     }
 #endif // wxUSE_OWNER_DRAWN/!wxUSE_OWNER_DRAWN
 
-    ::WinSendMsg(GetHwnd(), LM_DELETEITEM, (MPARAM)N, (MPARAM)0);
+    ::WinSendMsg(GetHwnd(), LM_DELETEITEM, (MPARAM)n, (MPARAM)0);
     m_nNumItems--;
 } // end of wxListBox::DoSetFirstItem
 
@@ -312,7 +312,7 @@ void wxListBox::DoSetItems( const wxArrayString& raChoices,
     }
     ::WinSendMsg(GetHwnd(), LM_DELETEALL, (MPARAM)0, (MPARAM)0);
     m_nNumItems = raChoices.GetCount();
-    for (size_t i = 0; i < m_nNumItems; i++)
+    for (unsigned int i = 0; i < m_nNumItems; i++)
     {
         if (m_windowStyle & wxLB_SORT)
             lIndexType = LIT_SORTASCENDING;
@@ -342,9 +342,9 @@ void wxListBox::DoSetItems( const wxArrayString& raChoices,
         //
         // Then create new ones
         //
-        for (size_t ui = 0; ui < m_nNumItems; ui++)
+        for (unsigned int ui = 0; ui < m_nNumItems; ui++)
         {
-            wxOwnerDrawn*           pNewItem = CreateItem(ui);
+            wxOwnerDrawn* pNewItem = CreateItem(ui);
 
             pNewItem->SetName(raChoices[ui]);
             m_aItems.Add(pNewItem);
@@ -358,7 +358,7 @@ void wxListBox::DoSetItems( const wxArrayString& raChoices,
 void wxListBox::Clear()
 {
 #if wxUSE_OWNER_DRAWN
-    size_t lUiCount = m_aItems.Count();
+    unsigned int lUiCount = m_aItems.Count();
 
     while (lUiCount-- != 0)
     {
@@ -369,7 +369,7 @@ void wxListBox::Clear()
 #else // !wxUSE_OWNER_DRAWN
     if (HasClientObjectData())
     {
-        for (size_t n = 0; n < (size_t)m_lNumItems; n++)
+        for (unsigned int n = 0; n < m_lNumItems; n++)
         {
             delete GetClientObject(n);
         }
@@ -414,12 +414,12 @@ bool wxListBox::IsSelected( int N ) const
     return (lItem == (LONG)N && lItem != LIT_NONE);
 } // end of wxListBox::IsSelected
 
-wxClientData* wxListBox::DoGetItemClientObject(int n) const
+wxClientData* wxListBox::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *)DoGetItemClientData(n);
 }
 
-void* wxListBox::DoGetItemClientData(int n) const
+void* wxListBox::DoGetItemClientData(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), NULL,
                  wxT("invalid index in wxListBox::GetClientData") );
@@ -427,12 +427,12 @@ void* wxListBox::DoGetItemClientData(int n) const
     return((void *)::WinSendMsg(GetHwnd(), LM_QUERYITEMHANDLE, MPFROMLONG(n), (MPARAM)0));
 } // end of wxListBox::DoGetItemClientData
 
-void wxListBox::DoSetItemClientObject(int n, wxClientData* pClientData)
+void wxListBox::DoSetItemClientObject(unsigned int n, wxClientData* pClientData)
 {
     DoSetItemClientData(n, pClientData);
 } // end of wxListBox::DoSetItemClientObject
 
-void wxListBox::DoSetItemClientData(int n, void* pClientData)
+void wxListBox::DoSetItemClientData(unsigned int n, void* pClientData)
 {
     wxCHECK_RET( IsValid(n),
                  wxT("invalid index in wxListBox::SetClientData") );
@@ -533,33 +533,32 @@ int wxListBox::GetSelection() const
                      ));
 } // end of wxListBox::GetSelection
 
-wxString wxListBox::GetString( int N ) const
+wxString wxListBox::GetString(unsigned int n) const
 {
     LONG     lLen = 0;
     wxChar*  zBuf;
     wxString sResult;
 
-    wxCHECK_MSG( IsValid(N), wxEmptyString,
+    wxCHECK_MSG( IsValid(n), wxEmptyString,
                  wxT("invalid index in wxListBox::GetClientData") );
 
-    lLen = LONGFROMMR(::WinSendMsg(GetHwnd(), LM_QUERYITEMTEXTLENGTH, (MPARAM)N, (MPARAM)0));
+    lLen = LONGFROMMR(::WinSendMsg(GetHwnd(), LM_QUERYITEMTEXTLENGTH, (MPARAM)n, (MPARAM)0));
     zBuf = new wxChar[lLen + 1];
-    ::WinSendMsg(GetHwnd(), LM_QUERYITEMTEXT, MPFROM2SHORT((SHORT)N, (SHORT)lLen), (MPARAM)zBuf);
+    ::WinSendMsg(GetHwnd(), LM_QUERYITEMTEXT, MPFROM2SHORT((SHORT)n, (SHORT)lLen), (MPARAM)zBuf);
     zBuf[lLen] = '\0';
     sResult = zBuf;
     delete [] zBuf;
     return sResult;
 } // end of wxListBox::GetString
 
-void wxListBox::DoInsertItems( const wxArrayString& asItems,
-                               int nPos )
+void wxListBox::DoInsertItems(const wxArrayString& asItems, unsigned int nPos)
 {
     wxCHECK_RET( IsValidInsert(nPos),
                  wxT("invalid index in wxListBox::InsertItems") );
 
-    size_t nItems = asItems.GetCount();
+    unsigned int nItems = asItems.GetCount();
 
-    for (size_t i = 0; i < nItems; i++)
+    for (unsigned int i = 0; i < nItems; i++)
     {
         int nIndex = (int)::WinSendMsg( GetHwnd(),
                                         LM_INSERTITEM,
@@ -580,35 +579,35 @@ void wxListBox::DoInsertItems( const wxArrayString& asItems,
     }
 } // end of wxListBox::DoInsertItems
 
-void wxListBox::SetString(int N, const wxString& rsString)
+void wxListBox::SetString(unsigned int n, const wxString& rsString)
 {
-    wxCHECK_RET( IsValid(N),
+    wxCHECK_RET( IsValid(n),
                  wxT("invalid index in wxListBox::SetString") );
 
     //
     // Remember the state of the item
     //
-    bool           bWasSelected = IsSelected(N);
+    bool           bWasSelected = IsSelected(n);
     void*          pOldData = NULL;
     wxClientData*  pOldObjData = NULL;
 
     if (m_clientDataItemsType == wxClientData_Void)
-        pOldData = GetClientData(N);
+        pOldData = GetClientData(n);
     else if (m_clientDataItemsType == wxClientData_Object)
-        pOldObjData = GetClientObject(N);
+        pOldObjData = GetClientObject(n);
 
     //
     // Delete and recreate it
     //
     ::WinSendMsg( GetHwnd()
                  ,LM_DELETEITEM
-                 ,(MPARAM)N
+                 ,(MPARAM)n
                  ,(MPARAM)0
                 );
 
-    int                             nNewN = N;
+    int nNewN = n;
 
-    if (N == (int)(m_nNumItems - 1))
+    if (n == (int)(m_nNumItems - 1))
         nNewN = -1;
 
     ::WinSendMsg( GetHwnd()
@@ -621,30 +620,26 @@ void wxListBox::SetString(int N, const wxString& rsString)
     // Restore the client data
     //
     if (pOldData)
-        SetClientData( N
-                      ,pOldData
-                     );
+        SetClientData(n, pOldData);
     else if (pOldObjData)
-        SetClientObject( N
-                        ,pOldObjData
-                       );
+        SetClientObject(n, pOldObjData);
 
     //
     // We may have lost the selection
     //
     if (bWasSelected)
-        Select(N);
+        Select(n);
 
 #if wxUSE_OWNER_DRAWN
     if (m_windowStyle & wxLB_OWNERDRAW)
         //
         // Update item's text
         //
-        m_aItems[N]->SetName(rsString);
+        m_aItems[n]->SetName(rsString);
 #endif  //USE_OWNER_DRAWN
 } // end of wxListBox::SetString
 
-size_t wxListBox::GetCount() const
+unsigned int wxListBox::GetCount() const
 {
     return m_nNumItems;
 }
@@ -664,7 +659,7 @@ wxSize wxListBox::DoGetBestSize() const
     int        nCy;
     wxFont     vFont = (wxFont)GetFont();
 
-    for (size_t i = 0; i < m_nNumItems; i++)
+    for (unsigned int i = 0; i < m_nNumItems; i++)
     {
         wxString vStr(GetString(i));
 
index d2ef991a12cf478c0f4f28dbdb6fce839de05308..94808ae14b94faea9a022f3cb556f6e4138ce65f 100644 (file)
@@ -81,7 +81,7 @@ wxRadioBox::~wxRadioBox()
         wxRemoveHandleAssociation(this);
     if (m_ahRadioButtons)
     {
-        for (size_t i = 0; i < m_nNoItems; i++)
+        for (unsigned int i = 0; i < m_nNoItems; i++)
         {
             wxWindow* pWin = wxFindWinFromHandle((WXHWND)m_ahRadioButtons[i]);
             wxRemoveHandleAssociation(pWin);
@@ -104,8 +104,8 @@ void wxRadioBox::Command ( wxCommandEvent& rEvent )
 
 bool wxRadioBox::ContainsHWND( WXHWND hWnd ) const
 {
-    size_t nCount = GetCount();
-    size_t i;
+    unsigned int nCount = GetCount();
+    unsigned int i;
 
     for (i = 0; i < nCount; i++)
     {
@@ -178,7 +178,7 @@ bool wxRadioBox::Create( wxWindow* pParent,
     //
     // Now we can set m_nNoItems and let SetMajorDim set m_numCols/m_numRows
     //
-    m_nNoItems = (size_t)nNum;
+    m_nNoItems = (unsigned int)nNum;
     SetMajorDim(nMajorDim == 0 ? nNum : nMajorDim, lStyle);
 
     m_ahRadioButtons = new WXHWND[nNum];
@@ -406,7 +406,7 @@ void wxRadioBox::DoSetSize(
     nStartX = nXOffset;
     nStartY = nYOffset;
 
-    for (size_t i = 0; i < m_nNoItems; i++)
+    for (unsigned int i = 0; i < m_nNoItems; i++)
     {
         //
         // The last button in the row may be wider than the other ones as the
@@ -510,7 +510,7 @@ void wxRadioBox::DoSetSize(
     }
 } // end of wxRadioBox::DoSetSize
 
-bool wxRadioBox::Enable(int nItem, bool bEnable)
+bool wxRadioBox::Enable(unsigned int nItem, bool bEnable)
 {
     wxCHECK_MSG( IsValid(nItem), false,
                  wxT("invalid item in wxRadioBox::Enable()") );
@@ -523,12 +523,12 @@ bool wxRadioBox::Enable(bool bEnable)
 {
     if ( !wxControl::Enable(bEnable) )
         return false;
-    for (size_t i = 0; i < m_nNoItems; i++)
+    for (unsigned int i = 0; i < m_nNoItems; i++)
         ::WinEnableWindow((HWND)m_ahRadioButtons[i], bEnable);
     return true;
 } // end of wxRadioBox::Enable
 
-size_t wxRadioBox::GetCount() const
+unsigned int wxRadioBox::GetCount() const
 {
     return m_nNoItems;
 } // end of wxRadioBox::GetCount
@@ -545,7 +545,7 @@ wxSize wxRadioBox::GetMaxButtonSize() const
     int nWidthMax = 0;
     int nHeightMax = 0;
 
-    for (size_t i = 0 ; i < m_nNoItems; i++)
+    for (unsigned int i = 0 ; i < m_nNoItems; i++)
     {
         int nWidth;
         int nHeight;
@@ -597,7 +597,7 @@ void wxRadioBox::GetSize( int* pnWidth, int* pnHeight ) const
     if (m_hWnd)
         wxFindMaxSize( m_hWnd, &vRect );
 
-    for (size_t i = 0; i < m_nNoItems; i++)
+    for (unsigned int i = 0; i < m_nNoItems; i++)
         wxFindMaxSize( m_ahRadioButtons[i], &vRect );
 
     if (pnWidth)
@@ -607,7 +607,7 @@ void wxRadioBox::GetSize( int* pnWidth, int* pnHeight ) const
 } // end of wxRadioBox::GetSize
 
 // Find string for position
-wxString wxRadioBox::GetString( int nNum ) const
+wxString wxRadioBox::GetString(unsigned int nNum) const
 {
     wxCHECK_MSG( IsValid(nNum), wxEmptyString, wxT("invalid radiobox index") );
     return wxGetWindowText(m_ahRadioButtons[nNum]);
@@ -616,11 +616,12 @@ wxString wxRadioBox::GetString( int nNum ) const
 // For single selection items only
 wxString wxRadioBox::GetStringSelection() const
 {
-    wxString                        sResult;
-    int                             nSel = GetSelection();
+    wxString sResult;
+    int nSel = GetSelection();
 
-    if (nSel > -1)
+    if (nSel != wxNOT_FOUND)
         sResult = GetString(nSel);
+
     return sResult;
 } // end of wxRadioBox::GetStringSelection
 
@@ -689,7 +690,7 @@ bool wxRadioBox::OS2Command( WXUINT uCmd,
         if (wId == GetId())
             return true;
 
-        for (size_t i = 0; i < m_nNoItems; i++)
+        for (unsigned int i = 0; i < m_nNoItems; i++)
         {
             if (wId == wxGetWindowId(m_ahRadioButtons[i]))
             {
@@ -717,9 +718,10 @@ bool wxRadioBox::OS2Command( WXUINT uCmd,
 
 void wxRadioBox::SendNotificationEvent()
 {
-    wxCommandEvent                  vEvent( wxEVT_COMMAND_RADIOBOX_SELECTED
-                                           ,m_windowId
-                                          );
+    wxCommandEvent vEvent(
+                       wxEVT_COMMAND_RADIOBOX_SELECTED,
+                       m_windowId
+                   );
 
     vEvent.SetInt( m_nSelectedButton );
     vEvent.SetString( GetString(m_nSelectedButton) );
@@ -750,7 +752,7 @@ bool wxRadioBox::SetFont(const wxFont& rFont)
     //
     // Also set the font of our radio buttons
     //
-    for (size_t n = 0; n < m_nNoItems; n++)
+    for (unsigned int n = 0; n < m_nNoItems; n++)
     {
         HWND hWndBtn = (HWND)m_ahRadioButtons[n];
 
@@ -774,10 +776,7 @@ void wxRadioBox::SetSelection(
     m_nSelectedButton = nNum;
 } // end of wxRadioBox::SetSelection
 
-void wxRadioBox::SetString(
-  int                               nItem
-, const wxString&                   rsLabel
-)
+void wxRadioBox::SetString(unsigned int nItem, const wxString& rsLabel)
 {
     wxCHECK_RET( IsValid(nItem), wxT("invalid radiobox index") );
 
@@ -803,7 +802,7 @@ bool wxRadioBox::Show(bool bShow)
     if (!wxControl::Show(bShow))
         return false;
 
-    for (size_t i = 0; i < m_nNoItems; i++)
+    for (unsigned int i = 0; i < m_nNoItems; i++)
     {
         ::WinShowWindow((HWND)m_ahRadioButtons[i], (BOOL)bShow);
     }
@@ -811,10 +810,7 @@ bool wxRadioBox::Show(bool bShow)
 } // end of wxRadioBox::Show
 
 // Show a specific button
-bool wxRadioBox::Show(
-  int                               nItem
-, bool                              bShow
-)
+bool wxRadioBox::Show(unsigned int nItem, bool bShow)
 {
     wxCHECK_MSG( IsValid(nItem), false,
                  wxT("invalid item in wxRadioBox::Show()") );
index 3201417dfde35b7cf793359e02d57af7c411f01c..fe75aeae4d7e7b3e0f7f7c7698b22d5df83a234b 100644 (file)
@@ -148,14 +148,14 @@ private:
 };
 
 wxCheckListBoxItem::wxCheckListBoxItem(wxCheckListBox *pParent, size_t nIndex)
-                  : wxOwnerDrawn(wxEmptyString, TRUE)   // checkable
+                  : wxOwnerDrawn(wxEmptyString, true)   // checkable
 {
 }
 
 bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc,
                                     wxODAction act, wxODStatus stat)
 {
-    return FALSE;
+    return false;
 }
 
 // change the state of the item and redraw it
@@ -229,7 +229,7 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id,
 // misc overloaded methods
 // -----------------------
 
-void wxCheckListBox::Delete(int N)
+void wxCheckListBox::Delete(unsigned int n)
 {
 }
 
@@ -258,12 +258,12 @@ bool wxCheckListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item)
 // check items
 // -----------
 
-bool wxCheckListBox::IsChecked(size_t uiIndex) const
+bool wxCheckListBox::IsChecked(unsigned int uiIndex) const
 {
     return false;
 }
 
-void wxCheckListBox::Check(size_t uiIndex, bool bCheck)
+void wxCheckListBox::Check(unsigned int uiIndex, bool bCheck)
 {
 }
 
@@ -284,4 +284,3 @@ int wxCheckListBox::DoHitTestItem(wxCoord x, wxCoord y) const
 }
 
 #endif
-
index b5ff3ed5eeb63d3c4628a1c7cf47f66dcee0e152..e0b31045ce33a58484b73bb9878456ef8459def3 100644 (file)
@@ -154,12 +154,12 @@ int wxChoice::DoAppend(const wxString& item)
     return 0;
 }
 
-int wxChoice::DoInsert(const wxString& item, int pos)
+int wxChoice::DoInsert(const wxString& item, unsigned int pos)
 {
     return 0;
 }
 
-void wxChoice::Delete(int n)
+void wxChoice::Delete(unsigned int n)
 {
 }
 
@@ -188,40 +188,38 @@ void wxChoice::SetSelection(int n)
 // string list functions
 // ----------------------------------------------------------------------------
 
-size_t wxChoice::GetCount() const
+unsigned int wxChoice::GetCount() const
 {
     return 0;
 }
 
-void wxChoice::SetString(int n, const wxString& s)
+void wxChoice::SetString(unsigned int n, const wxString& s)
 {
 }
 
-wxString wxChoice::GetString(int n) const
+wxString wxChoice::GetString(unsigned int n) const
 {
-    wxString str;
-
-    return str;
+    return wxEmptyString;
 }
 
 // ----------------------------------------------------------------------------
 // client data
 // ----------------------------------------------------------------------------
 
-void wxChoice::DoSetItemClientData( int n, void* clientData )
+void wxChoice::DoSetItemClientData(unsigned int n, void* clientData)
 {
 }
 
-void* wxChoice::DoGetItemClientData( int n ) const
+void* wxChoice::DoGetItemClientData(unsigned int n) const
 {
     return (void *)NULL;
 }
 
-void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
+void wxChoice::DoSetItemClientObject(unsigned int n, wxClientData* clientData )
 {
 }
 
-wxClientData* wxChoice::DoGetItemClientObject( int n ) const
+wxClientData* wxChoice::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *)DoGetItemClientData(n);
 }
index 7302ebdaf0a15290b887d45edc584f30c4306950..24f38de7a9118c97eaeaba37b919659511339344 100644 (file)
@@ -177,7 +177,7 @@ void wxListBox::DoSetFirstItem(int N)
 {
 }
 
-void wxListBox::Delete(int N)
+void wxListBox::Delete(unsigned int n)
 {
 }
 
@@ -207,21 +207,21 @@ bool wxListBox::IsSelected(int N) const
     return false;
 }
 
-wxClientData* wxListBox::DoGetItemClientObject(int n) const
+wxClientData* wxListBox::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *)DoGetItemClientData(n);
 }
 
-void *wxListBox::DoGetItemClientData(int n) const
+void *wxListBox::DoGetItemClientData(unsigned int n) const
 {
     return (void *)NULL;
 }
 
-void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxListBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
 }
 
-void wxListBox::DoSetItemClientData(int n, void *clientData)
+void wxListBox::DoSetItemClientData(unsigned int n, void *clientData)
 {
 }
 
@@ -238,23 +238,21 @@ int wxListBox::GetSelection() const
 }
 
 // Find string for position
-wxString wxListBox::GetString(int N) const
+wxString wxListBox::GetString(unsigned int n) const
 {
-    wxString result;
-
-    return result;
+    return wxEmptyString;
 }
 
 void
-wxListBox::DoInsertItems(const wxArrayString& items, int pos)
+wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
 }
 
-void wxListBox::SetString(int N, const wxString& s)
+void wxListBox::SetString(unsigned int n, const wxString& s)
 {
 }
 
-size_t wxListBox::GetCount() const
+unsigned int wxListBox::GetCount() const
 {
     return 0;
 }
index 03b015e38c7d45f6e43d78cac92c55a6308932ab..ed5c2b33244cbd57db5676cf996f7e76c1f23b8a 100644 (file)
@@ -112,7 +112,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 +160,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 +238,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 +275,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 +293,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 +327,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 +343,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)
index 384d39359c10620a3f253a29dcda387b6b4e7035..a69725f51065a78a0877eab2f11de8f9999b63fb 100644 (file)
@@ -103,17 +103,17 @@ bool wxCheckListBox::Create(wxWindow *parent,
 // wxCheckListBox functions
 // ----------------------------------------------------------------------------
 
-bool wxCheckListBox::IsChecked(size_t item) const
+bool wxCheckListBox::IsChecked(unsigned int item) const
 {
-    wxCHECK_MSG( item < m_checks.GetCount(), false,
+    wxCHECK_MSG( IsValid(item), false,
                  _T("invalid index in wxCheckListBox::IsChecked") );
 
     return m_checks[item] != 0;
 }
 
-void wxCheckListBox::Check(size_t item, bool check)
+void wxCheckListBox::Check(unsigned int item, bool check)
 {
-    wxCHECK_RET( item < m_checks.GetCount(),
+    wxCHECK_RET( IsValid(item),
                  _T("invalid index in wxCheckListBox::Check") );
 
     // intermediate var is needed to avoid compiler warning with VC++
@@ -130,7 +130,7 @@ void wxCheckListBox::Check(size_t item, bool check)
 // methods forwarded to wxListBox
 // ----------------------------------------------------------------------------
 
-void wxCheckListBox::Delete(int n)
+void wxCheckListBox::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n), _T("invalid index in wxListBox::Delete") );
 
@@ -149,12 +149,12 @@ int wxCheckListBox::DoAppend(const wxString& item)
     return pos;
 }
 
-void wxCheckListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxCheckListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     wxListBox::DoInsertItems(items, pos);
 
-    size_t count = items.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    unsigned int count = items.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_checks.Insert(false, pos + n);
     }
@@ -165,8 +165,8 @@ void wxCheckListBox::DoSetItems(const wxArrayString& items, void **clientData)
     // call it first as it does DoClear()
     wxListBox::DoSetItems(items, clientData);
 
-    size_t count = items.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    unsigned int count = items.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_checks.Add(false);
     }
@@ -265,7 +265,7 @@ bool wxStdCheckListboxInputHandler::HandleMouse(wxInputConsumer *consumer,
         if ( x >= 0 &&
              x < renderer->GetCheckBitmapSize().x &&
              item >= 0 &&
-             (size_t)item < lbox->GetCount() )
+             (unsigned int)item < lbox->GetCount() )
         {
             lbox->PerformAction(wxACTION_CHECKLISTBOX_TOGGLE, item);
 
index 43e9e551728169cfa6eb8eae9f8e57018d755e13..fd5a4d5886d25ca92e1d883e4fd00656bc6dea37 100644 (file)
@@ -796,29 +796,29 @@ void wxComboBox::Clear()
     GetText()->SetValue(wxEmptyString);
 }
 
-void wxComboBox::Delete(int n)
+void wxComboBox::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n), _T("invalid index in wxComboBox::Delete") );
 
-    if (GetSelection() == n)
+    if (GetSelection() == (int)n)
         GetText()->SetValue(wxEmptyString);
 
     GetLBox()->Delete(n);
 }
 
-size_t wxComboBox::GetCount() const
+unsigned int wxComboBox::GetCount() const
 {
     return GetLBox()->GetCount();
 }
 
-wxString wxComboBox::GetString(int n) const
+wxString wxComboBox::GetString(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), wxEmptyString, _T("invalid index in wxComboBox::GetString") );
 
     return GetLBox()->GetString(n);
 }
 
-void wxComboBox::SetString(int n, const wxString& s)
+void wxComboBox::SetString(unsigned int n, const wxString& s)
 {
     wxCHECK_RET( IsValid(n), _T("invalid index in wxComboBox::SetString") );
 
@@ -856,34 +856,34 @@ int wxComboBox::DoAppend(const wxString& item)
     return GetLBox()->Append(item);
 }
 
-int wxComboBox::DoInsert(const wxString& item, int pos)
+int wxComboBox::DoInsert(const wxString& item, unsigned int pos)
 {
     wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list"));
     wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index"));
 
-    if ((size_t)pos == GetCount())
+    if (pos == GetCount())
         return DoAppend(item);
 
     GetLBox()->Insert(item, pos);
     return pos;
 }
 
-void wxComboBox::DoSetItemClientData(int n, void* clientData)
+void wxComboBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
     GetLBox()->SetClientData(n, clientData);
 }
 
-void *wxComboBox::DoGetItemClientData(int n) const
+void *wxComboBox::DoGetItemClientData(unsigned int n) const
 {
     return GetLBox()->GetClientData(n);
 }
 
-void wxComboBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxComboBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     GetLBox()->SetClientObject(n, clientData);
 }
 
-wxClientData* wxComboBox::DoGetItemClientObject(int n) const
+wxClientData* wxComboBox::DoGetItemClientObject(unsigned int n) const
 {
     return GetLBox()->GetClientObject(n);
 }
index 663611a6c76d521a8f01232bfe1acc616266224f..c54214e879ed168c71f931bc29384e402742a3b8 100644 (file)
@@ -168,7 +168,7 @@ int wxCMPFUNC_CONV wxListBoxSortNoCase(wxString* s1, wxString* s2)
 
 int wxListBox::DoAppendOnly(const wxString& item)
 {
-    size_t index;
+    unsigned int index;
 
     if ( IsSorted() )
     {
@@ -211,14 +211,14 @@ int wxListBox::DoAppend(const wxString& item)
     return index;
 }
 
-void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
+void wxListBox::DoInsertItems(const wxArrayString& items, unsigned int pos)
 {
     // the position of the item being added to a sorted listbox can't be
     // specified
     wxCHECK_RET( !IsSorted(), _T("can't insert items into sorted listbox") );
 
-    size_t count = items.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    unsigned int count = items.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_strings->Insert(items[n], pos + n);
         m_itemsClientData.Insert(NULL, pos + n);
@@ -241,16 +241,16 @@ void wxListBox::DoSetItems(const wxArrayString& items, void **clientData)
 {
     DoClear();
 
-    size_t count = items.GetCount();
+    unsigned int count = items.GetCount();
     if ( !count )
         return;
 
     m_strings->Alloc(count);
 
     m_itemsClientData.Alloc(count);
-    for ( size_t n = 0; n < count; n++ )
+    for ( unsigned int n = 0; n < count; n++ )
     {
-        size_t index = DoAppendOnly(items[n]);
+        unsigned int index = DoAppendOnly(items[n]);
 
         m_itemsClientData.Insert(clientData ? clientData[n] : NULL, index);
     }
@@ -260,7 +260,7 @@ void wxListBox::DoSetItems(const wxArrayString& items, void **clientData)
     RefreshAll();
 }
 
-void wxListBox::SetString(int n, const wxString& s)
+void wxListBox::SetString(unsigned int n, const wxString& s)
 {
     wxCHECK_RET( !IsSorted(), _T("can't set string in sorted listbox") );
 
@@ -301,8 +301,8 @@ void wxListBox::DoClear()
 
     if ( HasClientObjectData() )
     {
-        size_t count = m_itemsClientData.GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = m_itemsClientData.GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             delete (wxClientData *) m_itemsClientData[n];
         }
@@ -325,7 +325,7 @@ void wxListBox::Clear()
     RefreshAll();
 }
 
-void wxListBox::Delete(int n)
+void wxListBox::Delete(unsigned int n)
 {
     wxCHECK_RET( IsValid(n),
                  _T("invalid index in wxListBox::Delete") );
@@ -344,7 +344,7 @@ void wxListBox::Delete(int n)
     m_itemsClientData.RemoveAt(n);
 
     // when the item disappears we must not keep using its index
-    if ( n == m_current )
+    if ( (int)n == m_current )
     {
         m_current = -1;
     }
@@ -357,8 +357,8 @@ void wxListBox::Delete(int n)
     // update the selections array: the indices of all seletected items after
     // the one being deleted must change and the item itselfm ust be removed
     int index = wxNOT_FOUND;
-    size_t count = m_selections.GetCount();
-    for ( size_t item = 0; item < count; item++ )
+    unsigned int count = m_selections.GetCount();
+    for ( unsigned int item = 0; item < count; item++ )
     {
         if ( m_selections[item] == n )
         {
@@ -392,22 +392,22 @@ void wxListBox::Delete(int n)
 // client data handling
 // ----------------------------------------------------------------------------
 
-void wxListBox::DoSetItemClientData(int n, void* clientData)
+void wxListBox::DoSetItemClientData(unsigned int n, void* clientData)
 {
     m_itemsClientData[n] = clientData;
 }
 
-void *wxListBox::DoGetItemClientData(int n) const
+void *wxListBox::DoGetItemClientData(unsigned int n) const
 {
     return m_itemsClientData[n];
 }
 
-void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
+void wxListBox::DoSetItemClientObject(unsigned int n, wxClientData* clientData)
 {
     m_itemsClientData[n] = clientData;
 }
 
-wxClientData* wxListBox::DoGetItemClientObject(int n) const
+wxClientData* wxListBox::DoGetItemClientObject(unsigned int n) const
 {
     return (wxClientData *)m_itemsClientData[n];
 }
@@ -476,7 +476,7 @@ int wxListBox::GetSelections(wxArrayInt& selections) const
 {
     // always return sorted array to the user
     selections = m_selections;
-    size_t count = m_selections.GetCount();
+    unsigned int count = m_selections.GetCount();
 
     // don't call sort on an empty array
     if ( count )
@@ -574,7 +574,7 @@ void wxListBox::UpdateScrollbars()
     wxSize size = GetClientSize();
 
     // is our height enough to show all items?
-    size_t nLines = GetCount();
+    unsigned int nLines = GetCount();
     wxCoord lineHeight = GetLineHeight();
     bool showScrollbarY = (int)nLines*lineHeight > size.y;
 
@@ -705,9 +705,9 @@ void wxListBox::DoDraw(wxControlRenderer *renderer)
 
     // get the items which must be redrawn
     wxCoord lineHeight = GetLineHeight();
-    size_t itemFirst = yTop / lineHeight,
-           itemLast = (yBottom + lineHeight - 1) / lineHeight,
-           itemMax = m_strings->GetCount();
+    unsigned int itemFirst = yTop / lineHeight,
+                 itemLast = (yBottom + lineHeight - 1) / lineHeight,
+                 itemMax = m_strings->GetCount();
 
     if ( itemFirst >= itemMax )
         return;
@@ -776,8 +776,8 @@ wxCoord wxListBox::GetMaxWidth() const
     {
         wxListBox *self = wxConstCast(this, wxListBox);
         wxCoord width;
-        size_t count = m_strings->GetCount();
-        for ( size_t n = 0; n < count; n++ )
+        unsigned int count = m_strings->GetCount();
+        for ( unsigned int n = 0; n < count; n++ )
         {
             GetTextExtent(this->GetString(n), &width, NULL);
             if ( width > m_maxWidth )
@@ -833,8 +833,8 @@ wxSize wxListBox::DoGetBestClientSize() const
     wxCoord width = 0,
             height = 0;
 
-    size_t count = m_strings->GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    unsigned int count = m_strings->GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         wxCoord w,h;
         GetTextExtent(this->GetString(n), &w, &h);
@@ -913,7 +913,7 @@ void wxListBox::SetCurrentItem(int n)
 
 bool wxListBox::FindItem(const wxString& prefix, bool strictlyAfter)
 {
-    size_t count = GetCount();
+    unsigned int count = GetCount();
     if ( count==0 )
     {
         // empty listbox, we can't find anything in it
@@ -1055,7 +1055,7 @@ void wxListBox::ExtendSelection(int itemTo)
         SetSelection(n);
     }
 
-    size_t count = GetCount();
+    unsigned int count = GetCount();
     for ( ; n < (int)count; n++ )
     {
         Deselect(n);
@@ -1230,7 +1230,7 @@ int wxStdListboxInputHandler::FixItemIndex(const wxListBox *lbox,
         // mouse is above the first item
         item = 0;
     }
-    else if ( (size_t)item >= lbox->GetCount() )
+    else if ( (unsigned int)item >= lbox->GetCount() )
     {
         // mouse is below the last item
         item = lbox->GetCount() - 1;
@@ -1241,7 +1241,7 @@ int wxStdListboxInputHandler::FixItemIndex(const wxListBox *lbox,
 
 bool wxStdListboxInputHandler::IsValidIndex(const wxListBox *lbox, int item)
 {
-    return item >= 0 && (size_t)item < lbox->GetCount();
+    return item >= 0 && (unsigned int)item < lbox->GetCount();
 }
 
 wxControlAction
index a01ada44bdb7f31ffc91e0a7b9fc44eb6cf1d8a2..b51b63aecbfb78bfaa2eb10fac70288885f91bd8 100644 (file)
@@ -197,8 +197,8 @@ wxRadioBox::~wxRadioBox()
     // the buttons themselves: this must be done as the user code expects them
     // to disappear now and not some time later when they will be deleted by
     // our (common) parent
-    size_t count = m_buttons.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    unsigned int count = m_buttons.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_buttons[n]->PopEventHandler(true /* delete it */);
 
@@ -282,7 +282,7 @@ void wxRadioBox::OnRadioButton(wxEvent& event)
 // methods forwarded to the buttons
 // ----------------------------------------------------------------------------
 
-wxString wxRadioBox::GetString(int n) const
+wxString wxRadioBox::GetString(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), wxEmptyString,
                  _T("invalid index in wxRadioBox::GetString") );
@@ -290,35 +290,35 @@ wxString wxRadioBox::GetString(int n) const
     return m_buttons[n]->GetLabel();
 }
 
-void wxRadioBox::SetString(int n, const wxString& label)
+void wxRadioBox::SetString(unsigned int n, const wxString& label)
 {
     wxCHECK_RET( IsValid(n), _T("invalid index in wxRadioBox::SetString") );
 
     m_buttons[n]->SetLabel(label);
 }
 
-bool wxRadioBox::Enable(int n, bool enable)
+bool wxRadioBox::Enable(unsigned int n, bool enable)
 {
     wxCHECK_MSG( IsValid(n), false, _T("invalid index in wxRadioBox::Enable") );
 
     return m_buttons[n]->Enable(enable);
 }
 
-bool wxRadioBox::IsItemEnabled(int n) const
+bool wxRadioBox::IsItemEnabled(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), false, _T("invalid index in wxRadioBox::IsItemEnabled") );
 
     return m_buttons[n]->IsEnabled();
 }
 
-bool wxRadioBox::Show(int n, bool show)
+bool wxRadioBox::Show(unsigned int n, bool show)
 {
     wxCHECK_MSG( IsValid(n), false, _T("invalid index in wxRadioBox::Show") );
 
     return m_buttons[n]->Show(show);
 }
 
-bool wxRadioBox::IsItemShown(int n) const
+bool wxRadioBox::IsItemShown(unsigned int n) const
 {
     wxCHECK_MSG( IsValid(n), false, _T("invalid index in wxRadioBox::IsItemShown") );
 
@@ -335,8 +335,8 @@ bool wxRadioBox::Enable(bool enable)
         return false;
 
     // also enable/disable the buttons
-    const size_t count = m_buttons.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    const unsigned int count = m_buttons.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         Enable(n, enable);
     }
@@ -350,8 +350,8 @@ bool wxRadioBox::Show(bool show)
         return false;
 
     // also show/hide the buttons
-    const size_t count = m_buttons.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    const unsigned int count = m_buttons.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         Show(n, show);
     }
@@ -375,8 +375,8 @@ void wxRadioBox::DoSetToolTip(wxToolTip *tooltip)
     wxControl::DoSetToolTip(tooltip);
 
     // Also set them for all Radio Buttons
-    const size_t count = m_buttons.GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    const unsigned int count = m_buttons.GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         if (tooltip)
             m_buttons[n]->SetToolTip(tooltip->GetTip());
@@ -395,8 +395,8 @@ wxSize wxRadioBox::GetMaxButtonSize() const
     int widthMax, heightMax, width = 0, height = 0;
     widthMax = heightMax = 0;
 
-    const int count = GetCount();
-    for ( int n = 0; n < count; n++ )
+    const unsigned int count = GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_buttons[n]->GetBestSize(&width, &height);
 
@@ -442,8 +442,8 @@ void wxRadioBox::DoMoveWindow(int x0, int y0, int width, int height)
     int x = x0,
         y = y0;
 
-    const size_t count = GetCount();
-    for ( size_t n = 0; n < count; n++ )
+    const unsigned int count = GetCount();
+    for ( unsigned int n = 0; n < count; n++ )
     {
         m_buttons[n]->SetSize(x, y, sizeBtn.x, sizeBtn.y);