X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/717a70722efbd1931301d44344df83ec23118b7b..115563867dac8edf57b6d2c6ae95910c7f277d77:/include/wx/mac/carbon/textctrl.h diff --git a/include/wx/mac/carbon/textctrl.h b/include/wx/mac/carbon/textctrl.h index a4a6dffdb2..acc52b5b3c 100644 --- a/include/wx/mac/carbon/textctrl.h +++ b/include/wx/mac/carbon/textctrl.h @@ -18,6 +18,9 @@ // has more features (backgrounds etc.), but may show redraw artefacts and other // problems depending on your usage; hence, the default is 'false'. #define wxMAC_TEXTCONTROL_USE_MLTE wxT("mac.textcontrol-use-mlte") + // set this to 'true' if you want editable text controls to have spell checking turned + // on by default, you can change this setting individually on a control using MacCheckSpelling + #define wxMAC_TEXTCONTROL_USE_SPELL_CHECKER wxT("mac.textcontrol-use-spell-checker") #endif #include "wx/control.h" @@ -47,7 +50,7 @@ public: Create(parent, id, value, pos, size, style, validator, name); } - ~wxTextCtrl(); + virtual ~wxTextCtrl(); bool Create(wxWindow *parent, wxWindowID id, @@ -61,7 +64,6 @@ public: // accessors // --------- virtual wxString GetValue() const; - virtual void SetValue(const wxString& value); virtual int GetLineLength(long lineNo) const; virtual wxString GetLineText(long lineNo) const; @@ -81,9 +83,6 @@ public: virtual void Replace(long from, long to, const wxString& value); virtual void Remove(long from, long to); - // load the controls contents from the file - virtual bool LoadFile(const wxString& file); - // sets/clears the dirty flag virtual void MarkDirty(); virtual void DiscardEdits(); @@ -174,17 +173,7 @@ public: virtual void MacVisibilityChanged(); virtual void MacEnabledStateChanged(); virtual void MacSuperChangedPosition(); - -#ifndef __WXMAC_OSX__ - virtual void MacControlUserPaneDrawProc(wxInt16 part); - virtual wxInt16 MacControlUserPaneHitTestProc(wxInt16 x, wxInt16 y); - virtual wxInt16 MacControlUserPaneTrackingProc(wxInt16 x, wxInt16 y, void* actionProc); - virtual void MacControlUserPaneIdleProc(); - virtual wxInt16 MacControlUserPaneKeyDownProc(wxInt16 keyCode, wxInt16 charCode, wxInt16 modifiers); - virtual void MacControlUserPaneActivateProc(bool activating); - virtual wxInt16 MacControlUserPaneFocusProc(wxInt16 action); - virtual void MacControlUserPaneBackgroundProc(void* info); -#endif + virtual void MacCheckSpelling(bool check); wxMacTextControl * GetPeer() const { return (wxMacTextControl*) m_peer; } @@ -195,6 +184,10 @@ protected: virtual wxSize DoGetBestSize() const; + virtual void CreatePeer(const wxString& str, const wxPoint& pos, const wxSize& size, long style ); + + virtual void DoSetValue(const wxString& value, int flags = 0); + bool m_editable; // flag is set to true when the user edits the controls contents @@ -203,6 +196,18 @@ protected: // need to make this public because of the current implementation via callbacks unsigned long m_maxLength; + bool GetTriggerOnSetValue() const + { + return m_triggerOnSetValue; + } + + void SetTriggerOnSetValue(bool trigger) + { + m_triggerOnSetValue = trigger; + } + + bool m_triggerOnSetValue ; + private : wxMenu *m_privateContextMenu;