]>
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 inline wxListBox( wxWindow
*parent
, wxWindowID id
,
49 const wxPoint
& pos
= wxDefaultPosition
,
50 const wxSize
& size
= wxDefaultSize
,
51 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
53 const wxValidator
& validator
= wxDefaultValidator
,
54 const wxString
& name
= wxListBoxNameStr
)
56 Create(parent
, id
, pos
, size
, n
, choices
, style
, validator
, name
);
58 bool Create( wxWindow
*parent
, wxWindowID id
,
59 const wxPoint
& pos
= wxDefaultPosition
,
60 const wxSize
& size
= wxDefaultSize
,
61 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
63 const wxValidator
& validator
= wxDefaultValidator
,
64 const wxString
& name
= wxListBoxNameStr
);
65 void Append( const wxString
&item
);
66 void Append( const wxString
&item
, char *clientData
);
69 void Deselect( int n
);
70 int FindString( const wxString
&item
) const;
71 char *GetClientData( int n
) const;
72 int GetSelection(void) const;
73 int GetSelections( class wxArrayInt
&) const;
74 wxString
GetString( int n
) const;
75 wxString
GetStringSelection(void) const;
77 bool Selected( int n
);
78 void Set( int n
, const wxString
*choices
);
79 void SetClientData( int n
, char *clientData
);
80 void SetFirstItem( int n
);
81 void SetFirstItem( const wxString
&item
);
82 void SetSelection( int n
, bool select
= TRUE
);
83 void SetString( int n
, const wxString
&string
);
84 void SetStringSelection( const wxString
&string
, bool select
= TRUE
);
86 void SetFont( const wxFont
&font
);
87 void SetDropTarget( wxDropTarget
*dropTarget
);
88 virtual void SetBackgroundColour(const wxColour
&colour
);
92 int GetIndex( GtkWidget
*item
) const;
93 GtkWidget
*GetConnectWidget(void);
94 bool IsOwnGtkWindow( GdkWindow
*window
);
103 #endif // __GTKLISTBOXH__