1998-10-20 01:39:29 +04:00
|
|
|
//
|
2005-02-25 00:55:12 +03:00
|
|
|
// "$Id$"
|
1998-10-20 01:39:29 +04:00
|
|
|
//
|
|
|
|
// Pack header file for the Fast Light Tool Kit (FLTK).
|
|
|
|
//
|
2010-11-29 00:06:39 +03:00
|
|
|
// Copyright 1998-2010 by Bill Spitzak and others.
|
1998-10-20 01:39:29 +04:00
|
|
|
//
|
2011-07-19 08:49:30 +04:00
|
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
|
|
// file is missing or damaged, see the license at:
|
|
|
|
//
|
|
|
|
// http://www.fltk.org/COPYING.php
|
1998-10-20 01:39:29 +04:00
|
|
|
//
|
2005-04-16 04:13:17 +04:00
|
|
|
// Please report all bugs and problems on the following page:
|
|
|
|
//
|
|
|
|
// http://www.fltk.org/str.php
|
1998-10-20 01:39:29 +04:00
|
|
|
//
|
1998-10-06 22:21:25 +04:00
|
|
|
|
2008-10-15 17:46:06 +04:00
|
|
|
/* \file
|
2008-09-16 11:26:22 +04:00
|
|
|
Fl_Pack widget . */
|
|
|
|
|
1998-10-06 22:21:25 +04:00
|
|
|
#ifndef Fl_Pack_H
|
|
|
|
#define Fl_Pack_H
|
|
|
|
|
|
|
|
#include <FL/Fl_Group.H>
|
|
|
|
|
2008-09-14 19:45:27 +04:00
|
|
|
/**
|
|
|
|
This widget was designed to add the functionality of compressing and
|
|
|
|
aligning widgets.
|
|
|
|
<P>If type() is Fl_Pack::HORIZONTAL all the children are
|
|
|
|
resized to the height of the Fl_Pack, and are moved next to
|
|
|
|
each other horizontally. If type() is not Fl_Pack::HORIZONTAL
|
|
|
|
then the children are resized to the width and are stacked below each
|
|
|
|
other. Then the Fl_Pack resizes itself to surround the child
|
|
|
|
widgets.
|
|
|
|
<P>This widget is needed for the Fl_Tabs.
|
|
|
|
In addition you may want to put the Fl_Pack inside an
|
|
|
|
Fl_Scroll.
|
|
|
|
|
|
|
|
<P>The resizable for Fl_Pack is set to NULL by default.</p>
|
|
|
|
<P>See also: Fl_Group::resizable()
|
|
|
|
*/
|
2002-08-14 20:49:38 +04:00
|
|
|
class FL_EXPORT Fl_Pack : public Fl_Group {
|
1998-10-06 22:21:25 +04:00
|
|
|
int spacing_;
|
2009-02-18 12:27:54 +03:00
|
|
|
|
1998-10-06 22:21:25 +04:00
|
|
|
public:
|
|
|
|
enum { // values for type(int)
|
|
|
|
VERTICAL = 0,
|
|
|
|
HORIZONTAL = 1
|
|
|
|
};
|
2009-02-18 12:27:54 +03:00
|
|
|
|
|
|
|
protected:
|
2002-08-14 20:49:38 +04:00
|
|
|
void draw();
|
2009-02-18 12:27:54 +03:00
|
|
|
|
|
|
|
public:
|
2002-08-14 20:49:38 +04:00
|
|
|
Fl_Pack(int x,int y,int w ,int h,const char *l = 0);
|
2008-09-14 19:45:27 +04:00
|
|
|
/**
|
|
|
|
Gets the number of extra pixels of blank space that are added
|
|
|
|
between the children.
|
|
|
|
*/
|
1998-10-06 22:21:25 +04:00
|
|
|
int spacing() const {return spacing_;}
|
2008-09-14 19:45:27 +04:00
|
|
|
/**
|
|
|
|
Sets the number of extra pixels of blank space that are added
|
|
|
|
between the children.
|
|
|
|
*/
|
1998-10-06 22:21:25 +04:00
|
|
|
void spacing(int i) {spacing_ = i;}
|
2008-09-14 19:45:27 +04:00
|
|
|
/** Same as Fl_Group::type() */
|
1998-10-06 22:21:25 +04:00
|
|
|
uchar horizontal() const {return type();}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
1998-10-20 01:39:29 +04:00
|
|
|
|
|
|
|
//
|
2005-02-25 00:55:12 +03:00
|
|
|
// End of "$Id$".
|
1998-10-20 01:39:29 +04:00
|
|
|
//
|