FLTK
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 
57 public:
58  enum { // values for type(int)
59  VERTICAL = 0,
60  HORIZONTAL = 1
61  };
62 
63 protected:
64  void draw();
65 
66 public:
67  Fl_Pack(int X, int Y, int W, int H, const char *L = 0);
72  int spacing() const {return spacing_;}
77  void spacing(int i) {spacing_ = i;}
90  uchar horizontal() const {return type();}
91 };
92 
93 #endif
uchar type() const
Gets the widget type.
Definition: Fl_Widget.H:261
This widget was designed to add the functionality of compressing and aligning widgets.
Definition: Fl_Pack.H:54
void draw()
Draws the widget.
Definition: Fl_Group.cxx:817
void spacing(int i)
Sets the number of extra pixels of blank space that are added between the children.
Definition: Fl_Pack.H:77
The Fl_Group class is the FLTK container widget.
Definition: Fl_Group.H:42
uchar horizontal() const
Returns non-zero if Fl_Pack alignment is horizontal.
Definition: Fl_Pack.H:90
int spacing() const
Gets the number of extra pixels of blank space that are added between the children.
Definition: Fl_Pack.H:72
unsigned char uchar
unsigned char
Definition: fl_types.h:28