]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/combobox.h
1. wxStaticBox doesn't draw over the underlying controls any more
[wxWidgets.git] / include / wx / msw / combobox.h
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: combobox.h
3// Purpose: wxComboBox class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
4438caf4 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_COMBOBOX_H_
13#define _WX_COMBOBOX_H_
2bda0e17
KB
14
15#ifdef __GNUG__
4438caf4 16 #pragma interface "combobox.h"
2bda0e17
KB
17#endif
18
19#include "wx/choice.h"
20
47d67540 21#if wxUSE_COMBOBOX
2bda0e17 22
39ca6d79
OK
23WXDLLEXPORT_DATA(extern const wxChar*) wxComboBoxNameStr;
24WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
2bda0e17 25
4438caf4
VZ
26// ----------------------------------------------------------------------------
27// Combobox control
28// ----------------------------------------------------------------------------
29
2bda0e17
KB
30class WXDLLEXPORT wxComboBox: public wxChoice
31{
4438caf4
VZ
32 DECLARE_DYNAMIC_CLASS(wxComboBox)
33
34public:
35 wxComboBox() { }
36
37 wxComboBox(wxWindow *parent, wxWindowID id,
38 const wxString& value = wxEmptyString,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 int n = 0, const wxString choices[] = NULL,
42 long style = 0,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxComboBoxNameStr)
45 {
46 Create(parent, id, value, pos, size, n, choices, style, validator, name);
47 }
48
49 bool Create(wxWindow *parent, wxWindowID id,
50 const wxString& value = wxEmptyString,
51 const wxPoint& pos = wxDefaultPosition,
52 const wxSize& size = wxDefaultSize,
53 int n = 0, const wxString choices[] = NULL,
54 long style = 0,
55 const wxValidator& validator = wxDefaultValidator,
56 const wxString& name = wxComboBoxNameStr);
57
58 // List functions: see wxChoice
59
60 // Text field functions
61 wxString GetValue() const { return GetLabel(); }
62 virtual void SetValue(const wxString& value);
63
64 // Clipboard operations
65 virtual void Copy();
66 virtual void Cut();
67 virtual void Paste();
68 virtual void SetInsertionPoint(long pos);
69 virtual void SetInsertionPointEnd();
70 virtual long GetInsertionPoint() const;
71 virtual long GetLastPosition() const;
72 virtual void Replace(long from, long to, const wxString& value);
73 virtual void Remove(long from, long to);
74 virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
75 virtual void SetSelection(long from, long to);
76 virtual void SetEditable(bool editable);
77
78 virtual bool MSWCommand(WXUINT param, WXWORD id);
79
80protected:
81 virtual void DoSetSize(int x, int y,
82 int width, int height,
83 int sizeFlags = wxSIZE_AUTO);
2bda0e17
KB
84};
85
47d67540 86#endif // wxUSE_COMBOBOX
2bda0e17 87#endif
bbcdf8bc 88 // _WX_COMBOBOX_H_