converted to 16 colors
[wxWidgets.git] / include / wx / mac / combobox.h
CommitLineData
0dbd6262
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: combobox.h
3// Purpose: wxComboBox class
4// Author: AUTHOR
5// Modified by:
6// Created: ??/??/98
7// RCS-ID: $Id$
8// Copyright: (c) AUTHOR
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() {}
31
32 inline 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,
37 long style = 0,
38 const wxValidator& validator = wxDefaultValidator,
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,
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxComboBoxNameStr);
52
53 // List functions
54 virtual void Append(const wxString& item);
55 virtual void Delete(int n);
56 virtual void Clear();
57 virtual int GetSelection() const ;
58 virtual void SetSelection(int n);
59 virtual int FindString(const wxString& s) const;
60 virtual wxString GetString(int n) const ;
61 virtual wxString GetStringSelection() const ;
62 virtual bool SetStringSelection(const wxString& sel);
63 virtual inline int Number() const { return m_noStrings; }
64
65 // Text field functions
66 virtual wxString GetValue() const ;
67 virtual void SetValue(const wxString& value);
68
69 // Clipboard operations
70 virtual void Copy();
71 virtual void Cut();
72 virtual void Paste();
73 virtual void SetInsertionPoint(long pos);
74 virtual void SetInsertionPointEnd();
75 virtual long GetInsertionPoint() const ;
76 virtual long GetLastPosition() const ;
77 virtual void Replace(long from, long to, const wxString& value);
78 virtual void Remove(long from, long to);
79 virtual void SetSelection(long from, long to);
80 virtual void SetEditable(bool editable);
81};
82
83#endif
84 // _WX_COMBOBOX_H_