]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/control.h
474c65bdf724d6be31b319d2686474a17d47595d
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 #include "wx/window.h"
17 #include "wx/validate.h"
20 class WXDLLEXPORT wxControl
: public wxControlBase
22 DECLARE_ABSTRACT_CLASS(wxControl
)
26 wxControl( wxWindow
*parent
,
28 const wxPoint
&pos
= wxDefaultPosition
,
29 const wxSize
&size
= wxDefaultSize
,
31 const wxValidator
& validator
= wxDefaultValidator
,
32 const wxString
&name
= wxControlNameStr
)
34 Create(parent
, id
, pos
, size
, style
, validator
, name
);
37 bool Create(wxWindow
*parent
, wxWindowID id
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
, long style
= 0,
40 const wxValidator
& validator
= wxDefaultValidator
,
41 const wxString
& name
= wxControlNameStr
);
43 // simulates the event, returns true if the event was processed
44 virtual void Command(wxCommandEvent
& WXUNUSED(event
)) { }
46 // calls the callback and appropriate event handlers, returns true if
47 // event was processed
48 virtual bool ProcessCommand(wxCommandEvent
& event
);
50 virtual void SetLabel(const wxString
& label
);
51 virtual wxString
GetLabel() const ;
53 bool InSetValue() const { return m_inSetValue
; }
56 // calls wxControlBase::CreateControl, also sets foreground, background and
57 // font to parent's values
58 bool CreateControl(wxWindow
*parent
,
63 const wxValidator
& validator
,
64 const wxString
& name
);
66 // native implementation using XtQueryGeometry
67 virtual wxSize
DoGetBestSize() const;
69 // Motif: prevent callbacks being called while in SetValue
75 #endif // _WX_CONTROL_H_