]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/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 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
34 extern const char *wxListBoxNameStr
;
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class wxListBox
: public wxControl
42 DECLARE_DYNAMIC_CLASS(wxListBox
)
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
);
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;
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
);
82 int GetIndex( GtkWidget
*item
) const;
85 #endif // __GTKLISTBOXH__