]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/combobox.h
safe macro expansion
[wxWidgets.git] / include / wx / os2 / combobox.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: combobox.h
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
DW
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_COMBOBOX_H_
13#define _WX_COMBOBOX_H_
14
0e320a79
DW
15#include "wx/choice.h"
16
37f214d5
DW
17#if wxUSE_COMBOBOX
18
0e320a79
DW
19WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr;
20WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
21
22// Combobox item
23class WXDLLEXPORT wxComboBox: public wxChoice
24{
25 DECLARE_DYNAMIC_CLASS(wxComboBox)
26
27 public:
28 inline wxComboBox() {}
29
30 inline wxComboBox(wxWindow *parent, wxWindowID id,
31 const wxString& value = wxEmptyString,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 int n = 0, const wxString choices[] = NULL,
35 long style = 0,
57c4d796 36#if wxUSE_VALIDATORS
0e320a79 37 const wxValidator& validator = wxDefaultValidator,
57c4d796 38#endif
0e320a79
DW
39 const wxString& name = wxComboBoxNameStr)
40 {
41 Create(parent, id, value, pos, size, n, choices, style, validator, name);
42 }
43
44 bool Create(wxWindow *parent, wxWindowID id,
45 const wxString& value = wxEmptyString,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize,
48 int n = 0, const wxString choices[] = NULL,
49 long style = 0,
57c4d796 50#if wxUSE_VALIDATORS
0e320a79 51 const wxValidator& validator = wxDefaultValidator,
57c4d796 52#endif
0e320a79
DW
53 const wxString& name = wxComboBoxNameStr);
54
37f214d5
DW
55 // List functions: see wxChoice
56
57 wxString GetValue() const { return GetLabel(); }
58 virtual void SetValue(const wxString& value);
59
60 // Clipboard operations
61 virtual void Copy();
62 virtual void Cut();
63 virtual void Paste();
64 virtual void SetInsertionPoint(long pos);
65 virtual void SetInsertionPointEnd();
66 virtual long GetInsertionPoint() const;
67 virtual long GetLastPosition() const;
68 virtual void Replace(long from, long to, const wxString& value);
69 virtual void Remove(long from, long to);
70 virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
71 virtual void SetSelection(long from, long to);
72 virtual void SetEditable(bool editable);
73
74 virtual bool OS2Command(WXUINT param, WXWORD id);
0e320a79 75
37f214d5
DW
76protected:
77 virtual void DoSetSize(int x, int y,
78 int width, int height,
79 int sizeFlags = wxSIZE_AUTO);
0e320a79
DW
80};
81
37f214d5 82#endif // wxUSE_COMBOBOX
0e320a79
DW
83#endif
84 // _WX_COMBOBOX_H_