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_
|
|
|
|
|
|
|
|
// 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
|
|
|
|
2001-11-16 13:40:45 -05:00
|
|
|
inline wxChoice( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,int n = 0
|
|
|
|
,const wxString asChoices[] = NULL
|
|
|
|
,long lStyle = 0
|
1999-11-08 00:18:15 -05:00
|
|
|
#if wxUSE_VALIDATORS
|
2001-11-16 13:40:45 -05:00
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
1999-11-08 00:18:15 -05:00
|
|
|
#endif
|
2001-11-16 13:40:45 -05:00
|
|
|
,const wxString& rsName = wxChoiceNameStr
|
|
|
|
)
|
1999-10-22 18:00:20 -04:00
|
|
|
{
|
2001-11-16 13:40:45 -05:00
|
|
|
Create( pParent
|
|
|
|
,vId
|
|
|
|
,rPos
|
|
|
|
,rSize
|
|
|
|
,n
|
|
|
|
,asChoices
|
|
|
|
,lStyle
|
|
|
|
#if wxUSE_VALIDATORS
|
|
|
|
,rValidator
|
|
|
|
#endif
|
|
|
|
,rsName
|
|
|
|
);
|
1999-10-22 18:00:20 -04:00
|
|
|
}
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2001-11-16 13:40:45 -05:00
|
|
|
bool Create( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,int n = 0
|
|
|
|
,const wxString asChoices[] = NULL
|
|
|
|
,long lStyle = 0
|
1999-11-08 00:18:15 -05:00
|
|
|
#if wxUSE_VALIDATORS
|
2001-11-16 13:40:45 -05:00
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
1999-11-08 00:18:15 -05:00
|
|
|
#endif
|
2001-11-16 13:40:45 -05:00
|
|
|
,const wxString& rsName = wxChoiceNameStr
|
|
|
|
);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2001-11-16 13:40:45 -05:00
|
|
|
//
|
1999-10-22 18:00:20 -04:00
|
|
|
// Implement base class virtuals
|
2001-11-16 13:40:45 -05:00
|
|
|
//
|
|
|
|
virtual int DoAppend(const wxString& rsItem);
|
|
|
|
virtual void Delete(int n);
|
|
|
|
virtual void Clear(void);
|
1999-10-14 00:43:46 -04:00
|
|
|
|
2001-11-16 13:40:45 -05:00
|
|
|
virtual int GetCount(void) const;
|
|
|
|
virtual int GetSelection(void) const ;
|
|
|
|
virtual void SetSelection(int n);
|
1999-10-14 00:43:46 -04:00
|
|
|
|
2001-11-16 13:40:45 -05:00
|
|
|
virtual int FindString(const wxString& rsStr) const;
|
1999-10-22 18:00:20 -04:00
|
|
|
virtual wxString GetString(int n) const ;
|
2001-11-16 13:40:45 -05:00
|
|
|
virtual void SetString( int n
|
|
|
|
,const wxString& rsStr
|
|
|
|
);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2001-11-16 13:40:45 -05:00
|
|
|
//
|
1999-10-22 18:00:20 -04:00
|
|
|
// OS2 only
|
2001-11-16 13:40:45 -05:00
|
|
|
//
|
|
|
|
virtual bool OS2Command( WXUINT uParam
|
|
|
|
,WXWORD wId
|
|
|
|
);
|
|
|
|
MRESULT OS2WindowProc( WXUINT uMsg
|
|
|
|
,WXWPARAM wParam
|
|
|
|
,WXLPARAM lParam
|
|
|
|
);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
protected:
|
2001-11-16 13:40:45 -05:00
|
|
|
virtual void DoSetItemClientData( int n
|
|
|
|
,void* pClientData
|
|
|
|
);
|
|
|
|
virtual void* DoGetItemClientData(int n) const;
|
|
|
|
virtual void DoSetItemClientObject( int n
|
|
|
|
,wxClientData* pClientData
|
|
|
|
);
|
|
|
|
virtual wxClientData* DoGetItemClientObject(int n) const;
|
|
|
|
virtual wxSize DoGetBestSize(void) const;
|
|
|
|
virtual void DoSetSize( int nX
|
|
|
|
,int nY
|
|
|
|
,int nWidth
|
|
|
|
,int nHeight
|
|
|
|
,int nsizeFlags = wxSIZE_AUTO
|
|
|
|
);
|
|
|
|
void Free(void);
|
|
|
|
}; // end of CLASS wxChoice
|
1999-07-29 01:11:30 -04:00
|
|
|
|
1999-10-14 00:43:46 -04:00
|
|
|
#endif // _WX_CHOICE_H_
|