]>
git.saurik.com Git - wxWidgets.git/blob - contrib/samples/applet/combobox.h
1 /****************************************************************************
3 * wxWindows HTML Applet Package
5 * Copyright (C) 1991-2001 SciTech Software, Inc.
8 * ========================================================================
10 * The contents of this file are subject to the wxWindows License
11 * Version 3.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.wxwindows.org/licence3.txt
15 * Software distributed under the License is distributed on an
16 * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
17 * implied. See the License for the specific language governing
18 * rights and limitations under the License.
20 * ========================================================================
25 * Description: Combobox wrapper. This header file defines the custom
26 * combo boxes used for this sample program.
28 ****************************************************************************/
33 /*--------------------------- Class Definitions ---------------------------*/
35 /****************************************************************************
37 Defines a Custom ComboBox. This combobox is a portable implementation of
38 the msw combobox control. It is made of the wxWindows textctrl primitive and
39 the listbox primitive. This object does not create or display the controls,
40 it provides the relationship and underlying behavior layer for the primitives
41 allready created via wxDesigner.
42 ****************************************************************************/
49 wxTextCtrl
*m_TextCtrl
;
53 ComboBox(wxWindow
*parent
, int,int);
55 // Returns the id of the listbox: listBoxId.
58 // Inserts: Used to insert items into the listbox
59 void Insert(const wxString
& item
, int pos
);
60 void Insert(const wxString
& item
, int pos
, void *clientData
);
61 void Insert(const wxString
& item
, int pos
, wxClientData
*clientData
);
62 void InsertItems(int nItems
, const wxString
*items
, int pos
);
63 void InsertItems(const wxArrayString
& items
, int pos
);
65 // Sets: Used to set items in the combo box
66 void Set(int n
, const wxString
* items
, void **clientData
);
67 void Set(const wxArrayString
& items
, void **clientData
);
68 int FindString(const wxString
&s
);
70 // Selections: Used to get/de/select items in the listbox
74 wxString
GetStringSelection();
75 bool SetStringSelection(const wxString
& s
, bool select
);
77 // Set the specified item at the first visible item or scroll to max
79 void SetFirstItem(int n
);
80 void SetFirstItem(const wxString
& s
);
82 // Append items to the listbox
83 void Append(const wxString
& item
);
84 void Append(const wxString
& item
, void *clientData
);
85 void Append(const wxString
& item
, wxClientData
*clientData
);
87 // Deleting items from the list box
91 // OnChange event function (called from SDD dialog box code, see: dialog.h) Mimic
92 // msw combobox behavior: Click on listbox item it shows in textbox.
93 void OnChange(wxCommandEvent
&event
);
96 #endif // __COMBOBOX_H