]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/listbox.h
added printing
[wxWidgets.git] / include / wx / gtk1 / listbox.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: listbox.h
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// Id:
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11
12#ifndef __GTKLISTBOXH__
13#define __GTKLISTBOXH__
14
15#ifdef __GNUG__
16#pragma interface
17#endif
18
19#include "wx/defs.h"
20#include "wx/object.h"
21#include "wx/list.h"
22#include "wx/control.h"
23
24//-----------------------------------------------------------------------------
25// classes
26//-----------------------------------------------------------------------------
27
28class wxListBox;
a3622daa 29class wxArrayInt;
c801d85f
KB
30
31//-----------------------------------------------------------------------------
32// global data
33//-----------------------------------------------------------------------------
34
35extern const char *wxListBoxNameStr;
36
37//-----------------------------------------------------------------------------
38// wxListBox
39//-----------------------------------------------------------------------------
40
41class wxListBox: public wxControl
42{
43 DECLARE_DYNAMIC_CLASS(wxListBox)
44
45 public:
46
47 wxListBox(void);
48 wxListBox( wxWindow *parent, wxWindowID id,
49 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
debe6624
JS
50 int n = 0, const wxString choices[] = NULL,
51 long style = 0, const wxString &name = wxListBoxNameStr );
52 bool Create( wxWindow *parent, wxWindowID id,
c801d85f 53 const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
debe6624
JS
54 int n = 0, const wxString choices[] = NULL,
55 long style = 0, const wxString &name = wxListBoxNameStr );
c801d85f
KB
56 void Append( const wxString &item );
57 void Append( const wxString &item, char *clientData );
58 void Clear(void);
59 void Delete( int n );
60 void Deselect( int n );
61 int FindString( const wxString &item ) const;
debe6624 62 char *GetClientData( int n ) const;
c801d85f 63 int GetSelection(void) const;
f5bf3b95 64 int GetSelections( class wxArrayInt &) const;
c801d85f
KB
65 wxString GetString( int n ) const;
66 wxString GetStringSelection(void) const;
67 int Number(void);
debe6624
JS
68 bool Selected( int n );
69 void Set( int n, const wxString *choices );
70 void SetClientData( int n, char *clientData );
c801d85f
KB
71 void SetFirstItem( int n );
72 void SetFirstItem( const wxString &item );
debe6624
JS
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 );
76
30dea054 77 virtual GtkWidget *GetConnectWidget(void);
e3e65dac 78
c801d85f
KB
79 private:
80
81 GtkList *m_list;
e2414cbe 82 wxList m_clientData;
c801d85f
KB
83
84 public:
85
86 int GetIndex( GtkWidget *item ) const;
87};
88
89#endif // __GTKLISTBOXH__