1998-05-20 10:01:55 -04: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 06:07:38 -04:00
|
|
|
inline wxChoice( wxWindow *parent, wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
1998-08-22 23:22:56 -04:00
|
|
|
int n = 0, const wxString choices[] = (const wxString *) NULL,
|
1998-08-14 06:07:38 -04: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 11:17:59 -04:00
|
|
|
bool Create( wxWindow *parent, wxWindowID id,
|
1998-08-14 06:07:38 -04:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
1998-08-22 23:22:56 -04:00
|
|
|
int n = 0, const wxString choices[] = (wxString *) NULL,
|
1998-08-14 06:07:38 -04:00
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxChoiceNameStr );
|
1998-05-20 10:01:55 -04:00
|
|
|
void Append( const wxString &item );
|
|
|
|
void Clear(void);
|
1998-09-01 11:41:45 -04:00
|
|
|
void Delete(int n);
|
1998-05-20 10:01:55 -04:00
|
|
|
int FindString( const wxString &string ) const;
|
|
|
|
int GetColumns(void) const;
|
|
|
|
int GetSelection(void);
|
1998-07-04 11:17:59 -04:00
|
|
|
wxString GetString( int n ) const;
|
1998-05-20 10:01:55 -04:00
|
|
|
wxString GetStringSelection(void) const;
|
|
|
|
int Number(void) const;
|
1998-07-04 11:17:59 -04:00
|
|
|
void SetColumns( int n = 1 );
|
|
|
|
void SetSelection( int n );
|
1998-05-20 10:01:55 -04:00
|
|
|
void SetStringSelection( const wxString &string );
|
1998-09-07 08:29:07 -04:00
|
|
|
|
1998-09-06 09:46:50 -04:00
|
|
|
void SetFont( const wxFont &font );
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKCHOICEH__
|