implementation for mac added

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-02-21 16:38:23 +00:00
parent 407f0db050
commit eabe6af8d9
4 changed files with 315 additions and 2 deletions

59
include/wx/mac/tglbtn.h Normal file
View File

@@ -0,0 +1,59 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/mac/tglbtn.h
// Purpose: Declaration of the wxToggleButton class, which implements a
// toggle button under wxMac.
// Author: Stefan Csomor
// Modified by:
// Created: 08.02.01
// RCS-ID: $Id$
// Copyright: (c) 2004 Stefan Csomor
// License: wxWindows License
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TOGGLEBUTTON_H_
#define _WX_TOGGLEBUTTON_H_
WXDLLEXPORT_DATA(extern const wxChar*) wxCheckBoxNameStr;
// Checkbox item (single checkbox)
class WXDLLEXPORT wxToggleButton : public wxControl
{
public:
wxToggleButton() {}
wxToggleButton(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);
}
bool Create(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);
virtual void SetValue(bool value);
virtual bool GetValue() const ;
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
virtual void Command(wxCommandEvent& event);
protected:
virtual wxSize DoGetBestSize() const;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)
};
#endif // _WX_TOGGLEBUTTON_H_

View File

@@ -32,9 +32,9 @@ END_DECLARE_EVENT_TYPES()
#include "wx/gtk/tglbtn.h"
# elif defined(__WXMOTIF__)
#include "wx/motif/tglbtn.h"
#elif defined(__WXMAC__)
#include "wx/mac/tglbtn.h"
/*
# elif defined(__WXMAC__)
# include "wx/mac/tglbtn.h"
# elif defined(__WXPM__)
# include "wx/os2/tglbtn.h"
*/