Lumiera  0.pre.03
»edit your freedom«
Expander Class Reference

#include "stage/model/expander-revealer.hpp"

Description

Functor component to support the default implementation of expanding/collapsing.

It is built based on closures (lambdas) to explicate how to detect the expansion state of the widget in question and how actively to expand or collapse it. A default constructed Expander disables this feature – which can be detected through the #canExpand() function.

Definition at line 85 of file expander-revealer.hpp.

Public Types

using ChangeFun = std::function< void(bool)>
 
using ProbeFun = std::function< bool(void)>
 

Public Member Functions

 Expander (ProbeFun detectCurrExpansionState, ChangeFun expand_collapse)
 
bool canExpand () const
 
bool collapse ()
 
bool expand (bool yes=true)
 
bool isExpanded () const
 
 operator bool () const
 
bool operator() (bool shallExpand)
 

Private Attributes

ChangeFun changeState_
 
ProbeFun probeState_
 
+ Collaboration diagram for Expander:

The documentation for this class was generated from the following file: