Nana C++ Library  

An open-source C++ framework project
The Programmer's Guide 
widget_object<root_tag>

Description

a widget_object is a base class of all the classes defined as a root window.

Model of

Root Window 

Public base classes

widget

Members

void background(colour_t) Sets the color of background.
colour_t background() const Returns the color of background.
nana::string caption() const Returns the caption.
void caption(const nana::string&) Sets the caption.
void close() const Closes the window.
void cursor(nana::gui::cursor); Sets a system predefined cursor.
nana::gui::cursor cursor() const Retrieves the shape of cursor.
bool empty() const Determines whether the manipulator is handling a window.
bool enabled() const Determines whether the window is enabled for mouse and keyboard input.
void enabled(bool) Sets the window whether enabled for mouse and keyboard input.
bool focused() const Returns true if the widget has focus.
void foreground(colour_t) Sets the color of foreground.
colour_t foreground() const Returns the color of foreground.
window handle() const Returns the handle of window, returns 0 if window is not created.
void hide() Sets the window invisible.
void icon(const nana::paint::image&) Sets the icon.
template<typename Event, typename Function>
event_handle make_event(Function)
Register an event callback functor.
template<typename Event, typename Class, typename Concept>
event_handle make_event(Class& object, void (Concept::*)(const eventinfo&))
Register an event callback functor. The functor is a member function of Concept.
void move(int x, int y) Moves the window to a new position.
window owner() const Returns the owner of the window.
void picture(const nana::char_t* filename) Sets a image file as a window background.
void show() Sets the window visible.
nana::size size() const Returns the size of window.
void size(unsigned width, unsigned height) Sets the size of window.
void umake_event(event_handle) const Deletes an event callback by a handle.

Notes

None.

See also

form



Move to The Nana Programmer's Guide Main Page