Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/model/w-link.hpp"
Managed link to a sigc::trackable
UI widget, without taking ownership.
Automatically installs a callback to switch this link into detached state when the target (widget) is destroyed.
TAR | the actual target widget type, which can be forward declared, until the point where the widget is actually constructed or attached. This target type must derive from sigc::trackable |
Definition at line 79 of file w-link.hpp.
Public Member Functions | |
WLink (TAR &targetWidget) | |
WLink (WLink const &r) | |
WLink (WLink &&rr) | |
void | clear () |
detach and deactivate this link More... | |
void | connect (TAR &otherTarget) |
(re)connect this smart link to the given target. More... | |
bool | isActive () const |
bool | isValid () const |
operator bool () const | |
TAR & | operator* () const |
TAR * | operator-> () const |
WLink & | operator= (WLink other) |
Friends | |
void | swap (WLink &l, WLink &r) |
swap the pointees, including callback registration. More... | |
Private Member Functions | |
void | __ensureAlive () const |
TAR * | attachTo (TAR &target) |
Private Attributes | |
TAR * | widget_ |
|
inline |
detach and deactivate this link
Definition at line 170 of file w-link.hpp.
Referenced by WLink< TimelineWidget >::connect().
|
inline |
(re)connect this smart link to the given target.
Any previously existing link is detached beforehand
sigc::trackable
is sane) Might leave this WLink in disconnected state when throwing error::External | when registration with sigc::trackable fails |
Definition at line 184 of file w-link.hpp.
|
inlineprivate |
installs the necessary callback to detach this link in case the target is destroyed
Definition at line 205 of file w-link.hpp.
Referenced by WLink< TimelineWidget >::connect().
swap the pointees, including callback registration.
Definition at line 128 of file w-link.hpp.
Referenced by WLink< TimelineWidget >::operator=().