]>
Commit | Line | Data |
---|---|---|
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 | ||
22 | IMPLEMENT_DYNAMIC_CLASS(wxControl,wxWindow) | |
23 | ||
24 | wxControl::wxControl() | |
25 | { | |
26 | m_needParent = TRUE; | |
27 | } | |
28 | ||
29 | wxControl::wxControl( wxWindow *parent, | |
30 | wxWindowID id, | |
31 | const wxPoint &pos, | |
32 | const wxSize &size, | |
33 | long style, | |
34 | const wxString &name ) | |
35 | : wxWindow( parent, id, pos, size, style, name ) | |
36 | { | |
37 | } | |
38 | ||
39 | void wxControl::SetLabel( const wxString &label ) | |
40 | { | |
41 | m_label.Empty(); | |
42 | for ( const wxChar *pc = label; *pc != _T('\0'); pc++ ) | |
43 | { | |
44 | if ( *pc == _T('&') ) | |
45 | { | |
46 | pc++; // skip it | |
47 | #if 0 // it would be unused anyhow for now - kbd interface not done yet | |
48 | if ( *pc != _T('&') ) m_chAccel = *pc; | |
49 | #endif | |
50 | } | |
51 | m_label << *pc; | |
52 | } | |
53 | } | |
54 | ||
55 | wxString wxControl::GetLabel(void) const | |
56 | { | |
57 | return m_label; | |
58 | } | |
59 | ||
60 |