1999-07-26 19:02:32 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/choice.h
|
|
|
|
// Purpose: wxChoice class interface
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 26.07.99
|
|
|
|
// RCS-ID: $Id$
|
2004-05-23 10:56:36 -04:00
|
|
|
// Copyright: (c) wxWidgets team
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-07-26 19:02:32 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-14 20:23:28 -04:00
|
|
|
#ifndef _WX_CHOICE_H_BASE_
|
|
|
|
#define _WX_CHOICE_H_BASE_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
1999-07-26 19:02:32 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// headers
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2005-03-16 11:18:31 -05:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#if wxUSE_CHOICE
|
|
|
|
|
1999-10-22 14:00:39 -04:00
|
|
|
#include "wx/ctrlsub.h" // the base class
|
1999-07-26 19:02:32 -04:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// global data
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2005-01-21 13:48:22 -05:00
|
|
|
extern WXDLLEXPORT_DATA(const wxChar*) wxChoiceNameStr;
|
1999-07-26 19:02:32 -04:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxChoice allows to select one of a non-modifiable list of strings
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1999-10-22 14:00:39 -04:00
|
|
|
class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
|
1999-07-26 19:02:32 -04:00
|
|
|
{
|
|
|
|
public:
|
2004-01-15 08:49:22 -05:00
|
|
|
wxChoiceBase() { }
|
2004-10-12 16:14:23 -04:00
|
|
|
virtual ~wxChoiceBase();
|
1999-07-26 19:02:32 -04:00
|
|
|
|
2003-07-21 20:24:07 -04:00
|
|
|
// all generic methods are in wxControlWithItems
|
|
|
|
|
2003-06-23 10:49:46 -04:00
|
|
|
// set/get the number of columns in the control (as they're not supported on
|
1999-07-26 19:02:32 -04:00
|
|
|
// most platforms, they do nothing by default)
|
|
|
|
virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
|
|
|
|
virtual int GetColumns() const { return 1 ; }
|
|
|
|
|
1999-10-22 14:00:39 -04:00
|
|
|
// emulate selecting the item event.GetInt()
|
|
|
|
void Command(wxCommandEvent& event);
|
2003-07-21 20:24:07 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_NO_COPY_CLASS(wxChoiceBase)
|
1999-07-26 19:02:32 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// include the platform-dependent class definition
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2001-11-17 18:13:55 -05:00
|
|
|
#if defined(__WXUNIVERSAL__)
|
|
|
|
#include "wx/univ/choice.h"
|
2004-09-29 04:03:26 -04:00
|
|
|
#elif defined(__SMARTPHONE__) && defined(__WXWINCE__)
|
2004-08-23 06:53:57 -04:00
|
|
|
#include "wx/msw/wince/choicece.h"
|
2001-11-17 18:13:55 -05:00
|
|
|
#elif defined(__WXMSW__)
|
1999-07-26 19:02:32 -04:00
|
|
|
#include "wx/msw/choice.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXMOTIF__)
|
1999-07-26 19:02:32 -04:00
|
|
|
#include "wx/motif/choice.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXGTK__)
|
1999-07-26 19:02:32 -04:00
|
|
|
#include "wx/gtk/choice.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXMAC__)
|
1999-07-26 19:02:32 -04:00
|
|
|
#include "wx/mac/choice.h"
|
2003-03-22 01:18:36 -05:00
|
|
|
#elif defined(__WXCOCOA__)
|
|
|
|
#include "wx/cocoa/choice.h"
|
1999-07-27 23:38:12 -04:00
|
|
|
#elif defined(__WXPM__)
|
|
|
|
#include "wx/os2/choice.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#endif // wxUSE_CHOICE
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
1998-08-14 20:23:28 -04:00
|
|
|
// _WX_CHOICE_H_BASE_
|