added wxCheckBox::IsChecked() to wxMac and documented it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15396 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-05-06 11:40:16 +00:00
parent 0e0a4e6447
commit 6e8e9b6628
2 changed files with 56 additions and 52 deletions

View File

@@ -93,7 +93,15 @@ Gets the state of the checkbox.
\wxheading{Return value} \wxheading{Return value}
Returns TRUE if it is checked, FALSE otherwise. Returns {\tt TRUE} if it is checked, {\tt FALSE} otherwise.
\membersection{wxCheckBox::IsChecked}\label{wxcheckboxischecked}
\constfunc{bool}{IsChecked}{\void}
This is just a maybe more readable synonym for
\helpref{GetValue}{wxcheckboxgetvalue}: just as the latter, it returns
{\tt TRUE} if the checkbox is checked and {\tt FALSE} otherwise.
\membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue} \membersection{wxCheckBox::SetValue}\label{wxcheckboxsetvalue}
@@ -104,6 +112,6 @@ wxEVT\_COMMAND\_CHECKBOX\_CLICKED event to get emitted.
\wxheading{Parameters} \wxheading{Parameters}
\docparam{state}{If TRUE, the check is on, otherwise it is off.} \docparam{state}{If {\tt TRUE|, the check is on, otherwise it is off.}

View File

@@ -6,7 +6,7 @@
// Created: ??/??/98 // Created: ??/??/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) AUTHOR
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _WX_CHECKBOX_H_ #ifndef _WX_CHECKBOX_H_
@@ -16,69 +16,65 @@
#pragma interface "checkbox.h" #pragma interface "checkbox.h"
#endif #endif
#include "wx/control.h"
WXDLLEXPORT_DATA(extern const char*) wxCheckBoxNameStr;
// Checkbox item (single checkbox) // Checkbox item (single checkbox)
class WXDLLEXPORT wxBitmap; class WXDLLEXPORT wxCheckBox : public wxCheckBoxBase
class WXDLLEXPORT wxCheckBox: public wxControl
{ {
DECLARE_DYNAMIC_CLASS(wxCheckBox) public:
wxCheckBox() { }
wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
public: bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
inline wxCheckBox() { } const wxPoint& pos = wxDefaultPosition,
inline wxCheckBox(wxWindow *parent, wxWindowID id, const wxString& label, const wxSize& size = wxDefaultSize, long style = 0,
const wxPoint& pos = wxDefaultPosition, const wxValidator& validator = wxDefaultValidator,
const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxCheckBoxNameStr);
const wxValidator& validator = wxDefaultValidator, virtual void SetValue(bool);
const wxString& name = wxCheckBoxNameStr) virtual bool GetValue() const;
{ virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart );
Create(parent, id, label, pos, size, style, validator, name); virtual void Command(wxCommandEvent& event);
}
bool Create(wxWindow *parent, wxWindowID id, const wxString& label, DECLARE_DYNAMIC_CLASS(wxCheckBox)
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool);
virtual bool GetValue() const ;
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
virtual void Command(wxCommandEvent& event);
}; };
class WXDLLEXPORT wxBitmap;
class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox class WXDLLEXPORT wxBitmapCheckBox: public wxCheckBox
{ {
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
public: public:
int checkWidth ; int checkWidth;
int checkHeight ; int checkHeight;
wxBitmapCheckBox() wxBitmapCheckBox()
: checkWidth(-1), checkHeight(-1) : checkWidth(-1), checkHeight(-1)
{ } { }
wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap, wxBitmapCheckBox(wxWindow *parent, wxWindowID id, const wxBitmap *label,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0, const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr); const wxString& name = wxCheckBoxNameStr)
virtual void SetValue(bool); {
virtual bool GetValue() const ; Create(parent, id, label, pos, size, style, validator, name);
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); }
virtual void SetLabel(const wxBitmap *bitmap);
virtual void SetLabel( const wxString & WXUNUSED(name) ) {} bool Create(wxWindow *parent, wxWindowID id, const wxBitmap *bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool);
virtual bool GetValue() const;
virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
virtual void SetLabel(const wxBitmap *bitmap);
virtual void SetLabel( const wxString & WXUNUSED(name) ) {}
DECLARE_DYNAMIC_CLASS(wxBitmapCheckBox)
}; };
#endif #endif
// _WX_CHECKBOX_H_ // _WX_CHECKBOX_H_