llist.Insert(" and ");
llist.SetFont(-1,-1,-1,-1,-1,"red","black");
llist.Insert("red on black");
- llist.SetFont(-1,-1,-1,-1,-1,"black");
+ llist.SetFont(-1,-1,-1,-1,-1,"black","white");
llist.Insert(" text.");
llist.LineBreak();
// setting up the default:
dc.SetTextForeground( *wxBLACK );
+ dc.SetTextBackground( *wxWHITE );
+ dc.SetBackgroundMode( wxSOLID ); // to enable setting of text background
dc.SetFont( *wxNORMAL_FONT );
+
+ //FIXME: who frees the brush, how long does it need to exist?
if(m_DefaultSetting)
+ {
m_DefaultSetting->Draw(dc,wxPoint(0,0),0,true);
+ dc.SetBackground( wxBrush(* m_DefaultSetting->GetBGColour(),wxSOLID));
+ }
+ else
+ dc.SetBackground( wxBrush(wxColour("White"), wxSOLID) );
+
+ dc.Clear();
+
+
// we calculate everything for drawing a line, then rewind to the
// begin of line and actually draw it
m_LineHeight = (BASELINESTRETCH*m_FontPtSize)/10;
m_MaxX = 0; m_MaxY = 0;
+
if(m_DefaultSetting)
delete m_DefaultSetting;
m_DefaultSetting = new
bool underline,
wxColour const *fg, wxColour const *bg);
~wxLayoutObjectCmd();
- // caller must free pointer:
+ /// caller must free pointer:
wxLayoutStyleInfo *GetStyle(void) const ;
+ /// return the background colour for setting colour of window
+ wxColour const *GetBGColour(void) const { return m_ColourBG; }
private:
/// the font to use
wxFont *m_font;