]>
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 // simulates the event, returns TRUE if the event was processed
33 virtual void Command(wxCommandEvent
& WXUNUSED(event
)) { }
35 // calls the callback and appropriate event handlers, returns TRUE if
36 // event was processed
37 virtual bool ProcessCommand(wxCommandEvent
& event
);
39 virtual void SetLabel(const wxString
& label
);
40 virtual wxString
GetLabel() const ;
42 #if WXWIN_COMPATIBILITY
43 void Callback(const wxFunction function
) { m_callback
= function
; }; // Adds callback
45 wxFunction
GetCallback() { return m_callback
; }
46 #endif // WXWIN_COMPATIBILITY
48 bool InSetValue() const { return m_inSetValue
; }
51 #if WXWIN_COMPATIBILITY
52 wxFunction m_callback
; // Callback associated with the window
53 #endif // WXWIN_COMPATIBILITY
55 bool m_inSetValue
; // Motif: prevent callbacks being called while