]> git.saurik.com Git - wxWidgets.git/blob - src/os2/button.cpp
warnings for mingw32 compilation fixed
[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 = (wxWindow *)GetParent();
54 if (parent)
55 parent->SetDefaultItem(this);
56
57 // TODO: make button the default
58 }
59
60 wxString wxButton::GetLabel() const
61 {
62 // TODO
63 return wxString("");
64 }
65
66 void wxButton::SetLabel(const wxString& label)
67 {
68 // TODO
69 }
70
71 void wxButton::Command (wxCommandEvent & event)
72 {
73 ProcessCommand (event);
74 }
75