]> git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/combobox.h
Don't require skipping "page changed" event in wxMSW wxNotebook.
[wxWidgets.git] / include / wx / palmos / combobox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/combobox.h
3 // Purpose: wxComboBox class
4 // Author: William Osborne - minimal working wxPalmOS port
5 // Modified by:
6 // Created: 10/13/04
7 // RCS-ID: $Id$
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_COMBOBOX_H_
13 #define _WX_COMBOBOX_H_
14
15 #include "wx/choice.h"
16
17 #if wxUSE_COMBOBOX
18
19 // ----------------------------------------------------------------------------
20 // Combobox control
21 // ----------------------------------------------------------------------------
22
23 class WXDLLIMPEXP_CORE wxComboBox: public wxChoice
24 {
25 public:
26 wxComboBox() { }
27
28 wxComboBox(wxWindow *parent, wxWindowID id,
29 const wxString& value = wxEmptyString,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 int n = 0, const wxString choices[] = NULL,
33 long style = 0,
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxComboBoxNameStr)
36 {
37 Create(parent, id, value, pos, size, n, choices, style, validator, name);
38 }
39 wxComboBox(wxWindow *parent, wxWindowID id,
40 const wxString& value,
41 const wxPoint& pos,
42 const wxSize& size,
43 const wxArrayString& choices,
44 long style = 0,
45 const wxValidator& validator = wxDefaultValidator,
46 const wxString& name = wxComboBoxNameStr)
47 {
48 Create(parent, id, value, pos, size, choices, style, validator, name);
49 }
50
51 bool Create(wxWindow *parent,
52 wxWindowID id,
53 const wxString& value = wxEmptyString,
54 const wxPoint& pos = wxDefaultPosition,
55 const wxSize& size = wxDefaultSize,
56 int n = 0,
57 const wxString choices[] = NULL,
58 long style = 0,
59 const wxValidator& validator = wxDefaultValidator,
60 const wxString& name = wxComboBoxNameStr);
61 bool Create(wxWindow *parent,
62 wxWindowID id,
63 const wxString& value,
64 const wxPoint& pos,
65 const wxSize& size,
66 const wxArrayString& choices,
67 long style = 0,
68 const wxValidator& validator = wxDefaultValidator,
69 const wxString& name = wxComboBoxNameStr);
70
71 // List functions: see wxChoice
72
73 // Text field functions
74 wxString GetValue() const { return GetLabel(); }
75 virtual void SetValue(const wxString& value);
76
77 // Clipboard operations
78 virtual void Copy();
79 virtual void Cut();
80 virtual void Paste();
81 virtual void SetInsertionPoint(long pos);
82 virtual void SetInsertionPointEnd();
83 virtual long GetInsertionPoint() const;
84 virtual wxTextPos GetLastPosition() const;
85 virtual void Replace(long from, long to, const wxString& value);
86 virtual void Remove(long from, long to);
87 virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
88 virtual void SetSelection(long from, long to);
89 virtual void SetEditable(bool editable);
90 virtual bool IsEditable() const;
91
92 virtual void Undo();
93 virtual void Redo();
94 virtual void SelectAll();
95
96 virtual bool CanCopy() const;
97 virtual bool CanCut() const;
98 virtual bool CanPaste() const;
99 virtual bool CanUndo() const;
100 virtual bool CanRedo() const;
101
102 // implementation only from now on
103 virtual bool MSWCommand(WXUINT param, WXWORD id);
104 bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
105 virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
106
107 WXHWND GetEditHWND() const;
108
109 protected:
110 virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
111
112 private:
113 DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox)
114 };
115
116 #endif // wxUSE_COMBOBOX
117 #endif
118 // _WX_COMBOBOX_H_