]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/control.h
build fix for wxGTK/Univ build (#9706)
[wxWidgets.git] / include / wx / motif / control.h
CommitLineData
9b6dbb09 1/////////////////////////////////////////////////////////////////////////////
925f7740 2// Name: wx/motif/control.h
9b6dbb09
JS
3// Purpose: wxControl class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CONTROL_H_
13#define _WX_CONTROL_H_
14
9b6dbb09
JS
15#include "wx/window.h"
16#include "wx/list.h"
17#include "wx/validate.h"
18
19// General item class
53a2db12 20class WXDLLIMPEXP_CORE wxControl: public wxControlBase
9b6dbb09 21{
a4294b78 22 DECLARE_ABSTRACT_CLASS(wxControl)
925f7740 23
9b6dbb09 24public:
a4294b78 25 wxControl();
0148fe1e 26 wxControl( wxWindow *parent,
83df96d6
JS
27 wxWindowID id,
28 const wxPoint &pos = wxDefaultPosition,
29 const wxSize &size = wxDefaultSize,
30 long style = 0,
31 const wxValidator& validator = wxDefaultValidator,
32 const wxString &name = wxControlNameStr )
5a2155ef
BJ
33 {
34 Create(parent, id, pos, size, style, validator, name);
35 }
925f7740 36
5a2155ef 37 bool Create(wxWindow *parent, wxWindowID id,
83df96d6
JS
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize, long style = 0,
40 const wxValidator& validator = wxDefaultValidator,
41 const wxString& name = wxControlNameStr);
925f7740 42
0c02f070 43 // simulates the event, returns true if the event was processed
31528cd3 44 virtual void Command(wxCommandEvent& WXUNUSED(event)) { }
925f7740 45
0c02f070 46 // calls the callback and appropriate event handlers, returns true if
31528cd3
VZ
47 // event was processed
48 virtual bool ProcessCommand(wxCommandEvent& event);
925f7740 49
a4294b78
JS
50 virtual void SetLabel(const wxString& label);
51 virtual wxString GetLabel() const ;
925f7740 52
7491d644 53 bool InSetValue() const { return m_inSetValue; }
925f7740 54
9b6dbb09 55protected:
ec75d791
MB
56 // calls wxControlBase::CreateControl, also sets foreground, background and
57 // font to parent's values
58 bool CreateControl(wxWindow *parent,
59 wxWindowID id,
60 const wxPoint& pos,
61 const wxSize& size,
62 long style,
63 const wxValidator& validator,
64 const wxString& name);
65
0c02f070
MB
66 // native implementation using XtQueryGeometry
67 virtual wxSize DoGetBestSize() const;
68
70dc287a
VZ
69 // Motif: prevent callbacks being called while in SetValue
70 bool m_inSetValue;
925f7740 71
a4294b78 72 DECLARE_EVENT_TABLE()
9b6dbb09
JS
73};
74
70dc287a 75#endif // _WX_CONTROL_H_