Nana C++ Library. Reference for users.
What we need to use nana
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
nana::widget Class Referenceabstract

Abstract class for defining the capacity interface. More...

Inheritance diagram for nana::widget:
nana::detail::widget_base nana::widget_object< Category, DrawerTrigger, Events, Scheme, typename > nana::widget_object< category::lite_widget_tag, DrawerTrigger, Events, Scheme > nana::widget_object< category::root_tag, DrawerTrigger, Events, Scheme > nana::widget_object< category::lite_widget_tag, drawer_trigger > nana::widget_object< category::root_tag, drawer > nana::widget_object< category::root_tag, drawerbase::float_listbox::trigger > nana::widget_object< category::root_tag, drawerbase::form::trigger, detail::events_root_extension > nana::widget_object< category::root_tag, menu_drawer > nana::widget_object< category::root_tag, tlwnd_drawer > nana::widget_object< category::widget_tag, dockcaption_dtrigger > nana::widget_object< category::widget_tag, drawer_splitter > nana::widget_object< category::widget_tag, drawerbase::button::trigger > nana::widget_object< category::widget_tag, drawerbase::categorize::trigger, drawerbase::categorize::categorize_events< T > > nana::widget_object< category::widget_tag, drawerbase::categorize::trigger, drawerbase::categorize::categorize_events< ValueType > > nana::widget_object< category::widget_tag, drawerbase::checkbox::drawer, drawerbase::checkbox::events_type, drawerbase::checkbox::scheme > nana::widget_object< category::widget_tag, drawerbase::combox::trigger, drawerbase::combox::combox_events,::nana::widgets::skeletons::text_editor_scheme > nana::widget_object< category::widget_tag, drawerbase::date_chooser::trigger, drawerbase::date_chooser::date_chooser_events > nana::widget_object< category::widget_tag, drawerbase::label::trigger > nana::widget_object< category::widget_tag, drawerbase::listbox::trigger, drawerbase::listbox::listbox_events, drawerbase::listbox::scheme > nana::widget_object< category::widget_tag, drawerbase::menubar::trigger,::nana::general_events, drawerbase::menubar::scheme > nana::widget_object< category::widget_tag, drawerbase::panel::drawer, general_events, drawerbase::group::scheme > nana::widget_object< category::widget_tag, drawerbase::picture::drawer > nana::widget_object< category::widget_tag, drawerbase::progress::trigger,::nana::general_events, drawerbase::progress::scheme > nana::widget_object< category::widget_tag, drawerbase::scroll::trigger< Vertical >, drawerbase::scroll::scroll_events > nana::widget_object< category::widget_tag, drawerbase::slider::trigger, drawerbase::slider::slider_events, drawerbase::slider::scheme_impl > nana::widget_object< category::widget_tag, drawerbase::spinbox::drawer, drawerbase::spinbox::spinbox_events,::nana::widgets::skeletons::text_editor_scheme > nana::widget_object< category::widget_tag, drawerbase::tabbar::trigger, drawerbase::tabbar::tabbar_events< Type > > nana::widget_object< category::widget_tag, drawerbase::tabbar_lite::driver, drawerbase::tabbar_lite::events > nana::widget_object< category::widget_tag, drawerbase::textbox::drawer, drawerbase::textbox::textbox_events,::nana::widgets::skeletons::text_editor_scheme > nana::widget_object< category::widget_tag, drawerbase::toolbar::drawer, drawerbase::toolbar::toolbar_events > nana::widget_object< category::widget_tag, drawerbase::treebox::trigger, drawerbase::treebox::treebox_events, drawerbase::treebox::scheme > nana::widget_object< std::conditional< HasBackground, category::widget_tag, category::lite_widget_tag >::type, drawerbase::panel::drawer >

Classes

class  inner_widget_notifier
 

Public Types

using native_string_type = detail::native_string_type
 

Public Member Functions

 widget ()=default
 
virtual ~widget ()=default
 
virtual window handle () const =0
 Returns the handle of window, returns 0 if window is not created. More...
 
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
 
widgetcaption (std::string utf8)
 
widgetcaption (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_eventsevents () const
 
void umake_event (event_handle eh) const
 Deletes an event callback by a handle. More...
 
widgetregister_shortkey (wchar_t)
 Registers a shortkey. To remove a registered key, pass 0. More...
 
widgettake_active (bool activated, window take_if_not_activated)
 
widgettooltip (const ::std::string &)
 
 operator dummy_bool_type () const
 
 operator window () const
 

Protected Member Functions

std::unique_ptr
<::nana::detail::widget_notifier_interface
_m_wdg_notifier ()
 
virtual void _m_complete_creation ()
 
virtual general_events_m_get_general_events () const =0
 
virtual native_string_type _m_caption () const noexcept
 
virtual void _m_caption (native_string_type &&)
 
virtual nana::cursor _m_cursor () const
 
virtual void _m_cursor (nana::cursor)
 
virtual void _m_close ()
 
virtual bool _m_enabled () const
 
virtual void _m_enabled (bool)
 
virtual std::shared_ptr
< scroll_operation_interface
_m_scroll_operation ()
 
virtual bool _m_show (bool)
 
virtual bool _m_visible () const
 
virtual void _m_size (const nana::size &)
 
virtual void _m_move (int x, int y)
 
virtual void _m_move (const rectangle &)
 
virtual void _m_typeface (const nana::paint::font &font)
 
virtual nana::paint::font _m_typeface () const
 
virtual void _m_fgcolor (const nana::color &)
 
virtual nana::color _m_fgcolor () const
 
virtual void _m_bgcolor (const nana::color &)
 
virtual nana::color _m_bgcolor () const
 

Friends

class detail::widget_notifier_interface
 

Detailed Description

Abstract class for defining the capacity interface.

Examples:
a_group_impl.cpp.

Member Typedef Documentation

Constructor & Destructor Documentation

nana::widget::widget ( )
default
virtual nana::widget::~widget ( )
virtualdefault

Member Function Documentation

void nana::widget::_m_bgcolor ( const nana::color col)
protectedvirtual
nana::color nana::widget::_m_bgcolor ( ) const
protectedvirtual
auto nana::widget::_m_caption ( ) const
protectedvirtualnoexcept

Reimplemented in nana::textbox.

void nana::widget::_m_caption ( native_string_type &&  str)
protectedvirtual

Reimplemented in nana::textbox.

void nana::widget::_m_close ( )
protectedvirtual
void nana::widget::_m_complete_creation ( )
protectedvirtual
nana::cursor nana::widget::_m_cursor ( ) const
protectedvirtual
void nana::widget::_m_cursor ( nana::cursor  cur)
protectedvirtual
bool nana::widget::_m_enabled ( ) const
protectedvirtual
void nana::widget::_m_enabled ( bool  value)
protectedvirtual
void nana::widget::_m_fgcolor ( const nana::color col)
protectedvirtual
nana::color nana::widget::_m_fgcolor ( ) const
protectedvirtual
virtual general_events& nana::widget::_m_get_general_events ( ) const
protectedpure virtual
void nana::widget::_m_move ( int  x,
int  y 
)
protectedvirtual
void nana::widget::_m_move ( const rectangle r)
protectedvirtual
std::shared_ptr< scroll_operation_interface > nana::widget::_m_scroll_operation ( )
protectedvirtual

Reimplemented in nana::textbox.

bool nana::widget::_m_show ( bool  visible)
protectedvirtual
void nana::widget::_m_size ( const nana::size sz)
protectedvirtual
void nana::widget::_m_typeface ( const nana::paint::font font)
protectedvirtual

Reimplemented in nana::textbox.

nana::paint::font nana::widget::_m_typeface ( ) const
protectedvirtual
bool nana::widget::_m_visible ( ) const
protectedvirtual
std::unique_ptr<::nana::detail::widget_notifier_interface > nana::widget::_m_wdg_notifier ( )
protected
void nana::widget::bgcolor ( const nana::color col)
nana::color nana::widget::bgcolor ( ) const
widget & nana::widget::caption ( std::string  utf8)
widget & nana::widget::caption ( std::wstring  text)
auto nana::widget::caption_native ( ) const
noexcept
std::wstring nana::widget::caption_wstring ( ) const
noexcept
void nana::widget::close ( )
void nana::widget::cursor ( nana::cursor  cur)
nana::cursor nana::widget::cursor ( ) const

Retrieves the shape of cursor.

bool nana::widget::empty ( ) const

Determines whether the manipulator is handling a window.

void nana::widget::enable_dropfiles ( bool  enb)

Enables/Disables a window to accept dropped files.

bool nana::widget::enabled ( ) const

Determines whether the window is enabled for mouse and keyboard input.

void nana::widget::enabled ( bool  value)
general_events & nana::widget::events ( ) const
void nana::widget::fgcolor ( const nana::color col)
nana::color nana::widget::fgcolor ( ) const
void nana::widget::focus ( )
bool nana::widget::focused ( ) const
virtual window nana::widget::handle ( ) const
pure virtual

Returns the handle of window, returns 0 if window is not created.

Implemented in nana::detail::widget_base.

void nana::widget::hide ( )

Sets the window invisible.

template<typename... Args>
void nana::widget::i18n ( std::string  msgid,
Args &&...  args 
)
inline
void nana::widget::i18n ( i18n_eval  eval)
void nana::widget::move ( int  x,
int  y 
)
Examples:
screen.cpp.
void nana::widget::move ( const point pos)
void nana::widget::move ( const rectangle r)
nana::widget::operator widget::dummy_bool_type ( ) const
nana::widget::operator window ( ) const
window nana::widget::parent ( ) const
nana::point nana::widget::pos ( ) const
widget & nana::widget::register_shortkey ( wchar_t  key)

Registers a shortkey. To remove a registered key, pass 0.

void nana::widget::release_capture ( )

Disables the widget to grab the mouse input.

std::shared_ptr< scroll_operation_interface > nana::widget::scroll_operation ( )
void nana::widget::set_capture ( bool  ignore_children)

Enables the widget to grab the mouse input.

nana::size nana::widget::size ( ) const
void nana::widget::size ( const nana::size sz)
widget & nana::widget::take_active ( bool  activated,
window  take_if_not_activated 
)
widget & nana::widget::tooltip ( const ::std::string text)
Examples:
helloworld_demo.cpp.
void nana::widget::typeface ( const paint::font font)
nana::paint::font nana::widget::typeface ( ) const
void nana::widget::umake_event ( event_handle  eh) const

Deletes an event callback by a handle.

bool nana::widget::visible ( ) const

Friends And Related Function Documentation

friend class detail::widget_notifier_interface
friend