]>
git.saurik.com Git - wxWidgets.git/blob - src/qt/button.cpp
   1 ///////////////////////////////////////////////////////////////////////////// 
   8 // Copyright:   (c) AUTHOR 
   9 // Licence:     wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  13 #pragma implementation "button.h" 
  16 #include "wx/button.h" 
  18 IMPLEMENT_DYNAMIC_CLASS(wxButton
, wxControl
) 
  22 bool wxButton::Create(wxWindow 
*parent
, wxWindowID id
, const wxString
& label
, 
  24            const wxSize
& size
, long style
, 
  25            const wxValidator
& validator
, 
  29     SetValidator(validator
); 
  30     m_windowStyle 
= style
; 
  32     parent
->AddChild((wxButton 
*)this); 
  35         m_windowId 
= NewControlId(); 
  39     // TODO: create button 
  44 void wxButton::SetSize(int x
, int y
, int width
, int height
, int sizeFlags
) 
  49 void wxButton::SetDefault() 
  51     wxWindow 
*parent 
= (wxWindow 
*)GetParent(); 
  53         parent
->SetDefaultItem(this); 
  55     // TODO: make button the default 
  58 wxString 
wxButton::GetLabel() const 
  64 void wxButton::SetLabel(const wxString
& label
) 
  69 void wxButton::Command (wxCommandEvent 
& event
) 
  71     ProcessCommand (event
);