FLTK 1.4.0
Loading...
Searching...
No Matches
Fl_Pack.H
1//
2// Pack header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2020 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
17/* \file
18 Fl_Pack widget . */
19
20#ifndef Fl_Pack_H
21#define Fl_Pack_H
22
23#include <FL/Fl_Group.H>
24
54class FL_EXPORT Fl_Pack : public Fl_Group {
55 int spacing_;
56
57public:
58 enum { // values for type(int)
59 VERTICAL = 0,
60 HORIZONTAL = 1
61 };
62
63protected:
64 void draw() FL_OVERRIDE;
65
66public:
67 Fl_Pack(int X, int Y, int W, int H, const char *L = 0);
68
73 int spacing() const {return spacing_;}
74
79 void spacing(int i) {spacing_ = i;}
80
93 uchar horizontal() const {return type();}
94
95 void resize(int X, int Y, int W, int H) FL_OVERRIDE;
96};
97
98#endif
Fl_Group and Fl_End classes.
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
This widget was designed to add the functionality of compressing and aligning widgets.
Definition Fl_Pack.H:54
void spacing(int i)
Sets the number of extra pixels of blank space that are added between the children.
Definition Fl_Pack.H:79
int spacing() const
Gets the number of extra pixels of blank space that are added between the children.
Definition Fl_Pack.H:73
uchar horizontal() const
Returns non-zero if Fl_Pack alignment is horizontal.
Definition Fl_Pack.H:93
uchar type() const
Gets the widget type.
Definition Fl_Widget.H:343
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
unsigned char uchar
unsigned char
Definition fl_types.h:30