uint -> size_t change
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
#pragma interface "checklst.h"
|
#pragma interface "checklst.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef unsigned int uint;
|
typedef unsigned int size_t;
|
||||||
|
|
||||||
#if !USE_OWNER_DRAWN
|
#if !USE_OWNER_DRAWN
|
||||||
#error "wxCheckListBox class requires owner-drawn functionality."
|
#error "wxCheckListBox class requires owner-drawn functionality."
|
||||||
@@ -41,16 +41,16 @@ public:
|
|||||||
// const wxFont& font = wxNullFont);
|
// const wxFont& font = wxNullFont);
|
||||||
|
|
||||||
// items may be checked
|
// items may be checked
|
||||||
bool IsChecked(uint uiIndex) const;
|
bool IsChecked(size_t uiIndex) const;
|
||||||
void Check(uint uiIndex, bool bCheck = TRUE);
|
void Check(size_t uiIndex, bool bCheck = TRUE);
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
uint GetItemHeight() const { return m_nItemHeight; }
|
size_t GetItemHeight() const { return m_nItemHeight; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// we create our items ourselves and they have non-standard size,
|
// we create our items ourselves and they have non-standard size,
|
||||||
// so we need to override these functions
|
// so we need to override these functions
|
||||||
virtual wxOwnerDrawn *CreateItem(uint n);
|
virtual wxOwnerDrawn *CreateItem(size_t n);
|
||||||
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
|
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
|
||||||
|
|
||||||
// pressing space or clicking the check box toggles the item
|
// pressing space or clicking the check box toggles the item
|
||||||
@@ -58,7 +58,7 @@ protected:
|
|||||||
void OnLeftClick(wxMouseEvent& event);
|
void OnLeftClick(wxMouseEvent& event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint 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_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
@@ -58,7 +58,7 @@ class WXDLLEXPORT wxPaintDC: public wxDC
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
static WXHDC ms_PaintHDC;
|
static WXHDC ms_PaintHDC;
|
||||||
static uint ms_PaintCount;
|
static size_t ms_PaintCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -55,8 +55,8 @@ public:
|
|||||||
virtual bool GetFirstEntry(wxString& str, long& lIndex) const;
|
virtual bool GetFirstEntry(wxString& str, long& lIndex) const;
|
||||||
virtual bool GetNextEntry (wxString& str, long& lIndex) const;
|
virtual bool GetNextEntry (wxString& str, long& lIndex) const;
|
||||||
|
|
||||||
virtual uint GetNumberOfEntries(bool bRecursive = FALSE) const;
|
virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const;
|
||||||
virtual uint GetNumberOfGroups(bool bRecursive = FALSE) const;
|
virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const;
|
||||||
|
|
||||||
virtual bool HasGroup(const wxString& strName) const;
|
virtual bool HasGroup(const wxString& strName) const;
|
||||||
virtual bool HasEntry(const wxString& strName) const;
|
virtual bool HasEntry(const wxString& strName) const;
|
||||||
|
@@ -68,10 +68,10 @@ class WXDLLEXPORT wxListBox: public wxControl
|
|||||||
bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
|
||||||
|
|
||||||
// plug-in for derived classes
|
// plug-in for derived classes
|
||||||
virtual wxOwnerDrawn *CreateItem(uint n);
|
virtual wxOwnerDrawn *CreateItem(size_t n);
|
||||||
|
|
||||||
// allows to get the item and use SetXXX functions to set it's appearance
|
// allows to get the item and use SetXXX functions to set it's appearance
|
||||||
wxOwnerDrawn *GetItem(uint n) const { return m_aItems[n]; }
|
wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
virtual void Append(const wxString& item);
|
virtual void Append(const wxString& item);
|
||||||
|
@@ -65,7 +65,7 @@ public:
|
|||||||
// StdFormat enumerations or a user-defined format)
|
// StdFormat enumerations or a user-defined format)
|
||||||
virtual bool IsSupportedFormat(wxDataFormat format) const = 0;
|
virtual bool IsSupportedFormat(wxDataFormat format) const = 0;
|
||||||
// get the (total) size of data
|
// get the (total) size of data
|
||||||
virtual uint GetDataSize() const = 0;
|
virtual size_t GetDataSize() const = 0;
|
||||||
// copy raw data to provided pointer
|
// copy raw data to provided pointer
|
||||||
virtual void GetDataHere(void *pBuf) const = 0;
|
virtual void GetDataHere(void *pBuf) const = 0;
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ public:
|
|||||||
{ return (wxDataFormat) wxDataObject::Text; }
|
{ return (wxDataFormat) wxDataObject::Text; }
|
||||||
virtual bool IsSupportedFormat(wxDataFormat format) const
|
virtual bool IsSupportedFormat(wxDataFormat format) const
|
||||||
{ return format == wxDataObject::Text || format == wxDataObject::Locale; }
|
{ return format == wxDataObject::Text || format == wxDataObject::Locale; }
|
||||||
virtual uint GetDataSize() const
|
virtual size_t GetDataSize() const
|
||||||
{ return m_strText.Len() + 1; } // +1 for trailing '\0'of course
|
{ return m_strText.Len() + 1; } // +1 for trailing '\0'of course
|
||||||
virtual void GetDataHere(void *pBuf) const
|
virtual void GetDataHere(void *pBuf) const
|
||||||
{ memcpy(pBuf, m_strText.c_str(), GetDataSize()); }
|
{ memcpy(pBuf, m_strText.c_str(), GetDataSize()); }
|
||||||
|
@@ -53,8 +53,8 @@ public:
|
|||||||
|
|
||||||
// get number of entries/subgroups in the current group, with or without
|
// get number of entries/subgroups in the current group, with or without
|
||||||
// it's subgroups
|
// it's subgroups
|
||||||
virtual uint GetNumberOfEntries(bool bRecursive = FALSE) const;
|
virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const;
|
||||||
virtual uint GetNumberOfGroups(bool bRecursive = FALSE) const;
|
virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const;
|
||||||
|
|
||||||
// read/write
|
// read/write
|
||||||
virtual bool Read(wxString *pStr, const char *szKey,
|
virtual bool Read(wxString *pStr, const char *szKey,
|
||||||
|
@@ -83,9 +83,9 @@ public:
|
|||||||
// number of standard keys
|
// number of standard keys
|
||||||
static const size_t nStdKeys;
|
static const size_t nStdKeys;
|
||||||
// get the name of a standard key
|
// get the name of a standard key
|
||||||
static const char *GetStdKeyName(uint key);
|
static const char *GetStdKeyName(size_t key);
|
||||||
// get the short name of a standard key
|
// get the short name of a standard key
|
||||||
static const char *GetStdKeyShortName(uint key);
|
static const char *GetStdKeyShortName(size_t key);
|
||||||
// get StdKey from root HKEY
|
// get StdKey from root HKEY
|
||||||
static StdKey GetStdKeyFromHkey(HKEY hkey);
|
static StdKey GetStdKeyFromHkey(HKEY hkey);
|
||||||
|
|
||||||
@@ -123,10 +123,10 @@ public:
|
|||||||
// get the info about key (any number of these pointers may be NULL)
|
// get the info about key (any number of these pointers may be NULL)
|
||||||
|
|
||||||
#ifdef __GNUWIN32__
|
#ifdef __GNUWIN32__
|
||||||
bool GetKeyInfo(uint *pnSubKeys, // number of subkeys
|
bool GetKeyInfo(size_t *pnSubKeys, // number of subkeys
|
||||||
uint *pnMaxKeyLen, // max len of subkey name
|
size_t *pnMaxKeyLen, // max len of subkey name
|
||||||
uint *pnValues, // number of values
|
size_t *pnValues, // number of values
|
||||||
uint *pnMaxValueLen) const;
|
size_t *pnMaxValueLen) const;
|
||||||
#else
|
#else
|
||||||
bool GetKeyInfo(ulong *pnSubKeys, // number of subkeys
|
bool GetKeyInfo(ulong *pnSubKeys, // number of subkeys
|
||||||
ulong *pnMaxKeyLen, // max len of subkey name
|
ulong *pnMaxKeyLen, // max len of subkey name
|
||||||
|
Reference in New Issue
Block a user