X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..f644bc116bbe46d6ab609a44c05835dc4d87ba02:/include/wx/univ/combobox.h diff --git a/include/wx/univ/combobox.h b/include/wx/univ/combobox.h index 4096d25d01..8c9eb4fcdc 100644 --- a/include/wx/univ/combobox.h +++ b/include/wx/univ/combobox.h @@ -6,7 +6,7 @@ // Created: 30.08.00 // RCS-ID: $Id$ // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) -// Licence: wxWidgets licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// /* @@ -36,10 +36,6 @@ #ifndef _WX_UNIV_COMBOBOX_H_ #define _WX_UNIV_COMBOBOX_H_ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "univcombobox.h" -#endif - class WXDLLEXPORT wxComboControl; class WXDLLEXPORT wxListBox; class WXDLLEXPORT wxPopupComboWindow; @@ -70,6 +66,7 @@ class WXDLLEXPORT wxComboPopup { public: wxComboPopup(wxComboControl *combo) { m_combo = combo; } + virtual ~wxComboPopup() {} // we must have an associated control which is subclassed by the combobox virtual wxControl *GetControl() = 0; @@ -77,7 +74,7 @@ public: // called before showing the control to set the initial selection - notice // that the text passed to this method might not correspond to any valid // item (if the user edited it directly), in which case the method should - // just return FALSE but not emit any errors + // just return false but not emit any errors virtual bool SetSelection(const wxString& value) = 0; // called immediately after the control is shown @@ -137,7 +134,7 @@ public: void ShowPopup(); void HidePopup(); - // return TRUE if the popup is currently shown + // return true if the popup is currently shown bool IsPopupShown() const { return m_isPopupShown; } // get the popup window containing the popup control @@ -159,13 +156,18 @@ public: virtual void OnDismiss(); // forward these functions to all subcontrols - virtual bool Enable(bool enable = TRUE); - virtual bool Show(bool show = TRUE); + virtual bool Enable(bool enable = true); + virtual bool Show(bool show = true); #if wxUSE_TOOLTIPS virtual void DoSetToolTip( wxToolTip *tip ); #endif // wxUSE_TOOLTIPS + // we have our own input handler and our own actions + virtual bool PerformAction(const wxControlAction& action, + long numArg = 0l, + const wxString& strArg = wxEmptyString); + protected: // override the base class virtuals involved into geometry calculations virtual wxSize DoGetBestClientSize() const; @@ -174,11 +176,6 @@ protected: int width, int height, int sizeFlags = wxSIZE_AUTO); - // we have our own input handler and our own actions - virtual bool PerformAction(const wxControlAction& action, - long numArg = 0l, - const wxString& strArg = wxEmptyString); - // event handlers void OnKey(wxKeyEvent& event); @@ -277,34 +274,42 @@ public: virtual void SetInsertionPoint(long pos); virtual void SetInsertionPointEnd(); virtual long GetInsertionPoint() const; - virtual long GetLastPosition() const; + virtual wxTextPos GetLastPosition() const; virtual void Replace(long from, long to, const wxString& value); virtual void Remove(long from, long to); virtual void SetSelection(long from, long to); virtual void SetEditable(bool editable); + virtual bool IsEditable() const; + + virtual void Undo(); + virtual void Redo(); + virtual void SelectAll(); + + virtual bool CanCopy() const; + virtual bool CanCut() const; + virtual bool CanPaste() const; + virtual bool CanUndo() const; + virtual bool CanRedo() const; // wxControlWithItems methods virtual void Clear(); - virtual void Delete(int n); - 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 void Select(int n); + virtual void Delete(unsigned int n); + virtual unsigned int GetCount() const; + virtual wxString GetString(unsigned int n) const; + virtual void SetString(unsigned int n, const wxString& s); + virtual int FindString(const wxString& s, bool bCase = false) const; + virtual void SetSelection(int n); virtual int GetSelection() const; - void SetSelection(int n) { Select(n); } - - void SetStringSelection(const wxString& WXUNUSED(s)) { } wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST protected: virtual int DoAppend(const wxString& item); - virtual int DoInsert(const wxString& item, int pos); - virtual void DoSetItemClientData(int n, void* clientData); - virtual void* DoGetItemClientData(int n) const; - virtual void DoSetItemClientObject(int n, wxClientData* clientData); - virtual wxClientData* DoGetItemClientObject(int n) const; + virtual int DoInsert(const wxString& item, unsigned int pos); + virtual void DoSetItemClientData(unsigned int n, void* clientData); + virtual void* DoGetItemClientData(unsigned int n) const; + virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData); + virtual wxClientData* DoGetItemClientObject(unsigned int n) const; // common part of all ctors void Init();