X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a2fd8a45eca03f90371a1c41b2f7450df088b07c..3d5930b5ea5cd28d97ca9df147cd48bc51061480:/include/wx/stc/stc.h diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 5ab192da78..e701ed9881 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -1978,7 +1978,7 @@ class WordList; struct SCNotification; #ifndef SWIG -extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr; +extern WXDLLIMPEXP_DATA_STC(const char) wxSTCNameStr[]; class WXDLLIMPEXP_FWD_STC wxStyledTextCtrl; class WXDLLIMPEXP_FWD_STC wxStyledTextEvent; #endif @@ -2615,9 +2615,6 @@ public: // Is the document different from when it was last saved? bool GetModify() const; - // Select a range of text. - void SetSelection(int start, int end); - // Retrieve the selected text. wxString GetSelectedText(); @@ -2646,7 +2643,7 @@ public: void SetReadOnly(bool readOnly); // Will a paste succeed? - bool CanPaste(); + bool CanPaste() const; // Are there any undoable actions in the undo history? bool CanUndo() const; @@ -3547,13 +3544,6 @@ public: void SetMargins(int left, int right); - // Retrieve the start and end positions of the current selection. -#ifdef SWIG - void GetSelection(int* OUTPUT, int* OUTPUT); -#else - void GetSelection(int* startPos, int* endPos); -#endif - // Retrieve the point in the window where a position is displayed. wxPoint PointFromPosition(int pos); @@ -3703,6 +3693,9 @@ public: } } +#ifdef SWIG + void GetSelection(long* OUTPUT, long* OUTPUT) const; +#else virtual void GetSelection(long *from, long *to) const { if ( from ) @@ -3711,6 +3704,18 @@ public: *to = GetSelectionEnd(); } + // kept for compatibility only + void GetSelection(int *from, int *to) + { + long f, t; + GetSelection(&f, &t); + if ( from ) + *from = f; + if ( to ) + *to = t; + } +#endif + virtual bool IsEditable() const { return !GetReadOnly(); } virtual void SetEditable(bool editable) { SetReadOnly(!editable); }