2001-06-26 16:59:19 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/combobox.h
|
|
|
|
// Purpose: wxComboBox declaration
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 24.12.00
|
|
|
|
// RCS-ID: $Id$
|
2004-05-23 10:56:36 -04:00
|
|
|
// Copyright: (c) 1996-2000 wxWidgets team
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 16:59:19 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-14 20:23:28 -04:00
|
|
|
#ifndef _WX_COMBOBOX_H_BASE_
|
|
|
|
#define _WX_COMBOBOX_H_BASE_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
2006-07-30 08:38:39 -04:00
|
|
|
#if wxUSE_COMBOBOX
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[];
|
2001-06-26 16:59:19 -04:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxComboBoxBase: this interface defines the methods wxComboBox must implement
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#include "wx/ctrlsub.h"
|
2007-09-25 20:30:22 -04:00
|
|
|
#include "wx/textentry.h"
|
2001-06-26 16:59:19 -04:00
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxComboBoxBase : public wxItemContainer,
|
2009-02-15 14:34:58 -05:00
|
|
|
public wxTextEntry
|
2001-06-26 16:59:19 -04:00
|
|
|
{
|
|
|
|
public:
|
2007-11-13 10:22:40 -05:00
|
|
|
// override these methods to disambiguate between two base classes versions
|
2007-09-25 20:30:22 -04:00
|
|
|
virtual void Clear()
|
|
|
|
{
|
|
|
|
wxTextEntry::Clear();
|
|
|
|
wxItemContainer::Clear();
|
|
|
|
}
|
|
|
|
|
2007-11-13 10:22:40 -05:00
|
|
|
bool IsEmpty() const { return wxItemContainer::IsEmpty(); }
|
|
|
|
|
2007-09-25 20:30:22 -04:00
|
|
|
// 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 10:16:51 -05:00
|
|
|
|
2010-01-23 20:00:45 -05:00
|
|
|
virtual void Popup() { wxFAIL_MSG( wxT("Not implemented") ); };
|
|
|
|
virtual void Dismiss() { wxFAIL_MSG( wxT("Not implemented") ); };
|
|
|
|
|
2006-10-30 11:04:27 -05: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 16:59:19 -04: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 10:15:17 -04:00
|
|
|
#elif defined(__WXMOTIF__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/motif/combobox.h"
|
2006-01-22 22:27:34 -05:00
|
|
|
#elif defined(__WXGTK20__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/gtk/combobox.h"
|
2006-01-22 22:27:34 -05:00
|
|
|
#elif defined(__WXGTK__)
|
|
|
|
#include "wx/gtk1/combobox.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXMAC__)
|
2008-06-11 15:17:41 -04:00
|
|
|
#include "wx/osx/combobox.h"
|
2003-07-14 11:58:33 -04:00
|
|
|
#elif defined(__WXCOCOA__)
|
|
|
|
#include "wx/cocoa/combobox.h"
|
1999-07-27 23:38:12 -04:00
|
|
|
#elif defined(__WXPM__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/os2/combobox.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#endif // wxUSE_COMBOBOX
|
|
|
|
|
2007-09-25 20:30:22 -04:00
|
|
|
#endif // _WX_COMBOBOX_H_BASE_
|