]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/combobox.h
Added missing "const" for operator== and operator!=.
[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 14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
4438caf4 16 #pragma interface "combobox.h"
2bda0e17
KB
17#endif
18
19#include "wx/choice.h"
20
47d67540 21#if wxUSE_COMBOBOX
2bda0e17 22
4438caf4
VZ
23// ----------------------------------------------------------------------------
24// Combobox control
25// ----------------------------------------------------------------------------
26
2bda0e17
KB
27class WXDLLEXPORT wxComboBox: public wxChoice
28{
4438caf4 29public:
6463b9f5 30 wxComboBox() { }
4438caf4
VZ
31
32 wxComboBox(wxWindow *parent, wxWindowID id,
33 const wxString& value = wxEmptyString,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 int n = 0, const wxString choices[] = NULL,
37 long style = 0,
38 const wxValidator& validator = wxDefaultValidator,
6463b9f5
JS
39 const wxString& name = wxComboBoxNameStr)
40 {
41 Create(parent, id, value, pos, size, n, choices, style, validator, name);
42 }
584ad2a3
MB
43 wxComboBox(wxWindow *parent, wxWindowID id,
44 const wxString& value,
45 const wxPoint& pos,
46 const wxSize& size,
47 const wxArrayString& choices,
48 long style = 0,
49 const wxValidator& validator = wxDefaultValidator,
50 const wxString& name = wxComboBoxNameStr)
51 {
52 Create(parent, id, value, pos, size, choices, style, validator, name);
53 }
4438caf4 54
f6bcfd97
BP
55 bool Create(wxWindow *parent,
56 wxWindowID id,
57 const wxString& value = wxEmptyString,
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize,
60 int n = 0,
61 const wxString choices[] = NULL,
62 long style = 0,
63 const wxValidator& validator = wxDefaultValidator,
64 const wxString& name = wxComboBoxNameStr);
584ad2a3
MB
65 bool Create(wxWindow *parent,
66 wxWindowID id,
67 const wxString& value,
68 const wxPoint& pos,
69 const wxSize& size,
70 const wxArrayString& choices,
71 long style = 0,
72 const wxValidator& validator = wxDefaultValidator,
73 const wxString& name = wxComboBoxNameStr);
4438caf4
VZ
74
75 // List functions: see wxChoice
76
77 // Text field functions
78 wxString GetValue() const { return GetLabel(); }
79 virtual void SetValue(const wxString& value);
80
81 // Clipboard operations
82 virtual void Copy();
83 virtual void Cut();
84 virtual void Paste();
85 virtual void SetInsertionPoint(long pos);
86 virtual void SetInsertionPointEnd();
87 virtual long GetInsertionPoint() const;
88 virtual long GetLastPosition() const;
89 virtual void Replace(long from, long to, const wxString& value);
90 virtual void Remove(long from, long to);
91 virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
92 virtual void SetSelection(long from, long to);
93 virtual void SetEditable(bool editable);
94
f6bcfd97 95 // implementation only from now on
4438caf4 96 virtual bool MSWCommand(WXUINT param, WXWORD id);
f6bcfd97 97 bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
c140b7e7 98 virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
3a7d5f7c 99
f6bcfd97
BP
100 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
101 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
102
103 WXHWND GetEditHWND() const;
fc7a2a60 104
71e57cd6
VZ
105protected:
106 virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
107
fc7a2a60
VZ
108private:
109 DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox)
2bda0e17
KB
110};
111
47d67540 112#endif // wxUSE_COMBOBOX
2bda0e17 113#endif
bbcdf8bc 114 // _WX_COMBOBOX_H_