]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/listbox.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKLISTBOXH__
13 #define __GTKLISTBOXH__
20 #include "wx/object.h"
22 #include "wx/control.h"
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 extern const char *wxListBoxNameStr
;
37 //-----------------------------------------------------------------------------
39 //-----------------------------------------------------------------------------
41 class wxListBox
: public wxControl
43 DECLARE_DYNAMIC_CLASS(wxListBox
)
48 wxListBox( wxWindow
*parent
, wxWindowID id
,
49 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
50 int n
= 0, const wxString choices
[] = NULL
,
51 long style
= 0, const wxString
&name
= wxListBoxNameStr
);
52 bool Create( wxWindow
*parent
, wxWindowID id
,
53 const wxPoint
&pos
= wxDefaultPosition
, const wxSize
&size
= wxDefaultSize
,
54 int n
= 0, const wxString choices
[] = NULL
,
55 long style
= 0, const wxString
&name
= wxListBoxNameStr
);
56 void Append( const wxString
&item
);
57 void Append( const wxString
&item
, char *clientData
);
60 void Deselect( int n
);
61 int FindString( const wxString
&item
) const;
62 char *GetClientData( int n
) const;
63 int GetSelection(void) const;
64 int GetSelections( class wxArrayInt
&) const;
65 wxString
GetString( int n
) const;
66 wxString
GetStringSelection(void) const;
68 bool Selected( int n
);
69 void Set( int n
, const wxString
*choices
);
70 void SetClientData( int n
, char *clientData
);
71 void SetFirstItem( int n
);
72 void SetFirstItem( const wxString
&item
);
73 void SetSelection( int n
, bool select
= TRUE
);
74 void SetString( int n
, const wxString
&string
);
75 void SetStringSelection( const wxString
&string
, bool select
= TRUE
);
77 virtual GtkWidget
*GetConnectWidget(void);
86 int GetIndex( GtkWidget
*item
) const;
89 #endif // __GTKLISTBOXH__