-
- if(m_ReLayoutAll)
- {
- forceAll = TRUE;
- bottom = -1;
- }
- ForceTotalLayout(FALSE);
-
-
- // If one line was dirty, we need to re-calculate all
- // following lines, too.
- bool wasDirty = forceAll;
- // we need to layout until we reach at least the cursor line,
- // otherwise we won't be able to scroll to it
- bool cursorReached = false;
- wxLayoutLine *line = m_FirstLine;
- while(line)
- {
- if(! wasDirty)
- ApplyStyle(line->GetStyleInfo(), dc);
- if(
- // if any previous line was dirty, we need to layout all
- // following lines:
- wasDirty
- // go on until we find the cursorline
- || ! cursorReached
- // layout dirty lines:
- || line->IsDirty()
- // always layout the cursor line toupdate the cursor
- // position and size:
- || line == m_CursorLine
- // or if it's the line we are asked to look for:
- || (cpos && line->GetLineNumber() == cpos->y)
- // layout at least the desired region:
- || (bottom == -1 )
- || (line->GetPosition().y <= bottom)
- )
- {
- if(line->IsDirty())
- wasDirty = true;
-
- // The following Layout() calls will update our
- // m_CurrentStyleInfo if needed.
- if(line == m_CursorLine)
- {
- line->Layout(dc, this,
- (wxPoint *)&m_CursorScreenPos,
- (wxPoint *)&m_CursorSize,
- &m_CursorStyleInfo,
- m_CursorPos.x);
+
+ if(m_ReLayoutAll)
+ {
+ forceAll = true;
+ bottom = -1;
+ }
+
+ ForceTotalLayout(false);
+
+
+ // If one line was dirty, we need to re-calculate all
+ // following lines, too.
+ bool wasDirty = forceAll;
+ // we need to layout until we reach at least the cursor line,
+ // otherwise we won't be able to scroll to it
+ bool cursorReached = false;
+ wxLayoutLine *line = m_FirstLine;
+ while(line)
+ {
+ if(! wasDirty)
+ ApplyStyle(line->GetStyleInfo(), dc);
+ if(
+ // if any previous line was dirty, we need to layout all
+ // following lines:
+ wasDirty
+ // go on until we find the cursorline
+ || ! cursorReached
+ // layout dirty lines:
+ || line->IsDirty()
+ // always layout the cursor line toupdate the cursor
+ // position and size:
+ || line == m_CursorLine
+ // or if it's the line we are asked to look for:
+ || (cpos && line->GetLineNumber() == cpos->y)
+ // layout at least the desired region:
+ || (bottom == -1 )
+ || (line->GetPosition().y <= bottom)
+ )
+ {
+ if(line->IsDirty())
+ wasDirty = true;
+
+ // The following Layout() calls will update our
+ // m_CurrentStyleInfo if needed.
+ if(line == m_CursorLine)
+ {
+ line->Layout(dc, this,
+ (wxPoint *)&m_CursorScreenPos,
+ (wxPoint *)&m_CursorSize,
+ &m_CursorStyleInfo,
+ m_CursorPos.x);