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
  • child_start
  • child_end
  • cols
  • col_header
  • col_header_color
  • col_header_height
  • col_resize_min
  • 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_resize_min
  • row_position
  • row_resize
  • table_box
  • 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 callback(TableContext context, int row, int col)

    int Fl_Table::child_start()
    int Fl_Table::child_end()

    virtual void 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 pixels)
    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)

    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 pixels)
    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::when(Fl_When val)
    Fl_When Fl_Table::when()