Nana C++ Library. Reference for users.
What we need to use nana
|
A toolbar at the top of window for pop-upping menus. More...
Public Member Functions | |
menubar ()=default | |
The default constructor delay creation. More... | |
menubar (window) | |
Create a menubar at the top of the specified window. More... | |
~menubar () | |
void | create (window) |
Create a menubar at the top of the specified window. More... | |
menu & | push_back (const std::string &) |
Appends a new (empty) menu. More... | |
menu & | at (size_t index) const |
Gets the menu specified by index. More... | |
std::size_t | length () const |
Number of menus. More... | |
void | clear () |
Removes all the menus. More... | |
bool | cancel () |
Deselects the menu. More... | |
bool | hovered () const |
Determines the mouse is hovered on the menubar or its popped menu. More... | |
Public Member Functions inherited from nana::widget_object< category::widget_tag, drawerbase::menubar::trigger,::nana::general_events, drawerbase::menubar::scheme > | |
widget_object () | |
~widget_object () | |
event_type & | events () const |
bool | create (window parent_wd, bool visible) |
bool | create (window parent_wd, const rectangle &r={}, bool visible=true) |
widget_object & | borderless (bool enable) |
bool | borderless () const |
scheme_type & | scheme () const |
void | filter_event (const event_code evt_code, const bool bDisabled) |
void | filter_event (const std::vector< event_code > evt_codes, const bool bDisabled) |
void | filter_event (const event_filter_status &evt_all_states) |
bool | filter_event (const event_code evt_code) |
event_filter_status | filter_event () |
void | clear_filter () |
Public Member Functions inherited from nana::detail::widget_base | |
window | handle () const override |
Returns the handle of window, returns 0 if window is not created. More... | |
Public Member Functions inherited from nana::widget | |
widget ()=default | |
virtual | ~widget ()=default |
bool | empty () const |
Determines whether the manipulator is handling a window. More... | |
void | close () |
window | parent () const |
::std::string | caption () const noexcept |
::std::wstring | caption_wstring () const noexcept |
native_string_type | caption_native () const noexcept |
widget & | caption (std::string utf8) |
widget & | caption (std::wstring) |
template<typename... Args> | |
void | i18n (std::string msgid, Args &&...args) |
void | i18n (i18n_eval) |
void | cursor (nana::cursor) |
nana::cursor | cursor () const |
Retrieves the shape of cursor. More... | |
void | typeface (const paint::font &font) |
paint::font | typeface () const |
bool | enabled () const |
Determines whether the window is enabled for mouse and keyboard input. More... | |
void | enabled (bool) |
void | enable_dropfiles (bool) |
Enables/Disables a window to accept dropped files. More... | |
void | focus () |
bool | focused () const |
std::shared_ptr < scroll_operation_interface > | scroll_operation () |
void | show () |
Sets the window visible. More... | |
void | hide () |
Sets the window invisible. More... | |
bool | visible () const |
nana::size | size () const |
void | size (const nana::size &) |
void | set_capture (bool ignore_children) |
Enables the widget to grab the mouse input. More... | |
void | release_capture () |
Disables the widget to grab the mouse input. More... | |
point | pos () const |
void | move (int x, int y) |
void | move (const point &) |
void | move (const rectangle &) |
void | fgcolor (const nana::color &) |
nana::color | fgcolor () const |
void | bgcolor (const nana::color &) |
nana::color | bgcolor () const |
general_events & | events () const |
void | umake_event (event_handle eh) const |
Deletes an event callback by a handle. More... | |
widget & | register_shortkey (wchar_t) |
Registers a shortkey. To remove a registered key, pass 0. More... | |
widget & | take_active (bool activated, window take_if_not_activated) |
widget & | tooltip (const ::std::string &) |
operator dummy_bool_type () const | |
operator window () const | |
A toolbar at the top of window for pop-upping menus.
The widget sets as shortkey the character behind the first of & in the text, for the item. e.g. "File(&F)" or "&File".
|
default |
The default constructor delay creation.
nana::menubar::menubar | ( | window | wd | ) |
Create a menubar at the top of the specified window.
nana::menubar::~menubar | ( | ) |
menu & nana::menubar::at | ( | size_t | index | ) | const |
Gets the menu specified by index.
bool nana::menubar::cancel | ( | ) |
Deselects the menu.
If a menu is popped up, the menu deselects the item and close the pop-upped menu.
void nana::menubar::clear | ( | ) |
Removes all the menus.
void nana::menubar::create | ( | window | wd | ) |
Create a menubar at the top of the specified window.
bool nana::menubar::hovered | ( | ) | const |
Determines the mouse is hovered on the menubar or its popped menu.
std::size_t nana::menubar::length | ( | ) | const |
Number of menus.
menu & nana::menubar::push_back | ( | const std::string & | text | ) |
Appends a new (empty) menu.