]> git.saurik.com Git - wxWidgets.git/blame - include/wx/control.h
added GetMargins()
[wxWidgets.git] / include / wx / control.h
CommitLineData
8d99be5f
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/control.h
3// Purpose: wxControl common interface
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 26.07.99
7// RCS-ID: $Id$
8// Copyright: (c) wxWindows team
9// Licence: wxWindows license
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_CONTROL_H_BASE_
13#define _WX_CONTROL_H_BASE_
c801d85f 14
8d99be5f
VZ
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19#ifdef __GNUG__
1b68e0b5 20 #pragma interface "controlbase.h"
8d99be5f
VZ
21#endif
22
23#include "wx/window.h" // base class
24
25// ----------------------------------------------------------------------------
26// wxControl is the base class for all controls
27// ----------------------------------------------------------------------------
28
29class WXDLLEXPORT wxControlBase : public wxWindow
30{
31public:
03e11df5
GD
32#ifdef __WXMAC_X__
33 virtual ~wxControlBase() {} // Added min for Mac X
34#endif
8d99be5f
VZ
35 // simulates the event of given type (i.e. wxButton::Command() is just as
36 // if the button was clicked)
37 virtual void Command(wxCommandEvent &event);
38
39protected:
3f2711d5
VZ
40 // creates the control (calls wxWindowBase::CreateBase inside) and adds it
41 // to the list of parents children
8d99be5f
VZ
42 bool CreateControl(wxWindowBase *parent,
43 wxWindowID id,
44 const wxPoint& pos,
45 const wxSize& size,
46 long style,
47 const wxValidator& validator,
48 const wxString& name);
49
50 // inherit colour and font settings from the parent window
51 void InheritAttributes();
bfbd6dc1
VZ
52
53 // initialize the common fields of wxCommandEvent
54 void InitCommandEvent(wxCommandEvent& event) const;
8d99be5f
VZ
55};
56
57// ----------------------------------------------------------------------------
58// include platform-dependent wxControl declarations
59// ----------------------------------------------------------------------------
f03fc89f 60
2049ba38 61#if defined(__WXMSW__)
8d99be5f 62 #include "wx/msw/control.h"
2049ba38 63#elif defined(__WXMOTIF__)
8d99be5f 64 #include "wx/motif/control.h"
2049ba38 65#elif defined(__WXGTK__)
8d99be5f 66 #include "wx/gtk/control.h"
b4e76e0d 67#elif defined(__WXQT__)
8d99be5f 68 #include "wx/qt/control.h"
34138703 69#elif defined(__WXMAC__)
8d99be5f 70 #include "wx/mac/control.h"
1777b9bb
DW
71#elif defined(__WXPM__)
72 #include "wx/os2/control.h"
34138703 73#elif defined(__WXSTUBS__)
8d99be5f 74 #include "wx/stubs/control.h"
c801d85f
KB
75#endif
76
77#endif
34138703 78 // _WX_CONTROL_H_BASE_