git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55868
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Is the document different from when it was last saved?
bool GetModify() const;
// 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();
// Retrieve the selected text.
wxString GetSelectedText();
void SetMargins(int left, int right);
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);
// 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 )
virtual void GetSelection(long *from, long *to) const
{
if ( from )
if ( to )
*to = GetSelectionEnd();
}
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); }
virtual bool IsEditable() const { return !GetReadOnly(); }
virtual void SetEditable(bool editable) { SetReadOnly(!editable); }
('Retrieve the contents of a line.',)),
('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() {
'GetSelText' :
('GetSelectedText',
'wxString %s();',
'''wxString %s() {
+ long start;
+ long end;
GetSelection(&start, &end);
int len = end - start;
GetSelection(&start, &end);
int len = end - start;
return SendMsg(2159, 0, 0) != 0;
}
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() {
// Retrieve the selected text.
wxString wxStyledTextCtrl::GetSelectedText() {
+ long start;
+ long end;
GetSelection(&start, &end);
int len = end - start;
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);
// 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()
{
wxCharBuffer wxStyledTextCtrl::GetSelectedTextRaw()
{
+ long start;
+ long end;
GetSelection(&start, &end);
int len = end - start;
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);
// 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()
{
wxCharBuffer wxStyledTextCtrl::GetSelectedTextRaw()
{
+ long start;
+ long end;
GetSelection(&start, &end);
int len = end - start;
GetSelection(&start, &end);
int len = end - start;
void SetMargins(int left, int right);
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);
// 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 )
virtual void GetSelection(long *from, long *to) const
{
if ( from )
if ( to )
*to = GetSelectionEnd();
}
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); }
virtual bool IsEditable() const { return !GetReadOnly(); }
virtual void SetEditable(bool editable) { SetReadOnly(!editable); }