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