wxItemContainerImmutable::FindString unified.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f7c40316d5
commit
853dcc57c6
@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/16
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_CHOICE_H__
|
||||
@ -85,7 +85,7 @@ public:
|
||||
virtual int GetCount() const;
|
||||
virtual wxString GetString(int) const;
|
||||
virtual void SetString(int, const wxString&);
|
||||
virtual int FindString(const wxString&) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual int GetSelection() const;
|
||||
virtual int DoAppend(const wxString&);
|
||||
virtual int DoInsert(const wxString&, int);
|
||||
|
@ -26,7 +26,7 @@ class wxCocoaNSComboBox
|
||||
public:
|
||||
void AssociateNSComboBox(WX_NSComboBox cocoaNSComboBox);
|
||||
void DisassociateNSComboBox(WX_NSComboBox cocoaNSComboBox);
|
||||
|
||||
|
||||
virtual void doWxEvent(int nEvent) = 0;
|
||||
};
|
||||
|
||||
@ -110,7 +110,7 @@ public:
|
||||
virtual int GetCount() const;
|
||||
virtual wxString GetString(int) const;
|
||||
virtual void SetString(int, const wxString&);
|
||||
virtual int FindString(const wxString&) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual int GetSelection() const;
|
||||
virtual int DoAppend(const wxString&);
|
||||
virtual int DoInsert(const wxString&, int);
|
||||
|
@ -4,9 +4,9 @@
|
||||
// Author: David Elliott
|
||||
// Modified by:
|
||||
// Created: 2003/03/16
|
||||
// RCS-ID: $Id:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2003 David Elliott
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __WX_COCOA_LISTBOX_H__
|
||||
@ -98,7 +98,7 @@ public:
|
||||
virtual int GetCount() const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
// selection
|
||||
virtual int GetSelection() const;
|
||||
protected:
|
||||
|
@ -44,7 +44,22 @@ public:
|
||||
virtual wxString GetString(int n) const = 0;
|
||||
wxArrayString GetStrings() const;
|
||||
virtual void SetString(int n, const wxString& s) = 0;
|
||||
virtual int FindString(const wxString& s) const = 0;
|
||||
|
||||
// finding string natively is either case sensitive or insensitive
|
||||
// but never both so fall back to this base version for not
|
||||
// supported search type
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const
|
||||
{
|
||||
int count = GetCount();
|
||||
|
||||
for ( int i = 0; i < count ; i ++ )
|
||||
{
|
||||
if (GetString(i).IsSameAs( s , bCase ))
|
||||
return i;
|
||||
}
|
||||
|
||||
return wxNOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
// selection
|
||||
@ -208,4 +223,3 @@ inline int wxItemContainer::Number() const
|
||||
#endif // wxUSE_CONTROLS
|
||||
|
||||
#endif // _WX_CTRLSUB_H_BASE_
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Name: wx/gtk/choice.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@ -70,7 +70,7 @@ public:
|
||||
void SetSelection( int n );
|
||||
|
||||
virtual int GetCount() const;
|
||||
int FindString( const wxString& string ) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
wxString GetString( int n ) const;
|
||||
void SetString( int n, const wxString& string );
|
||||
|
||||
@ -102,8 +102,8 @@ private:
|
||||
wxSortedArrayString *m_strings;
|
||||
|
||||
public:
|
||||
// this circumvents a GTK+ 2.0 bug so that the selection is
|
||||
// invalidated properly
|
||||
// this circumvents a GTK+ 2.0 bug so that the selection is
|
||||
// invalidated properly
|
||||
int m_selection_hack;
|
||||
|
||||
private:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: combobox.h
|
||||
// Name: wx/gtk/combobox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
@ -83,7 +83,7 @@ public:
|
||||
void Clear();
|
||||
void Delete( int n );
|
||||
|
||||
virtual int FindString( const wxString &item ) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
int GetSelection() const;
|
||||
int GetCurrentSelection() const;
|
||||
wxString GetString( int n ) const;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.h
|
||||
// Name: wx/gtk/listbox.h
|
||||
// Purpose: wxListBox class declaration
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@ -73,7 +73,7 @@ public:
|
||||
virtual int GetCount() const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
|
||||
virtual bool IsSelected(int n) const;
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
@ -93,7 +93,7 @@ public:
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
|
||||
// implementation from now on
|
||||
|
||||
void GtkAddItem( const wxString &item, int pos=-1 );
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxRadioBoxNameStr);
|
||||
|
||||
int FindString( const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
void SetSelection( int n );
|
||||
int GetSelection() const;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Name: wx/gtk/choice.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@ -70,7 +70,7 @@ public:
|
||||
void SetSelection( int n );
|
||||
|
||||
virtual int GetCount() const;
|
||||
int FindString( const wxString& string ) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
wxString GetString( int n ) const;
|
||||
void SetString( int n, const wxString& string );
|
||||
|
||||
@ -102,8 +102,8 @@ private:
|
||||
wxSortedArrayString *m_strings;
|
||||
|
||||
public:
|
||||
// this circumvents a GTK+ 2.0 bug so that the selection is
|
||||
// invalidated properly
|
||||
// this circumvents a GTK+ 2.0 bug so that the selection is
|
||||
// invalidated properly
|
||||
int m_selection_hack;
|
||||
|
||||
private:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: combobox.h
|
||||
// Name: wx/gtk/combobox.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
@ -83,7 +83,7 @@ public:
|
||||
void Clear();
|
||||
void Delete( int n );
|
||||
|
||||
virtual int FindString( const wxString &item ) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
int GetSelection() const;
|
||||
int GetCurrentSelection() const;
|
||||
wxString GetString( int n ) const;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.h
|
||||
// Name: wx/gtk/listbox.h
|
||||
// Purpose: wxListBox class declaration
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
@ -73,7 +73,7 @@ public:
|
||||
virtual int GetCount() const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
|
||||
virtual bool IsSelected(int n) const;
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
@ -93,7 +93,7 @@ public:
|
||||
|
||||
static wxVisualAttributes
|
||||
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
||||
|
||||
|
||||
// implementation from now on
|
||||
|
||||
void GtkAddItem( const wxString &item, int pos=-1 );
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxRadioBoxNameStr);
|
||||
|
||||
int FindString( const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
void SetSelection( int n );
|
||||
int GetSelection() const;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Name: wx/mac/carbon/choice.h
|
||||
// Purpose: wxChoice class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@ -30,60 +30,60 @@ public:
|
||||
wxChoice()
|
||||
: m_strings(), m_datas(), m_macPopUpMenuHandle(NULL)
|
||||
{}
|
||||
|
||||
|
||||
virtual ~wxChoice() ;
|
||||
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual int DoAppend(const wxString& item);
|
||||
virtual int DoInsert(const wxString& item, int pos);
|
||||
virtual void Delete(int n);
|
||||
virtual void Clear();
|
||||
// implement base class pure virtuals
|
||||
virtual int DoAppend(const wxString& item);
|
||||
virtual int DoInsert(const wxString& item, int pos);
|
||||
virtual void Delete(int n);
|
||||
virtual void Clear();
|
||||
|
||||
virtual int GetCount() const ;
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
int GetCurrentSelection() const { return GetSelection(); }
|
||||
virtual int GetCount() const ;
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
int GetCurrentSelection() const { return GetSelection(); }
|
||||
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual void SetString( int , const wxString& s ) ;
|
||||
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual void SetString( int , const wxString& s ) ;
|
||||
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const ;
|
||||
@ -96,12 +96,12 @@ public: // for wxComboBox only
|
||||
|
||||
protected:
|
||||
// free all memory we have (used by Clear() and dtor)
|
||||
// prevent collision with some BSD definitions of macro Free()
|
||||
// prevent collision with some BSD definitions of macro Free()
|
||||
void FreeData();
|
||||
|
||||
wxArrayString m_strings;
|
||||
wxChoiceDataArray m_datas ;
|
||||
WXHMENU m_macPopUpMenuHandle ;
|
||||
wxArrayString m_strings;
|
||||
wxChoiceDataArray m_datas ;
|
||||
WXHMENU m_macPopUpMenuHandle ;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: combobox.h
|
||||
// Name: wx/mac/carbon/combobox.h
|
||||
// Purpose: wxComboBox class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@ -89,7 +89,7 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
|
||||
virtual int GetSelection() const ;
|
||||
int GetCurrentSelection() const { return GetSelection(); }
|
||||
virtual void SetSelection(int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual wxString GetStringSelection() const ;
|
||||
virtual void SetString(int n, const wxString& s) ;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.h
|
||||
// Name: wx/mac/carbon/listbox.h
|
||||
// Purpose: wxListBox class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@ -80,7 +80,7 @@ public:
|
||||
virtual int GetCount() const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
|
||||
virtual bool IsSelected(int n) const;
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Name: wx/mac/classic/choice.h
|
||||
// Purpose: wxChoice class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@ -30,59 +30,58 @@ public:
|
||||
wxChoice()
|
||||
: m_strings(), m_datas(), m_macPopUpMenuHandle(NULL)
|
||||
{}
|
||||
|
||||
|
||||
virtual ~wxChoice() ;
|
||||
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr)
|
||||
{
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int n = 0, const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
const wxArrayString& choices,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxChoiceNameStr);
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual int DoAppend(const wxString& item);
|
||||
virtual int DoInsert(const wxString& item, int pos);
|
||||
virtual void Delete(int n);
|
||||
virtual void Clear();
|
||||
// implement base class pure virtuals
|
||||
virtual int DoAppend(const wxString& item);
|
||||
virtual int DoInsert(const wxString& item, int pos);
|
||||
virtual void Delete(int n);
|
||||
virtual void Clear();
|
||||
|
||||
virtual int GetCount() const ;
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
virtual int GetCount() const ;
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual void SetString( int , const wxString& s ) ;
|
||||
void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual void SetString( int , const wxString& s ) ;
|
||||
void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const ;
|
||||
@ -95,12 +94,12 @@ public: // for wxComboBox only
|
||||
|
||||
protected:
|
||||
// free all memory we have (used by Clear() and dtor)
|
||||
// prevent collision with some BSD definitions of macro Free()
|
||||
// prevent collision with some BSD definitions of macro Free()
|
||||
void FreeData();
|
||||
|
||||
wxArrayString m_strings;
|
||||
wxChoiceDataArray m_datas ;
|
||||
WXHMENU m_macPopUpMenuHandle ;
|
||||
wxArrayString m_strings;
|
||||
wxChoiceDataArray m_datas ;
|
||||
WXHMENU m_macPopUpMenuHandle ;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: combobox.h
|
||||
// Name: wx/mac/classic/combobox.h
|
||||
// Purpose: wxComboBox class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@ -83,7 +83,7 @@ class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
|
||||
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual wxString GetStringSelection() const ;
|
||||
virtual void SetString(int n, const wxString& s) ;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.h
|
||||
// Name: wx/mac/classic/listbox.h
|
||||
// Purpose: wxListBox class
|
||||
// Author: Stefan Csomor
|
||||
// Modified by:
|
||||
@ -82,7 +82,7 @@ public:
|
||||
|
||||
virtual ~wxListBox();
|
||||
virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL);
|
||||
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void Clear();
|
||||
virtual void Delete(int n);
|
||||
@ -90,7 +90,7 @@ public:
|
||||
virtual int GetCount() const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
|
||||
virtual bool IsSelected(int n) const;
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
@ -153,7 +153,7 @@ protected:
|
||||
bool HasMultipleSelection() const;
|
||||
|
||||
// free memory (common part of Clear() and dtor)
|
||||
// prevent collision with some BSD definitions of macro Free()
|
||||
// prevent collision with some BSD definitions of macro Free()
|
||||
void FreeData();
|
||||
|
||||
int m_noItems;
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: checklst.h
|
||||
// Name: wx/motif/checklst.h
|
||||
// Purpose: wxCheckListBox class - a listbox with checkable items
|
||||
// Note: this is an optional class.
|
||||
// Author: Julian Smart
|
||||
@ -18,14 +18,14 @@
|
||||
class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
|
||||
|
||||
|
||||
public:
|
||||
// ctors
|
||||
wxCheckListBox();
|
||||
wxCheckListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
int nStrings = 0,
|
||||
int nStrings = 0,
|
||||
const wxString choices[] = NULL,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
@ -46,7 +46,7 @@ public:
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
@ -54,14 +54,14 @@ public:
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
|
||||
// items may be checked
|
||||
bool IsChecked(size_t uiIndex) const;
|
||||
void Check(size_t uiIndex, bool bCheck = true);
|
||||
|
||||
// override base class functions
|
||||
virtual int DoAppend(const wxString& item);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual wxString GetString(int n) const;
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Name: wx/motif/choice.h
|
||||
// Purpose: wxChoice class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CHOICE_H_
|
||||
@ -29,7 +29,7 @@ class WXDLLEXPORT wxChoice: public wxChoiceBase
|
||||
public:
|
||||
wxChoice();
|
||||
~wxChoice();
|
||||
|
||||
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
@ -41,7 +41,7 @@ public:
|
||||
Init();
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
|
||||
wxChoice(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
@ -80,7 +80,7 @@ public:
|
||||
virtual wxClientData* DoGetItemClientObject(int n) const;
|
||||
virtual int GetSelection() const;
|
||||
virtual void Delete(int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual void Clear();
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual wxString GetString(int n) const;
|
||||
@ -89,12 +89,12 @@ public:
|
||||
virtual void SetSelection(int n);
|
||||
virtual void SetColumns(int n = 1 );
|
||||
virtual int GetColumns() const ;
|
||||
|
||||
// Original API
|
||||
|
||||
// Original API
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
|
||||
|
||||
void SetFocus();
|
||||
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||
virtual void ChangeBackgroundColour();
|
||||
@ -120,7 +120,7 @@ protected:
|
||||
WXWidget m_formWidget;
|
||||
wxStringList m_stringList;
|
||||
wxClientDataDictionary m_clientDataDict;
|
||||
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: combobox.h
|
||||
// Name: wx/motif/combobox.h
|
||||
// Purpose: wxComboBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -76,7 +76,7 @@ public:
|
||||
virtual void Clear();
|
||||
virtual int GetSelection() const ;
|
||||
virtual void SetSelection(int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.h
|
||||
// Name: wx/motif/listbox.h
|
||||
// Purpose: wxListBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 17/09/98
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_LISTBOX_H_
|
||||
@ -22,7 +22,7 @@ class WXDLLEXPORT wxArrayInt;
|
||||
class WXDLLEXPORT wxListBox: public wxListBoxBase
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxListBox)
|
||||
|
||||
|
||||
public:
|
||||
wxListBox();
|
||||
wxListBox(wxWindow *parent, wxWindowID id,
|
||||
@ -35,7 +35,7 @@ public:
|
||||
{
|
||||
Create(parent, id, pos, size, n, choices, style, validator, name);
|
||||
}
|
||||
|
||||
|
||||
wxListBox(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
@ -46,7 +46,7 @@ public:
|
||||
{
|
||||
Create(parent, id, pos, size, choices, style, validator, name);
|
||||
}
|
||||
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
@ -54,7 +54,7 @@ public:
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
@ -62,9 +62,9 @@ public:
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxListBoxNameStr);
|
||||
|
||||
|
||||
~wxListBox();
|
||||
|
||||
|
||||
// implementation of wxControlWithItems
|
||||
virtual int GetCount() const;
|
||||
virtual int DoAppend(const wxString& item);
|
||||
@ -74,7 +74,7 @@ public:
|
||||
virtual wxClientData* DoGetItemClientObject(int n) const;
|
||||
virtual int GetSelection() const;
|
||||
virtual void Delete(int n);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual void Clear();
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual wxString GetString(int n) const;
|
||||
@ -89,7 +89,7 @@ public:
|
||||
|
||||
// For single or multiple choice list item
|
||||
void Command(wxCommandEvent& event);
|
||||
|
||||
|
||||
// Implementation
|
||||
virtual void ChangeBackgroundColour();
|
||||
virtual void ChangeForegroundColour();
|
||||
@ -102,7 +102,7 @@ protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
int m_noItems;
|
||||
|
||||
|
||||
// List mapping positions->client data
|
||||
wxClientDataDictionary m_clientDataDict;
|
||||
private:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: radiobox.h
|
||||
// Name: wx/motif/radiobox.h
|
||||
// Purpose: wxRadioBox class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -72,7 +72,6 @@ public:
|
||||
const wxValidator& val = wxDefaultValidator,
|
||||
const wxString& name = wxRadioBoxNameStr);
|
||||
|
||||
int FindString(const wxString& s) const;
|
||||
void SetSelection(int N);
|
||||
int GetSelection() const;
|
||||
|
||||
@ -123,4 +122,3 @@ private:
|
||||
};
|
||||
|
||||
#endif // _WX_MOTIF_RADIOBOX_H_
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Name: wx/msw/choice.h
|
||||
// Purpose: wxChoice class
|
||||
// Author: Julian Smart
|
||||
// Modified by: Vadim Zeitlin to derive from wxChoiceBase
|
||||
@ -77,7 +77,7 @@ public:
|
||||
virtual int GetCurrentSelection() const;
|
||||
virtual void SetSelection(int n);
|
||||
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
|
||||
|
@ -84,7 +84,7 @@ public:
|
||||
virtual int GetCount() const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
|
||||
virtual bool IsSelected(int n) const;
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
virtual int GetSelection() const;
|
||||
virtual void SetSelection(int n);
|
||||
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choice.h
|
||||
// Name: wx/os2/choice.h
|
||||
// Purpose: wxChoice class
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@ -98,7 +98,6 @@ public:
|
||||
virtual int GetSelection(void) const ;
|
||||
virtual void SetSelection(int n);
|
||||
|
||||
virtual int FindString(const wxString& rsStr) const;
|
||||
virtual wxString GetString(int n) const ;
|
||||
virtual void SetString( int n
|
||||
,const wxString& rsStr
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: listbox.h
|
||||
// Name: wx/os2/listbox.h
|
||||
// Purpose: wxListBox class
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@ -108,10 +108,7 @@ public:
|
||||
|
||||
virtual int GetCount(void) const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString( int n
|
||||
,const wxString& rsString
|
||||
);
|
||||
virtual int FindString(const wxString& rsString) const;
|
||||
virtual void SetString(int n, const wxString& rsString);
|
||||
|
||||
virtual bool IsSelected(int n) const;
|
||||
virtual void DoSetSelection( int n
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: radiobox.h
|
||||
// Name: wx/os2/radiobox.h
|
||||
// Purpose: wxRadioBox class
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@ -99,11 +99,10 @@ public:
|
||||
,const wxString& rsName = wxRadioBoxNameStr
|
||||
);
|
||||
|
||||
void Command(wxCommandEvent& rEvent);
|
||||
bool ContainsHWND(WXHWND hWnd) const;
|
||||
virtual bool Enable(bool bEnable = true);
|
||||
virtual bool Enable(int nItem, bool bEnable = true);
|
||||
int FindString(const wxString& sStr) const;
|
||||
void Command(wxCommandEvent& rEvent);
|
||||
bool ContainsHWND(WXHWND hWnd) const;
|
||||
virtual bool Enable(bool bEnable = true);
|
||||
virtual bool Enable(int nItem, bool bEnable = true);
|
||||
|
||||
virtual WXHBRUSH OnCtlColor( WXHDC hDC
|
||||
,WXHWND hWnd
|
||||
|
@ -73,7 +73,6 @@ public:
|
||||
virtual int GetSelection() const;
|
||||
virtual void SetSelection(int n);
|
||||
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
|
||||
|
@ -84,7 +84,6 @@ public:
|
||||
virtual int GetCount() const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
|
||||
virtual bool IsSelected(int n) const;
|
||||
virtual void DoSetSelection(int n, bool select);
|
||||
|
@ -38,10 +38,6 @@ public:
|
||||
// return the item above/below/to the left/right of the given one
|
||||
int GetNextItem(int item, wxDirection dir, long style) const;
|
||||
|
||||
|
||||
// implement some of wxItemContainerImmutable functions
|
||||
virtual int FindString(const wxString& s) const;
|
||||
|
||||
// deprecated functions
|
||||
// --------------------
|
||||
|
||||
|
@ -296,7 +296,7 @@ public:
|
||||
virtual int GetCount() const;
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s) const;
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const;
|
||||
virtual void SetSelection(int n);
|
||||
virtual int GetSelection() const;
|
||||
|
||||
|
@ -103,8 +103,8 @@ public:
|
||||
virtual wxString GetString(int n) const
|
||||
{ return m_strings->Item(n); }
|
||||
virtual void SetString(int n, const wxString& s);
|
||||
virtual int FindString(const wxString& s) const
|
||||
{ return m_strings->Index(s); }
|
||||
virtual int FindString(const wxString& s, bool bCase = false) const
|
||||
{ return m_strings->Index(s, bCase); }
|
||||
|
||||
virtual bool IsSelected(int n) const
|
||||
{ return m_selections.Index(n) != wxNOT_FOUND; }
|
||||
|
Loading…
Reference in New Issue
Block a user