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