=====================================================================
Inserting NL in empty line sometimes doesn't move cursor down.
+Line numbers go a bit berserk, too. :-)
+
+The following two probs can probably be fixed by adding the
+RecalculateLayout() method:
+ Funny re-layout shows again in sample text.
+ Printing works again, but layout at begin of new page is corrupted.
-Printing produces empty pages only.
Selections:
- moving in negative direction doesn't work
void
MyFrame::AddSampleText(wxLayoutList *llist)
{
-#if 0
llist->Clear(wxSWISS,16,wxNORMAL,wxNORMAL, false);
llist->SetFont(-1,-1,-1,-1,-1,"blue");
llist->Insert("blue");
llist->SetFont(-1,-1,-1,-1,-1,"black");
llist->Insert("The quick brown fox jumps over the lazy dog.");
llist->LineBreak();
-#endif
llist->SetFont(wxROMAN,16,wxNORMAL,wxNORMAL, false);
llist->Insert("--");
llist->SetFont(-1,-1,wxNORMAL);
llist->LineBreak();
-#if 0
llist->Insert("and ");
llist->SetFont(-1,-1,wxSLANT);
llist->Insert("slanted");
llist->LineBreak();
}
}
-#endif
llist->MoveCursorTo(wxPoint(0,0));
m_lwin->SetDirty();
m_lwin->Refresh();
m_FirstLine = m_CursorLine->GetPreviousLine();
m_CursorPos.y++;
m_CursorPos.x = 0;
+// doesn't help m_CursorLine.MarkDirty();
m_CursorLine->RecalculatePositions(true, this); //FIXME needed?
return true;
}
/// Returns dirty state
bool IsDirty(void) const { return m_Dirty; }
+ /// Marks line as diry.
+ void MarkDirty(void) { m_Dirty = true; }
private:
/// Destructor is private. Use DeleteLine() to remove it.
~wxLayoutLine();