]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/combobox.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKCOMBOBOXH__
13 #define __GTKCOMBOBOXH__
16 #pragma interface "combobox.h"
20 #include "wx/object.h"
21 #include "wx/control.h"
23 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 extern const char* wxComboBoxNameStr
;
34 extern const char* wxEmptyString
;
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class wxComboBox
: public wxControl
42 DECLARE_DYNAMIC_CLASS(wxComboBox
)
45 inline wxComboBox(void) {}
47 inline wxComboBox(wxWindow
*parent
, wxWindowID id
,
48 const wxString
& value
= wxEmptyString
,
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
= wxComboBoxNameStr
)
56 Create(parent
, id
, value
, pos
, size
, n
, choices
, style
, validator
, name
);
58 bool Create(wxWindow
*parent
, wxWindowID id
,
59 const wxString
& value
= wxEmptyString
,
60 const wxPoint
& pos
= wxDefaultPosition
,
61 const wxSize
& size
= wxDefaultSize
,
62 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
64 const wxValidator
& validator
= wxDefaultValidator
,
65 const wxString
& name
= wxComboBoxNameStr
);
68 void Append( const wxString
&item
);
69 void Append( const wxString
&item
, char* clientData
);
71 int FindString( const wxString
&item
);
72 char* GetClientData( int n
);
73 void SetClientData( int n
, char * clientData
);
74 int GetSelection(void) const;
75 wxString
GetString( int n
) const;
76 wxString
GetStringSelection(void) const;
77 int Number(void) const;
78 void SetSelection( int n
);
79 void SetStringSelection( const wxString
&string
);
81 wxString
GetValue(void) const ;
82 void SetValue(const wxString
& value
);
87 void SetInsertionPoint(long pos
);
88 void SetInsertionPointEnd(void);
89 long GetInsertionPoint(void) const ;
90 long GetLastPosition(void) const ;
91 void Replace(long from
, long to
, const wxString
& value
);
92 void Remove(long from
, long to
);
93 void SetSelection(long from
, long to
);
94 void SetEditable(bool editable
);
96 void SetFont( const wxFont
&font
);
97 void OnSize( wxSizeEvent
&event
);
98 void SetBackgroundColour( const wxColour
&colour
);
108 GtkWidget
* GetConnectWidget(void);
109 bool IsOwnGtkWindow( GdkWindow
*window
);
111 DECLARE_EVENT_TABLE()
114 #endif // __GTKCOMBOBOXH__