libt3widget
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
t3_widget::filtered_list_internal_t< list_t > Class Template Reference

Partial implementation of the filtered list. More...

Inheritance diagram for t3_widget::filtered_list_internal_t< list_t >:
t3_widget::filtered_list_base_t t3_widget::list_base_t t3_widget::filtered_list_t< list_t >

Public Member Functions

 filtered_list_internal_t (list_t *list)
 Make a new filtered_list_internal_t, wrapping an existing list. More...
 
virtual const std::string * operator[] (size_t idx) const
 Retrieve element idx. More...
 
virtual void reset_filter (void)
 Reset the filter. More...
 
virtual void set_filter (const signals::slot< bool, string_list_base_t *, size_t > &_test)
 Set the filter callback. More...
 
virtual size_t size (void) const
 Retrieve the size of the list. More...
 

Protected Member Functions

void update_list (void)
 Update the filtered list. More...
 

Static Protected Member Functions

static bool null_filter (list_t *, size_t)
 

Protected Attributes

list_t * base
 Base list of which this is a filtered view. More...
 
signals::connection base_content_changed_connection
 Connection to base list's content_changed signal. More...
 
std::vector< size_t > items
 Vector holding the indices in the base list of the items included in the filtered list. More...
 
optional< signals::slot< bool, list_t *, size_t > > test
 Filter function. More...
 

Detailed Description

template<class list_t>
class t3_widget::filtered_list_internal_t< list_t >

Partial implementation of the filtered list.

Constructor & Destructor Documentation

template<class list_t>
t3_widget::filtered_list_internal_t< list_t >::filtered_list_internal_t ( list_t *  list)
inline

Make a new filtered_list_internal_t, wrapping an existing list.

Member Function Documentation

template<class list_t>
virtual const std::string* t3_widget::filtered_list_internal_t< list_t >::operator[] ( size_t  idx) const
inlinevirtual

Retrieve element idx.

Implements t3_widget::list_base_t.

template<class list_t>
virtual void t3_widget::filtered_list_internal_t< list_t >::reset_filter ( void  )
inlinevirtual

Reset the filter.

Implements t3_widget::filtered_list_base_t.

template<class list_t>
virtual void t3_widget::filtered_list_internal_t< list_t >::set_filter ( const signals::slot< bool, string_list_base_t *, size_t > &  )
inlinevirtual
template<class list_t>
virtual size_t t3_widget::filtered_list_internal_t< list_t >::size ( void  ) const
inlinevirtual

Retrieve the size of the list.

Implements t3_widget::list_base_t.

template<class list_t>
void t3_widget::filtered_list_internal_t< list_t >::update_list ( void  )
inlineprotected

Update the filtered list.

Called automatically when the base list changes, through the use of the content_changed signal.

Member Data Documentation

template<class list_t>
list_t* t3_widget::filtered_list_internal_t< list_t >::base
protected

Base list of which this is a filtered view.

template<class list_t>
signals::connection t3_widget::filtered_list_internal_t< list_t >::base_content_changed_connection
protected

Connection to base list's content_changed signal.

template<class list_t>
std::vector<size_t> t3_widget::filtered_list_internal_t< list_t >::items
protected

Vector holding the indices in the base list of the items included in the filtered list.

template<class list_t>
optional<signals::slot<bool, list_t *, size_t> > t3_widget::filtered_list_internal_t< list_t >::test
protected

Filter function.