26#include <FL/Fl_Rect.H>
148 friend class Fl_Grid_Type;
178 Cell(
int row,
int col) {
221 Fl_Widget *widget()
const {
return widget_; }
223 short row()
const {
return row_; }
224 short col()
const {
return col_; }
226 void rowspan(
short v) { rowspan_ = v; }
227 void colspan(
short v) { colspan_ = v; }
228 short rowspan()
const {
return rowspan_; }
229 short colspan()
const {
return colspan_; }
234 void minimum_size(
int w,
int h) {
if (w>=0) w_ = w;
if (h>=0) h_ = h; }
235 void minimum_size(
int *w,
int *h)
const {
if (w) *w = w_;
if (h) *h = h_; }
247 short margin_bottom_;
261 Cell *add_cell(
int row,
int col);
262 void remove_cell(
int row,
int col);
265 Fl_Grid(
int X,
int Y,
int W,
int H,
const char *L = 0);
270 virtual void layout(
int rows,
int cols,
int margin = -1,
int gap = -1);
271 virtual void layout();
272 virtual void clear_layout();
275 short rows()
const {
return rows_; }
276 short cols()
const {
return cols_; }
294 need_layout_ =
false;
308 virtual
void draw_grid();
314 virtual
void margin(
int left,
int top = -1,
int right = -1,
int bottom = -1);
315 int margin(
int *left,
int *top,
int *right,
int *bottom) const;
319 virtual
void gap(
int row_gap,
int col_gap = -1);
320 void gap(
int *row_gap,
int *col_gap) const;
324 Fl_Grid::Cell* cell(
int row,
int col) const;
335 void col_width(
int col,
int value);
336 void col_width(const
int *value,
size_t size);
337 int col_width(
int col) const;
339 void col_weight(
int col,
int value);
340 void col_weight(const
int *value,
size_t size);
341 int col_weight(
int col) const;
343 void col_gap(
int col,
int value);
344 void col_gap(const
int *value,
size_t size);
345 int col_gap(
int col) const;
347 void row_height(
int row,
int value);
348 void row_height(const
int *value,
size_t size);
349 int row_height(
int row) const;
351 void row_weight(
int row,
int value);
352 void row_weight(const
int *value,
size_t size);
353 int row_weight(
int row) const;
355 void row_gap(
int row,
int value);
356 void row_gap(const
int *value,
size_t size);
357 int row_gap(
int row) const;
359 int computed_col_width(
int col) const;
360 int computed_row_height(
int row) const;
379 void show_grid(
int set) {
380 draw_grid_ = set ? true :
false;
397 draw_grid_ = set ? true :
false;
401 void debug(
int level = 127);
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition Enumerations.H:1118
const Fl_Grid_Align FL_GRID_RIGHT
Align the widget at the right side of the cell.
Definition Fl_Grid.H:44
unsigned short Fl_Grid_Align
Fl_Grid type for child widget alignment control.
Definition Fl_Grid.H:29
const Fl_Grid_Align FL_GRID_VERTICAL
Stretch the widget vertically to fill the cell.
Definition Fl_Grid.H:50
const Fl_Grid_Align FL_GRID_HORIZONTAL
Stretch the widget horizontally to fill the cell.
Definition Fl_Grid.H:47
const Fl_Grid_Align FL_GRID_CENTER
Align the widget in the middle of the cell (default).
Definition Fl_Grid.H:32
const Fl_Grid_Align FL_GRID_PROPORTIONAL
Stretch the widget proportionally.
Definition Fl_Grid.H:56
const Fl_Grid_Align FL_GRID_FILL
Stretch the widget in both directions to fill the cell.
Definition Fl_Grid.H:53
const Fl_Grid_Align FL_GRID_TOP
Align the widget at the top of the cell.
Definition Fl_Grid.H:35
const Fl_Grid_Align FL_GRID_LEFT
Align the widget at the left side of the cell.
Definition Fl_Grid.H:41
const Fl_Grid_Align FL_GRID_BOTTOM
Align the widget at the bottom of the cell.
Definition Fl_Grid.H:38
Fl_Group and Fl_End classes.
~Cell()
The destructor deletes the cell.
Definition Fl_Grid.H:197
void next(Cell *c)
Sets the next pointer of a grid's cell.
Definition Fl_Grid.H:217
Cell * next()
Returns the next widget cell of the same row of this cell.
Definition Fl_Grid.H:202
Fl_Grid is a container (layout) widget with multiple columns and rows.
Definition Fl_Grid.H:147
void show_grid(int set, Fl_Color col)
Enable or disable drawing of the grid helper lines for visualization.
Definition Fl_Grid.H:396
void need_layout(int set)
Request or reset the request to calculate the layout of children.
Definition Fl_Grid.H:288
bool need_layout() const
Return whether layout calculation is required.
Definition Fl_Grid.H:301
The Fl_Group class is the main FLTK container widget.
Definition Fl_Group.H:56
void resize(int, int, int, int) FL_OVERRIDE
Resizes the Fl_Group widget and all of its children.
Definition Fl_Group.cxx:825
void draw() FL_OVERRIDE
Draws the widget.
Definition Fl_Group.cxx:943
Rectangle with standard FLTK coordinates (X, Y, W, H).
Definition Fl_Rect.H:30
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46