1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: choice.h
|
|
|
|
// Purpose: wxChoice class
|
1999-10-14 04:43:46 +00:00
|
|
|
// Author: David Webster
|
1999-07-29 05:11:30 +00:00
|
|
|
// Modified by:
|
1999-10-14 04:43:46 +00:00
|
|
|
// Created: 10/13/99
|
1999-07-29 05:11:30 +00:00
|
|
|
// RCS-ID: $Id$
|
1999-10-14 04:43:46 +00:00
|
|
|
// Copyright: (c) David Webster
|
2004-05-23 14:56:36 +00:00
|
|
|
// Licence: wxWidgets licence
|
1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CHOICE_H_
|
|
|
|
#define _WX_CHOICE_H_
|
|
|
|
|
|
|
|
// Choice item
|
1999-10-15 21:00:38 +00:00
|
|
|
class WXDLLEXPORT wxChoice: public wxChoiceBase
|
1999-07-29 05:11:30 +00:00
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxChoice)
|
|
|
|
|
1999-10-22 22:00:20 +00:00
|
|
|
public:
|
|
|
|
// ctors
|
|
|
|
inline wxChoice() { }
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2001-11-16 18:40:45 +00: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
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxChoiceNameStr
|
|
|
|
)
|
1999-10-22 22:00:20 +00:00
|
|
|
{
|
2001-11-16 18:40:45 +00:00
|
|
|
Create( pParent
|
|
|
|
,vId
|
|
|
|
,rPos
|
|
|
|
,rSize
|
|
|
|
,n
|
|
|
|
,asChoices
|
|
|
|
,lStyle
|
|
|
|
,rValidator
|
|
|
|
,rsName
|
|
|
|
);
|
1999-10-22 22:00:20 +00:00
|
|
|
}
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2004-01-31 18:21:45 +00:00
|
|
|
inline wxChoice( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxPoint& rPos
|
|
|
|
,const wxSize& rSize
|
|
|
|
,const wxArrayString& asChoices
|
|
|
|
,long lStyle = 0
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxChoiceNameStr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Create( pParent
|
|
|
|
,vId
|
|
|
|
,rPos
|
|
|
|
,rSize
|
|
|
|
,asChoices
|
|
|
|
,lStyle
|
|
|
|
,rValidator
|
|
|
|
,rsName
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2001-11-16 18:40:45 +00: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
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxChoiceNameStr
|
|
|
|
);
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2004-01-31 18:21:45 +00:00
|
|
|
bool Create( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxPoint& rPos
|
|
|
|
,const wxSize& rSize
|
|
|
|
,const wxArrayString& asChoices
|
|
|
|
,long lStyle = 0
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxChoiceNameStr
|
|
|
|
);
|
|
|
|
|
2001-11-16 18:40:45 +00:00
|
|
|
//
|
1999-10-22 22:00:20 +00:00
|
|
|
// Implement base class virtuals
|
2001-11-16 18:40:45 +00:00
|
|
|
//
|
|
|
|
virtual int DoAppend(const wxString& rsItem);
|
2003-05-09 12:58:28 +00:00
|
|
|
virtual int DoInsert(const wxString& rsItem, int pos);
|
2001-11-16 18:40:45 +00:00
|
|
|
virtual void Delete(int n);
|
|
|
|
virtual void Clear(void);
|
1999-10-14 04:43:46 +00:00
|
|
|
|
2001-11-16 18:40:45 +00:00
|
|
|
virtual int GetCount(void) const;
|
|
|
|
virtual int GetSelection(void) const ;
|
|
|
|
virtual void SetSelection(int n);
|
1999-10-14 04:43:46 +00:00
|
|
|
|
2001-11-16 18:40:45 +00:00
|
|
|
virtual int FindString(const wxString& rsStr) const;
|
1999-10-22 22:00:20 +00:00
|
|
|
virtual wxString GetString(int n) const ;
|
2001-11-16 18:40:45 +00:00
|
|
|
virtual void SetString( int n
|
|
|
|
,const wxString& rsStr
|
|
|
|
);
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2001-11-16 18:40:45 +00:00
|
|
|
//
|
1999-10-22 22:00:20 +00:00
|
|
|
// OS2 only
|
2001-11-16 18:40:45 +00:00
|
|
|
//
|
|
|
|
virtual bool OS2Command( WXUINT uParam
|
|
|
|
,WXWORD wId
|
|
|
|
);
|
|
|
|
MRESULT OS2WindowProc( WXUINT uMsg
|
|
|
|
,WXWPARAM wParam
|
|
|
|
,WXLPARAM lParam
|
|
|
|
);
|
1999-07-29 05:11:30 +00:00
|
|
|
|
|
|
|
protected:
|
2001-11-16 18:40:45 +00: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 05:11:30 +00:00
|
|
|
|
1999-10-14 04:43:46 +00:00
|
|
|
#endif // _WX_CHOICE_H_
|