/usr/include/Wt/WToolBar is in libwt-dev 3.3.3+dfsg-4.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | // This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2012 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef WT_WTOOLBAR_H_
#define WT_WTOOLBAR_H_
#include <vector>
#include <Wt/WCompositeWidget>
namespace Wt {
/*! \class WToolBar Wt/WToolBar Wt/WToolBar
* \brief A toolbar
*
*
* By default, a toolbar is rendered as "compact" leaving no margin
* between buttons. By adding a separator or a split button, the
* toolbar also supports separation between buttons.
*/
class WT_API WToolBar : public WCompositeWidget
{
public:
/*! \brief Constructor.
*/
WToolBar(WContainerWidget *parent = 0);
/*! \brief Set vertical or horizontal orientation
*
* Use bootstrap btn-group-vertical style for vertical orientation.
*/
void setOrientation(Orientation orientation);
/*! \brief Adds a button.
*/
void addButton(WPushButton *button,
AlignmentFlag alignmentFlag = AlignLeft);
/*! \brief Adds a split button.
*
* When adding a split button, the toolbar automatically becomes
* non-compact, since otherwise the split button functionality
* cannot be distinguished from other buttons.
*
* \sa setCompact()
*/
void addButton(WSplitButton *button,
AlignmentFlag alignmentFlag = AlignLeft);
/*! \brief Adds a widget.
*
* The toolbar automatically becomes non-compact.
*
*/
void addWidget(WWidget *widget, AlignmentFlag alignmentFlag = AlignLeft);
/*! \brief Adds a separator.
*
* The toolbar automatically becomes non-compact.
*
* \sa setCompact()
*/
void addSeparator();
/*! \brief Returns the number of buttons.
*
* \sa widget()
*/
int count() const;
/*! \brief Returns a button.
*
* The returned widget is a WPushButton or WSplitButton added by addButton()
* or a widget added by addWidget().
*/
WWidget *widget(int index) const;
/*! \brief Sets the toolbar to be rendered compact.
*
* The default value is \c true, but <tt>setCompact(true)</tt> is
* called automatically when calling addButton(WSplitButton *) or
* addSeparator().
*/
void setCompact(bool compact);
/*! \brief Returns whether the toolbar was rendered compact.
*
* \sa setCompact()
*/
bool isCompact() const { return compact_; }
private:
bool compact_;
WContainerWidget *impl_;
WContainerWidget *lastGroup_;
WContainerWidget *lastGroup();
};
}
#endif // WT_WTOOLBAR_H_
|