]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/checklst.h
Richtext interface fixes and additions for Phoenix
[wxWidgets.git] / include / wx / os2 / checklst.h
CommitLineData
0e320a79 1///////////////////////////////////////////////////////////////////////////////
84882850 2// Name: wx/os2/checklst.h
0e320a79
DW
3// Purpose: wxCheckListBox class - a listbox with checkable items
4// Note: this is an optional class.
37f214d5 5// Author: David Webster
a419c3b1 6// Modified by:
37f214d5 7// Created: 10/13/99
0e320a79 8// RCS-ID: $Id$
37f214d5 9// Copyright: (c) David Webster
65571936 10// Licence: wxWindows licence
0e320a79
DW
11///////////////////////////////////////////////////////////////////////////////
12
13#ifndef _WX_CHECKLST_H_
14#define _WX_CHECKLST_H_
15
37f214d5 16#include <stddef.h>
0e320a79 17
84882850 18#include "wx/defs.h"
0e320a79 19
1de4baa3 20class wxOwnerDrawn; // so the compiler knows, it is a class.
023d13a6 21
53a2db12 22class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
0e320a79 23{
0e320a79 24public:
f5ea767e 25 //
1de4baa3
DW
26 // Ctors
27 //
28 wxCheckListBox();
29 wxCheckListBox( wxWindow* pParent
30 ,wxWindowID vId
31 ,const wxPoint& rPos = wxDefaultPosition
32 ,const wxSize& vSize = wxDefaultSize
33 ,int nStrings = 0
34 ,const wxString asChoices[] = NULL
35 ,long lStyle = 0
1de4baa3 36 ,const wxValidator& rValidator = wxDefaultValidator
1de4baa3
DW
37 ,const wxString& rsName = wxListBoxNameStr
38 );
584ad2a3
MB
39 wxCheckListBox( wxWindow* pParent
40 ,wxWindowID vId
41 ,const wxPoint& rPos
42 ,const wxSize& vSize
43 ,const wxArrayString& asChoices
44 ,long lStyle = 0
45 ,const wxValidator& rValidator = wxDefaultValidator
46 ,const wxString& rsName = wxListBoxNameStr
47 );
1de4baa3 48
f5ea767e 49 //
1de4baa3
DW
50 // Override base class virtuals
51 //
aa61d352 52 virtual void Delete(unsigned int n);
1de4baa3
DW
53
54 virtual bool SetFont(const wxFont &rFont);
55
f5ea767e 56 //
1de4baa3
DW
57 // Items may be checked
58 //
aa61d352
VZ
59 bool IsChecked(unsigned int uiIndex) const;
60 void Check(unsigned int uiIndex, bool bCheck = true);
1de4baa3 61
f5ea767e 62 //
1de4baa3
DW
63 // Accessors
64 //
65 size_t GetItemHeight(void) const { return m_nItemHeight; }
37f214d5
DW
66
67protected:
f5ea767e 68 //
1de4baa3
DW
69 // We create our items ourselves and they have non-standard size,
70 // so we need to override these functions
71 //
72 virtual wxOwnerDrawn* CreateItem(size_t n);
f5ea767e 73 virtual long OS2OnMeasure(WXMEASUREITEMSTRUCT* pItem);
1de4baa3 74
f5ea767e 75 //
1de4baa3
DW
76 // Pressing space or clicking the check box toggles the item
77 //
78 void OnChar(wxKeyEvent& rEvent);
79 void OnLeftClick(wxMouseEvent& rEvent);
37f214d5
DW
80
81private:
aa61d352 82 size_t m_nItemHeight; // height of checklistbox items (the same for all)
1de4baa3 83
1de4baa3
DW
84 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
85 DECLARE_EVENT_TABLE()
84882850 86}; // end of CLASS wxCheckListBox
0e320a79
DW
87
88#endif
a419c3b1 89 // _WX_CHECKLST_H_