2004-03-23 17:35:05 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2006-03-23 22:05:23 +00:00
|
|
|
// Name: wx/mac/carbon/checklst.h
|
2004-03-23 17:35:05 +00:00
|
|
|
// Purpose: wxCheckListBox class - a listbox with checkable items
|
|
|
|
// Note: this is an optional class.
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 1998-01-01
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Stefan Csomor
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2004-03-23 17:35:05 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-05-18 00:52:48 +00:00
|
|
|
#ifndef _WX_MAC_CHECKLST_H_
|
|
|
|
#define _WX_MAC_CHECKLST_H_
|
2004-03-23 17:35:05 +00:00
|
|
|
|
2006-05-18 00:52:48 +00:00
|
|
|
class wxMacCheckListControl
|
2006-04-19 07:25:08 +00:00
|
|
|
{
|
|
|
|
public :
|
|
|
|
virtual bool MacIsChecked(unsigned int n) const = 0;
|
|
|
|
virtual void MacCheck(unsigned int n, bool bCheck = true) = 0;
|
2006-05-18 00:52:48 +00:00
|
|
|
|
|
|
|
virtual ~wxMacCheckListControl() { }
|
2006-04-19 07:25:08 +00:00
|
|
|
};
|
|
|
|
|
2004-03-23 17:35:05 +00:00
|
|
|
class WXDLLEXPORT wxCheckListBox : public wxCheckListBoxBase
|
|
|
|
{
|
|
|
|
public:
|
2006-05-18 00:52:48 +00:00
|
|
|
// ctors
|
2004-03-23 17:35:05 +00:00
|
|
|
wxCheckListBox() { Init(); }
|
|
|
|
wxCheckListBox(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int nStrings = 0,
|
|
|
|
const wxString *choices = NULL,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxListBoxNameStr)
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
|
|
|
|
Create(parent, id, pos, size, nStrings, choices, style, validator, name);
|
|
|
|
}
|
|
|
|
wxCheckListBox(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size,
|
|
|
|
const wxArrayString& choices,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxListBoxNameStr)
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
|
|
|
|
Create(parent, id, pos, size, choices, style, validator, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int nStrings = 0,
|
|
|
|
const wxString *choices = NULL,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxListBoxNameStr);
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size,
|
|
|
|
const wxArrayString& choices,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxListBoxNameStr);
|
|
|
|
|
2004-05-11 19:24:07 +00:00
|
|
|
// items may be checked
|
2006-03-23 22:05:23 +00:00
|
|
|
bool IsChecked(unsigned int uiIndex) const;
|
|
|
|
void Check(unsigned int uiIndex, bool bCheck = true);
|
2004-03-23 17:35:05 +00:00
|
|
|
|
2006-04-19 07:25:08 +00:00
|
|
|
wxMacCheckListControl* GetPeer() const;
|
2004-05-11 19:24:07 +00:00
|
|
|
|
2004-03-23 17:35:05 +00:00
|
|
|
protected:
|
|
|
|
void Init();
|
2004-05-11 19:24:07 +00:00
|
|
|
|
2006-05-18 00:52:48 +00:00
|
|
|
private:
|
2004-05-11 19:24:07 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
2006-05-18 00:52:48 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
|
2004-03-23 17:35:05 +00:00
|
|
|
};
|
|
|
|
|
2006-05-18 00:52:48 +00:00
|
|
|
#endif // _WX_MAC_CHECKLST_H_
|