{
// parts of the line need highlighting
tempto = xpos+(**i).GetLength();
-#if 0
- if(tempto >= from && xpos <= to)
- {
- tempto = to-xpos;
- if(tempto > (**i).GetLength())
- tempto = (**i).GetLength();
- CoordType tmp = from-xpos;
- if(tmp < 0) tmp = 0;
-#endif
- (**i).Draw(dc, pos, llist, from-xpos, to-xpos);
-#if 0
- }
- else
- {
- llist->EndHighlighting(dc); // FIXME! inefficient
- (**i).Draw(dc, pos, llist);
- }
-#endif
+ (**i).Draw(dc, pos, llist, from-xpos, to-xpos);
}
else
(**i).Draw(dc, pos, llist);
void
wxLayoutLine::MergeNextLine(wxLayoutList *llist)
{
- wxASSERT(GetNextLine());
+ wxCHECK_RET(GetNextLine(),"wxLayout internal error: no next line to merge");
wxLayoutObjectList &list = GetNextLine()->m_ObjectList;
wxLOiterator i;
//FIXME: this could be optimised, for now be prudent:
wxLayoutLine *oldnext = GetNextLine();
SetNext(GetNextLine()->GetNextLine());
delete oldnext;
+ GetNextLine()->MoveLines(-1);
RecalculatePositions(1, llist);
}
// little condition to speed up redrawing:
if(bottom != -1 && line->GetPosition().y > bottom) break;
}
- line->RecalculatePosition(this);
+ line->RecalculatePositions(1,this);
line = line->GetNextLine();
}
ApplyStyle(&m_DefaultSetting, dc);
wxBrush brush(m_CurrentSetting.m_bg, wxSOLID);
dc.SetBrush(brush);
+ dc.SetBackgroundMode(wxTRANSPARENT);
while(line)
{
#if SHOW_SELECTIONS
dc.SetTextForeground(m_CurrentSetting.m_bg);
dc.SetTextBackground(m_CurrentSetting.m_fg);
+ dc.SetBackgroundMode(wxSOLID);
#endif
}
#if SHOW_SELECTIONS
dc.SetTextForeground(m_CurrentSetting.m_fg);
dc.SetTextBackground(m_CurrentSetting.m_bg);
+ dc.SetBackgroundMode(wxTRANSPARENT);
#endif
}
wxLayoutList *llist = Copy( m_Selection.m_CursorA,
m_Selection.m_CursorB );
-
- if(wxlo) // export as data object, too
+
+ if(llist && wxlo) // export as data object, too
{
wxString string;
{
m_llist = llist;
m_title = title;
+ // remove any highlighting which could interfere with printing:
+ m_llist->StartSelection();
+ m_llist->EndSelection();
}
wxLayoutPrintout::~wxLayoutPrintout()