]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/combobox.h
Notebook, Listbox, and Checklst updates
[wxWidgets.git] / include / wx / msw / combobox.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
f6bcfd97 2// Name: wx/msw/combobox.h
2bda0e17
KB
3// Purpose: wxComboBox class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
4438caf4 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_COMBOBOX_H_
13#define _WX_COMBOBOX_H_
2bda0e17
KB
14
15#ifdef __GNUG__
4438caf4 16 #pragma interface "combobox.h"
2bda0e17
KB
17#endif
18
19#include "wx/choice.h"
20
47d67540 21#if wxUSE_COMBOBOX
2bda0e17 22
39ca6d79 23WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
2bda0e17 24
4438caf4
VZ
25// ----------------------------------------------------------------------------
26// Combobox control
27// ----------------------------------------------------------------------------
28
2bda0e17
KB
29class WXDLLEXPORT wxComboBox: public wxChoice
30{
4438caf4
VZ
31 DECLARE_DYNAMIC_CLASS(wxComboBox)
32
33public:
34 wxComboBox() { }
35
36 wxComboBox(wxWindow *parent, wxWindowID id,
37 const wxString& value = wxEmptyString,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 int n = 0, const wxString choices[] = NULL,
41 long style = 0,
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxComboBoxNameStr)
44 {
45 Create(parent, id, value, pos, size, n, choices, style, validator, name);
46 }
47
f6bcfd97
BP
48 bool Create(wxWindow *parent,
49 wxWindowID id,
50 const wxString& value = wxEmptyString,
51 const wxPoint& pos = wxDefaultPosition,
52 const wxSize& size = wxDefaultSize,
53 int n = 0,
54 const wxString choices[] = NULL,
55 long style = 0,
56 const wxValidator& validator = wxDefaultValidator,
57 const wxString& name = wxComboBoxNameStr);
4438caf4
VZ
58
59 // List functions: see wxChoice
60
61 // Text field functions
62 wxString GetValue() const { return GetLabel(); }
63 virtual void SetValue(const wxString& value);
64
65 // Clipboard operations
66 virtual void Copy();
67 virtual void Cut();
68 virtual void Paste();
69 virtual void SetInsertionPoint(long pos);
70 virtual void SetInsertionPointEnd();
71 virtual long GetInsertionPoint() const;
72 virtual long GetLastPosition() const;
73 virtual void Replace(long from, long to, const wxString& value);
74 virtual void Remove(long from, long to);
75 virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
76 virtual void SetSelection(long from, long to);
77 virtual void SetEditable(bool editable);
78
f6bcfd97 79 // implementation only from now on
4438caf4 80 virtual bool MSWCommand(WXUINT param, WXWORD id);
f6bcfd97
BP
81 bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
82 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
83 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
84
85 WXHWND GetEditHWND() const;
2bda0e17
KB
86};
87
47d67540 88#endif // wxUSE_COMBOBOX
2bda0e17 89#endif
bbcdf8bc 90 // _WX_COMBOBOX_H_