## class fltk::Bar

### Class Hierarchy

    fltk::Group
       |
       +----fltk::Bar

### Include Files

    #include <fltk/Bar.h>

### Description

This group widget can be "closed" by the user by clicking on the small box that is at the left edge. When it is closed it resizes to a small horizontal strip with the box at the left edge and draws the label() (if any), and all child widgets are hidden and do not get any events. When opened the label disappears and all child widgets reappear.

This must be made a child of an fltk::Pack for the resizing to be useful.

If type() of the bar is set to `fltk::Bar::VERTICAL` then it will be a vertical strip with the control box at the top.

The default box is `fltk::FLAT_BOX`. If there are several bars you probably need to change this in order to see the dividing lines between them.

### Methods

fltk::Bar ~Bar opened open close glyph_size

#### fltk::Bar::Bar(int x, int y, int w, int h, const char *label = 0)

Creates a new empty fltk::Bar.

#### virtual fltk::Bar::~Bar()

Like all groups, the destructor also deletes all the children. This allows a whole tree to be deleted at once, without having to keep a pointer to all the children in the user code.

#### bool fltk::Bar::opened() const
bool fltk::Bar::opened(bool)

True if the bar is opened, false if it is closed. Setting this value returns true if the new value is different than the old one.

#### bool fltk::Bar::open()

Same as `opened(true)`

#### bool fltk::Bar::close()

Same as `opened(false)`

#### int fltk::Bar::glyph_size() const
void fltk::Bar::glyph_size(int)

Get or set the width of the box (or the height if this is a vertical bar), this is also the thickness the bar resizes to when closed.