]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/palmos/tglbtn.cpp
Close tree edit even if the change is vetoed to be consistent with MSW [patch 1110252]
[wxWidgets.git] / src / palmos / tglbtn.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/palmos/tglbtn.cpp
3// Purpose: Definition of the wxToggleButton class, which implements a
4// toggle button.
5// Author: William Osborne - minimal working wxPalmOS port
6// Modified by: Wlodzimierz ABX Skiba - native implementation
7// Created: 10/13/04
8// RCS-ID: $Id$
9// Copyright: (c) William Osborne, Wlodzimierz Skiba
10// Licence: wxWindows licence
11/////////////////////////////////////////////////////////////////////////////
12
13// ============================================================================
14// declatations
15// ============================================================================
16
17// ----------------------------------------------------------------------------
18// headers
19// ----------------------------------------------------------------------------
20
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
27#if wxUSE_TOGGLEBTN
28
29#ifndef WX_PRECOMP
30 #include "wx/button.h"
31 #include "wx/brush.h"
32 #include "wx/dcscreen.h"
33 #include "wx/settings.h"
34
35 #include "wx/log.h"
36#endif // WX_PRECOMP
37
38#include "wx/tglbtn.h"
39
40// ----------------------------------------------------------------------------
41// macros
42// ----------------------------------------------------------------------------
43
44IMPLEMENT_DYNAMIC_CLASS(wxToggleButton, wxControl)
45DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED)
46
47// ============================================================================
48// implementation
49// ============================================================================
50
51// ----------------------------------------------------------------------------
52// wxToggleButton
53// ----------------------------------------------------------------------------
54
55// Single check box item
56bool wxToggleButton::Create(wxWindow *parent, wxWindowID id,
57 const wxString& label,
58 const wxPoint& pos,
59 const wxSize& size, long style,
60 const wxValidator& validator,
61 const wxString& name)
62{
63 wxControl::PalmCreateControl(pushButtonCtl, parent, id, label, pos, size);
64 return true;
65}
66
67wxBorder wxToggleButton::GetDefaultBorder() const
68{
69 return wxBORDER_NONE;
70}
71
72wxSize wxToggleButton::DoGetBestSize() const
73{
74 return wxSize(0,0);
75}
76
77void wxToggleButton::SetValue(bool val)
78{
79 SetBoolValue(val);
80}
81
82bool wxToggleButton::GetValue() const
83{
84 return GetBoolValue();
85}
86
87void wxToggleButton::Command(wxCommandEvent & event)
88{
89}
90
91#endif // wxUSE_TOGGLEBTN
92