26#include <FL/Fl_Rect.H>
148 friend class Fl_Grid_Type;
178 Cell(
int row,
int col) {
193 Fl_Widget *widget()
const {
return widget_; }
195 short row()
const {
return row_; }
196 short col()
const {
return col_; }
198 void rowspan(
short v) { rowspan_ = v; }
199 void colspan(
short v) { colspan_ = v; }
200 short rowspan()
const {
return rowspan_; }
201 short colspan()
const {
return colspan_; }
206 void minimum_size(
int w,
int h) {
if (w>=0) w_ = w;
if (h>=0) h_ = h; }
207 void minimum_size(
int *w,
int *h)
const {
if (w) *w = w_;
if (h) *h = h_; }
219 short margin_bottom_;
233 Cell *add_cell(
int row,
int col);
234 void remove_cell(
int row,
int col);
237 Fl_Grid(
int X,
int Y,
int W,
int H,
const char *L = 0);
242 virtual void layout(
int rows,
int cols,
int margin = -1,
int gap = -1);
243 virtual void layout();
244 virtual void clear_layout();
247 short rows()
const {
return rows_; }
248 short cols()
const {
return cols_; }
266 need_layout_ =
false;
280 virtual
void draw_grid();
286 virtual
void margin(
int left,
int top = -1,
int right = -1,
int bottom = -1);
287 int margin(
int *left,
int *top,
int *right,
int *bottom) const;
291 virtual
void gap(
int row_gap,
int col_gap = -1);
292 void gap(
int *row_gap,
int *col_gap) const;
296 Fl_Grid::Cell* cell(
int row,
int col) const;
307 void col_width(
int col,
int value);
308 void col_width(const
int *value,
size_t size);
309 int col_width(
int col) const;
311 void col_weight(
int col,
int value);
312 void col_weight(const
int *value,
size_t size);
313 int col_weight(
int col) const;
315 void col_gap(
int col,
int value);
316 void col_gap(const
int *value,
size_t size);
317 int col_gap(
int col) const;
319 void row_height(
int row,
int value);
320 void row_height(const
int *value,
size_t size);
321 int row_height(
int row) const;
323 void row_weight(
int row,
int value);
324 void row_weight(const
int *value,
size_t size);
325 int row_weight(
int row) const;
327 void row_gap(
int row,
int value);
328 void row_gap(const
int *value,
size_t size);
329 int row_gap(
int row) const;
331 int computed_col_width(
int col) const;
332 int computed_row_height(
int row) const;
351 void show_grid(
int set) {
352 draw_grid_ = set ? true :
false;
369 draw_grid_ = set ? true :
false;
373 void debug(
int level = 127);
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition Enumerations.H:1101
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.
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:368
void need_layout(int set)
Request or reset the request to calculate the layout of children.
Definition Fl_Grid.H:260
bool need_layout() const
Return whether layout calculation is required.
Definition Fl_Grid.H:273
The Fl_Group class is the 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:823
void draw() FL_OVERRIDE
Draws the widget.
Definition Fl_Group.cxx:926
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