a few more buglets

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2461 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-05-14 11:36:17 +00:00
parent cd043c51dd
commit ed07b20b50
4 changed files with 9 additions and 5 deletions

View File

@@ -17,8 +17,13 @@ TODO
===================================================================== =====================================================================
Inserting NL in empty line sometimes doesn't move cursor down. 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: Selections:
- moving in negative direction doesn't work - moving in negative direction doesn't work

View File

@@ -116,14 +116,12 @@ MyFrame::MyFrame(void) :
void void
MyFrame::AddSampleText(wxLayoutList *llist) MyFrame::AddSampleText(wxLayoutList *llist)
{ {
#if 0
llist->Clear(wxSWISS,16,wxNORMAL,wxNORMAL, false); llist->Clear(wxSWISS,16,wxNORMAL,wxNORMAL, false);
llist->SetFont(-1,-1,-1,-1,-1,"blue"); llist->SetFont(-1,-1,-1,-1,-1,"blue");
llist->Insert("blue"); llist->Insert("blue");
llist->SetFont(-1,-1,-1,-1,-1,"black"); llist->SetFont(-1,-1,-1,-1,-1,"black");
llist->Insert("The quick brown fox jumps over the lazy dog."); llist->Insert("The quick brown fox jumps over the lazy dog.");
llist->LineBreak(); llist->LineBreak();
#endif
llist->SetFont(wxROMAN,16,wxNORMAL,wxNORMAL, false); llist->SetFont(wxROMAN,16,wxNORMAL,wxNORMAL, false);
llist->Insert("--"); llist->Insert("--");
@@ -152,7 +150,6 @@ MyFrame::AddSampleText(wxLayoutList *llist)
llist->SetFont(-1,-1,wxNORMAL); llist->SetFont(-1,-1,wxNORMAL);
llist->LineBreak(); llist->LineBreak();
#if 0
llist->Insert("and "); llist->Insert("and ");
llist->SetFont(-1,-1,wxSLANT); llist->SetFont(-1,-1,wxSLANT);
llist->Insert("slanted"); llist->Insert("slanted");
@@ -197,7 +194,6 @@ MyFrame::AddSampleText(wxLayoutList *llist)
llist->LineBreak(); llist->LineBreak();
} }
} }
#endif
llist->MoveCursorTo(wxPoint(0,0)); llist->MoveCursorTo(wxPoint(0,0));
m_lwin->SetDirty(); m_lwin->SetDirty();
m_lwin->Refresh(); m_lwin->Refresh();

View File

@@ -1410,6 +1410,7 @@ wxLayoutList::LineBreak(void)
m_FirstLine = m_CursorLine->GetPreviousLine(); m_FirstLine = m_CursorLine->GetPreviousLine();
m_CursorPos.y++; m_CursorPos.y++;
m_CursorPos.x = 0; m_CursorPos.x = 0;
// doesn't help m_CursorLine.MarkDirty();
m_CursorLine->RecalculatePositions(true, this); //FIXME needed? m_CursorLine->RecalculatePositions(true, this); //FIXME needed?
return true; return true;
} }

View File

@@ -606,6 +606,8 @@ public:
/// Returns dirty state /// Returns dirty state
bool IsDirty(void) const { return m_Dirty; } bool IsDirty(void) const { return m_Dirty; }
/// Marks line as diry.
void MarkDirty(void) { m_Dirty = true; }
private: private:
/// Destructor is private. Use DeleteLine() to remove it. /// Destructor is private. Use DeleteLine() to remove it.
~wxLayoutLine(); ~wxLayoutLine();