1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxControl common interface
4 // Author: Vadim Zeitlin
8 // Copyright: (c) wxWindows team
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_CONTROL_H_BASE_
13 #define _WX_CONTROL_H_BASE_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
20 #pragma interface "controlbase.h"
23 #include "wx/window.h" // base class
25 // ----------------------------------------------------------------------------
26 // wxControl is the base class for all controls
27 // ----------------------------------------------------------------------------
29 class WXDLLEXPORT wxControlBase
: public wxWindow
32 // simulates the event of given type (i.e. wxButton::Command() is just as
33 // if the button was clicked)
34 virtual void Command(wxCommandEvent
&event
);
37 // creates the control (calls wxWindowBase::CreateBase inside) and adds it
38 // to the list of parents children
39 bool CreateControl(wxWindowBase
*parent
,
45 const wxValidator
& validator
,
47 const wxString
& name
);
49 // an overloaded version for the controls without validators
50 bool CreateControl(wxWindowBase
*parent
,
57 return CreateControl(parent
, id
, pos
, size
, style
,
58 wxDefaultValidator
, name
);
61 // inherit colour and font settings from the parent window
62 void InheritAttributes();
65 // ----------------------------------------------------------------------------
66 // include platform-dependent wxControl declarations
67 // ----------------------------------------------------------------------------
69 #if defined(__WXMSW__)
70 #include "wx/msw/control.h"
71 #elif defined(__WXMOTIF__)
72 #include "wx/motif/control.h"
73 #elif defined(__WXGTK__)
74 #include "wx/gtk/control.h"
75 #elif defined(__WXQT__)
76 #include "wx/qt/control.h"
77 #elif defined(__WXMAC__)
78 #include "wx/mac/control.h"
79 #elif defined(__WXPM__)
80 #include "wx/os2/control.h"
81 #elif defined(__WXSTUBS__)
82 #include "wx/stubs/control.h"
86 // _WX_CONTROL_H_BASE_