]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: control.cpp | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
dbf858b5 | 5 | // Id: $Id$ |
01111366 | 6 | // Copyright: (c) 1998 Robert Roebling, Julian Smart and Vadim Zeitlin |
32c77a71 | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | #ifdef __GNUG__ | |
11 | #pragma implementation "control.h" | |
12 | #endif | |
13 | ||
14 | #include "wx/control.h" | |
15 | ||
034be888 RR |
16 | #include "gtk/gtkfeatures.h" |
17 | ||
c801d85f KB |
18 | //----------------------------------------------------------------------------- |
19 | // wxControl | |
20 | //----------------------------------------------------------------------------- | |
21 | ||
22 | IMPLEMENT_DYNAMIC_CLASS(wxControl,wxWindow) | |
23 | ||
31528cd3 | 24 | wxControl::wxControl() |
c801d85f | 25 | { |
b292e2f5 | 26 | m_needParent = TRUE; |
6de97a3b | 27 | } |
c801d85f | 28 | |
31528cd3 VZ |
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 ) | |
c801d85f | 36 | { |
6de97a3b | 37 | } |
c801d85f KB |
38 | |
39 | void wxControl::Command( wxCommandEvent &WXUNUSED(event) ) | |
40 | { | |
6de97a3b | 41 | } |
c801d85f KB |
42 | |
43 | void wxControl::SetLabel( const wxString &label ) | |
44 | { | |
3bce7509 | 45 | m_label = _T(""); |
31528cd3 | 46 | for ( const wxChar *pc = label; *pc != _T('\0'); pc++ ) |
b292e2f5 | 47 | { |
31528cd3 VZ |
48 | if ( *pc == _T('&') ) |
49 | { | |
b292e2f5 | 50 | pc++; // skip it |
32c77a71 | 51 | #if 0 // it would be unused anyhow for now - kbd interface not done yet |
3bce7509 | 52 | if ( *pc != _T('&') ) m_chAccel = *pc; |
32c77a71 | 53 | #endif |
b292e2f5 RR |
54 | } |
55 | m_label << *pc; | |
32c77a71 | 56 | } |
6de97a3b | 57 | } |
c801d85f KB |
58 | |
59 | wxString wxControl::GetLabel(void) const | |
60 | { | |
b292e2f5 | 61 | return m_label; |
6de97a3b | 62 | } |
c801d85f KB |
63 | |
64 |