]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/combobox.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling
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
)
46 inline wxComboBox() {}
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
);
59 bool Create(wxWindow
*parent
, wxWindowID id
,
60 const wxString
& value
= wxEmptyString
,
61 const wxPoint
& pos
= wxDefaultPosition
,
62 const wxSize
& size
= wxDefaultSize
,
63 int n
= 0, const wxString choices
[] = (const wxString
*) NULL
,
65 const wxValidator
& validator
= wxDefaultValidator
,
66 const wxString
& name
= wxComboBoxNameStr
);
68 void Append( const wxString
&item
);
69 void Append( const wxString
&item
, void* clientData
);
70 void Append( const wxString
&item
, wxClientData
* clientData
);
72 void SetClientData( int n
, void* clientData
);
73 void* GetClientData( int n
);
74 void SetClientObject( int n
, wxClientData
* clientData
);
75 wxClientData
* GetClientObject( int n
);
80 int FindString( const wxString
&item
);
81 int GetSelection() const;
82 wxString
GetString( int n
) const;
83 wxString
GetStringSelection() const;
85 void SetSelection( int n
);
86 void SetStringSelection( const wxString
&string
);
88 wxString
GetValue() const;
89 void SetValue(const wxString
& value
);
94 void SetInsertionPoint( long pos
);
95 void SetInsertionPointEnd();
96 long GetInsertionPoint() const;
97 long GetLastPosition() const;
98 void Replace( long from
, long to
, const wxString
& value
);
99 void Remove( long from
, long to
);
100 void SetSelection( long from
, long to
);
101 void SetEditable( bool editable
);
103 void OnSize( wxSizeEvent
&event
);
108 wxList m_clientDataList
;
110 void AppendCommon( const wxString
&item
);
111 GtkWidget
* GetConnectWidget();
112 bool IsOwnGtkWindow( GdkWindow
*window
);
113 void ApplyWidgetStyle();
115 DECLARE_EVENT_TABLE()
118 #endif // __GTKCOMBOBOXH__