Nana C++ Library  
An open-source C++ framework project
The Nana Programmer's Guide 
nana::gui::button

Description

a button widget.


Model of

Widget Window 


Public base classes

class widget_object: public widget


Members

button() The construction.
button(nana::gui::window wd, bool visible) Creates a button.
button(nana::gui::window wd, const nana::string& text, bool visible = true) Ditto.
button(nana::gui::window wd, const nana::char_t* text, bool visible = true) Ditto.
button(nana::gui::window wd, const rectangle& r = rectangle(), bool visible = true) Creates a button with a specified rectangle.
void icon(const nana::paint::image&) Sets an icon image.
void enable_pushed(bool eb) Enables or disables the pushed state of the button.
bool pushed() const Returns the pushed state of the button.
void pushed(bool ps) Sets the pushed state.
void omitted(bool eb) Enables/Disables omitting displaying the caption if the text is too long.
void enable_focus_color(bool eb) Enables/Disables showing the caption with a special color to indicate the button is focused.
button& set_bground(const pat::cloneable&) Sets a user-defined background element. (See the element bground)
button& set_bground(const std::string&) Sets a pre-defined background element by the specified name. (See the element bground)
button& transparent(bool enabled) Enables/disables the transparent.
bool transparent() const Returns the button whether it is transparent.
button& edge_effects(bool enabled) Enables/disables the edge nimbus effect.


File

nana/gui/widgets/button.hpp


Notes

None.


See also

element bground


Move to The Nana Programmer's Guide Main Page