1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-09-27 16:54:43 +00:00
|
|
|
// Name: wx/os2/choice.h
|
1999-07-29 05:11:30 +00:00
|
|
|
// 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 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CHOICE_H_
|
|
|
|
#define _WX_CHOICE_H_
|
|
|
|
|
2006-04-12 20:31:46 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-07-29 05:11:30 +00:00
|
|
|
// Choice item
|
2006-04-12 20:31:46 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
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
|
2006-06-18 19:25:41 +00:00
|
|
|
inline wxChoice() { }
|
2006-04-12 20:31:46 +00:00
|
|
|
virtual ~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
|
|
|
//
|
2006-03-23 22:05:23 +00:00
|
|
|
virtual void Delete(unsigned int n);
|
2001-11-16 18:40:45 +00:00
|
|
|
virtual void Clear(void);
|
1999-10-14 04:43:46 +00:00
|
|
|
|
2006-03-23 22:05:23 +00:00
|
|
|
virtual unsigned int GetCount() const;
|
|
|
|
virtual int GetSelection(void) const;
|
2006-06-18 19:25:41 +00:00
|
|
|
virtual int GetCurrentSelection(void) const { return GetSelection(); }
|
2001-11-16 18:40:45 +00:00
|
|
|
virtual void SetSelection(int n);
|
1999-10-14 04:43:46 +00:00
|
|
|
|
2006-03-23 22:05:23 +00:00
|
|
|
virtual wxString GetString(unsigned int n) const;
|
|
|
|
virtual void SetString(unsigned 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:
|
2006-04-12 20:31:46 +00:00
|
|
|
virtual int DoAppend(const wxString& rsItem);
|
|
|
|
virtual int DoInsert(const wxString& rsItem, unsigned int pos);
|
|
|
|
virtual void DoSetItemClientData(unsigned int n, void* pClientData);
|
2006-03-23 22:05:23 +00:00
|
|
|
virtual void* DoGetItemClientData(unsigned int n) const;
|
|
|
|
virtual void DoSetItemClientObject(unsigned int n, wxClientData* pClientData);
|
|
|
|
virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
|
2001-11-16 18:40:45 +00:00
|
|
|
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_
|