]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/control.h
Added wxStrnicmp and to wchar.h, not yet for Unicode mode.
[wxWidgets.git] / include / wx / motif / control.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: control.h
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
7491d644 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CONTROL_H_
13#define _WX_CONTROL_H_
14
15#ifdef __GNUG__
16#pragma interface "control.h"
17#endif
18
19#include "wx/window.h"
20#include "wx/list.h"
21#include "wx/validate.h"
22
23// General item class
24class WXDLLEXPORT wxControl: public wxWindow
25{
a4294b78 26 DECLARE_ABSTRACT_CLASS(wxControl)
7491d644 27
9b6dbb09 28public:
a4294b78
JS
29 wxControl();
30 ~wxControl();
9b6dbb09 31
31528cd3
VZ
32 // simulates the event, returns TRUE if the event was processed
33 virtual void Command(wxCommandEvent& WXUNUSED(event)) { }
34
35 // calls the callback and appropriate event handlers, returns TRUE if
36 // event was processed
37 virtual bool ProcessCommand(wxCommandEvent& event);
38
a4294b78
JS
39 virtual void SetLabel(const wxString& label);
40 virtual wxString GetLabel() const ;
9b6dbb09 41
31528cd3 42#if WXWIN_COMPATIBILITY
7491d644
VZ
43 void Callback(const wxFunction function) { m_callback = function; }; // Adds callback
44
45 wxFunction GetCallback() { return m_callback; }
31528cd3 46#endif // WXWIN_COMPATIBILITY
9b6dbb09 47
7491d644 48 bool InSetValue() const { return m_inSetValue; }
9b6dbb09
JS
49
50protected:
31528cd3 51#if WXWIN_COMPATIBILITY
a4294b78 52 wxFunction m_callback; // Callback associated with the window
31528cd3 53#endif // WXWIN_COMPATIBILITY
9b6dbb09 54
a4294b78
JS
55 bool m_inSetValue; // Motif: prevent callbacks being called while
56 // in SetValue
57
58 DECLARE_EVENT_TABLE()
9b6dbb09
JS
59};
60
61#endif
62 // _WX_CONTROL_H_