/usr/include/Wt/WNavigationBar is in libwt-dev 3.3.4+dfsg-6ubuntu1.
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 | // 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_WNAVIGATION_BAR_H_
#define WT_WNAVIGATION_BAR_H_
#include <vector>
#include <Wt/WLink>
#include <Wt/WTemplate>
namespace Wt {
class WStackedWidget;
class WTable;
/*! \class WNavigationBar Wt/WNavigationBar Wt/WNavigationBar
* \brief A navigation bar
*
* \note WNavigationBar is currently only styled in the Bootstrap themes.
*/
class WT_API WNavigationBar : public WTemplate
{
public:
/*! \brief Constructor.
*/
WNavigationBar(WContainerWidget *parent = 0);
/*! \brief Sets a title.
*
* The title may optionally link to a 'homepage'.
*/
void setTitle(const WString& title, const WLink& link = WLink());
/*! \brief Sets whether the navigation bar will respond to screen size.
*
* For screens that are less wide, the navigation bar can be
* rendered different (more compact and allowing for vertical menu
* layouts).
*/
void setResponsive(bool responsive);
/*! \brief Adds a menu to the navigation bar.
*
* Typically, a navigation bar will contain at least one menu which
* implements the top-level navigation options allowed by the
* navigation bar.
*
* The menu may be aligned to the left or to the right of the
* navigation bar.
*/
void addMenu(WMenu *menu, AlignmentFlag alignment = AlignLeft);
/*! \brief Adds a form field to the navigation bar.
*
* In some cases, one may want to add a few form fields to the navigation
* bar (e.g. for a compact login option).
*/
void addFormField(WWidget *widget, AlignmentFlag alignment = AlignLeft);
/*! \brief Adds a search widget to the navigation bar.
*
* This is not so different from addFormField(), except that the
* form field may be styled differently to indicate a search
* function.
*/
void addSearch(WLineEdit *field, AlignmentFlag alignment = AlignLeft);
/*! \brief Adds a widget to the navigation bar.
*
* Any other widget may be added to the navigation bar, although they may
* require special CSS style to blend well with the navigation bar style.
*/
void addWidget(WWidget *widget, AlignmentFlag alignment = AlignLeft);
protected:
WInteractWidget *createCollapseButton();
WInteractWidget *createExpandButton();
private:
void expandContents();
void collapseContents();
void undoExpandContents();
void addWrapped(WWidget *widget, AlignmentFlag alignment,
const char *wrapClass);
void addWrapped(WWidget *widget, WWidget* parent, int role,
AlignmentFlag alignment);
void align(WWidget *widget, AlignmentFlag alignment);
bool animatedResponsive() const;
};
}
#endif // WT_WNAVIGATION_BAR_H_
|