]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/stubs/checklst.h
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxCheckListBox class - a listbox with checkable items
4 // Note: this is an optional class.
9 // Copyright: (c) AUTHOR
10 // Licence: wxWindows licence
11 ///////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_CHECKLST_H_
14 #define _WX_CHECKLST_H_
17 #pragma interface "checklst.h"
20 typedef unsigned int uint
;
22 class wxCheckListBoxItem
; // fwd decl, define in checklst.cpp
24 class wxCheckListBox
: public wxListBox
26 DECLARE_DYNAMIC_CLASS(wxCheckListBox
)
30 wxCheckListBox(wxWindow
*parent
, wxWindowID id
,
31 const wxPoint
& pos
= wxDefaultPosition
,
32 const wxSize
& size
= wxDefaultSize
,
34 const wxString choices
[] = NULL
,
36 const wxValidator
& validator
= wxDefaultValidator
,
37 const wxString
& name
= wxListBoxNameStr
);
39 // items may be checked
40 bool IsChecked(uint uiIndex
) const;
41 void Check(uint uiIndex
, bool bCheck
= TRUE
);
44 uint
GetItemHeight() const { return m_nItemHeight
; }
47 // we create our items ourselves and they have non-standard size,
48 // so we need to override these functions
49 virtual wxOwnerDrawn
*CreateItem(uint n
);
51 // pressing space or clicking the check box toggles the item
52 void OnChar(wxKeyEvent
& event
);
53 void OnLeftClick(wxMouseEvent
& event
);
56 uint m_nItemHeight
; // height of checklistbox items (the same for all)