]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/combobox.h
Applied patch [ 837515 ] wxIPaddress + docs patch
[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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
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 public:
30 wxComboBox();
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,
39 const wxString& name = wxComboBoxNameStr);
40
41 bool Create(wxWindow *parent,
42 wxWindowID id,
43 const wxString& value = wxEmptyString,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 int n = 0,
47 const wxString choices[] = NULL,
48 long style = 0,
49 const wxValidator& validator = wxDefaultValidator,
50 const wxString& name = wxComboBoxNameStr);
51
52 // List functions: see wxChoice
53
54 // Text field functions
55 wxString GetValue() const { return GetLabel(); }
56 virtual void SetValue(const wxString& value);
57
58 // Clipboard operations
59 virtual void Copy();
60 virtual void Cut();
61 virtual void Paste();
62 virtual void SetInsertionPoint(long pos);
63 virtual void SetInsertionPointEnd();
64 virtual long GetInsertionPoint() const;
65 virtual long GetLastPosition() const;
66 virtual void Replace(long from, long to, const wxString& value);
67 virtual void Remove(long from, long to);
68 virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
69 virtual void SetSelection(long from, long to);
70 virtual void SetEditable(bool editable);
71
72 // implementation only from now on
73 virtual bool MSWCommand(WXUINT param, WXWORD id);
74 bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
75 virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
76 WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
77
78 WXHWND GetEditHWND() const;
79
80 private:
81 DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox)
82 };
83
84 #endif // wxUSE_COMBOBOX
85 #endif
86 // _WX_COMBOBOX_H_