]>
git.saurik.com Git - wxWidgets.git/blob - src/os2/button.cpp
54fba624567d764a147a659aa247443ee8d80c21
1 /////////////////////////////////////////////////////////////////////////////
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "button.h"
16 #include "wx/button.h"
18 #if !USE_SHARED_LIBRARY
19 IMPLEMENT_DYNAMIC_CLASS(wxButton
, wxControl
)
24 bool wxButton::Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
26 const wxSize
& size
, long style
,
27 const wxValidator
& validator
,
31 SetValidator(validator
);
32 m_windowStyle
= style
;
34 parent
->AddChild((wxButton
*)this);
37 m_windowId
= NewControlId();
41 // TODO: create button
46 void wxButton::SetSize(int x
, int y
, int width
, int height
, int sizeFlags
)
51 void wxButton::SetDefault()
53 wxWindow
*parent
= GetParent();
54 wxButton
*btnOldDefault
= NULL
;
55 wxPanel
*panel
= wxDynamicCast(parent
, wxPanel
);
57 panel
->SetDefaultItem(this);
59 // TODO: make button the default
62 wxString
wxButton::GetLabel() const
68 void wxButton::SetLabel(const wxString
& label
)
73 void wxButton::Command (wxCommandEvent
& event
)
75 ProcessCommand (event
);