]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/control.h
9662c06ad157b89c5038bccb2d085b7948631788
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"
23 #define wxControlNameStr _T("control")
26 class WXDLLEXPORT wxControl
: public wxWindow
28 DECLARE_ABSTRACT_CLASS(wxControl
)
32 wxControl( wxWindow
*parent
,
34 const wxPoint
&pos
= wxDefaultPosition
,
35 const wxSize
&size
= wxDefaultSize
,
37 const wxString
&name
= wxControlNameStr
);
40 wxControl( wxWindow
*parent
,
42 const wxPoint
&pos
= wxDefaultPosition
,
43 const wxSize
&size
= wxDefaultSize
,
45 const wxValidator
& validator
= wxDefaultValidator
,
46 const wxString
&name
= wxControlNameStr
);
50 // simulates the event, returns TRUE if the event was processed
51 virtual void Command(wxCommandEvent
& WXUNUSED(event
)) { }
53 // calls the callback and appropriate event handlers, returns TRUE if
54 // event was processed
55 virtual bool ProcessCommand(wxCommandEvent
& event
);
57 virtual void SetLabel(const wxString
& label
);
58 virtual wxString
GetLabel() const ;
60 #if WXWIN_COMPATIBILITY
61 void Callback(const wxFunction function
) { m_callback
= function
; }; // Adds callback
63 wxFunction
GetCallback() { return m_callback
; }
64 #endif // WXWIN_COMPATIBILITY
66 bool InSetValue() const { return m_inSetValue
; }
69 #if WXWIN_COMPATIBILITY
70 wxFunction m_callback
; // Callback associated with the window
71 #endif // WXWIN_COMPATIBILITY
73 bool m_inSetValue
; // Motif: prevent callbacks being called while