]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/listbox.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKLISTBOXH__
12 #define __GTKLISTBOXH__
19 #include "wx/object.h"
21 #include "wx/control.h"
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
34 extern const char *wxListBoxNameStr
;
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class wxListBox
: public wxControl
42 DECLARE_DYNAMIC_CLASS(wxListBox
)
47 inline wxListBox( wxWindow
*parent
, wxWindowID id
,
48 const wxPoint
& pos
= wxDefaultPosition
,
49 const wxSize
& size
= wxDefaultSize
,
50 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
52 const wxValidator
& validator
= wxDefaultValidator
,
53 const wxString
& name
= wxListBoxNameStr
)
55 Create(parent
, id
, pos
, size
, n
, choices
, style
, validator
, name
);
57 bool Create( wxWindow
*parent
, wxWindowID id
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
,
60 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
62 const wxValidator
& validator
= wxDefaultValidator
,
63 const wxString
& name
= wxListBoxNameStr
);
64 void Append( const wxString
&item
);
65 void Append( const wxString
&item
, char *clientData
);
68 void Deselect( int n
);
69 int FindString( const wxString
&item
) const;
70 char *GetClientData( int n
) const;
71 int GetSelection(void) const;
72 int GetSelections( class wxArrayInt
&) const;
73 wxString
GetString( int n
) const;
74 wxString
GetStringSelection(void) const;
76 bool Selected( int n
);
77 void Set( int n
, const wxString
*choices
);
78 void SetClientData( int n
, char *clientData
);
79 void SetFirstItem( int n
);
80 void SetFirstItem( const wxString
&item
);
81 void SetSelection( int n
, bool select
= TRUE
);
82 void SetString( int n
, const wxString
&string
);
83 void SetStringSelection( const wxString
&string
, bool select
= TRUE
);
85 void SetDropTarget( wxDropTarget
*dropTarget
);
89 int GetIndex( GtkWidget
*item
) const;
90 GtkWidget
*GetConnectWidget(void);
91 bool IsOwnGtkWindow( GdkWindow
*window
);
92 void ApplyWidgetStyle();
99 #endif // __GTKLISTBOXH__