#include <Fl_ColumnManager.H>
Inheritance diagram for Fl_ColumnManager:
Public Methods |
|
Fl_ColumnManager (int x, int y, int w, int h, const char *label=NULL) | |
Standard fltk constructor. More... |
|
int | handle (int event) |
Process click and drag events. More... |
|
void | update () |
Force sorting and redraw of controller.
More... |
|
void | set_browser (Fl_Browser *b) |
Identify the associated browser and establish
a link with the it. More... |
|
void | draw () |
Response to fltk draw requests. More... |
|
Protected Methods |
|
void | draw_control (int c, int X, int Y, int W, int H) |
Draw control button for the specified column,
it's box must be passed in. More... |
|
void | click_control (int c, int X, int Y, int W, int H) |
Process a click for a specified control button,
it's box must be passed in. More... |
|
void | drag_control (int c, int X, int Y, int W, int H) |
Process a drag for a specified divider, the
lefthand control button's box must be passed in. More... |
|
void | for_each_column (void(Fl_ColumnManager::*action)(int col, int, int, int, int)) |
Common utility for processing each column.
More... |
|
Static Protected Methods |
|
void | scrollbar_callback (Fl_Widget *s, void *cm) |
Replacement callback for the browser's hscrollbar.
More... |
|
Protected Attributes |
|
Fl_Browser * | B |
the associated browser. |
|
int | mySortColumn |
the column to sort by. |
The class is designed to manage the row sorting of the text in an Fl_Browser. Depressing any column button will cause the rows to be sorted by the text in that column. It uses the column_widths() of the associated browser to draw itself. These widths can be changed interactively.
|
Standard fltk constructor. Defers associating the controlled browser. Sets the sorting column to none (-1). |
|
Process a click for a specified control button, it's box must be passed in. Excludes 3 pixels at the ends of the control button for resizing them. |
|
Process a drag for a specified divider, the lefthand control button's box must be passed in. Resizing via dragging requires the mouse be within 3 pixels of the control button dividers. |
|
Response to fltk draw requests. Uses the common utility for processing each column. |
|
Draw control button for the specified column, it's box must be passed in. Could be modified to draw a label in the control button. |
|
Common utility for processing each column. Each column's box is calculated and then the action called for it. |
|
Process click and drag events. FL_PUSH checks for a click on each column control. FL_DRAG tries to drag the column divider, if close enough (+/-3 pixels). |
|
Replacement callback for the browser's hscrollbar. Performs the same task as the fltk 1.1.4 callback does, but also forces the control manager to redraw. |
|
Identify the associated browser and establish a link with the it. In addition to identifying the associated browser, the callback for the browser's hscrollbar is changed. This also sets the hscrollbar's user_data to point to this column manager. |
|
Force sorting and redraw of controller. This should be called whenever the sorting needs to be done or the column widths have been changed directly through the browser. |