]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/combobox.h
Allow wxStaticText to have a custom fg without a custom bg
[wxWidgets.git] / include / wx / palmos / combobox.h
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e1d63b79 2// Name: wx/palmos/combobox.h
ffecfa5a 3// Purpose: wxComboBox class
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
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
27class WXDLLEXPORT wxComboBox: public wxChoice
28{
29public:
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 Create(parent, id, value, pos, size, n, choices, style, validator, name);
42 }
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 }
54
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);
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);
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;
7d8268a1 88 virtual wxTextPos GetLastPosition() const;
ffecfa5a
JS
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);
150e31d2
JS
94 virtual bool IsEditable() const;
95
96 virtual void Undo();
97 virtual void Redo();
98 virtual void SelectAll();
99
100 virtual bool CanCopy() const;
101 virtual bool CanCut() const;
102 virtual bool CanPaste() const;
103 virtual bool CanUndo() const;
104 virtual bool CanRedo() const;
ffecfa5a
JS
105
106 // implementation only from now on
107 virtual bool MSWCommand(WXUINT param, WXWORD id);
108 bool MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam);
109 virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
110
ffecfa5a
JS
111 WXHWND GetEditHWND() const;
112
113protected:
114 virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
115
116private:
117 DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox)
118};
119
120#endif // wxUSE_COMBOBOX
121#endif
122 // _WX_COMBOBOX_H_