#pragma interface "checklst.h"
#endif
-typedef unsigned int uint;
+typedef unsigned int size_t;
#if !USE_OWNER_DRAWN
#error "wxCheckListBox class requires owner-drawn functionality."
// const wxFont& font = wxNullFont);
// items may be checked
- bool IsChecked(uint uiIndex) const;
- void Check(uint uiIndex, bool bCheck = TRUE);
+ bool IsChecked(size_t uiIndex) const;
+ void Check(size_t uiIndex, bool bCheck = TRUE);
// accessors
- uint GetItemHeight() const { return m_nItemHeight; }
+ size_t GetItemHeight() const { return m_nItemHeight; }
protected:
// we create our items ourselves and they have non-standard size,
// so we need to override these functions
- virtual wxOwnerDrawn *CreateItem(uint n);
+ virtual wxOwnerDrawn *CreateItem(size_t n);
virtual bool MSWOnMeasure(WXMEASUREITEMSTRUCT *item);
// pressing space or clicking the check box toggles the item
void OnLeftClick(wxMouseEvent& event);
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()
};
protected:
static WXHDC ms_PaintHDC;
- static uint ms_PaintCount;
+ static size_t ms_PaintCount;
};
#endif
virtual bool GetFirstEntry(wxString& str, long& lIndex) const;
virtual bool GetNextEntry (wxString& str, long& lIndex) const;
- virtual uint GetNumberOfEntries(bool bRecursive = FALSE) const;
- virtual uint GetNumberOfGroups(bool bRecursive = FALSE) const;
+ virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const;
+ virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const;
virtual bool HasGroup(const wxString& strName) const;
virtual bool HasEntry(const wxString& strName) const;
bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
// 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
- wxOwnerDrawn *GetItem(uint n) const { return m_aItems[n]; }
+ wxOwnerDrawn *GetItem(size_t n) const { return m_aItems[n]; }
#endif
virtual void Append(const wxString& item);
// StdFormat enumerations or a user-defined format)
virtual bool IsSupportedFormat(wxDataFormat format) const = 0;
// get the (total) size of data
- virtual uint GetDataSize() const = 0;
+ virtual size_t GetDataSize() const = 0;
// copy raw data to provided pointer
virtual void GetDataHere(void *pBuf) const = 0;
{ return (wxDataFormat) wxDataObject::Text; }
virtual bool IsSupportedFormat(wxDataFormat format) const
{ 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
virtual void GetDataHere(void *pBuf) const
{ memcpy(pBuf, m_strText.c_str(), GetDataSize()); }
// get number of entries/subgroups in the current group, with or without
// it's subgroups
- virtual uint GetNumberOfEntries(bool bRecursive = FALSE) const;
- virtual uint GetNumberOfGroups(bool bRecursive = FALSE) const;
+ virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const;
+ virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const;
// read/write
virtual bool Read(wxString *pStr, const char *szKey,
// number of standard keys
static const size_t nStdKeys;
// 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
- static const char *GetStdKeyShortName(uint key);
+ static const char *GetStdKeyShortName(size_t key);
// get StdKey from root HKEY
static StdKey GetStdKeyFromHkey(HKEY hkey);
// get the info about key (any number of these pointers may be NULL)
#ifdef __GNUWIN32__
- bool GetKeyInfo(uint *pnSubKeys, // number of subkeys
- uint *pnMaxKeyLen, // max len of subkey name
- uint *pnValues, // number of values
- uint *pnMaxValueLen) const;
+ bool GetKeyInfo(size_t *pnSubKeys, // number of subkeys
+ size_t *pnMaxKeyLen, // max len of subkey name
+ size_t *pnValues, // number of values
+ size_t *pnMaxValueLen) const;
#else
bool GetKeyInfo(ulong *pnSubKeys, // number of subkeys
ulong *pnMaxKeyLen, // max len of subkey name