]> git.saurik.com Git - wxWidgets.git/blame - include/wx/qt/control.h
Added wxFileName::GetModificationTime()
[wxWidgets.git] / include / wx / qt / control.h
CommitLineData
7c78e7c7
RR
1/////////////////////////////////////////////////////////////////////////////
2// Name: control.h
01b2eeec
KB
3// Purpose: wxControl class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
7c78e7c7
RR
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
01b2eeec
KB
12#ifndef _WX_CONTROL_H_
13#define _WX_CONTROL_H_
7c78e7c7
RR
14
15#ifdef __GNUG__
01b2eeec 16#pragma interface "control.h"
7c78e7c7
RR
17#endif
18
7c78e7c7 19#include "wx/window.h"
01b2eeec
KB
20#include "wx/list.h"
21#include "wx/validate.h"
7c78e7c7 22
01b2eeec
KB
23// General item class
24class WXDLLEXPORT wxControl: public wxWindow
25{
26 DECLARE_ABSTRACT_CLASS(wxControl)
27public:
28 wxControl();
29 ~wxControl();
7c78e7c7 30
01b2eeec
KB
31 virtual void Command(wxCommandEvent& WXUNUSED(event)) = 0; // Simulates an event
32 virtual void ProcessCommand(wxCommandEvent& event); // Calls the callback and
33 // appropriate event handlers
34 virtual void SetLabel(const wxString& label);
35 virtual wxString GetLabel() const ;
7c78e7c7 36
01b2eeec
KB
37 // Places item in centre of panel - so can't be used BEFORE panel->Fit()
38 void Centre(int direction = wxHORIZONTAL);
39 inline void Callback(const wxFunction function) { m_callback = function; }; // Adds callback
7c78e7c7 40
01b2eeec 41 inline wxFunction GetCallback() { return m_callback; }
7c78e7c7
RR
42
43protected:
01b2eeec
KB
44 wxFunction m_callback; // Callback associated with the window
45
46DECLARE_EVENT_TABLE()
7c78e7c7
RR
47};
48
01b2eeec
KB
49#endif
50 // _WX_CONTROL_H_