// 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 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 )
if ( to )
*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); }
('Retrieve the contents of a line.',)),
- 'SetSel' : ('SetSelection', 0, 0, 0),
+ 'SetSel' : (None, 0,0,0), #'SetSelection', 0, 0, 0),
'GetSelText' :
('GetSelectedText',
'wxString %s();',
'''wxString %s() {
- int start;
- int end;
+ long start;
+ long end;
GetSelection(&start, &end);
int len = end - start;
return SendMsg(2159, 0, 0) != 0;
}
-// Select a range of text.
-void wxStyledTextCtrl::SetSelection(int start, int end)
-{
- SendMsg(2160, start, end);
-}
-
// Retrieve the selected text.
wxString wxStyledTextCtrl::GetSelectedText() {
- int start;
- int end;
+ long start;
+ long end;
GetSelection(&start, &end);
int len = end - start;
}
-// Retrieve the start and end positions of the current selection.
-void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) {
- if (startPos != NULL)
- *startPos = SendMsg(SCI_GETSELECTIONSTART);
- if (endPos != NULL)
- *endPos = SendMsg(SCI_GETSELECTIONEND);
-}
-
-
// Retrieve the point in the window where a position is displayed.
wxPoint wxStyledTextCtrl::PointFromPosition(int pos) {
int x = SendMsg(SCI_POINTXFROMPOSITION, 0, pos);
wxCharBuffer wxStyledTextCtrl::GetSelectedTextRaw()
{
- int start;
- int end;
+ long start;
+ long end;
GetSelection(&start, &end);
int len = end - start;
}
-// Retrieve the start and end positions of the current selection.
-void wxStyledTextCtrl::GetSelection(int* startPos, int* endPos) {
- if (startPos != NULL)
- *startPos = SendMsg(SCI_GETSELECTIONSTART);
- if (endPos != NULL)
- *endPos = SendMsg(SCI_GETSELECTIONEND);
-}
-
-
// Retrieve the point in the window where a position is displayed.
wxPoint wxStyledTextCtrl::PointFromPosition(int pos) {
int x = SendMsg(SCI_POINTXFROMPOSITION, 0, pos);
wxCharBuffer wxStyledTextCtrl::GetSelectedTextRaw()
{
- int start;
- int end;
+ long start;
+ long end;
GetSelection(&start, &end);
int len = end - start;
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 )
if ( to )
*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); }