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
// 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();
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;
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);
}
}
+#ifdef SWIG
+ void GetSelection(long* OUTPUT, long* OUTPUT) const;
+#else
virtual void GetSelection(long *from, long *to) const
{
if ( from )
*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); }
virtual void ShowPosition(long pos) { GotoPos(pos); }
- using wxWindow::HitTest;
+ // FIXME-VC6: can't use wxWindow here because of "error C2603: illegal
+ // access declaration: 'wxWindow' is not a direct base of
+ // 'wxStyledTextCtrl'" with VC6
+ using wxControl::HitTest;
virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const
{
return wxTE_HT_ON_TEXT;
}
+ // just unhide it
+ virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt,
+ wxTextCoord *col,
+ wxTextCoord *row) const
+ {
+ return wxTextAreaBase::HitTest(pt, col, row);
+ }
+
#ifndef SWIG
protected:
virtual bool DoLoadFile(const wxString& file, int fileType);