/** Draws an object.
@param dc the wxDC to draw on
@param coords where to draw the baseline of the object.
+ @param wxllist pointer to wxLayoutList
@param begin if !=-1, from which position on to highlight it
@param end if begin !=-1, how many positions to highlight it
*/
virtual void Draw(wxDC & /* dc */,
wxPoint const & /* coords */,
+ class wxLayoutList *wxllist,
CoordType begin = -1,
CoordType end = -1) { }
virtual wxLayoutObjectType GetType(void) const { return WXLO_TYPE_TEXT; }
virtual void Layout(wxDC &dc);
virtual void Draw(wxDC &dc, wxPoint const &coords,
+ class wxLayoutList *wxllist,
CoordType begin = -1,
CoordType end = -1);
/** Calculates and returns the size of the object.
virtual wxLayoutObjectType GetType(void) const { return WXLO_TYPE_ICON; }
virtual void Layout(wxDC &dc);
virtual void Draw(wxDC &dc, wxPoint const &coords,
+ class wxLayoutList *wxllist,
CoordType begin = -1,
CoordType end = -1);
virtual wxLayoutObjectType GetType(void) const { return WXLO_TYPE_CMD; }
virtual void Layout(wxDC &dc);
virtual void Draw(wxDC &dc, wxPoint const &coords,
+ class wxLayoutList *wxllist,
CoordType begin = -1,
CoordType end = -1);
wxLayoutObjectCmd(int size, int family, int style, int weight,
inline void SetFontUnderline(bool ul) { SetFont(-1,-1,-1,-1,(int)ul); }
/// set font colours by name
inline void SetFontColour(char const *fg, char const *bg = NULL) { SetFont(-1,-1,-1,-1,-1,fg,bg); }
+ /// set font colours by colour
+ inline void SetFontColour(wxColour *fg, wxColour *bg = NULL) { SetFont(-1,-1,-1,-1,-1,fg,bg); }
/**
Returns a pointer to the default settings.
This is only valid temporarily and should not be stored
/// Begin selecting text.
void StartSelection(void);
+ // Continue selecting text
+ void ContinueSelection(void);
/// End selecting text.
void EndSelection(void);
/// Are we still selecting text?
bool IsSelecting(void);
bool IsSelected(const wxPoint &cursor);
+ /// starts highlighting of text for selections
+ void StartHighlighting(wxDC &dc);
+ /// ends highlighting of text for selections
+ void EndHighlighting(wxDC &dc);
+
/** Tests whether this layout line is selected and needs
highlighting.
@param line to test for
/// A structure for the selection.
struct Selection
{
+ Selection() { m_valid = false; m_selecting = false; }
bool m_valid;
bool m_selecting;
wxPoint m_CursorA, m_CursorB;
- Selection() { m_valid = false; m_selecting = true; }
} m_Selection;
/** @name Font parameters. */
//@{