]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/combobox.h
all delete functions now send delete notification event
[wxWidgets.git] / include / wx / motif / combobox.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: combobox.h
3// Purpose: wxComboBox class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_COMBOBOX_H_
13#define _WX_COMBOBOX_H_
14
15#ifdef __GNUG__
16#pragma interface "combobox.h"
17#endif
18
19#include "wx/choice.h"
20
21WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr;
22WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
23
24// Combobox item
25class WXDLLEXPORT wxComboBox: public wxChoice
26{
27 DECLARE_DYNAMIC_CLASS(wxComboBox)
28
29 public:
30 inline wxComboBox() {}
8aa04e8b 31 ~wxComboBox();
9b6dbb09
JS
32
33 inline wxComboBox(wxWindow *parent, wxWindowID id,
34 const wxString& value = wxEmptyString,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 int n = 0, const wxString choices[] = NULL,
38 long style = 0,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxComboBoxNameStr)
41 {
42 Create(parent, id, value, pos, size, n, choices, style, validator, name);
43 }
44
45 bool Create(wxWindow *parent, wxWindowID id,
46 const wxString& value = wxEmptyString,
47 const wxPoint& pos = wxDefaultPosition,
48 const wxSize& size = wxDefaultSize,
49 int n = 0, const wxString choices[] = NULL,
50 long style = 0,
51 const wxValidator& validator = wxDefaultValidator,
52 const wxString& name = wxComboBoxNameStr);
53
8aa04e8b 54 virtual void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
4fabb575
JS
55 virtual void SetSize(const wxRect& rect, int sizeFlags = wxSIZE_AUTO)
56 { wxWindow::SetSize(rect, sizeFlags); }
57 virtual void SetSize(const wxSize& size) { wxWindow::SetSize(size); }
8aa04e8b
JS
58
59 // List functions
60 virtual void Append(const wxString& item);
61 virtual void Delete(int n);
62 virtual void Clear();
63 virtual int GetSelection() const ;
64 virtual void SetSelection(int n);
65 virtual int FindString(const wxString& s) const;
66 virtual wxString GetString(int n) const ;
67 virtual wxString GetStringSelection() const ;
68 virtual bool SetStringSelection(const wxString& sel);
69 virtual inline int Number() const { return m_noStrings; }
70
9b6dbb09
JS
71 // Text field functions
72 virtual wxString GetValue() const ;
73 virtual void SetValue(const wxString& value);
74
75 // Clipboard operations
76 virtual void Copy();
77 virtual void Cut();
78 virtual void Paste();
79 virtual void SetInsertionPoint(long pos);
80 virtual void SetInsertionPointEnd();
81 virtual long GetInsertionPoint() const ;
82 virtual long GetLastPosition() const ;
83 virtual void Replace(long from, long to, const wxString& value);
84 virtual void Remove(long from, long to);
9b6dbb09
JS
85 virtual void SetSelection(long from, long to);
86 virtual void SetEditable(bool editable);
0d57be45
JS
87
88// Implementation
4b5f3fe6 89 virtual void ChangeFont(bool keepOriginalSize = TRUE);
0d57be45
JS
90 virtual void ChangeBackgroundColour();
91 virtual void ChangeForegroundColour();
8aa04e8b
JS
92 WXWidget GetTopWidget() const { return m_mainWidget; }
93 WXWidget GetMainWidget() const { return m_mainWidget; }
9b6dbb09
JS
94};
95
96#endif
97 // _WX_COMBOBOX_H_