]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/tglbtn.cpp
regen bakefiles - get rid of explicit size setting after ctor
[wxWidgets.git] / src / palmos / tglbtn.cpp
CommitLineData
ffecfa5a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: src/palmos/tglbtn.cpp
3// Purpose: Definition of the wxToggleButton class, which implements a
4// toggle button.
5// Author: William Osborne
6// Modified by:
7// Created: 10/13/04
8// RCS-ID: $Id:
9// Copyright: (c) William Osborne
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#include "wx/tglbtn.h"
28
29#if wxUSE_TOGGLEBTN
30
31#ifndef WX_PRECOMP
32 #include "wx/button.h"
33 #include "wx/brush.h"
34 #include "wx/dcscreen.h"
35 #include "wx/settings.h"
36
37 #include "wx/log.h"
38#endif // WX_PRECOMP
39
40#include "wx/palmos/private.h"
41
42// ----------------------------------------------------------------------------
43// macros
44// ----------------------------------------------------------------------------
45
46IMPLEMENT_DYNAMIC_CLASS(wxToggleButton, wxControl)
47DEFINE_EVENT_TYPE(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED)
48
49#define BUTTON_HEIGHT_FROM_CHAR_HEIGHT(cy) (11*EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)/10)
50
51// ============================================================================
52// implementation
53// ============================================================================
54
55// ----------------------------------------------------------------------------
56// wxToggleButton
57// ----------------------------------------------------------------------------
58
59bool wxToggleButton::MSWCommand(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id))
60{
61 wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, m_windowId);
62 event.SetInt(GetValue());
63 event.SetEventObject(this);
64 ProcessCommand(event);
65 return TRUE;
66}
67
68// Single check box item
69bool wxToggleButton::Create(wxWindow *parent, wxWindowID id,
70 const wxString& label,
71 const wxPoint& pos,
72 const wxSize& size, long style,
73 const wxValidator& validator,
74 const wxString& name)
75{
76 return false;
77}
78
79wxBorder wxToggleButton::GetDefaultBorder() const
80{
81 return wxBORDER_NONE;
82}
83
84WXDWORD wxToggleButton::MSWGetStyle(long style, WXDWORD *exstyle) const
85{
86 return 0;
87}
88
89void wxToggleButton::SetLabel(const wxString& label)
90{
91}
92
93wxSize wxToggleButton::DoGetBestSize() const
94{
95 return wxSize(0,0);
96}
97
98void wxToggleButton::SetValue(bool val)
99{
100}
101
102#ifndef BST_CHECKED
103#define BST_CHECKED 0x0001
104#endif
105
106bool wxToggleButton::GetValue() const
107{
108 return false;
109}
110
111void wxToggleButton::Command(wxCommandEvent & event)
112{
113}
114
115#endif // wxUSE_TOGGLEBTN
116