]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/control.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxControl class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
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 wxWindow
26 DECLARE_ABSTRACT_CLASS(wxControl
)
32 virtual void Command(wxCommandEvent
& WXUNUSED(event
)) {}; // Simulates an event
33 virtual void ProcessCommand(wxCommandEvent
& event
); // Calls the callback and
34 // appropriate event handlers
35 virtual void SetLabel(const wxString
& label
);
36 virtual wxString
GetLabel() const ;
38 // Places item in centre of panel - so can't be used BEFORE panel->Fit()
39 void Centre(int direction
= wxHORIZONTAL
);
40 void Callback(const wxFunction function
) { m_callback
= function
; }; // Adds callback
42 wxFunction
GetCallback() { return m_callback
; }
44 bool InSetValue() const { return m_inSetValue
; }
47 wxFunction m_callback
; // Callback associated with the window
49 bool m_inSetValue
; // Motif: prevent callbacks being called while