class Fl_Table


Class Hierarchy

Include Files

Description

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 act as a container for FLTK widgets (see widgettable.cxx), or custom widgets (see testtablerow.cxx, with custom widgets being optimal for very large tables.

When acting as a container for custom widgets, 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 values you supply for when().

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

Methods

  • Fl_Table
  • ~Fl_Table
  • callback
  • cols
  • col_header
  • col_header_color
  • col_header_height
  • col_position
  • col_resize
  • col_width
  • col_width_all
  • draw_cell
  • resize
  • rows
  • row_header
  • row_header_color
  • row_header_width
  • row_height
  • row_height_all
  • row_position
  • row_resize
  • top_row
  • when
  • Fl_Table::Fl_Table(int x, int y, int w, int h, const char *label = 0)

    Fl_Table::~Fl_Table()

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

    virtual void callback(TableContext context, int row, int col)

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

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

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

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

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

    int Fl_Table::col_resize() void Fl_Table::col_resize(int pixels)

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

    int Fl_Table::col_width_all(int pixels)

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

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

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

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

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

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

    int Fl_Table::row_resize() void Fl_Table::row_resize(int pixels)

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

    int Fl_Table::row_height_all(int pixels)

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

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