]> git.saurik.com Git - wxWidgets.git/blob - src/gtk/control.cpp
wxIsNumeric for values < 0
[wxWidgets.git] / src / gtk / control.cpp
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 //-----------------------------------------------------------------------------
17 // wxControl
18 //-----------------------------------------------------------------------------
19
20 IMPLEMENT_DYNAMIC_CLASS(wxControl,wxWindow)
21
22 wxControl::wxControl(void)
23 {
24 m_needParent = TRUE;
25 }
26
27 wxControl::wxControl( wxWindow *parent, wxWindowID id,
28 const wxPoint &pos, const wxSize &size,
29 long style, const wxString &name ) :
30 wxWindow( parent, id, pos, size, style, name )
31 {
32 }
33
34 void wxControl::Command( wxCommandEvent &WXUNUSED(event) )
35 {
36 }
37
38 void wxControl::SetLabel( const wxString &label )
39 {
40 m_label = "";
41 for ( const char *pc = label; *pc != '\0'; pc++ ) {
42 if ( *pc == '&' ) {
43 pc++; // skip it
44 #if 0 // it would be unused anyhow for now - kbd interface not done yet
45 if ( *pc != '&' )
46 m_chAccel = *pc;
47 #endif
48 }
49
50 m_label << *pc;
51 }
52 }
53
54 wxString wxControl::GetLabel(void) const
55 {
56 return m_label;
57 }
58
59
60