Wt  3.3.0
Public Member Functions
Wt::WNavigationBar Class Reference

A navigation bar. More...

#include <Wt/WNavigationBar>

Inheritance diagram for Wt::WNavigationBar:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 WNavigationBar (WContainerWidget *parent=0)
 Constructor.
void setTitle (const WString &title, const WLink &link=WLink())
 Sets a title.
void setResponsive (bool responsive)
 Sets whether the navigation bar will respond to screen size.
void addMenu (WMenu *menu, AlignmentFlag alignment=AlignLeft)
 Adds a menu to the navigation bar.
void addFormField (WWidget *widget, AlignmentFlag alignment=AlignLeft)
 Adds a form field to the navigation bar.
void addSearch (WLineEdit *field, AlignmentFlag alignment=AlignLeft)
 Adds a search widget to the navigation bar.
void addWidget (WWidget *widget, AlignmentFlag alignment=AlignLeft)
 Adds a widget to the navigation bar.

Detailed Description

A navigation bar.


Member Function Documentation

void Wt::WNavigationBar::addFormField ( WWidget widget,
AlignmentFlag  alignment = AlignLeft 
)

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 Wt::WNavigationBar::addMenu ( WMenu menu,
AlignmentFlag  alignment = AlignLeft 
)

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 Wt::WNavigationBar::addSearch ( WLineEdit field,
AlignmentFlag  alignment = AlignLeft 
)

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 Wt::WNavigationBar::addWidget ( WWidget widget,
AlignmentFlag  alignment = AlignLeft 
)

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 Wt::WNavigationBar::setResponsive ( bool  responsive)

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 Wt::WNavigationBar::setTitle ( const WString title,
const WLink link = WLink() 
)

Sets a title.

The title may optionally link to a 'homepage'.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Mon Apr 8 2013 for the C++ Web Toolkit (Wt) by doxygen 1.7.5.1