]> git.saurik.com Git - wxWidgets.git/blob - src/os2/button.cpp
54fba624567d764a147a659aa247443ee8d80c21
[wxWidgets.git] / src / os2 / button.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: button.cpp
3 // Purpose: wxButton
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "button.h"
14 #endif
15
16 #include "wx/button.h"
17
18 #if !USE_SHARED_LIBRARY
19 IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
20 #endif
21
22 // Button
23
24 bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
25 const wxPoint& pos,
26 const wxSize& size, long style,
27 const wxValidator& validator,
28 const wxString& name)
29 {
30 SetName(name);
31 SetValidator(validator);
32 m_windowStyle = style;
33
34 parent->AddChild((wxButton *)this);
35
36 if (id == -1)
37 m_windowId = NewControlId();
38 else
39 m_windowId = id;
40
41 // TODO: create button
42
43 return FALSE;
44 }
45
46 void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags)
47 {
48 // TODO
49 }
50
51 void wxButton::SetDefault()
52 {
53 wxWindow *parent = GetParent();
54 wxButton *btnOldDefault = NULL;
55 wxPanel *panel = wxDynamicCast(parent, wxPanel);
56 if (panel)
57 panel->SetDefaultItem(this);
58
59 // TODO: make button the default
60 }
61
62 wxString wxButton::GetLabel() const
63 {
64 // TODO
65 return wxString("");
66 }
67
68 void wxButton::SetLabel(const wxString& label)
69 {
70 // TODO
71 }
72
73 void wxButton::Command (wxCommandEvent & event)
74 {
75 ProcessCommand (event);
76 }
77