2001-06-26 20:59:19 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/combobox.h
|
|
|
|
// Purpose: wxComboBox declaration
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 24.12.00
|
|
|
|
// RCS-ID: $Id$
|
2004-05-23 14:56:36 +00:00
|
|
|
// Copyright: (c) 1996-2000 wxWidgets team
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 20:59:19 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-15 00:23:28 +00:00
|
|
|
#ifndef _WX_COMBOBOX_H_BASE_
|
|
|
|
#define _WX_COMBOBOX_H_BASE_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
2006-07-30 12:38:39 +00:00
|
|
|
#if wxUSE_COMBOBOX
|
|
|
|
|
2006-01-16 14:59:55 +00:00
|
|
|
extern WXDLLEXPORT_DATA(const wxChar) wxComboBoxNameStr[];
|
2001-06-26 20:59:19 +00:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxComboBoxBase: this interface defines the methods wxComboBox must implement
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#include "wx/ctrlsub.h"
|
2007-09-26 00:30:22 +00:00
|
|
|
#include "wx/textentry.h"
|
2001-06-26 20:59:19 +00:00
|
|
|
|
2007-09-26 00:30:22 +00:00
|
|
|
class WXDLLEXPORT wxComboBoxBase : public wxItemContainer,
|
|
|
|
public wxTextEntry
|
2001-06-26 20:59:19 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-09-26 00:30:22 +00:00
|
|
|
// override this to disambiguate between two base classes versions
|
|
|
|
virtual void Clear()
|
|
|
|
{
|
|
|
|
wxTextEntry::Clear();
|
|
|
|
wxItemContainer::Clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
// also bring in GetSelection() versions of both base classes in scope
|
|
|
|
//
|
|
|
|
// NB: GetSelection(from, to) could be already implemented in wxTextEntry
|
|
|
|
// but still make it pure virtual because for some platforms it's not
|
|
|
|
// implemented there and also because the derived class has to override
|
|
|
|
// it anyhow to avoid ambiguity with the other GetSelection()
|
|
|
|
virtual int GetSelection() const = 0;
|
|
|
|
virtual void GetSelection(long *from, long *to) const = 0;
|
2004-12-09 15:16:51 +00:00
|
|
|
|
2006-10-30 16:04:27 +00:00
|
|
|
// may return value different from GetSelection() when the combobox
|
|
|
|
// dropdown is shown and the user selected, but not yet accepted, a value
|
|
|
|
// different from the old one in it
|
|
|
|
virtual int GetCurrentSelection() const { return GetSelection(); }
|
2001-06-26 20:59:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// include the platform-dependent header defining the real class
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#if defined(__WXUNIVERSAL__)
|
|
|
|
#include "wx/univ/combobox.h"
|
|
|
|
#elif defined(__WXMSW__)
|
|
|
|
#include "wx/msw/combobox.h"
|
1998-07-10 14:15:17 +00:00
|
|
|
#elif defined(__WXMOTIF__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/motif/combobox.h"
|
2006-01-23 03:27:34 +00:00
|
|
|
#elif defined(__WXGTK20__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/gtk/combobox.h"
|
2006-01-23 03:27:34 +00:00
|
|
|
#elif defined(__WXGTK__)
|
|
|
|
#include "wx/gtk1/combobox.h"
|
1998-08-15 00:23:28 +00:00
|
|
|
#elif defined(__WXMAC__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/mac/combobox.h"
|
2003-07-14 15:58:33 +00:00
|
|
|
#elif defined(__WXCOCOA__)
|
|
|
|
#include "wx/cocoa/combobox.h"
|
1999-07-28 03:38:12 +00:00
|
|
|
#elif defined(__WXPM__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/os2/combobox.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif // wxUSE_COMBOBOX
|
|
|
|
|
2007-09-26 00:30:22 +00:00
|
|
|
#endif // _WX_COMBOBOX_H_BASE_
|