+ delete m_DefaultSetting;
+ m_DefaultSetting = NULL;
+ }
+}
+
+void
+wxLayoutList::SetFont(int family, int size, int style, int weight,
+ int underline, wxColour *fg,
+ wxColour *bg)
+{
+ if(family != -1) m_FontFamily = family;
+ if(size != -1) m_FontPtSize = size;
+ if(style != -1) m_FontStyle = style;
+ if(weight != -1) m_FontWeight = weight;
+ if(underline != -1) m_FontUnderline = underline != 0;
+
+ if(fg != NULL) m_ColourFG = *fg;
+ if(bg != NULL) m_ColourBG = *bg;
+
+ Insert(
+ new wxLayoutObjectCmd(m_FontPtSize,m_FontFamily,m_FontStyle,m_FontWeight,m_FontUnderline,
+ m_ColourFG, m_ColourBG));
+}
+
+void
+wxLayoutList::SetFont(int family, int size, int style, int weight,
+ int underline, char const *fg, char const *bg)
+
+{
+ wxColour
+ *cfg = NULL,
+ *cbg = NULL;
+
+ if( fg )
+ cfg = wxTheColourDatabase->FindColour(fg);
+ if( bg )
+ cbg = wxTheColourDatabase->FindColour(bg);
+
+ SetFont(family,size,style,weight,underline,cfg,cbg);
+}
+
+void
+wxLayoutList::Clear(int family, int size, int style, int weight,
+ int /* underline */, wxColour *fg, wxColour *bg)
+{
+ InternalClear();
+
+ // set defaults
+ m_FontPtSize = size;
+ m_FontUnderline = false;
+ m_FontFamily = family;
+ m_FontStyle = style;
+ m_FontWeight = weight;
+ if(fg) m_ColourFG = *fg;
+ if(bg) m_ColourBG = *bg;
+
+ m_ColourFG = *wxBLACK;
+ m_ColourBG = *wxWHITE;
+
+ if(m_DefaultSetting)
+ delete m_DefaultSetting;
+
+ m_DefaultSetting = new
+ wxLayoutObjectCmd(m_FontPtSize,m_FontFamily,m_FontStyle,
+ m_FontWeight,m_FontUnderline,
+ m_ColourFG, m_ColourBG);
+}
+
+
+
+bool
+wxLayoutList::MoveCursorTo(wxPoint const &p)
+{
+ SetUpdateRect(m_CursorScreenPos);
+ SetUpdateRect(m_CursorScreenPos+m_CursorSize);
+ wxLayoutLine *line = m_FirstLine;
+ while(line && line->GetLineNumber() != p.y)
+ line = line->GetNextLine();
+ if(line && line->GetLineNumber() == p.y) // found it
+ {
+ m_CursorPos.y = p.y;
+ m_CursorLine = line;
+ CoordType len = line->GetLength();
+ if(len >= p.x)