class Fl_Table

Class Hierarchy

Include Files


This is the base class for table widgets. (eg. Fl_Table_Row). To be useful it must be subclassed and several virtual functions defined. Normally applications use widgets derived from this widget, and do not use this widget directly; this widget is usually too low level to be used directly by applications.

This widget does not handle the data in the table. The draw_cell() method must be overridden by a subclass to manage drawing the contents of the cells.

This widget can be used in several ways:

When acting as part of a custom widget, events on the cells and/or headings generate callbacks when they are clicked by the user. You control when events are generated based on the setting for Fl_Table::when().

When acting as a container for FLTK widgets, the FLTK widgets maintain themselves. Although the draw_cell() method must be overridden, its contents can be very simple. See the draw_cell() code in widgettable.cxx.

The following variables are available to classes deriving from Fl_Table:

    x()/y()/w()/h()  -- Fl_Table widget's outer dimension.
                        The outer edge of the border of the Fl_Table.
                        (Red in the diagram above)

    wix/wiy/wiw/wih  -- Fl_Table widget's inner dimension.
                        The inner edge of the border of the Fl_Table.
                        eg. if the Fl_Table's box() is FL_NO_BOX, these
                        values are the same as x()/y()/w()/h().
                        (Yellow in the diagram above)

    tox/toy/tow/toh  -- The table's outer dimension.
                        The outer edge of the border around the cells,
                        but inside the row/col headings and scrollbars.
                        (Green in the diagram above)

    tix/tiy/tiw/tih  -- The table's inner dimension.
                        The inner edge of the border around the cells,
                        but inside the row/col headings and scrollbars.
                        AKA the table's clip region. eg. if the table_box()
                        is FL_NO_BOX, these values are the same as
                        (Blue in the diagram above) 


  • Fl_Table
  • ~Fl_Table
  • callback
  • callback_context
  • callback_row
  • callback_col
  • child
  • children
  • clear
  • cols
  • col_header
  • col_header_color
  • col_header_height
  • col_resize_min
  • col_position
  • col_resize
  • col_width
  • col_width_all
  • draw_cell
  • is_interactive_resize
  • resize
  • rows
  • row_header
  • row_header_color
  • row_header_width
  • row_height
  • row_height_all
  • row_resize_min
  • row_position
  • row_resize
  • table_box
  • top_row
  • user_data
  • visible_cells
  • when
  • Fl_Table::Fl_Table(int x, int y, int w, int h, const char *label = 0)


    Fl_Callback* Fl_Table::callback() const
    void Fl_Table::callback(Fl_Callback*, void* = 0)

    int Fl_Table::callback_row() const
    int Fl_Table::callback_col() const
    int Fl_Table::callback_context() const

    Fl_Widget* Fl_Table::child(int n) const

    int Fl_Table::children()

    void Fl_Table::clear()

    virtual void Fl_Table::draw_cell(TableContext context, int row, int col, int x, int y, int w, int h)

    void Fl_Table::cols(int ncols)
    int Fl_Table::cols()

    void Fl_Table::col_header(int onoff)
    int Fl_Table::col_header()

    void Fl_Table::col_header_color(Fl_Color c)
    int Fl_Table::col_header_color()

    void Fl_Table::col_header_height(int pixels)
    int Fl_Table::col_header_height()

    void Fl_Table::col_resize_min(int pixels)
    int Fl_Table::col_resize_min()

    void Fl_Table::col_position(int col)
    int Fl_Table::col_position()

    void Fl_Table::col_resize(int flag)
    int Fl_Table::col_resize()

    void Fl_Table::col_width(int col, int width)
    int Fl_Table::col_width(int col)

    int Fl_Table::col_width_all(int pixels)

    protected int Fl_Table::is_interactive_resize()

    int Fl_Table::resize(int x, int y, int w, int h)

    void Fl_Table::rows(int nrows)
    int Fl_Table::rows()

    void Fl_Table::row_header(int onoff)
    int Fl_Table::row_header()

    void Fl_Table::row_header_color(Fl_Color c)
    int Fl_Table::row_header_color()

    void Fl_Table::row_header_width(int pixels)
    int Fl_Table::row_header_width()

    void Fl_Table::row_resize_min(int pixels)
    int Fl_Table::row_resize_min()

    void Fl_Table::row_position(int row)
    int Fl_Table::row_position()

    void Fl_Table::row_resize(int flag)
    int Fl_Table::row_resize()

    void Fl_Table::row_height(int row, int new_height)
    int Fl_Table::row_height(int row)

    int Fl_Table::row_height_all(int pixels)

    void Fl_Table::table_box(Fl_Boxtype type)
    Fl_Boxtype Fl_Table::table_box()

    void Fl_Table::top_row(int row)
    int Fl_Table::top_row()

    int Fl_Table::visible_cells(int& toprow, int& botrow, int& leftcol, int& rightcol)

    int Fl_Table::when(Fl_When val)
    Fl_When Fl_Table::when()