Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

esve::ui::extra::Toggle Class Reference

A user-interface widget representing a boolean value. More...

#include <esve/ui/extra/Toggle.hxx>

List of all members.

Public Member Functions

virtual bool value () const =0
 Query the current value.

virtual Togglevalue (bool)=0
 Assign a new value.


Detailed Description

A user-interface widget representing a boolean value.

Keep in mind that modifying the value in code has a side-effect: it will send a handle_*() message as if the user changed it.

Setting the value within handle() itself is OK; the recursion is detected and consequently ignored.

This side-effect of emitting handle() in response to changing the value may seem surprising at first, but in the end it is the right thing. One should not depend upon the kindness of programmers to manually call update() every time they change something in code.

The facilities of Caching_Server and Caching_Emitter solve the issue of handle() being emitted before an object is fully constructed. As of this writing, all front-ends use Simple_Kernel which caches handle() messages during startup/construction phase.


Member Function Documentation

virtual Toggle& esve::ui::extra::Toggle::value bool   )  [pure virtual]
 

Assign a new value.

Returns:
*this


Generated on Tue May 30 11:40:58 2006 for esve by doxygen 1.3.4