]>
git.saurik.com Git - wxWidgets.git/blob - contrib/samples/applet/combobox.h
1 /****************************************************************************
3 * wxWindows HTML Applet Package
5 * ========================================================================
7 * The contents of this file are subject to the wxWindows licence; you
8 * may not use this file except in compliance with the License. You may
9 * obtain a copy of the License at http://www.wxwindows.org/licence.htm
11 * Software distributed under the License is distributed on an
12 * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
13 * implied. See the License for the specific language governing
14 * rights and limitations under the License.
16 * The Original Code is Copyright (C) 2001 SciTech Software, Inc.
18 * The Initial Developer of the Original Code is SciTech Software, Inc.
19 * All Rights Reserved.
21 * ========================================================================
26 * Description: Combobox wrapper. This header file defines the custom
27 * combo boxes used for this sample program.
29 ****************************************************************************/
34 /*--------------------------- Class Definitions ---------------------------*/
36 /****************************************************************************
38 Defines a Custom ComboBox. This combobox is a portable implementation of
39 the msw combobox control. It is made of the wxWindows textctrl primitive and
40 the listbox primitive. This object does not create or display the controls,
41 it provides the relationship and underlying behavior layer for the primitives
42 allready created via wxDesigner.
43 ****************************************************************************/
50 wxTextCtrl
*m_TextCtrl
;
54 ComboBox(wxWindow
*parent
, int,int);
56 // Returns the id of the listbox: listBoxId.
59 // Inserts: Used to insert items into the listbox
60 void Insert(const wxString
& item
, int pos
);
61 void Insert(const wxString
& item
, int pos
, void *clientData
);
62 void Insert(const wxString
& item
, int pos
, wxClientData
*clientData
);
63 void InsertItems(int nItems
, const wxString
*items
, int pos
);
64 void InsertItems(const wxArrayString
& items
, int pos
);
66 // Sets: Used to set items in the combo box
67 void Set(int n
, const wxString
* items
, void **clientData
);
68 void Set(const wxArrayString
& items
, void **clientData
);
69 int FindString(const wxString
&s
);
71 // Selections: Used to get/de/select items in the listbox
75 wxString
GetStringSelection();
76 bool SetStringSelection(const wxString
& s
, bool select
);
78 // Set the specified item at the first visible item or scroll to max
80 void SetFirstItem(int n
);
81 void SetFirstItem(const wxString
& s
);
83 // Append items to the listbox
84 void Append(const wxString
& item
);
85 void Append(const wxString
& item
, void *clientData
);
86 void Append(const wxString
& item
, wxClientData
*clientData
);
88 // Deleting items from the list box
92 // OnChange event function (called from SDD dialog box code, see: dialog.h) Mimic
93 // msw combobox behavior: Click on listbox item it shows in textbox.
94 void OnChange(wxCommandEvent
&event
);
97 #endif // __COMBOBOX_H