layout better
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2118,26 +2118,9 @@ wxLayoutList::Recalculate(wxDC &dc, CoordType bottom)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
wxLayoutList::UpdateCursorScreenPos(wxDC &dc)
|
|
||||||
{
|
|
||||||
wxCHECK_RET( m_CursorLine, "no cursor line" );
|
|
||||||
|
|
||||||
// we need to save the current style, in case the layout() of the line
|
|
||||||
// changes it
|
|
||||||
wxLayoutStyleInfo SiBackup = m_CurrentStyleInfo;
|
|
||||||
m_CursorLine->Layout(dc, this,
|
|
||||||
&m_CursorScreenPos, &m_CursorSize,
|
|
||||||
m_CursorPos.x,
|
|
||||||
true /* suppress update */);
|
|
||||||
ApplyStyle(SiBackup, dc); // restore it
|
|
||||||
}
|
|
||||||
|
|
||||||
wxPoint
|
wxPoint
|
||||||
wxLayoutList::GetCursorScreenPos(wxDC &dc)
|
wxLayoutList::GetCursorScreenPos(wxDC &dc)
|
||||||
{
|
{
|
||||||
UpdateCursorScreenPos(dc);
|
|
||||||
|
|
||||||
return m_CursorScreenPos;
|
return m_CursorScreenPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2348,11 +2331,7 @@ void
|
|||||||
wxLayoutList::DrawCursor(wxDC &dc, bool active, wxPoint const &translate)
|
wxLayoutList::DrawCursor(wxDC &dc, bool active, wxPoint const &translate)
|
||||||
{
|
{
|
||||||
if ( m_movedCursor )
|
if ( m_movedCursor )
|
||||||
{
|
|
||||||
UpdateCursorScreenPos(dc);
|
|
||||||
|
|
||||||
m_movedCursor = false;
|
m_movedCursor = false;
|
||||||
}
|
|
||||||
|
|
||||||
wxPoint coords(m_CursorScreenPos);
|
wxPoint coords(m_CursorScreenPos);
|
||||||
coords += translate;
|
coords += translate;
|
||||||
|
@@ -995,11 +995,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
wxPoint GetCursorScreenPos(wxDC &dc);
|
wxPoint GetCursorScreenPos(wxDC &dc);
|
||||||
|
|
||||||
/** Calculates the cursor position on the screen.
|
|
||||||
@param dc the dc to use for cursor position calculations
|
|
||||||
*/
|
|
||||||
void UpdateCursorScreenPos(wxDC &dc);
|
|
||||||
|
|
||||||
/** Draws the cursor.
|
/** Draws the cursor.
|
||||||
@param active If true, draw a bold cursor to mark window as
|
@param active If true, draw a bold cursor to mark window as
|
||||||
active.
|
active.
|
||||||
|
Reference in New Issue
Block a user