1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: choice.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-26 10:56:58 +00:00
|
|
|
// Id: $Id$
|
1998-10-24 17:12:05 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
1998-05-20 14:01:55 +00:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GTKCHOICEH__
|
|
|
|
#define __GTKCHOICEH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/list.h"
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxChoice;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// global data
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
extern const char *wxChoiceNameStr;
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxChoice
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxChoice: public wxControl
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxChoice)
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
wxChoice(void);
|
1998-08-14 10:07:38 +00:00
|
|
|
inline wxChoice( wxWindow *parent, wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
1998-08-23 03:22:56 +00:00
|
|
|
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
1998-08-14 10:07:38 +00:00
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxChoiceNameStr )
|
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, n, choices, style, validator, name);
|
|
|
|
}
|
1998-07-04 15:17:59 +00:00
|
|
|
bool Create( wxWindow *parent, wxWindowID id,
|
1998-08-14 10:07:38 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
1998-08-23 03:22:56 +00:00
|
|
|
int n = 0, const wxString choices[] = (wxString *) NULL,
|
1998-08-14 10:07:38 +00:00
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxChoiceNameStr );
|
1998-05-20 14:01:55 +00:00
|
|
|
void Append( const wxString &item );
|
|
|
|
void Clear(void);
|
1998-09-01 15:41:45 +00:00
|
|
|
void Delete(int n);
|
1998-05-20 14:01:55 +00:00
|
|
|
int FindString( const wxString &string ) const;
|
|
|
|
int GetColumns(void) const;
|
|
|
|
int GetSelection(void);
|
1998-07-04 15:17:59 +00:00
|
|
|
wxString GetString( int n ) const;
|
1998-05-20 14:01:55 +00:00
|
|
|
wxString GetStringSelection(void) const;
|
|
|
|
int Number(void) const;
|
1998-07-04 15:17:59 +00:00
|
|
|
void SetColumns( int n = 1 );
|
|
|
|
void SetSelection( int n );
|
1998-05-20 14:01:55 +00:00
|
|
|
void SetStringSelection( const wxString &string );
|
1998-09-07 12:29:07 +00:00
|
|
|
|
1998-10-29 18:03:18 +00:00
|
|
|
// implementation
|
|
|
|
|
|
|
|
void ApplyWidgetStyle();
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKCHOICEH__
|