]> git.saurik.com Git - wxWidgets.git/blame - src/gtk1/control.cpp
1. wxNotebook::GetPageCount() returns only the number of pages actually added
[wxWidgets.git] / src / gtk1 / control.cpp
CommitLineData
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
16//-----------------------------------------------------------------------------
17// wxControl
18//-----------------------------------------------------------------------------
19
20IMPLEMENT_DYNAMIC_CLASS(wxControl,wxWindow)
21
22wxControl::wxControl(void)
23{
c801d85f 24 m_needParent = TRUE;
6de97a3b 25}
c801d85f 26
32c77a71
VZ
27wxControl::wxControl( wxWindow *parent, wxWindowID id,
28 const wxPoint &pos, const wxSize &size,
debe6624 29 long style, const wxString &name ) :
c801d85f
KB
30 wxWindow( parent, id, pos, size, style, name )
31{
6de97a3b 32}
c801d85f
KB
33
34void wxControl::Command( wxCommandEvent &WXUNUSED(event) )
35{
6de97a3b 36}
c801d85f
KB
37
38void wxControl::SetLabel( const wxString &label )
39{
b593568e 40 m_label = "";
32c77a71
VZ
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 }
6de97a3b 52}
c801d85f
KB
53
54wxString wxControl::GetLabel(void) const
55{
56 return m_label;
6de97a3b 57}
c801d85f
KB
58
59
60