]>
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_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
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
)
30 wxControl( wxWindow
*parent
,
32 const wxPoint
&pos
= wxDefaultPosition
,
33 const wxSize
&size
= wxDefaultSize
,
35 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
&name
= wxControlNameStr
)
38 Create(parent
, id
, pos
, size
, style
, validator
, name
);
41 bool Create(wxWindow
*parent
, wxWindowID id
,
42 const wxPoint
& pos
= wxDefaultPosition
,
43 const wxSize
& size
= wxDefaultSize
, long style
= 0,
44 const wxValidator
& validator
= wxDefaultValidator
,
45 const wxString
& name
= wxControlNameStr
);
47 // simulates the event, returns TRUE if the event was processed
48 virtual void Command(wxCommandEvent
& WXUNUSED(event
)) { }
50 // calls the callback and appropriate event handlers, returns TRUE if
51 // event was processed
52 virtual bool ProcessCommand(wxCommandEvent
& event
);
54 virtual void SetLabel(const wxString
& label
);
55 virtual wxString
GetLabel() const ;
57 bool InSetValue() const { return m_inSetValue
; }
60 // calls wxControlBase::CreateControl, also sets foreground, background and
61 // font to parent's values
62 bool CreateControl(wxWindow
*parent
,
67 const wxValidator
& validator
,
68 const wxString
& name
);
70 // Motif: prevent callbacks being called while in SetValue
76 #endif // _WX_CONTROL_H_