class MASKING_DLL_DECLSPEC Header
The listbox header widget.
Inheritance:
Public Fields
-
std::vector<Column> * columns
- pointer to a vector of columns; the actual list is owned by the listbox
Protected Fields
-
int mouseColumn
- index of the column the mouse is currently hovering over
-
int resizingColumn
- index of the column that is being resized; -1 if no column is being resized
-
int resizeOffset
- the distance between the mouse x position and the border of the column at the time when resizing is initiated
Protected Methods
-
void Draw(Bitmap &canvas)
- draws the header
-
void MsgMousemove(const Point &d)
- updates mouseColumn on mouse move
-
void OnResize()
- handles resizing the columns with the mouse; called by MsgMousemove()
-
void OnMousemove()
- handles switching focus between header columns with the mouse; called by MsgMousemove()
-
virtual void DrawItemBackground(Bitmap &dst, Column* item, int state, const Rect &dstRect)
- Draws one background for one column header.
-
virtual void DrawItemContents(Bitmap &dst, Column* item, int state, const Rect &dstRect)
- Draws the contents of one column header (ie.
-
virtual int PreferredHeight()
- Returns the preferred height of the header.
Documentation
The listbox header widget. Draws all column headers and allows individual
headers to be clicked. You can derive your own headers from it to implement
custom drawing or behaviour.
std::vector<Column> * columns
-
pointer to a vector of columns; the actual list is owned by the listbox
int mouseColumn
-
index of the column the mouse is currently hovering over
int resizingColumn
-
index of the column that is being resized; -1 if no column is being resized
int resizeOffset
-
the distance between the mouse x position and the border of the column at
the time when resizing is initiated
void Draw(Bitmap &canvas)
-
draws the header
void MsgMousemove(const Point &d)
-
updates mouseColumn on mouse move
void OnResize()
-
handles resizing the columns with the mouse; called by MsgMousemove()
void OnMousemove()
-
handles switching focus between header columns with the mouse; called by MsgMousemove()
virtual void DrawItemBackground(Bitmap &dst, Column* item, int state, const Rect &dstRect)
-
Draws one background for one column header. Overload this to implement custom drawing
of the header background. The default implementation draws the column header backgrounds
using the bitmap normally used to skin buttons.
- Parameters:
- dst - destination bitmap
item - pointer to the item being drawn
state - status of the item (normal, selected, disabled or focused)
dstRect - rectangle into which the header should be rendered
virtual void DrawItemContents(Bitmap &dst, Column* item, int state, const Rect &dstRect)
-
Draws the contents of one column header (ie. the column title). Overload to implement
custom drawing of the header contents (i.e. the header titles).
- See Also:
- DrawItemBackground
virtual int PreferredHeight()
-
Returns the preferred height of the header. The listbox may actually ignore this but
will try to use it if possible. Overload this in a derived header class if you want
a differently sized header.
- This class has no child classes.
- Friends:
- class ListBoxEx
Alphabetic index Hierarchy of classes
Back to front page
|
page generated with DOC++