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::cat_proxy Class Reference
Inheritance diagram for nana::drawerbase::listbox::cat_proxy:
nana::widgets::detail::widget_iterator< std::input_iterator_tag, cat_proxy >

Public Types

using inline_notifier_interface = drawerbase::listbox::inline_notifier_interface
 
template<typename Value >
using value_translator = typename container_translator< Value >::value_translator
 
template<typename Value >
using cell_translator = typename container_translator< Value >::cell_translator
 
- Public Types inherited from nana::widgets::detail::widget_iterator< std::input_iterator_tag, cat_proxy >
using iterator_category = std::input_iterator_tag
 
using value_type = cat_proxy
 
using difference_type = std::ptrdiff_t
 
using pointer = cat_proxy *
 
using reference = cat_proxy &
 

Public Member Functions

 cat_proxy () noexcept=default
 
 cat_proxy (essence *, size_type pos) noexcept
 
 cat_proxy (essence *, category_t *) noexcept
 
template<typename T >
item_proxy append (T &&t, bool set_value=false)
 
template<typename T >
void append_model (const T &t)
 
template<typename Mutex , typename STLContainer , typename ValueTranslator , typename CellTranslator >
void model (STLContainer &&container, ValueTranslator vtrans, CellTranslator ctrans)
 
template<typename Mutex , typename STLContainer , typename ValueTranslator , typename CellTranslator >
void shared_model (STLContainer &container, ValueTranslator vtrans, CellTranslator ctrans)
 
template<typename Mutex , typename STLContainer , typename CellTranslator >
void shared_model (const STLContainer &container, CellTranslator ctrans)
 
model_guard model ()
 
void append (std::initializer_list< std::string > texts_utf8)
 Appends one item at the end of this category with the specifies texts in the column fields. More...
 
void append (std::initializer_list< std::wstring > texts)
 
size_type columns () const
 
cat_proxytext (std::string)
 
cat_proxytext (std::wstring)
 
std::string text () const
 
cat_proxyselect (bool)
 
bool selected () const
 
cat_proxydisplay_number (bool display)
 Enables/disables the number of items in the category to be displayed behind the category title. More...
 
bool expanded () const
 Determines whether the category is expanded. More...
 
cat_proxyexpanded (bool expand)
 Expands/collapses the category. More...
 
void push_back (std::string text_utf8)
 Behavior of a container. More...
 
item_proxy begin () const
 
item_proxy end () const
 
item_proxy cbegin () const
 
item_proxy cend () const
 
item_proxy at (size_type pos_abs) const
 
item_proxy back () const
 
size_type index_cast (size_type from, bool from_display_order) const
 Converts the index between absolute position and display position. More...
 
size_type position () const
 this cat position More...
 
size_type size () const
 Returns the number of items. More...
 
cat_proxyoperator= (const cat_proxy &)
 Behavior of Iterator. More...
 
cat_proxyoperator++ ()
 Behavior of Iterator. More...
 
cat_proxy operator++ (int)
 Behavior of Iterator. More...
 
cat_proxyoperator* ()
 Behavior of Iterator. More...
 
const cat_proxyoperator* () const
 Behavior of Iterator. More...
 
cat_proxyoperator-> ()
 Behavior of Iterator. More...
 
const cat_proxyoperator-> () const
 Behavior of Iterator. More...
 
bool operator== (const cat_proxy &) const
 Behavior of Iterator. More...
 
bool operator!= (const cat_proxy &) const
 Behavior of Iterator. More...
 
void inline_factory (size_type column, pat::cloneable< pat::abstract_factory< inline_notifier_interface >> factory)
 

Member Typedef Documentation

Constructor & Destructor Documentation

nana::drawerbase::listbox::cat_proxy::cat_proxy ( )
defaultnoexcept
nana::drawerbase::listbox::cat_proxy::cat_proxy ( essence ess,
size_type  pos 
)
noexcept
nana::drawerbase::listbox::cat_proxy::cat_proxy ( essence ess,
category_t cat 
)
noexcept

Member Function Documentation

template<typename T >
item_proxy nana::drawerbase::listbox::cat_proxy::append ( T &&  t,
bool  set_value = false 
)
inline

Append an item at the end of this category using the oresolver to generate the texts to be put in each column. First you have to make sure there is an overload of the operator<<() of the oresolver for the type of the object used here If a listbox have a model set, try call append_model instead.

Parameters
tValue used by the resolver to generate the texts to be put in each column of the item
set_valuedetermines whether to set the object as the value of this item.
Examples:
example_listbox.cpp.
void nana::drawerbase::listbox::cat_proxy::append ( std::initializer_list< std::string texts_utf8)

Appends one item at the end of this category with the specifies texts in the column fields.

void nana::drawerbase::listbox::cat_proxy::append ( std::initializer_list< std::wstring texts)
template<typename T >
void nana::drawerbase::listbox::cat_proxy::append_model ( const T &  t)
inline
item_proxy nana::drawerbase::listbox::cat_proxy::at ( size_type  pos_abs) const
item_proxy nana::drawerbase::listbox::cat_proxy::back ( ) const
item_proxy nana::drawerbase::listbox::cat_proxy::begin ( ) const
item_proxy nana::drawerbase::listbox::cat_proxy::cbegin ( ) const
item_proxy nana::drawerbase::listbox::cat_proxy::cend ( ) const
auto nana::drawerbase::listbox::cat_proxy::columns ( ) const
cat_proxy & nana::drawerbase::listbox::cat_proxy::display_number ( bool  display)

Enables/disables the number of items in the category to be displayed behind the category title.

item_proxy nana::drawerbase::listbox::cat_proxy::end ( ) const
bool nana::drawerbase::listbox::cat_proxy::expanded ( ) const

Determines whether the category is expanded.

cat_proxy & nana::drawerbase::listbox::cat_proxy::expanded ( bool  expand)

Expands/collapses the category.

Parameters
expandIndicates whether to expand or collapse the category. If this parameter is true, it expands the category. If the parameter is false, it collapses the category.
Returns
the reference of *this.
size_type nana::drawerbase::listbox::cat_proxy::index_cast ( size_type  from,
bool  from_display_order 
) const

Converts the index between absolute position and display position.

Parameters
fromThe index to be converted
from_display_orderIf this parameter is true, the method converts a display position to an absolute position. If the parameter is false, the method converts an absolute position to a display position.
Returns
a display position or an absolute position that are depending on from_display_order.
void nana::drawerbase::listbox::cat_proxy::inline_factory ( size_type  column,
pat::cloneable< pat::abstract_factory< inline_notifier_interface >>  factory 
)
template<typename Mutex , typename STLContainer , typename ValueTranslator , typename CellTranslator >
void nana::drawerbase::listbox::cat_proxy::model ( STLContainer &&  container,
ValueTranslator  vtrans,
CellTranslator  ctrans 
)
inline
model_guard nana::drawerbase::listbox::cat_proxy::model ( )
bool nana::drawerbase::listbox::cat_proxy::operator!= ( const cat_proxy r) const

Behavior of Iterator.

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

Behavior of Iterator.

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

Behavior of Iterator.

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

Behavior of Iterator.

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

Behavior of Iterator.

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

Behavior of Iterator.

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

Behavior of Iterator.

cat_proxy & nana::drawerbase::listbox::cat_proxy::operator= ( const cat_proxy r)

Behavior of Iterator.

bool nana::drawerbase::listbox::cat_proxy::operator== ( const cat_proxy r) const

Behavior of Iterator.

size_type nana::drawerbase::listbox::cat_proxy::position ( ) const

this cat position

void nana::drawerbase::listbox::cat_proxy::push_back ( std::string  text_utf8)

Behavior of a container.

cat_proxy & nana::drawerbase::listbox::cat_proxy::select ( bool  sel)
bool nana::drawerbase::listbox::cat_proxy::selected ( ) const
template<typename Mutex , typename STLContainer , typename ValueTranslator , typename CellTranslator >
void nana::drawerbase::listbox::cat_proxy::shared_model ( STLContainer &  container,
ValueTranslator  vtrans,
CellTranslator  ctrans 
)
inline
template<typename Mutex , typename STLContainer , typename CellTranslator >
void nana::drawerbase::listbox::cat_proxy::shared_model ( const STLContainer &  container,
CellTranslator  ctrans 
)
inline
size_type nana::drawerbase::listbox::cat_proxy::size ( ) const

Returns the number of items.

cat_proxy & nana::drawerbase::listbox::cat_proxy::text ( std::string  s)
cat_proxy & nana::drawerbase::listbox::cat_proxy::text ( std::wstring  s)
std::string nana::drawerbase::listbox::cat_proxy::text ( ) const