]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/listbox.h
Changes for wxEventType
[wxWidgets.git] / include / wx / gtk1 / listbox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: listbox.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id:
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11
12 #ifndef __GTKLISTBOXH__
13 #define __GTKLISTBOXH__
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "wx/defs.h"
20 #include "wx/object.h"
21 #include "wx/list.h"
22 #include "wx/control.h"
23
24 //-----------------------------------------------------------------------------
25 // classes
26 //-----------------------------------------------------------------------------
27
28 class wxListBox;
29
30 //-----------------------------------------------------------------------------
31 // global data
32 //-----------------------------------------------------------------------------
33
34 extern const char *wxListBoxNameStr;
35
36 //-----------------------------------------------------------------------------
37 // wxListBox
38 //-----------------------------------------------------------------------------
39
40 class wxListBox: public wxControl
41 {
42 DECLARE_DYNAMIC_CLASS(wxListBox)
43
44 public:
45
46 wxListBox(void);
47 wxListBox( wxWindow *parent, wxWindowID id,
48 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
49 const int n = 0, const wxString choices[] = NULL,
50 const long style = 0, const wxString &name = wxListBoxNameStr );
51 bool Create( wxWindow *parent, wxWindowID id,
52 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
53 const int n = 0, const wxString choices[] = NULL,
54 const long style = 0, const wxString &name = wxListBoxNameStr );
55 void Append( const wxString &item );
56 void Append( const wxString &item, char *clientData );
57 void Clear(void);
58 void Delete( int n );
59 void Deselect( int n );
60 int FindString( const wxString &item ) const;
61 char *GetClientData( const int n ) const;
62 int GetSelection(void) const;
63 int GetSelections( class wxArrayInt &) const;
64 wxString GetString( int n ) const;
65 wxString GetStringSelection(void) const;
66 int Number(void);
67 bool Selected( const int n );
68 void Set( const int n, const wxString *choices );
69 void SetClientData( const int n, char *clientData );
70 void SetFirstItem( int n );
71 void SetFirstItem( const wxString &item );
72 void SetSelection( const int n, const bool select = TRUE );
73 void SetString( const int n, const wxString &string );
74 void SetStringSelection( const wxString &string, const bool select = TRUE );
75
76 private:
77
78 GtkList *m_list;
79
80 public:
81
82 int GetIndex( GtkWidget *item ) const;
83 };
84
85 #endif // __GTKLISTBOXH__