Fully implement wxStyledTextCtrl::PositionToXY().
Fill in the column parameter too now. Closes #14332. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -550,6 +550,7 @@ All (GUI):
|
|||||||
- Added support for fields and virtual attributes to wxRichTextCtrl.
|
- Added support for fields and virtual attributes to wxRichTextCtrl.
|
||||||
- Added custom text and dimension scaling to wxRichTextCtrl.
|
- Added custom text and dimension scaling to wxRichTextCtrl.
|
||||||
- Added pixel font size capability to wxTextAttr and wxRichTextCtrl.
|
- Added pixel font size capability to wxTextAttr and wxRichTextCtrl.
|
||||||
|
- Fully implement wxStyledTextCtrl::PositionToXY() (troelsk).
|
||||||
|
|
||||||
GTK:
|
GTK:
|
||||||
|
|
||||||
|
@@ -4200,16 +4200,15 @@ public:
|
|||||||
|
|
||||||
virtual bool PositionToXY(long pos, long *x, long *y) const
|
virtual bool PositionToXY(long pos, long *x, long *y) const
|
||||||
{
|
{
|
||||||
|
long l = LineFromPosition(pos);
|
||||||
|
if ( l == -1 )
|
||||||
|
return false;
|
||||||
|
|
||||||
if ( x )
|
if ( x )
|
||||||
*x = -1; // TODO
|
*x = pos - PositionFromLine(l);
|
||||||
|
|
||||||
if ( y )
|
if ( y )
|
||||||
{
|
|
||||||
long l = LineFromPosition(pos);
|
|
||||||
if ( l == -1 )
|
|
||||||
return false;
|
|
||||||
*y = l;
|
*y = l;
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -398,16 +398,15 @@ public:
|
|||||||
|
|
||||||
virtual bool PositionToXY(long pos, long *x, long *y) const
|
virtual bool PositionToXY(long pos, long *x, long *y) const
|
||||||
{
|
{
|
||||||
|
long l = LineFromPosition(pos);
|
||||||
|
if ( l == -1 )
|
||||||
|
return false;
|
||||||
|
|
||||||
if ( x )
|
if ( x )
|
||||||
*x = -1; // TODO
|
*x = pos - PositionFromLine(l);
|
||||||
|
|
||||||
if ( y )
|
if ( y )
|
||||||
{
|
|
||||||
long l = LineFromPosition(pos);
|
|
||||||
if ( l == -1 )
|
|
||||||
return false;
|
|
||||||
*y = l;
|
*y = l;
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user