]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/combobox.h
Fix off by 1 error in wxHTML font size from points calculation.
[wxWidgets.git] / include / wx / os2 / combobox.h
CommitLineData
0e320a79 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/os2/combobox.h
0e320a79 3// Purpose: wxComboBox class
37f214d5 4// Author: David Webster
0e320a79 5// Modified by:
37f214d5 6// Created: 10/13/99
0e320a79 7// RCS-ID: $Id$
37f214d5 8// Copyright: (c) David Webster
65571936 9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_COMBOBOX_H_
13#define _WX_COMBOBOX_H_
14
0e320a79 15#include "wx/choice.h"
72cb72bf 16#include "wx/textentry.h"
0e320a79 17
37f214d5
DW
18#if wxUSE_COMBOBOX
19
0e320a79 20// Combobox item
53a2db12 21class WXDLLIMPEXP_CORE wxComboBox : public wxChoice,
72cb72bf 22 public wxTextEntry
0e320a79 23{
0e320a79
DW
24
25 public:
26 inline wxComboBox() {}
27
fb49f3b3
DW
28 inline wxComboBox( wxWindow* pParent
29 ,wxWindowID vId
30 ,const wxString& rsValue = wxEmptyString
31 ,const wxPoint& rPos = wxDefaultPosition
32 ,const wxSize& rSize = wxDefaultSize
33 ,int n = 0
34 ,const wxString asChoices[] = NULL
35 ,long lStyle = 0
fb49f3b3 36 ,const wxValidator& rValidator = wxDefaultValidator
fb49f3b3
DW
37 ,const wxString& rsName = wxComboBoxNameStr
38 )
39 {
40 Create( pParent
41 ,vId
42 ,rsValue
43 ,rPos
44 ,rSize
45 ,n
46 ,asChoices
47 ,lStyle
fb49f3b3 48 ,rValidator
fb49f3b3
DW
49 ,rsName
50 );
51 }
0e320a79 52
584ad2a3
MB
53 inline wxComboBox( wxWindow* pParent
54 ,wxWindowID vId
55 ,const wxString& rsValue
56 ,const wxPoint& rPos
57 ,const wxSize& rSize
58 ,const wxArrayString& asChoices
59 ,long lStyle = 0
60 ,const wxValidator& rValidator = wxDefaultValidator
61 ,const wxString& rsName = wxComboBoxNameStr
62 )
63 {
64 Create( pParent
65 ,vId
66 ,rsValue
67 ,rPos
68 ,rSize
69 ,asChoices
70 ,lStyle
71 ,rValidator
72 ,rsName
73 );
74 }
75
fb49f3b3
DW
76 bool Create( wxWindow* pParent
77 ,wxWindowID vId
78 ,const wxString& rsValue = wxEmptyString
79 ,const wxPoint& rPos = wxDefaultPosition
80 ,const wxSize& rSize = wxDefaultSize
81 ,int n = 0
82 ,const wxString asChoices[] = NULL
83 ,long lStyle = 0
fb49f3b3 84 ,const wxValidator& rValidator = wxDefaultValidator
fb49f3b3
DW
85 ,const wxString& rsName = wxComboBoxNameStr
86 );
0e320a79 87
584ad2a3
MB
88 bool Create( wxWindow* pParent
89 ,wxWindowID vId
90 ,const wxString& rsValue
91 ,const wxPoint& rPos
92 ,const wxSize& rSize
93 ,const wxArrayString& asChoices
94 ,long lStyle = 0
95 ,const wxValidator& rValidator = wxDefaultValidator
96 ,const wxString& rsName = wxComboBoxNameStr
97 );
98
36a96421
VZ
99 // See wxComboBoxBase discussion of IsEmpty().
100 bool IsListEmpty() const { return wxItemContainer::IsEmpty(); }
101 bool IsTextEmpty() const { return wxTextEntry::IsEmpty(); }
102
72cb72bf
SN
103 // resolve ambiguities among virtual functions inherited from both base
104 // classes
105 virtual void Clear();
106 virtual wxString GetValue() const;
107 virtual void SetValue(const wxString& value);
108 virtual wxString GetStringSelection() const
109 { return wxChoice::GetStringSelection(); }
110
fb49f3b3 111 inline virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
72cb72bf
SN
112 virtual void SetSelection(long from, long to)
113 { wxTextEntry::SetSelection(from, to); }
114 virtual int GetSelection() const { return wxChoice::GetSelection(); }
115 virtual void GetSelection(long *from, long *to) const
116 { wxTextEntry::GetSelection(from, to); }
117
118 virtual bool IsEditable() const;
fb49f3b3
DW
119
120 virtual bool OS2Command( WXUINT uParam
121 ,WXWORD wId
122 );
123 bool ProcessEditMsg( WXUINT uMsg
124 ,WXWPARAM wParam
125 ,WXLPARAM lParam
126 );
0e320a79 127
fb49f3b3 128private:
63f7d502
VZ
129 // implement wxTextEntry pure virtual methods
130 virtual wxWindow *GetEditableWindow() { return this; }
72cb72bf
SN
131 virtual WXHWND GetEditHWND() const { return m_hWnd; }
132
fb49f3b3
DW
133 DECLARE_DYNAMIC_CLASS(wxComboBox)
134}; // end of CLASS wxComboBox
0e320a79 135
37f214d5 136#endif // wxUSE_COMBOBOX
0e320a79
DW
137#endif
138 // _WX_COMBOBOX_H_