]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/motif/checklst.h
Make wxWindow::HasScrollbar() respect wxScrolled::ShowScrollbars().
[wxWidgets.git] / include / wx / motif / checklst.h
... / ...
CommitLineData
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/motif/checklst.h
3// Purpose: wxCheckListBox class - a listbox with checkable items
4// Note: this is an optional class.
5// Author: Julian Smart
6// Modified by:
7// Created: 17/09/98
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CHECKLST_H_
13#define _WX_CHECKLST_H_
14
15#include "wx/listbox.h"
16
17class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
18{
19 DECLARE_DYNAMIC_CLASS(wxCheckListBox)
20
21public:
22 // ctors
23 wxCheckListBox();
24 wxCheckListBox(wxWindow *parent, wxWindowID id,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize,
27 int nStrings = 0,
28 const wxString choices[] = NULL,
29 long style = 0,
30 const wxValidator& validator = wxDefaultValidator,
31 const wxString& name = wxListBoxNameStr);
32
33 wxCheckListBox(wxWindow *parent, wxWindowID id,
34 const wxPoint& pos,
35 const wxSize& size,
36 const wxArrayString& choices,
37 long style = 0,
38 const wxValidator& validator = wxDefaultValidator,
39 const wxString& name = wxListBoxNameStr);
40
41 bool Create(wxWindow *parent, wxWindowID id,
42 const wxPoint& pos = wxDefaultPosition,
43 const wxSize& size = wxDefaultSize,
44 int n = 0, const wxString choices[] = NULL,
45 long style = 0,
46 const wxValidator& validator = wxDefaultValidator,
47 const wxString& name = wxListBoxNameStr);
48
49 bool Create(wxWindow *parent, wxWindowID id,
50 const wxPoint& pos,
51 const wxSize& size,
52 const wxArrayString& choices,
53 long style = 0,
54 const wxValidator& validator = wxDefaultValidator,
55 const wxString& name = wxListBoxNameStr);
56
57 // items may be checked
58 bool IsChecked(unsigned int uiIndex) const;
59 void Check(unsigned int uiIndex, bool bCheck = true);
60
61 // override base class functions
62 virtual int DoInsertItems(const wxArrayStringsAdapter& items,
63 unsigned int pos,
64 void **clientData, wxClientDataType type);
65 virtual int FindString(const wxString& s, bool bCase = false) const;
66 virtual void SetString(unsigned int n, const wxString& s);
67 virtual wxString GetString(unsigned int n) const;
68
69private:
70 void DoToggleItem( int item, int x );
71private:
72 DECLARE_EVENT_TABLE()
73};
74
75#endif
76// _WX_CHECKLST_H_