1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: combobox.h
|
|
|
|
// Purpose: wxComboBox class
|
1999-10-14 00:43:46 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-14 00:43:46 -04:00
|
|
|
// Created: 10/13/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-14 00:43:46 -04:00
|
|
|
// Copyright: (c) David Webster
|
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_COMBOBOX_H_
|
|
|
|
#define _WX_COMBOBOX_H_
|
|
|
|
|
|
|
|
#include "wx/choice.h"
|
|
|
|
|
1999-10-14 00:43:46 -04:00
|
|
|
#if wxUSE_COMBOBOX
|
|
|
|
|
1999-07-29 01:11:30 -04:00
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr;
|
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
|
|
|
|
|
|
|
|
// Combobox item
|
|
|
|
class WXDLLEXPORT wxComboBox: public wxChoice
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
|
|
|
|
|
|
|
public:
|
|
|
|
inline wxComboBox() {}
|
|
|
|
|
|
|
|
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,
|
1999-11-08 00:18:15 -05:00
|
|
|
#if wxUSE_VALIDATORS
|
1999-07-29 01:11:30 -04:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1999-11-08 00:18:15 -05:00
|
|
|
#endif
|
1999-07-29 01:11:30 -04:00
|
|
|
const wxString& name = wxComboBoxNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, value, pos, size, n, choices, style, validator, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
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,
|
1999-11-08 00:18:15 -05:00
|
|
|
#if wxUSE_VALIDATORS
|
1999-07-29 01:11:30 -04:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1999-11-08 00:18:15 -05:00
|
|
|
#endif
|
1999-07-29 01:11:30 -04:00
|
|
|
const wxString& name = wxComboBoxNameStr);
|
|
|
|
|
1999-10-14 00:43:46 -04:00
|
|
|
// List functions: see wxChoice
|
|
|
|
|
|
|
|
wxString GetValue() const { return GetLabel(); }
|
|
|
|
virtual void SetValue(const wxString& value);
|
|
|
|
|
|
|
|
// Clipboard operations
|
|
|
|
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);
|
|
|
|
|
|
|
|
virtual bool OS2Command(WXUINT param, WXWORD id);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-10-14 00:43:46 -04:00
|
|
|
protected:
|
|
|
|
virtual void DoSetSize(int x, int y,
|
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
1999-07-29 01:11:30 -04:00
|
|
|
};
|
|
|
|
|
1999-10-14 00:43:46 -04:00
|
|
|
#endif // wxUSE_COMBOBOX
|
1999-07-29 01:11:30 -04:00
|
|
|
#endif
|
|
|
|
// _WX_COMBOBOX_H_
|