]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/choice.h
added wxListCtrl::DeleteAllColumns()
[wxWidgets.git] / include / wx / gtk1 / choice.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: choice.h
3// Purpose:
4// Author: Robert Roebling
dbf858b5 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
c801d85f
KB
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __GTKCHOICEH__
12#define __GTKCHOICEH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
19#include "wx/object.h"
20#include "wx/list.h"
21#include "wx/control.h"
22
23//-----------------------------------------------------------------------------
24// classes
25//-----------------------------------------------------------------------------
26
27class wxChoice;
28
29//-----------------------------------------------------------------------------
30// global data
31//-----------------------------------------------------------------------------
32
33extern const char *wxChoiceNameStr;
34
35//-----------------------------------------------------------------------------
36// wxChoice
37//-----------------------------------------------------------------------------
38
39class wxChoice: public wxControl
40{
41 DECLARE_DYNAMIC_CLASS(wxChoice)
42
fd0eed64 43public:
c801d85f 44
fd0eed64
RR
45 wxChoice();
46 inline wxChoice( wxWindow *parent, wxWindowID id,
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
49 int n = 0, const wxString choices[] = (const wxString *) NULL,
50 long style = 0,
51 const wxValidator& validator = wxDefaultValidator,
52 const wxString& name = wxChoiceNameStr )
53 {
6de97a3b 54 Create(parent, id, pos, size, n, choices, style, validator, name);
fd0eed64
RR
55 }
56 ~wxChoice();
57 bool Create( wxWindow *parent, wxWindowID id,
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize,
60 int n = 0, const wxString choices[] = (wxString *) NULL,
61 long style = 0,
62 const wxValidator& validator = wxDefaultValidator,
63 const wxString& name = wxChoiceNameStr );
64
65 void Append( const wxString &item );
66 void Append( const wxString &item, void* clientData );
67 void Append( const wxString &item, wxClientData* clientData );
68
69 void SetClientData( int n, void* clientData );
70 void* GetClientData( int n );
71 void SetClientObject( int n, wxClientData* clientData );
72 wxClientData* GetClientObject( int n );
73
74 void Clear();
75 void Delete(int n);
76
77 int FindString( const wxString &string ) const;
78 int GetColumns() const;
79 int GetSelection();
80 wxString GetString( int n ) const;
81 wxString GetStringSelection() const;
82 int Number() const;
83 void SetColumns( int n = 1 );
84 void SetSelection( int n );
85 void SetStringSelection( const wxString &string );
b4071e91 86
fd0eed64 87// implementation
58614078 88
f5e27805
RR
89 wxList m_clientDataList;
90 wxList m_clientObjectList;
fd0eed64
RR
91
92 void AppendCommon( const wxString &item );
93 void ApplyWidgetStyle();
c801d85f
KB
94};
95
96#endif // __GTKCHOICEH__