1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: choice.h
|
|
|
|
// Purpose: wxChoice class
|
1999-10-14 00:43:46 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-14 00:43:46 -04:00
|
|
|
// Created: 10/13/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-14 00:43:46 -04:00
|
|
|
// Copyright: (c) David Webster
|
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CHOICE_H_
|
|
|
|
#define _WX_CHOICE_H_
|
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr;
|
|
|
|
|
|
|
|
// Choice item
|
1999-10-15 17:00:38 -04:00
|
|
|
class WXDLLEXPORT wxChoice: public wxChoiceBase
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxChoice)
|
|
|
|
|
1999-10-22 18:00:20 -04:00
|
|
|
public:
|
|
|
|
// ctors
|
|
|
|
inline wxChoice() { }
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-10-22 18:00:20 -04:00
|
|
|
inline wxChoice(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = NULL,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxChoiceNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, n, choices, style, validator, name);
|
|
|
|
}
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-10-22 18:00:20 -04:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = NULL,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxChoiceNameStr);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-10-22 18:00:20 -04:00
|
|
|
// Implement base class virtuals
|
|
|
|
virtual int DoAppend(const wxString& item);
|
|
|
|
virtual void Delete(int n);
|
|
|
|
virtual void Clear();
|
1999-10-14 00:43:46 -04:00
|
|
|
|
1999-10-22 18:00:20 -04:00
|
|
|
virtual int GetCount() const;
|
|
|
|
virtual int GetSelection() const ;
|
|
|
|
virtual void SetSelection(int n);
|
1999-10-14 00:43:46 -04:00
|
|
|
|
1999-10-22 18:00:20 -04:00
|
|
|
virtual int FindString(const wxString& s) const;
|
|
|
|
virtual wxString GetString(int n) const ;
|
|
|
|
virtual void SetString(int n, const wxString& s);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-10-22 18:00:20 -04:00
|
|
|
// OS2 only
|
|
|
|
virtual bool OS2Command(WXUINT param, WXWORD id);
|
|
|
|
MRESULT OS2WindowProc(HWND hwnd, WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
protected:
|
1999-10-22 18:00:20 -04:00
|
|
|
virtual void DoSetItemClientData( int n, void* clientData );
|
|
|
|
virtual void* DoGetItemClientData( int n ) const;
|
|
|
|
virtual void DoSetItemClientObject( int n, wxClientData* clientData );
|
|
|
|
virtual wxClientData* DoGetItemClientObject( int n ) const;
|
1999-10-14 00:43:46 -04:00
|
|
|
|
|
|
|
// OS2 implementation
|
|
|
|
virtual wxSize DoGetBestSize();
|
|
|
|
virtual void DoSetSize(int x, int y,
|
|
|
|
int width, int height,
|
|
|
|
int sizeFlags = wxSIZE_AUTO);
|
|
|
|
private:
|
|
|
|
// Virtual function hiding supression
|
1999-10-22 18:00:20 -04:00
|
|
|
/*
|
1999-10-14 00:43:46 -04:00
|
|
|
inline virtual void DoSetClientData( void *data )
|
|
|
|
{ wxWindowBase::DoSetClientData(data); }
|
|
|
|
inline virtual void DoSetClientObject( wxClientData *data )
|
|
|
|
{ wxWindowBase::DoSetClientObject(data); }
|
|
|
|
inline virtual wxClientData *DoGetClientObject() const
|
|
|
|
{ return(wxWindowBase::DoGetClientObject());}
|
|
|
|
inline virtual void *DoGetClientData() const
|
|
|
|
{ return(wxWindowBase::DoGetClientData());}
|
1999-10-22 18:00:20 -04:00
|
|
|
*/
|
1999-07-29 01:11:30 -04:00
|
|
|
};
|
|
|
|
|
1999-10-14 00:43:46 -04:00
|
|
|
#endif // _WX_CHOICE_H_
|