]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/gtk1/control.cpp
1. fixed Maximise() mismatch between wxFrame and wxMDIFrame
[wxWidgets.git] / src / gtk1 / control.cpp
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: control.cpp
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling, Julian Smart and Vadim Zeitlin
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifdef __GNUG__
11#pragma implementation "control.h"
12#endif
13
14#include "wx/control.h"
15
16#include "gtk/gtkfeatures.h"
17
18//-----------------------------------------------------------------------------
19// wxControl
20//-----------------------------------------------------------------------------
21
22IMPLEMENT_DYNAMIC_CLASS(wxControl,wxWindow)
23
24wxControl::wxControl(void)
25{
26 m_needParent = TRUE;
27}
28
29wxControl::wxControl( wxWindow *parent, wxWindowID id,
30 const wxPoint &pos, const wxSize &size,
31 long style, const wxString &name ) :
32 wxWindow( parent, id, pos, size, style, name )
33{
34}
35
36void wxControl::Command( wxCommandEvent &WXUNUSED(event) )
37{
38}
39
40void wxControl::SetLabel( const wxString &label )
41{
42 m_label = _T("");
43 for ( const wxChar *pc = label; *pc != _T('\0'); pc++ )
44 {
45 if ( *pc == _T('&') )
46 {
47 pc++; // skip it
48#if 0 // it would be unused anyhow for now - kbd interface not done yet
49 if ( *pc != _T('&') ) m_chAccel = *pc;
50#endif
51 }
52 m_label << *pc;
53 }
54}
55
56wxString wxControl::GetLabel(void) const
57{
58 return m_label;
59}
60
61