X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..03f38c58fdd36b1e951dfed81b245a7337bbc3b4:/include/wx/gtk/listbox.h diff --git a/include/wx/gtk/listbox.h b/include/wx/gtk/listbox.h index 081570556e..ade4af225a 100644 --- a/include/wx/gtk/listbox.h +++ b/include/wx/gtk/listbox.h @@ -26,6 +26,7 @@ //----------------------------------------------------------------------------- class wxListBox; +class wxArrayInt; //----------------------------------------------------------------------------- // global data @@ -44,42 +45,58 @@ class wxListBox: public wxControl public: wxListBox(void); - wxListBox( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, const wxString &name = wxListBoxNameStr ); - bool Create( wxWindow *parent, wxWindowID id, - const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - const int n = 0, const wxString choices[] = NULL, - const long style = 0, const wxString &name = wxListBoxNameStr ); + inline wxListBox( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr ) + { + Create(parent, id, pos, size, n, choices, style, validator, name); + } + bool Create( wxWindow *parent, wxWindowID id, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + int n = 0, const wxString choices[] = (const wxString *) NULL, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxListBoxNameStr ); void Append( const wxString &item ); void Append( const wxString &item, char *clientData ); void Clear(void); void Delete( int n ); void Deselect( int n ); int FindString( const wxString &item ) const; - char *GetClientData( const int n ) const; + char *GetClientData( int n ) const; int GetSelection(void) const; - int GetSelections( int **selections ) const; + int GetSelections( class wxArrayInt &) const; wxString GetString( int n ) const; wxString GetStringSelection(void) const; int Number(void); - bool Selected( const int n ); - void Set( const int n, const wxString *choices ); - void SetClientData( const int n, char *clientData ); + bool Selected( int n ); + void Set( int n, const wxString *choices ); + void SetClientData( int n, char *clientData ); void SetFirstItem( int n ); void SetFirstItem( const wxString &item ); - void SetSelection( const int n, const bool select = TRUE ); - void SetString( const int n, const wxString &string ); - void SetStringSelection( const wxString &string, const bool select = TRUE ); + void SetSelection( int n, bool select = TRUE ); + void SetString( int n, const wxString &string ); + void SetStringSelection( const wxString &string, bool select = TRUE ); + + void SetFont( const wxFont &font ); + void SetDropTarget( wxDropTarget *dropTarget ); + + // implementation + + int GetIndex( GtkWidget *item ) const; + GtkWidget *GetConnectWidget(void); + bool IsOwnGtkWindow( GdkWindow *window ); private: GtkList *m_list; + wxList m_clientData; - public: - - int GetIndex( GtkWidget *item ) const; }; #endif // __GTKLISTBOXH__