1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: combobox.h
|
|
|
|
// Purpose: wxComboBox 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
|
|
|
|
// Licence: wxWindows licence
|
1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_COMBOBOX_H_
|
|
|
|
#define _WX_COMBOBOX_H_
|
|
|
|
|
|
|
|
#include "wx/choice.h"
|
|
|
|
|
1999-10-14 04:43:46 +00:00
|
|
|
#if wxUSE_COMBOBOX
|
|
|
|
|
1999-07-29 05:11:30 +00:00
|
|
|
// Combobox item
|
2001-11-16 18:40:45 +00:00
|
|
|
class WXDLLEXPORT wxComboBox : public wxChoice
|
1999-07-29 05:11:30 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
inline wxComboBox() {}
|
|
|
|
|
2001-11-16 18:40:45 +00:00
|
|
|
inline wxComboBox( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxString& rsValue = wxEmptyString
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,int n = 0
|
|
|
|
,const wxString asChoices[] = NULL
|
|
|
|
,long lStyle = 0
|
1999-11-08 05:18:15 +00:00
|
|
|
#if wxUSE_VALIDATORS
|
2001-11-16 18:40:45 +00:00
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
1999-11-08 05:18:15 +00:00
|
|
|
#endif
|
2001-11-16 18:40:45 +00:00
|
|
|
,const wxString& rsName = wxComboBoxNameStr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Create( pParent
|
|
|
|
,vId
|
|
|
|
,rsValue
|
|
|
|
,rPos
|
|
|
|
,rSize
|
|
|
|
,n
|
|
|
|
,asChoices
|
|
|
|
,lStyle
|
|
|
|
#if wxUSE_VALIDATORS
|
|
|
|
,rValidator
|
|
|
|
#endif
|
|
|
|
,rsName
|
|
|
|
);
|
|
|
|
}
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2001-11-16 18:40:45 +00:00
|
|
|
bool Create( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxString& rsValue = wxEmptyString
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,int n = 0
|
|
|
|
,const wxString asChoices[] = NULL
|
|
|
|
,long lStyle = 0
|
1999-11-08 05:18:15 +00:00
|
|
|
#if wxUSE_VALIDATORS
|
2001-11-16 18:40:45 +00:00
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
1999-11-08 05:18:15 +00:00
|
|
|
#endif
|
2001-11-16 18:40:45 +00:00
|
|
|
,const wxString& rsName = wxComboBoxNameStr
|
|
|
|
);
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2001-11-16 18:40:45 +00:00
|
|
|
//
|
1999-10-14 04:43:46 +00:00
|
|
|
// List functions: see wxChoice
|
2001-11-16 18:40:45 +00:00
|
|
|
//
|
|
|
|
inline wxString GetValue(void) const { return GetLabel(); }
|
|
|
|
virtual void SetValue(const wxString& rsValue);
|
1999-10-14 04:43:46 +00:00
|
|
|
|
2001-11-16 18:40:45 +00:00
|
|
|
//
|
1999-10-14 04:43:46 +00:00
|
|
|
// Clipboard operations
|
2001-11-16 18:40:45 +00:00
|
|
|
//
|
1999-10-14 04:43:46 +00:00
|
|
|
virtual void Copy();
|
|
|
|
virtual void Cut();
|
|
|
|
virtual void Paste();
|
|
|
|
|
2001-11-16 18:40:45 +00:00
|
|
|
virtual void SetInsertionPoint(long lPos);
|
|
|
|
virtual void SetInsertionPointEnd(void);
|
|
|
|
virtual long GetInsertionPoint(void) const;
|
|
|
|
virtual long GetLastPosition(void) const;
|
|
|
|
virtual void Replace( long lFrom
|
|
|
|
,long lTo
|
|
|
|
,const wxString& rsValue
|
|
|
|
);
|
|
|
|
virtual void Remove( long lFrom
|
|
|
|
,long lTo
|
|
|
|
);
|
|
|
|
inline virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
|
|
|
|
virtual void SetSelection( long lFrom
|
|
|
|
,long lTo
|
|
|
|
);
|
|
|
|
virtual void SetEditable(bool bEditable);
|
|
|
|
|
|
|
|
virtual bool OS2Command( WXUINT uParam
|
|
|
|
,WXWORD wId
|
|
|
|
);
|
|
|
|
bool ProcessEditMsg( WXUINT uMsg
|
|
|
|
,WXWPARAM wParam
|
|
|
|
,WXLPARAM lParam
|
|
|
|
);
|
1999-07-29 05:11:30 +00:00
|
|
|
|
1999-10-14 04:43:46 +00:00
|
|
|
protected:
|
2001-11-16 18:40:45 +00:00
|
|
|
virtual void DoSetSize( int nX
|
|
|
|
,int nY
|
|
|
|
,int nWidth
|
|
|
|
,int nHeight
|
|
|
|
,int nSizeFlags = wxSIZE_AUTO
|
|
|
|
);
|
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxComboBox)
|
|
|
|
}; // end of CLASS wxComboBox
|
1999-07-29 05:11:30 +00:00
|
|
|
|
1999-10-14 04:43:46 +00:00
|
|
|
#endif // wxUSE_COMBOBOX
|
1999-07-29 05:11:30 +00:00
|
|
|
#endif
|
|
|
|
// _WX_COMBOBOX_H_
|