1998-08-07 21:32:13 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: combobox.h
|
1998-08-12 09:16:21 +00:00
|
|
|
// Purpose: wxComboBox class
|
|
|
|
// Author: AUTHOR
|
|
|
|
// Modified by:
|
|
|
|
// Created: ??/??/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) AUTHOR
|
1998-08-07 21:32:13 +00:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
#ifndef _WX_COMBOBOX_H_
|
|
|
|
#define _WX_COMBOBOX_H_
|
1998-08-07 21:32:13 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "combobox.h"
|
|
|
|
#endif
|
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
#include "wx/choice.h"
|
1998-08-07 21:32:13 +00:00
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr;
|
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
1998-08-07 21:32:13 +00:00
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
// Combobox item
|
|
|
|
class WXDLLEXPORT wxComboBox: public wxChoice
|
1998-08-07 21:32:13 +00:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
|
|
|
|
|
|
|
public:
|
1998-08-12 09:16:21 +00:00
|
|
|
inline wxComboBox() {}
|
1998-08-07 21:32:13 +00:00
|
|
|
|
|
|
|
inline wxComboBox(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& value = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = NULL,
|
|
|
|
long style = 0,
|
1998-08-12 09:16:21 +00:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1998-08-07 21:32:13 +00:00
|
|
|
const wxString& name = wxComboBoxNameStr)
|
|
|
|
{
|
1998-08-12 09:16:21 +00:00
|
|
|
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
1998-08-07 21:32:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& value = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = NULL,
|
|
|
|
long style = 0,
|
1998-08-12 09:16:21 +00:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1998-08-07 21:32:13 +00:00
|
|
|
const wxString& name = wxComboBoxNameStr);
|
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
// List functions: see wxChoice
|
|
|
|
|
1998-08-07 21:32:13 +00:00
|
|
|
// Text field functions
|
1998-08-12 09:16:21 +00:00
|
|
|
virtual wxString GetValue() const ;
|
|
|
|
virtual void SetValue(const wxString& value);
|
1998-08-07 21:32:13 +00:00
|
|
|
|
|
|
|
// Clipboard operations
|
1998-08-12 09:16:21 +00:00
|
|
|
virtual void Copy();
|
|
|
|
virtual void Cut();
|
|
|
|
virtual void Paste();
|
|
|
|
virtual void SetInsertionPoint(long pos);
|
|
|
|
virtual void SetInsertionPointEnd();
|
|
|
|
virtual long GetInsertionPoint() const ;
|
|
|
|
virtual long GetLastPosition() const ;
|
|
|
|
virtual void Replace(long from, long to, const wxString& value);
|
|
|
|
virtual void Remove(long from, long to);
|
|
|
|
virtual void SetSelection(int n)
|
|
|
|
{
|
|
|
|
wxChoice::SetSelection(n);
|
|
|
|
}
|
|
|
|
virtual void SetSelection(long from, long to);
|
|
|
|
virtual void SetEditable(bool editable);
|
1998-08-07 21:32:13 +00:00
|
|
|
};
|
|
|
|
|
1998-08-12 09:16:21 +00:00
|
|
|
#endif
|
|
|
|
// _WX_COMBOBOX_H_
|