]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/checklst.h
Added SetSheetStyle to property sheet dialog to allow specification
[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
84882850 22class WXDLLEXPORT 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 //
52 virtual void Delete(int n);
1de4baa3
DW
53
54 virtual bool SetFont(const wxFont &rFont);
55
f5ea767e 56 //
1de4baa3
DW
57 // Items may be checked
58 //
59 bool IsChecked(size_t uiIndex) const;
60 void Check( size_t uiIndex
84882850 61 ,bool bCheck = true
1de4baa3
DW
62 );
63
f5ea767e 64 //
1de4baa3
DW
65 // Accessors
66 //
67 size_t GetItemHeight(void) const { return m_nItemHeight; }
37f214d5
DW
68
69protected:
f5ea767e 70 //
1de4baa3
DW
71 // We create our items ourselves and they have non-standard size,
72 // so we need to override these functions
73 //
74 virtual wxOwnerDrawn* CreateItem(size_t n);
f5ea767e 75 virtual long OS2OnMeasure(WXMEASUREITEMSTRUCT* pItem);
1de4baa3 76
84882850
WS
77 virtual void DoInsertItems(const wxArrayString& items, int pos);
78
f5ea767e 79 //
1de4baa3
DW
80 // Pressing space or clicking the check box toggles the item
81 //
82 void OnChar(wxKeyEvent& rEvent);
83 void OnLeftClick(wxMouseEvent& rEvent);
37f214d5
DW
84
85private:
1de4baa3
DW
86 size_t m_nItemHeight; // height of checklistbox items (the same for all)
87
1de4baa3
DW
88 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
89 DECLARE_EVENT_TABLE()
84882850 90}; // end of CLASS wxCheckListBox
0e320a79
DW
91
92#endif
a419c3b1 93 // _WX_CHECKLST_H_