1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: choice.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Created: 01/02/97
|
|
|
|
// Id:
|
|
|
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
|
|
// 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-09-06 13:46:50 +00:00
|
|
|
void SetFont( const wxFont &font );
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKCHOICEH__
|