/////////////////////////////////////////////////////////////////////////////
-// Name: combobox.h
+// Name: wx/mac/carbon/combobox.h
// Purpose: wxComboBox class
// Author: Stefan Csomor
// Modified by:
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWidgets licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_COMBOBOX_H_
#define _WX_COMBOBOX_H_
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "combobox.h"
-#endif
-
-#include "wx/textctrl.h"
#include "wx/choice.h"
-WXDLLEXPORT_DATA(extern const wxChar*) wxComboBoxNameStr;
+WXDLLEXPORT_DATA(extern const wxChar) wxComboBoxNameStr[];
+
+// forward declaration of private implementation classes
+
+class wxComboBoxText ;
+class wxComboBoxChoice ;
// Combobox item
class WXDLLEXPORT wxComboBox : public wxControl, public wxComboBoxBase
DECLARE_DYNAMIC_CLASS(wxComboBox)
public:
- inline wxComboBox() {}
+ wxComboBox() ;
virtual ~wxComboBox();
- // override the base class virtuals involved in geometry calculations
- virtual wxSize DoGetBestSize() const;
- virtual void DoMoveWindow(int x, int y, int width, int height);
// forward these functions to all subcontrols
- virtual bool Enable(bool enable = TRUE);
- virtual bool Show(bool show = TRUE);
- virtual void SetFocus();
+ virtual bool Enable(bool enable = true);
+ virtual bool Show(bool show = true);
// callback functions
virtual void DelegateTextChanged( const wxString& value );
virtual void Clear();
virtual int GetSelection() const ;
+ int GetCurrentSelection() const { return GetSelection(); }
virtual void SetSelection(int n);
- virtual void Select(int n) { SetSelection(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) ;
- virtual bool SetStringSelection(const wxString& sel);
// Text field functions
virtual wxString GetValue() const ;
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 int GetCount() const ;
+
+ 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 ;
+
wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
+ WX_DECLARE_CONTROL_CONTAINER();
protected:
+ // override the base class virtuals involved in geometry calculations
+ virtual wxSize DoGetBestSize() const;
+ virtual void DoMoveWindow(int x, int y, int width, int height);
+
virtual int DoAppend(const wxString& item) ;
virtual int DoInsert(const wxString& item, int pos) ;
void FreeData();
// the subcontrols
- wxTextCtrl* m_text;
- wxChoice* m_choice;
+ wxComboBoxText* m_text;
+ wxComboBoxChoice* m_choice;
+
+ DECLARE_EVENT_TABLE()
};
#endif