FLTK
Fl_Table.H
1 //
2 // Fl_Table -- A table widget for the Fast Light Tool Kit (FLTK).
3 //
4 // Copyright 2002 by Greg Ercolano.
5 // Copyright (c) 2004 O'ksi'D
6 //
7 // This library is free software. Distribution and use rights are outlined in
8 // the file "COPYING" which should have been included with this file. If this
9 // file is missing or damaged, see the license at:
10 //
11 // https://www.fltk.org/COPYING.php
12 //
13 // Please see the following page on how to report bugs and issues:
14 //
15 // https://www.fltk.org/bugs.php
16 //
17 
18 #ifndef _FL_TABLE_H
19 #define _FL_TABLE_H
20 
21 #include <FL/Fl_Group.H>
22 #include <FL/Fl_Scroll.H>
23 
108 class FL_EXPORT Fl_Table : public Fl_Group {
109 public:
117  CONTEXT_NONE = 0,
118  CONTEXT_STARTPAGE = 0x01,
119  CONTEXT_ENDPAGE = 0x02,
120  CONTEXT_ROW_HEADER = 0x04,
121  CONTEXT_COL_HEADER = 0x08,
122  CONTEXT_CELL = 0x10,
123  CONTEXT_TABLE = 0x20,
124  CONTEXT_RC_RESIZE = 0x40
125  };
126 
127 private:
128  int _rows, _cols; // total rows/cols
129  int _row_header_w; // width of row header
130  int _col_header_h; // height of column header
131  int _row_position; // last row_position set (not necessarily == toprow!)
132  int _col_position; // last col_position set (not necessarily == leftcol!)
133 
134  char _row_header; // row header enabled?
135  char _col_header; // col header enabled?
136  char _row_resize; // row resizing enabled?
137  char _col_resize; // col resizing enabled?
138  int _row_resize_min; // row minimum resizing height (default=1)
139  int _col_resize_min; // col minimum resizing width (default=1)
140 
141  // OPTIMIZATION: partial row/column redraw variables
142  int _redraw_toprow;
143  int _redraw_botrow;
144  int _redraw_leftcol;
145  int _redraw_rightcol;
146  Fl_Color _row_header_color;
147  Fl_Color _col_header_color;
148 
149  int _auto_drag;
150  int _selecting;
151  int _scrollbar_size;
152  enum {
153  TABCELLNAV = 1<<0,
154  };
155  unsigned int flags_;
156 
157  // An STL-ish vector without templates
158  class FL_EXPORT IntVector {
159  int *arr;
160  unsigned int _size;
161  void init() {
162  arr = 0;
163  _size = 0;
164  }
165  void copy(int *newarr, unsigned int newsize);
166  public:
167  IntVector() { init(); } // CTOR
168  ~IntVector(); // DTOR
169  IntVector(IntVector&o) { init(); copy(o.arr, o._size); } // COPY CTOR
170  IntVector& operator=(IntVector&o) { // ASSIGN
171  init();
172  copy(o.arr, o._size);
173  return(*this);
174  }
175  int operator[](int x) const { return(arr[x]); }
176  int& operator[](int x) { return(arr[x]); }
177  unsigned int size() { return(_size); }
178  void size(unsigned int count);
179  int pop_back() { int tmp = arr[_size-1]; _size--; return(tmp); }
180  void push_back(int val) { unsigned int x = _size; size(_size+1); arr[x] = val; }
181  int back() { return(arr[_size-1]); }
182  };
183 
184  IntVector _colwidths; // column widths in pixels
185  IntVector _rowheights; // row heights in pixels
186 
187  Fl_Cursor _last_cursor; // last mouse cursor before changed to 'resize' cursor
188 
189  // EVENT CALLBACK DATA
190  TableContext _callback_context; // event context
191  int _callback_row, _callback_col; // event row/col
192 
193  // handle() state variables.
194  // Put here instead of local statics in handle(), so more
195  // than one Fl_Table can exist without crosstalk between them.
196  //
197  int _resizing_col; // column being dragged
198  int _resizing_row; // row being dragged
199  int _dragging_x; // starting x position for horiz drag
200  int _dragging_y; // starting y position for vert drag
201  int _last_row; // last row we FL_PUSH'ed
202 
203  // Redraw single cell
204  void _redraw_cell(TableContext context, int R, int C);
205 
206  void _start_auto_drag();
207  void _stop_auto_drag();
208  void _auto_drag_cb();
209  static void _auto_drag_cb2(void *d);
210 
211 protected:
212  enum ResizeFlag {
213  RESIZE_NONE = 0,
214  RESIZE_COL_LEFT = 1,
215  RESIZE_COL_RIGHT = 2,
216  RESIZE_ROW_ABOVE = 3,
217  RESIZE_ROW_BELOW = 4
218  };
219 
220  int table_w;
221  int table_h;
222  int toprow;
223  int botrow;
224  int leftcol;
225  int rightcol;
226 
227  // selection
232 
233  // OPTIMIZATION: Precomputed scroll positions for the toprow/leftcol
236 
237  // Data table's inner dimension
238  int tix;
239  int tiy;
240  int tiw;
241  int tih;
242 
243  // Data table's outer dimension
244  int tox;
245  int toy;
246  int tow;
247  int toh;
248 
249  // Table widget's inner dimension
250  int wix;
251  int wiy;
252  int wiw;
253  int wih;
254 
258 
259  // Fltk
260  int handle(int e); // fltk handle() override
261 
262  // Class maintenance
263  void recalc_dimensions();
264  void table_resized(); // table resized; recalc
265  void table_scrolled(); // table scrolled; recalc
266  void get_bounds(TableContext context, // return x/y/w/h bounds for context
267  int &X, int &Y, int &W, int &H);
268  void change_cursor(Fl_Cursor newcursor); // change mouse cursor to some other shape
269  TableContext cursor2rowcol(int &R, int &C, ResizeFlag &resizeflag);
270  int find_cell(TableContext context, // find cell's x/y/w/h given r/c
271  int R, int C, int &X, int &Y, int &W, int &H);
272  int row_col_clamp(TableContext context, int &R, int &C);
273  // clamp r/c to known universe
274 
385  virtual void draw_cell(TableContext context, int R=0, int C=0,
386  int X=0, int Y=0, int W=0, int H=0)
387  { } // overridden by deriving class
388 
389  long row_scroll_position(int row); // find scroll position of row (in pixels)
390  long col_scroll_position(int col); // find scroll position of col (in pixels)
391 
395  int is_fltk_container() { // does table contain fltk widgets?
396  return( Fl_Group::children() > 3 ); // (ie. more than box and 2 scrollbars?)
397  }
398 
399  static void scroll_cb(Fl_Widget*,void*); // h/v scrollbar callback
400 
401  void damage_zone(int r1, int c1, int r2, int c2, int r3 = 0, int c3 = 0);
402 
407  void redraw_range(int topRow, int botRow, int leftCol, int rightCol) {
408  if ( _redraw_toprow == -1 ) {
409  // Initialize redraw range
410  _redraw_toprow = topRow;
411  _redraw_botrow = botRow;
412  _redraw_leftcol = leftCol;
413  _redraw_rightcol = rightCol;
414  } else {
415  // Extend redraw range
416  if ( topRow < _redraw_toprow ) _redraw_toprow = topRow;
417  if ( botRow > _redraw_botrow ) _redraw_botrow = botRow;
418  if ( leftCol < _redraw_leftcol ) _redraw_leftcol = leftCol;
419  if ( rightCol > _redraw_rightcol ) _redraw_rightcol = rightCol;
420  }
421  // Indicate partial redraw needed of some cells
422  damage(FL_DAMAGE_CHILD);
423  }
424 
425  // draw() has to be protected per FLTK convention (was public in 1.3.x)
426  void draw();
427 
428 public:
429  Fl_Table(int X, int Y, int W, int H, const char *l=0);
430  ~Fl_Table();
431 
437  virtual void clear() {
438  rows(0);
439  cols(0);
440  table->clear();
441  }
442 
443  // \todo: add topline(), middleline(), bottomline()
444 
450  inline void table_box(Fl_Boxtype val) {
451  table->box(val);
452  table_resized();
453  }
454 
458  inline Fl_Boxtype table_box( void ) {
459  return(table->box());
460  }
461 
462  virtual void rows(int val); // set/get number of rows
463 
467  inline int rows() {
468  return(_rows);
469  }
470 
471  virtual void cols(int val); // set/get number of columns
472 
476  inline int cols() {
477  return(_cols);
478  }
479 
508  inline void visible_cells(int& r1, int& r2, int& c1, int& c2) {
509  r1 = toprow;
510  r2 = botrow;
511  c1 = leftcol;
512  c2 = rightcol;
513  }
514 
520  return(_resizing_row != -1 || _resizing_col != -1);
521  }
522 
526  inline int row_resize() {
527  return(_row_resize);
528  }
529 
536  void row_resize(int flag) { // enable row resizing
537  _row_resize = flag;
538  }
539 
543  inline int col_resize() {
544  return(_col_resize);
545  }
546 
553  void col_resize(int flag) { // enable col resizing
554  _col_resize = flag;
555  }
556 
560  inline int col_resize_min() { // column minimum resizing width
561  return(_col_resize_min);
562  }
563 
569  void col_resize_min(int val) {
570  _col_resize_min = ( val < 1 ) ? 1 : val;
571  }
572 
576  inline int row_resize_min() { // column minimum resizing width
577  return(_row_resize_min);
578  }
579 
585  void row_resize_min(int val) {
586  _row_resize_min = ( val < 1 ) ? 1 : val;
587  }
588 
592  inline int row_header() { // set/get row header enable flag
593  return(_row_header);
594  }
595 
600  void row_header(int flag) {
601  _row_header = flag;
602  table_resized();
603  redraw();
604  }
605 
609  inline int col_header() { // set/get col header enable flag
610  return(_col_header);
611  }
612 
617  void col_header(int flag) {
618  _col_header = flag;
619  table_resized();
620  redraw();
621  }
622 
626  inline void col_header_height(int height) { // set/get col header height
627  _col_header_h = height;
628  table_resized();
629  redraw();
630  }
631 
635  inline int col_header_height() {
636  return(_col_header_h);
637  }
638 
642  inline void row_header_width(int width) { // set/get row header width
643  _row_header_w = width;
644  table_resized();
645  redraw();
646  }
647 
651  inline int row_header_width() {
652  return(_row_header_w);
653  }
654 
658  inline void row_header_color(Fl_Color val) { // set/get row header color
659  _row_header_color = val;
660  redraw();
661  }
662 
667  return(_row_header_color);
668  }
669 
673  inline void col_header_color(Fl_Color val) { // set/get col header color
674  _col_header_color = val;
675  redraw();
676  }
677 
682  return(_col_header_color);
683  }
684 
685  void row_height(int row, int height); // set/get row height
686 
690  inline int row_height(int row) {
691  return((row<0 || row>=(int)_rowheights.size()) ? 0 : _rowheights[row]);
692  }
693 
694  void col_width(int col, int width); // set/get a column's width
695 
699  inline int col_width(int col) {
700  return((col<0 || col>=(int)_colwidths.size()) ? 0 : _colwidths[col]);
701  }
702 
707  void row_height_all(int height) { // set all row/col heights
708  for ( int r=0; r<rows(); r++ ) {
709  row_height(r, height);
710  }
711  }
712 
717  void col_width_all(int width) {
718  for ( int c=0; c<cols(); c++ ) {
719  col_width(c, width);
720  }
721  }
722 
723  void row_position(int row); // set/get table's current scroll position
724  void col_position(int col);
725 
729  int row_position() {
730  return(_row_position);
731  }
732 
736  int col_position() {
737  return(_col_position);
738  }
739 
745  inline void top_row(int row) { // set/get top row (deprecated)
746  row_position(row);
747  }
748 
753  inline int top_row() {
754  return(row_position());
755  }
756  int is_selected(int r, int c); // selected cell
757  void get_selection(int &row_top, int &col_left, int &row_bot, int &col_right);
758  void set_selection(int row_top, int col_left, int row_bot, int col_right);
759  int move_cursor(int R, int C, int shiftselect);
760  int move_cursor(int R, int C);
761  void resize(int X, int Y, int W, int H); // fltk resize() override
762 
763  // This crashes sortapp() during init.
764  // void box(Fl_Boxtype val) {
765  // Fl_Group::box(val);
766  // if ( table ) {
767  // resize(x(), y(), w(), h());
768  // }
769  // }
770  // Fl_Boxtype box(void) const {
771  // return(Fl_Group::box());
772  // }
773 
774  // Child group management
775 
780  void init_sizes() {
781  table->init_sizes();
782  table->redraw();
783  }
784 
789  void add(Fl_Widget& wgt) {
790  table->add(wgt);
791  if ( table->children() > 2 ) {
792  table->show();
793  } else {
794  table->hide();
795  }
796  }
797 
802  void add(Fl_Widget* wgt) {
803  add(*wgt);
804  }
805 
810  void insert(Fl_Widget& wgt, int n) {
811  table->insert(wgt,n);
812  }
813 
819  void insert(Fl_Widget& wgt, Fl_Widget* w2) {
820  table->insert(wgt,w2);
821  }
822 
826  void remove(Fl_Widget& wgt) {
827  table->remove(wgt);
828  }
829 
830  // (doxygen will substitute Fl_Group's docs here)
831  void begin() {
832  table->begin();
833  }
834 
835  // (doxygen will substitute Fl_Group's docs here)
836  void end() {
837  table->end();
838  // HACK: Avoid showing Fl_Scroll; seems to erase screen
839  // causing unnecessary flicker, even if its box() is FL_NO_BOX.
840  //
841  if ( table->children() > 2 ) {
842  table->show();
843  } else {
844  table->hide();
845  }
847  }
848 
853  Fl_Widget*const* array() {
854  return(table->array());
855  }
856 
871  Fl_Widget *child(int n) const {
872  return(table->child(n));
873  }
874 
883  int children() const {
884  return(table->children()-2); // -2: skip Fl_Scroll's h/v scrollbar widgets
885  }
886 
887  // (doxygen will substitute Fl_Group's docs here)
888  int find(const Fl_Widget *wgt) const {
889  return(table->find(wgt));
890  }
891 
892  // (doxygen will substitute Fl_Group's docs here)
893  int find(const Fl_Widget &wgt) const {
894  return(table->find(wgt));
895  }
896 
897  // CALLBACKS
898 
904  int callback_row() {
905  return(_callback_row);
906  }
907 
913  int callback_col() {
914  return(_callback_col);
915  }
916 
923  return(_callback_context);
924  }
925 
933  void do_callback(TableContext context, int row, int col) {
934  _callback_context = context;
935  _callback_row = row;
936  _callback_col = col;
938  }
939 
940 #ifdef FL_DOXYGEN
941 
969  void when(Fl_When flags);
970 #endif
971 
972 #ifdef FL_DOXYGEN
973 
1050  void callback(Fl_Widget*, void*);
1051 #endif
1052 
1062  int scrollbar_size() const {
1063  return(_scrollbar_size);
1064  }
1065 
1084  void scrollbar_size(int newSize) {
1085  if ( newSize != _scrollbar_size ) redraw();
1086  _scrollbar_size = newSize;
1087  }
1088 
1102  void tab_cell_nav(int val) {
1103  if ( val ) flags_ |= TABCELLNAV;
1104  else flags_ &= ~TABCELLNAV;
1105  }
1106 
1114  int tab_cell_nav() const {
1115  return(flags_ & TABCELLNAV ? 1 : 0);
1116  }
1117 };
1118 
1119 #endif /*_FL_TABLE_H*/
void col_resize(int flag)
Allows/disallows column resizing by the user.
Definition: Fl_Table.H:553
Fl_Widget is the base class for all widgets in FLTK.
Definition: Fl_Widget.H:85
int row_resize_min()
Returns the current row minimum resize value.
Definition: Fl_Table.H:576
int tiy
Data table&#39;s inner y dimension, inside bounding box. See Table Dimension Diagram. ...
Definition: Fl_Table.H:239
A table of widgets or other content.
Definition: Fl_Table.H:108
Fl_Boxtype table_box(void)
Returns the current box type used for the data table.
Definition: Fl_Table.H:458
int tow
Data table&#39;s outer w dimension, outside bounding box. See Table Dimension Diagram.
Definition: Fl_Table.H:246
Fl_Cursor
The following constants define the mouse cursors that are available in FLTK.
Definition: Enumerations.H:1156
int rows()
Returns the number of rows in the table.
Definition: Fl_Table.H:467
int row_header()
Returns if row headers are enabled or not.
Definition: Fl_Table.H:592
virtual void hide()
Makes a widget invisible.
Definition: Fl_Widget.cxx:251
int col_header_height()
Gets the column header height.
Definition: Fl_Table.H:635
Fl_Widget *const * array()
Returns a pointer to the array of children.
Definition: Fl_Table.H:853
int callback_col()
Returns the current column the event occurred on.
Definition: Fl_Table.H:913
void redraw()
Schedules the drawing of the widget.
Definition: Fl.cxx:1480
void table_box(Fl_Boxtype val)
Sets the kind of box drawn around the data table, the default being FL_NO_BOX.
Definition: Fl_Table.H:450
Fl_Boxtype box() const
Gets the box type of the widget.
Definition: Fl_Widget.H:350
void col_header_height(int height)
Sets the height in pixels for column headers and redraws the table.
Definition: Fl_Table.H:626
Fl_Widget * child(int n) const
Returns the child widget by an index.
Definition: Fl_Table.H:871
virtual void clear()
Clears the table to zero rows (rows(0)), zero columns (cols(0)), and clears any widgets (table->clear...
Definition: Fl_Table.H:437
int col_header()
Returns if column headers are enabled or not.
Definition: Fl_Table.H:609
void col_width_all(int width)
Convenience method to set the width of all columns to the same value, in pixels.
Definition: Fl_Table.H:717
void clear()
Clear all but the scrollbars...
Definition: Fl_Scroll.cxx:23
void remove(int index)
Removes the widget at index from the group but does not delete it.
Definition: Fl_Group.cxx:509
int toh
Data table&#39;s outer h dimension, outside bounding box. See Table Dimension Diagram.
Definition: Fl_Table.H:247
Fl_When
These constants determine when a callback is performed.
Definition: Enumerations.H:421
int wiw
Table widget&#39;s inner w dimension, inside bounding box. See Table Dimension Diagram.
Definition: Fl_Table.H:252
int leftcol
left column# of currently visible table on screen
Definition: Fl_Table.H:224
int find(const Fl_Widget *) const
Searches the child array for the widget and returns the index.
Definition: Fl_Group.cxx:49
Fl_Color row_header_color()
Returns the current row header color.
Definition: Fl_Table.H:666
void init_sizes()
Resets the internal array of widget sizes and positions.
Definition: Fl_Table.H:780
int children() const
Returns how many child widgets the group has.
Definition: Fl_Group.H:81
Fl_Group * parent() const
Returns a pointer to the parent widget.
Definition: Fl_Widget.H:241
void init_sizes()
Resets the internal array of widget sizes and positions.
Definition: Fl_Group.cxx:567
TableContext
The context bit flags for Fl_Table related callbacks.
Definition: Fl_Table.H:116
int tih
Data table&#39;s inner h dimension, inside bounding box. See Table Dimension Diagram. ...
Definition: Fl_Table.H:241
int children() const
Returns the number of children in the table.
Definition: Fl_Table.H:883
void end()
Exactly the same as current(this->parent()).
Definition: Fl_Group.cxx:72
void row_resize_min(int val)
Sets the current row minimum resize value.
Definition: Fl_Table.H:585
A child needs to be redrawn.
Definition: Enumerations.H:1214
Fl_Color col_header_color()
Gets the color for column headers.
Definition: Fl_Table.H:681
int toy
Data table&#39;s outer y dimension, outside bounding box. See Table Dimension Diagram.
Definition: Fl_Table.H:245
void visible_cells(int &r1, int &r2, int &c1, int &c2)
Returns the range of row and column numbers for all visible and partially visible cells in the table...
Definition: Fl_Table.H:508
int tox
Data table&#39;s outer x dimension, outside bounding box. See Table Dimension Diagram.
Definition: Fl_Table.H:244
Fl_Boxtype
FLTK standard box types.
Definition: Enumerations.H:598
int cols()
Get the number of columns in the table.
Definition: Fl_Table.H:476
void row_height_all(int height)
Convenience method to set the height of all rows to the same value, in pixels.
Definition: Fl_Table.H:707
void insert(Fl_Widget &, int i)
The widget is removed from its current group (if any) and then inserted into this group...
Definition: Fl_Group.cxx:464
void redraw_range(int topRow, int botRow, int leftCol, int rightCol)
Define region of cells to be redrawn by specified range of rows/cols, and then sets damage(DAMAGE_CHI...
Definition: Fl_Table.H:407
The Fl_Group class is the FLTK container widget.
Definition: Fl_Group.H:42
int wih
Table widget&#39;s inner h dimension, inside bounding box. See Table Dimension Diagram.
Definition: Fl_Table.H:253
int table_w
table&#39;s virtual width (in pixels)
Definition: Fl_Table.H:220
int is_interactive_resize()
Returns 1 if someone is interactively resizing a row or column.
Definition: Fl_Table.H:519
int toprow
top row# of currently visible table on screen
Definition: Fl_Table.H:222
void add(Fl_Widget &)
The widget is removed from its current group (if any) and then added to the end of this group...
Definition: Fl_Group.cxx:497
int select_row
extended selection row (-1 if none)
Definition: Fl_Table.H:230
void tab_cell_nav(int val)
Flag to control if Tab navigates table cells or not.
Definition: Fl_Table.H:1102
void row_header_color(Fl_Color val)
Sets the row header color and causes the screen to redraw.
Definition: Fl_Table.H:658
int col_width(int col)
Returns the current width of the specified column in pixels.
Definition: Fl_Table.H:699
int row_position()
Returns the current row scroll position as a row number.
Definition: Fl_Table.H:729
void begin()
Sets the current group so you can build the widget tree by just constructing the widgets.
Definition: Fl_Group.cxx:66
void col_header(int flag)
Enable or disable column headers.
Definition: Fl_Table.H:617
void add(Fl_Widget &wgt)
The specified widget is removed from its current group (if any) and added to the end of Fl_Table&#39;s gr...
Definition: Fl_Table.H:789
int current_row
selection cursor&#39;s current row (-1 if none)
Definition: Fl_Table.H:228
void row_resize(int flag)
Allows/disallows row resizing by the user.
Definition: Fl_Table.H:536
virtual void show()
Makes a widget visible.
Definition: Fl_Widget.cxx:239
virtual void draw_cell(TableContext context, int R=0, int C=0, int X=0, int Y=0, int W=0, int H=0)
Subclass should override this method to handle drawing the cells.
Definition: Fl_Table.H:385
int col_resize()
Returns if column resizing by the user is allowed.
Definition: Fl_Table.H:543
void top_row(int row)
Sets which row should be at the top of the table, scrolling as necessary, and the table is redrawn...
Definition: Fl_Table.H:745
int current_col
selection cursor&#39;s current column (-1 if none)
Definition: Fl_Table.H:229
int rightcol
right column# of currently visible table on screen
Definition: Fl_Table.H:225
int table_h
table&#39;s virtual height (in pixels)
Definition: Fl_Table.H:221
int row_height(int row)
Returns the current height of the specified row as a value in pixels.
Definition: Fl_Table.H:690
void insert(Fl_Widget &wgt, int n)
The specified widget is removed from its current group (if any) and inserted into the Fl_Table&#39;s grou...
Definition: Fl_Table.H:810
void col_header_color(Fl_Color val)
Sets the color for column headers and redraws the table.
Definition: Fl_Table.H:673
int is_fltk_container()
Does the table contain any child fltk widgets?
Definition: Fl_Table.H:395
int top_row()
Returns the current top row shown in the table.
Definition: Fl_Table.H:753
int toprow_scrollpos
precomputed scroll position for top row
Definition: Fl_Table.H:234
int scrollbar_size() const
Gets the current size of the scrollbars&#39; troughs, in pixels.
Definition: Fl_Table.H:1062
Fl_Scrollbar * vscrollbar
child vertical scrollbar widget
Definition: Fl_Table.H:256
Fl_Widget *const * array() const
Returns a pointer to the array of children.
Definition: Fl_Group.cxx:40
int row_header_width()
Returns the current row header width (in pixels).
Definition: Fl_Table.H:651
void col_resize_min(int val)
Sets the current column minimum resize value.
Definition: Fl_Table.H:569
int tiw
Data table&#39;s inner w dimension, inside bounding box. See Table Dimension Diagram. ...
Definition: Fl_Table.H:240
int select_col
extended selection column (-1 if none)
Definition: Fl_Table.H:231
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition: Enumerations.H:1042
void do_callback()
Calls the widget callback function with default arguments.
Definition: Fl_Widget.H:881
int tab_cell_nav() const
Get state of table&#39;s &#39;Tab&#39; key cell navigation flag.
Definition: Fl_Table.H:1114
int wiy
Table widget&#39;s inner y dimension, inside bounding box. See Table Dimension Diagram.
Definition: Fl_Table.H:251
This container widget lets you maneuver around a set of widgets much larger than your window...
Definition: Fl_Scroll.H:85
void add(Fl_Widget *wgt)
The specified widget is removed from its current group (if any) and added to the end of Fl_Table&#39;s gr...
Definition: Fl_Table.H:802
void insert(Fl_Widget &wgt, Fl_Widget *w2)
The specified widget is removed from its current group (if any) and inserted into Fl_Table&#39;s group be...
Definition: Fl_Table.H:819
void scrollbar_size(int newSize)
Sets the pixel size of the scrollbars&#39; troughs to newSize, in pixels.
Definition: Fl_Table.H:1084
int callback_row()
Returns the current row the event occurred on.
Definition: Fl_Table.H:904
int col_resize_min()
Returns the current column minimum resize value.
Definition: Fl_Table.H:560
int row_resize()
Returns if row resizing by the user is allowed.
Definition: Fl_Table.H:526
Fl_Scroll * table
child Fl_Scroll widget container for child fltk widgets (if any)
Definition: Fl_Table.H:255
int wix
Table widget&#39;s inner x dimension, inside bounding box. See Table Dimension Diagram.
Definition: Fl_Table.H:250
int botrow
bottom row# of currently visible table on screen
Definition: Fl_Table.H:223
int col_position()
Returns the current column scroll position as a column number.
Definition: Fl_Table.H:736
void do_callback(TableContext context, int row, int col)
Calls the widget callback.
Definition: Fl_Table.H:933
int tix
Data table&#39;s inner x dimension, inside bounding box. See Table Dimension Diagram. ...
Definition: Fl_Table.H:238
int leftcol_scrollpos
precomputed scroll position for left column
Definition: Fl_Table.H:235
TableContext callback_context()
Returns the current &#39;table context&#39;.
Definition: Fl_Table.H:922
Fl_Widget * child(int n) const
Returns array()[n].
Definition: Fl_Group.H:85
The Fl_Scrollbar widget displays a slider with arrow buttons at the ends of the scrollbar.
Definition: Fl_Scrollbar.H:41
void row_header_width(int width)
Sets the row header width to n and causes the screen to redraw.
Definition: Fl_Table.H:642
static Fl_Group * current()
Returns the currently active group.
Definition: Fl_Group.cxx:81
Fl_Scrollbar * hscrollbar
child horizontal scrollbar widget
Definition: Fl_Table.H:257
void row_header(int flag)
Enables/disables showing the row headers.
Definition: Fl_Table.H:600