]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/control.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxControl class
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CONTROL_H_
13 #define _WX_CONTROL_H_
16 #pragma interface "control.h"
19 #include "wx/window.h"
21 #include "wx/validate.h"
24 class WXDLLEXPORT wxControl
: public wxControlBase
26 DECLARE_ABSTRACT_CLASS(wxControl
)
31 virtual void Command(wxCommandEvent
& WXUNUSED(event
)) {}; // Simulates an event
32 virtual void ProcessCommand(wxCommandEvent
& event
); // Calls the callback and
33 // appropriate event handlers
34 virtual void SetLabel(const wxString
& label
);
35 virtual wxString
GetLabel() const ;
37 // Places item in centre of panel - so can't be used BEFORE panel->Fit()
38 void Centre(int direction
= wxHORIZONTAL
);
39 inline void Callback(const wxFunction function
) { m_callback
= function
; }; // Adds callback
41 inline wxFunction
GetCallback() { return m_callback
; }
44 wxFunction m_callback
; // Callback associated with the window