1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-09-27 12:54:43 -04:00
|
|
|
// Name: wx/os2/choice.h
|
1999-07-29 01:11:30 -04:00
|
|
|
// 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
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_CHOICE_H_
|
|
|
|
#define _WX_CHOICE_H_
|
|
|
|
|
2006-04-12 16:31:46 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-07-29 01:11:30 -04:00
|
|
|
// Choice item
|
2006-04-12 16:31:46 -04:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
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
|
2006-06-18 15:25:41 -04:00
|
|
|
inline wxChoice() { }
|
2006-04-12 16:31:46 -04:00
|
|
|
virtual ~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
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,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
|
|
|
|
,rValidator
|
|
|
|
,rsName
|
|
|
|
);
|
1999-10-22 18:00:20 -04:00
|
|
|
}
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2004-01-31 13:21:45 -05: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 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
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxChoiceNameStr
|
|
|
|
);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2004-01-31 13:21:45 -05: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 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
|
|
|
//
|
2007-07-26 09:54:14 -04:00
|
|
|
virtual void DoDeleteOneItem(unsigned int n);
|
|
|
|
virtual void DoClear(void);
|
1999-10-14 00:43:46 -04:00
|
|
|
|
2006-03-23 17:05:23 -05:00
|
|
|
virtual unsigned int GetCount() const;
|
|
|
|
virtual int GetSelection(void) const;
|
2001-11-16 13:40:45 -05:00
|
|
|
virtual void SetSelection(int n);
|
1999-10-14 00:43:46 -04:00
|
|
|
|
2006-03-23 17:05:23 -05:00
|
|
|
virtual wxString GetString(unsigned int n) const;
|
|
|
|
virtual void SetString(unsigned 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:
|
2007-07-26 09:54:14 -04:00
|
|
|
virtual int DoInsertItems(const wxArrayStringsAdapter& items,
|
|
|
|
unsigned int pos,
|
|
|
|
void **clientData,
|
|
|
|
wxClientDataType type);
|
|
|
|
|
2006-04-12 16:31:46 -04:00
|
|
|
virtual void DoSetItemClientData(unsigned int n, void* pClientData);
|
2006-03-23 17:05:23 -05:00
|
|
|
virtual void* DoGetItemClientData(unsigned int n) const;
|
2001-11-16 13:40:45 -05: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 01:11:30 -04:00
|
|
|
|
1999-10-14 00:43:46 -04:00
|
|
|
#endif // _WX_CHOICE_H_
|