Nana C++ Library. Reference for users.
What we need to use nana
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
nana::drawerbase::listbox::item_proxy Class Reference
Inheritance diagram for nana::drawerbase::listbox::item_proxy:
nana::widgets::detail::widget_iterator< std::input_iterator_tag, item_proxy >

Public Member Functions

 item_proxy (essence *, const index_pair &=index_pair{npos, npos})
 
item_proxy from_display (const index_pair &relative) const
 
index_pair to_display () const
 possible use: last_selected_display = last_selected.to_display().item; use with caution, it get invalidated after a sort() More...
 
bool displayed () const
 Determines whether the item is displayed on the screen. More...
 
bool empty () const noexcept
 Determines whether the item_proxy refers to invalid item. More...
 
item_proxycheck (bool chk, bool scroll_view=false)
 Checks/unchecks the item. More...
 
bool checked () const
 Determines whether the item is checked. More...
 
item_proxyselect (bool sel, bool scroll_view=false)
 Selects/deselects the item. More...
 
bool selected () const
 Determines whether he item is selected. More...
 
item_proxybgcolor (const nana::color &)
 
nana::color bgcolor () const
 
item_proxyfgcolor (const nana::color &)
 
nana::color fgcolor () const
 
index_pair pos () const noexcept
 
size_type columns () const noexcept
 
size_type column_cast (size_type col, bool disp_order) const
 Converts a position of column between display position and absolute position. More...
 
item_proxytext (size_type abs_col, cell)
 
item_proxytext (size_type abs_col, std::string)
 
item_proxytext (size_type abs_col, const std::wstring &)
 
std::string text (size_type abs_col) const
 
void icon (const nana::paint::image &)
 
template<typename T >
item_proxyresolve_from (const T &t)
 
template<typename T >
void resolve_to (T &t) const
 
template<typename T >
T const * value_ptr () const
 
template<typename T >
T & value () const
 
template<typename T >
T & value ()
 
template<typename T >
item_proxyvalue (T &&t)
 
bool operator== (const char *s) const
 Behavior of Iterator's value_type. More...
 
bool operator== (const wchar_t *s) const
 
bool operator== (const ::std::string &s) const
 
bool operator== (const ::std::wstring &s) const
 
item_proxyoperator= (const item_proxy &)
 Behavior of Iterator. More...
 
item_proxyoperator++ ()
 Behavior of Iterator. More...
 
item_proxy operator++ (int)
 Behavior of Iterator. More...
 
item_proxyoperator* ()
 Behavior of Iterator. More...
 
const item_proxyoperator* () const
 Behavior of Iterator. More...
 
item_proxyoperator-> ()
 Behavior of Iterator. More...
 
const item_proxyoperator-> () const
 Behavior of Iterator. More...
 
bool operator== (const item_proxy &) const
 Behavior of Iterator. More...
 
bool operator!= (const item_proxy &) const
 Behavior of Iterator. More...
 
essence_m_ess () const noexcept
 

Static Public Member Functions

static item_proxy from_display (essence *, const index_pair &relative)
 the main purpose of this it to make obvious that item_proxy operate with absolute positions, and don't get moved during sort() More...
 

Additional Inherited Members

- Public Types inherited from nana::widgets::detail::widget_iterator< std::input_iterator_tag, item_proxy >
using iterator_category = std::input_iterator_tag
 
using value_type = item_proxy
 
using difference_type = std::ptrdiff_t
 
using pointer = item_proxy *
 
using reference = item_proxy &
 

Detailed Description

operate with absolute positions and contain only the position but maintain pointers to parts of the real items item_proxy self, it references and iterators are not invalidated by sort()

Constructor & Destructor Documentation

nana::drawerbase::listbox::item_proxy::item_proxy ( essence ess,
const index_pair pos = index_pair{nposnpos} 
)

Member Function Documentation

essence * nana::drawerbase::listbox::item_proxy::_m_ess ( ) const
noexcept
item_proxy & nana::drawerbase::listbox::item_proxy::bgcolor ( const nana::color col)
nana::color nana::drawerbase::listbox::item_proxy::bgcolor ( ) const
item_proxy & nana::drawerbase::listbox::item_proxy::check ( bool  chk,
bool  scroll_view = false 
)

Checks/unchecks the item.

Parameters
chkIndicates whether to check or uncheck the item
scroll_viewIndicates whether to scroll the view to the item. It is ignored if the item is displayed.
Returns
the reference of *this.
bool nana::drawerbase::listbox::item_proxy::checked ( ) const

Determines whether the item is checked.

size_type nana::drawerbase::listbox::item_proxy::column_cast ( size_type  col,
bool  disp_order 
) const

Converts a position of column between display position and absolute position.

Parameters
colThe display position or absolute position.
disp_orderIndicates whether the col is a display position or absolute position. If this parameter is true, the col is display position
Returns
absolute position if disp_order is false, display position otherwise.
std::size_t nana::drawerbase::listbox::item_proxy::columns ( ) const
noexcept
bool nana::drawerbase::listbox::item_proxy::displayed ( ) const

Determines whether the item is displayed on the screen.

bool nana::drawerbase::listbox::item_proxy::empty ( ) const
noexcept

Determines whether the item_proxy refers to invalid item.

Returns
true if the item_proxy refers to an invalid item, false otherwise.
item_proxy & nana::drawerbase::listbox::item_proxy::fgcolor ( const nana::color col)
nana::color nana::drawerbase::listbox::item_proxy::fgcolor ( ) const
item_proxy nana::drawerbase::listbox::item_proxy::from_display ( essence ess,
const index_pair relative 
)
static

the main purpose of this it to make obvious that item_proxy operate with absolute positions, and don't get moved during sort()

item_proxy nana::drawerbase::listbox::item_proxy::from_display ( const index_pair relative) const
void nana::drawerbase::listbox::item_proxy::icon ( const nana::paint::image img)
bool nana::drawerbase::listbox::item_proxy::operator!= ( const item_proxy rhs) const

Behavior of Iterator.

item_proxy & nana::drawerbase::listbox::item_proxy::operator* ( )

Behavior of Iterator.

const item_proxy & nana::drawerbase::listbox::item_proxy::operator* ( ) const

Behavior of Iterator.

item_proxy & nana::drawerbase::listbox::item_proxy::operator++ ( )

Behavior of Iterator.

item_proxy nana::drawerbase::listbox::item_proxy::operator++ ( int  )

Behavior of Iterator.

item_proxy * nana::drawerbase::listbox::item_proxy::operator-> ( )

Behavior of Iterator.

const item_proxy * nana::drawerbase::listbox::item_proxy::operator-> ( ) const

Behavior of Iterator.

item_proxy & nana::drawerbase::listbox::item_proxy::operator= ( const item_proxy rhs)

Behavior of Iterator.

bool nana::drawerbase::listbox::item_proxy::operator== ( const char *  s) const

Behavior of Iterator's value_type.

bool nana::drawerbase::listbox::item_proxy::operator== ( const wchar_t *  s) const
bool nana::drawerbase::listbox::item_proxy::operator== ( const ::std::string s) const
bool nana::drawerbase::listbox::item_proxy::operator== ( const ::std::wstring s) const
bool nana::drawerbase::listbox::item_proxy::operator== ( const item_proxy rhs) const

Behavior of Iterator.

index_pair nana::drawerbase::listbox::item_proxy::pos ( ) const
noexcept
template<typename T >
item_proxy& nana::drawerbase::listbox::item_proxy::resolve_from ( const T &  t)
inline
template<typename T >
void nana::drawerbase::listbox::item_proxy::resolve_to ( T &  t) const
inline
item_proxy & nana::drawerbase::listbox::item_proxy::select ( bool  sel,
bool  scroll_view = false 
)

Selects/deselects the item.

is ignored if no change (maybe set last_selected anyway??), but if change emit event, deselect others if need ans set/unset last_selected

Parameters
selIndicates whether to select or deselect the item
scroll_viewIndicates whether to scroll the view to the item. It is ignored if the item is displayed.
Returns
the reference of *this.
bool nana::drawerbase::listbox::item_proxy::selected ( ) const

Determines whether he item is selected.

item_proxy & nana::drawerbase::listbox::item_proxy::text ( size_type  abs_col,
cell  cl 
)
item_proxy & nana::drawerbase::listbox::item_proxy::text ( size_type  abs_col,
std::string  str 
)
item_proxy & nana::drawerbase::listbox::item_proxy::text ( size_type  abs_col,
const std::wstring str 
)
std::string nana::drawerbase::listbox::item_proxy::text ( size_type  abs_col) const
index_pair nana::drawerbase::listbox::item_proxy::to_display ( ) const

possible use: last_selected_display = last_selected.to_display().item; use with caution, it get invalidated after a sort()

template<typename T >
T& nana::drawerbase::listbox::item_proxy::value ( ) const
inline
template<typename T >
T& nana::drawerbase::listbox::item_proxy::value ( )
inline
template<typename T >
item_proxy& nana::drawerbase::listbox::item_proxy::value ( T &&  t)
inline
template<typename T >
T const* nana::drawerbase::listbox::item_proxy::value_ptr ( ) const
inline