FLTK 1.4.4: Fl_Pack.H Source File

FLTK 1.4.4

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
54 class 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;
98 void clear() { Fl_Group::clear(); resizable(NULL); }
99};
100
101#endif
Fl_Group.H
Fl_Group and Fl_End classes.
Fl_Group::resize
void resize(int, int, int, int) FL_OVERRIDE
Resizes the Fl_Group widget and all of its children.
Definition Fl_Group.cxx:825
Fl_Group::draw
void draw() FL_OVERRIDE
Draws the widget.
Definition Fl_Group.cxx:943
Fl_Group::clear
void clear()
Deletes all child widgets from memory recursively.
Definition Fl_Group.cxx:381
Fl_Group::resizable
Fl_Widget * resizable() const
Returns the group's resizable widget.
Definition Fl_Group.H:215
Fl_Pack::spacing
void spacing(int i)
Sets the number of extra pixels of blank space that are added between the children.
Definition Fl_Pack.H:79
Fl_Pack::Fl_Pack
Fl_Pack(int X, int Y, int W, int H, const char *L=0)
Creates a new Fl_Pack widget using the given position, size, and label string.
Definition Fl_Pack.cxx:45
Fl_Pack::clear
void clear()
Deletes all child widgets with Fl_Group::clear().
Definition Fl_Pack.H:98
Fl_Pack::spacing
int spacing() const
Gets the number of extra pixels of blank space that are added between the children.
Definition Fl_Pack.H:73
Fl_Pack::horizontal
uchar horizontal() const
Returns non-zero if Fl_Pack alignment is horizontal.
Definition Fl_Pack.H:93
Fl_Widget::type
uchar type() const
Gets the widget type.
Definition Fl_Widget.H:351
FL_OVERRIDE
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
uchar
unsigned char uchar
unsigned char
Definition fl_types.h:30