]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/combobox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/combobox.h
3 // Purpose: wxComboBox class
4 // Author: William Osborne
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_COMBOBOX_H_
13 #define _WX_COMBOBOX_H_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "combobox.h"
19 #include "wx/choice.h"
23 // ----------------------------------------------------------------------------
25 // ----------------------------------------------------------------------------
27 class WXDLLEXPORT wxComboBox
: public wxChoice
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
,
38 const wxValidator
& validator
= wxDefaultValidator
,
39 const wxString
& name
= wxComboBoxNameStr
)
41 Create(parent
, id
, value
, pos
, size
, n
, choices
, style
, validator
, name
);
43 wxComboBox(wxWindow
*parent
, wxWindowID id
,
44 const wxString
& value
,
47 const wxArrayString
& choices
,
49 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxComboBoxNameStr
)
52 Create(parent
, id
, value
, pos
, size
, choices
, style
, validator
, name
);
55 bool Create(wxWindow
*parent
,
57 const wxString
& value
= wxEmptyString
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
,
61 const wxString choices
[] = NULL
,
63 const wxValidator
& validator
= wxDefaultValidator
,
64 const wxString
& name
= wxComboBoxNameStr
);
65 bool Create(wxWindow
*parent
,
67 const wxString
& value
,
70 const wxArrayString
& choices
,
72 const wxValidator
& validator
= wxDefaultValidator
,
73 const wxString
& name
= wxComboBoxNameStr
);
75 // List functions: see wxChoice
77 // Text field functions
78 wxString
GetValue() const { return GetLabel(); }
79 virtual void SetValue(const wxString
& value
);
81 // Clipboard operations
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 virtual bool IsEditable() const;
98 virtual void SelectAll();
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;
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
);
111 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
112 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
114 WXHWND
GetEditHWND() const;
117 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const;
120 DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox
)
123 #endif // wxUSE_COMBOBOX