Nana C++ Library. Reference for users.
What we need to use nana
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
nana::scroll< Vert > Class Template Reference

Provides a way to display an object which is larger than the window's client area. More...

Inheritance diagram for nana::scroll< Vert >:
nana::widget_object< category::widget_tag, drawerbase::scroll::trigger< Vertical >, drawerbase::scroll::scroll_events > nana::scroll_interface nana::detail::widget_base nana::widget

Public Member Functions

 scroll ()
 The default constructor without creating the widget. More...
 
 scroll (window wd, bool visible=true)
 The construct that creates a widget. More...
 
 scroll (window wd, const rectangle &r, bool visible=true)
 The construct that creates a widget. More...
 
bool scrollable (bool for_less) const override
 Determines whether it is scrollable. More...
 
size_type amount () const override
 the whole total (peak) More...
 
void amount (size_type peak) override
 
size_type range () const override
 Get the range of the widget (how many is shown on a page, that is, How many to scroll after click on first or second) More...
 
void range (size_type r) override
 Set the range of the widget. More...
 
size_type value () const override
 Get the value (current offset calculated from the very beginning) More...
 
void value (size_type s) override
 Set the value. More...
 
size_type step () const override
 Get the step of the sroll widget. The step indicates a variation of the value. More...
 
void step (size_type s) override
 Set the step. More...
 
bool make_step (bool forward, unsigned steps=1) override
 Increase/decrease values by a step (alternatively by some number of steps). More...
 
window window_handle () const override
 
bool make_scroll (bool forward)
 Increase/decrease values by steps as if it is scrolled through mouse wheel. More...
 
bool make_page_scroll (bool forward)
 Increase/decrease values by a page as if it is scrolled page up. More...
 
- Public Member Functions inherited from nana::widget_object< category::widget_tag, drawerbase::scroll::trigger< Vertical >, drawerbase::scroll::scroll_events >
 widget_object ()
 
 ~widget_object ()
 
event_typeevents () const
 
bool create (window parent_wd, bool visible)
 
bool create (window parent_wd, const rectangle &r={}, bool visible=true)
 
widget_objectborderless (bool enable)
 
bool borderless () const
 
scheme_typescheme () 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
 
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
 
- Public Member Functions inherited from nana::scroll_interface
virtual ~scroll_interface ()=default
 

Additional Inherited Members

- Public Types inherited from nana::widget_object< category::widget_tag, drawerbase::scroll::trigger< Vertical >, drawerbase::scroll::scroll_events >
using scheme_type = ::nana::widget_geometrics
 
using event_type = drawerbase::scroll::scroll_events
 
- Public Types inherited from nana::widget
using native_string_type = detail::native_string_type
 
- Public Types inherited from nana::scroll_interface
using size_type = std::size_t
 
- Protected Types inherited from nana::widget_object< category::widget_tag, drawerbase::scroll::trigger< Vertical >, drawerbase::scroll::scroll_events >
typedef
drawerbase::scroll::trigger
< Vertical > 
drawer_trigger_t
 
- Protected Member Functions inherited from nana::widget_object< category::widget_tag, drawerbase::scroll::trigger< Vertical >, drawerbase::scroll::scroll_events >
drawerbase::scroll::trigger
< Vertical > & 
get_drawer_trigger ()
 
const
drawerbase::scroll::trigger
< Vertical > & 
get_drawer_trigger () const
 
- Protected Member Functions inherited from nana::widget
std::unique_ptr
<::nana::detail::widget_notifier_interface
_m_wdg_notifier ()
 
virtual void _m_complete_creation ()
 
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
 
- Protected Attributes inherited from nana::detail::widget_base
window handle_ { nullptr }
 

Detailed Description

template<bool Vert>
class nana::scroll< Vert >

Provides a way to display an object which is larger than the window's client area.

Constructor & Destructor Documentation

template<bool Vert>
nana::scroll< Vert >::scroll ( )
inline

The default constructor without creating the widget.

template<bool Vert>
nana::scroll< Vert >::scroll ( window  wd,
bool  visible = true 
)
inline

The construct that creates a widget.

Parameters
wdA handle to the parent window of the widget being created.
visiblespecify the visibility after creation.
template<bool Vert>
nana::scroll< Vert >::scroll ( window  wd,
const rectangle r,
bool  visible = true 
)
inline

The construct that creates a widget.

Parameters
wdA handle to the parent window of the widget being created.
rthe size and position of the widget in its parent window coordinate.
visiblespecify the visibility after creation.

Member Function Documentation

template<bool Vert>
size_type nana::scroll< Vert >::amount ( ) const
inlineoverridevirtual

the whole total (peak)

Implements nana::scroll_interface.

template<bool Vert>
void nana::scroll< Vert >::amount ( size_type  peak)
inlineoverridevirtual
template<bool Vert>
bool nana::scroll< Vert >::make_page_scroll ( bool  forward)
inline

Increase/decrease values by a page as if it is scrolled page up.

Parameters
forwardit determines whether increase or decrease.
Returns
true if the value is changed.
template<bool Vert>
bool nana::scroll< Vert >::make_scroll ( bool  forward)
inline

Increase/decrease values by steps as if it is scrolled through mouse wheel.

Parameters
forwardit determines whether increase or decrease.
Returns
true if the value is changed.
template<bool Vert>
bool nana::scroll< Vert >::make_step ( bool  forward,
unsigned  steps = 1 
)
inlineoverridevirtual

Increase/decrease values by a step (alternatively by some number of steps).

Parameters
forwardit determines whether increase or decrease.
Returns
true if the value is changed.

Implements nana::scroll_interface.

template<bool Vert>
size_type nana::scroll< Vert >::range ( ) const
inlineoverridevirtual

Get the range of the widget (how many is shown on a page, that is, How many to scroll after click on first or second)

Implements nana::scroll_interface.

template<bool Vert>
void nana::scroll< Vert >::range ( size_type  r)
inlineoverridevirtual

Set the range of the widget.

Implements nana::scroll_interface.

template<bool Vert>
bool nana::scroll< Vert >::scrollable ( bool  for_less) const
inlineoverridevirtual

Determines whether it is scrollable.

Parameters
for_lesswhether it can be scrolled for a less value (backward or "up" if true, forward or "down" if false).

Implements nana::scroll_interface.

template<bool Vert>
size_type nana::scroll< Vert >::step ( ) const
inlineoverridevirtual

Get the step of the sroll widget. The step indicates a variation of the value.

Returns
the step.

Implements nana::scroll_interface.

template<bool Vert>
void nana::scroll< Vert >::step ( size_type  s)
inlineoverridevirtual

Set the step.

Parameters
sa value for step.

Implements nana::scroll_interface.

template<bool Vert>
size_type nana::scroll< Vert >::value ( ) const
inlineoverridevirtual

Get the value (current offset calculated from the very beginning)

Returns
the value.

Implements nana::scroll_interface.

template<bool Vert>
void nana::scroll< Vert >::value ( size_type  s)
inlineoverridevirtual

Set the value.

Parameters
sa new value.

Implements nana::scroll_interface.

template<bool Vert>
window nana::scroll< Vert >::window_handle ( ) const
inlineoverridevirtual