2004-03-23 12:35:05 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2006-03-23 17:05:23 -05:00
|
|
|
// Name: wx/mac/carbon/checklst.h
|
2004-03-23 12:35:05 -05: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 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2004-03-23 12:35:05 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-05-17 20:52:48 -04:00
|
|
|
#ifndef _WX_MAC_CHECKLST_H_
|
|
|
|
#define _WX_MAC_CHECKLST_H_
|
2004-03-23 12:35:05 -05:00
|
|
|
|
2006-05-17 20:52:48 -04:00
|
|
|
class wxMacCheckListControl
|
2006-04-19 03:25:08 -04:00
|
|
|
{
|
|
|
|
public :
|
|
|
|
virtual bool MacIsChecked(unsigned int n) const = 0;
|
|
|
|
virtual void MacCheck(unsigned int n, bool bCheck = true) = 0;
|
2006-05-17 20:52:48 -04:00
|
|
|
|
|
|
|
virtual ~wxMacCheckListControl() { }
|
2006-04-19 03:25:08 -04:00
|
|
|
};
|
|
|
|
|
2004-03-23 12:35:05 -05:00
|
|
|
class WXDLLEXPORT wxCheckListBox : public wxCheckListBoxBase
|
|
|
|
{
|
|
|
|
public:
|
2006-05-17 20:52:48 -04:00
|
|
|
// ctors
|
2004-03-23 12:35:05 -05: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 15:24:07 -04:00
|
|
|
// items may be checked
|
2006-03-23 17:05:23 -05:00
|
|
|
bool IsChecked(unsigned int uiIndex) const;
|
|
|
|
void Check(unsigned int uiIndex, bool bCheck = true);
|
2004-03-23 12:35:05 -05:00
|
|
|
|
2006-04-19 03:25:08 -04:00
|
|
|
wxMacCheckListControl* GetPeer() const;
|
2004-05-11 15:24:07 -04:00
|
|
|
|
2004-03-23 12:35:05 -05:00
|
|
|
protected:
|
|
|
|
void Init();
|
2004-05-11 15:24:07 -04:00
|
|
|
|
2006-05-17 20:52:48 -04:00
|
|
|
private:
|
2004-05-11 15:24:07 -04:00
|
|
|
DECLARE_EVENT_TABLE()
|
2006-05-17 20:52:48 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
|
2004-03-23 12:35:05 -05:00
|
|
|
};
|
|
|
|
|
2006-05-17 20:52:48 -04:00
|
|
|
#endif // _WX_MAC_CHECKLST_H_
|