]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: control.cpp | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Created: 01/02/97 | |
6 | // Id: | |
7 | // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem | |
32c77a71 | 8 | // Licence: wxWindows licence |
c801d85f KB |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifdef __GNUG__ | |
12 | #pragma implementation "control.h" | |
13 | #endif | |
14 | ||
15 | #include "wx/control.h" | |
16 | ||
17 | //----------------------------------------------------------------------------- | |
18 | // wxControl | |
19 | //----------------------------------------------------------------------------- | |
20 | ||
21 | IMPLEMENT_DYNAMIC_CLASS(wxControl,wxWindow) | |
22 | ||
23 | wxControl::wxControl(void) | |
24 | { | |
c801d85f | 25 | m_needParent = TRUE; |
6de97a3b | 26 | } |
c801d85f | 27 | |
32c77a71 VZ |
28 | wxControl::wxControl( wxWindow *parent, wxWindowID id, |
29 | const wxPoint &pos, const wxSize &size, | |
debe6624 | 30 | long style, const wxString &name ) : |
c801d85f KB |
31 | wxWindow( parent, id, pos, size, style, name ) |
32 | { | |
6de97a3b | 33 | } |
c801d85f KB |
34 | |
35 | void wxControl::Command( wxCommandEvent &WXUNUSED(event) ) | |
36 | { | |
6de97a3b | 37 | } |
c801d85f KB |
38 | |
39 | void wxControl::SetLabel( const wxString &label ) | |
40 | { | |
b593568e | 41 | m_label = ""; |
32c77a71 VZ |
42 | for ( const char *pc = label; *pc != '\0'; pc++ ) { |
43 | if ( *pc == '&' ) { | |
44 | pc++; // skip it | |
45 | #if 0 // it would be unused anyhow for now - kbd interface not done yet | |
46 | if ( *pc != '&' ) | |
47 | m_chAccel = *pc; | |
48 | #endif | |
49 | } | |
50 | ||
51 | m_label << *pc; | |
52 | } | |
6de97a3b | 53 | } |
c801d85f KB |
54 | |
55 | wxString wxControl::GetLabel(void) const | |
56 | { | |
57 | return m_label; | |
6de97a3b | 58 | } |
c801d85f KB |
59 | |
60 | ||
61 |