stlab.adobe.com Adobe Systems Incorporated

Checkbox widget. More...

#include <platform_checkbox.hpp>

List of all members.

Public Types

typedef any_regular_t model_type
typedef any_regular_t model_type
typedef boost::function< void(const
model_type &)> 
setter_type
typedef boost::function< void(const
model_type &)> 
setter_type

Public Member Functions

 checkbox_t (const std::string &name, const any_regular_t &true_value, const any_regular_t &false_value, theme_t theme, const std::string &alt_text)
 checkbox_t (const std::string &name, const any_regular_t &true_value, const any_regular_t &false_value, theme_t theme, const std::string &alt_text)
void display (const any_regular_t &value)
void enable (bool make_enabled)
void measure (extents_t &result)
void monitor (const setter_type &proc)
void place (const place_data_t &place_data)
Placeable Concept Operations

See the Placeable concept and placeable::hpp for more information.

void measure (extents_t &result)
void place (const place_data_t &place_data)
View Concept Operations

See the View concept and view::hpp for more information.

void display (const any_regular_t &value)
Controller Concept Operations

See the Controller concept and controller::hpp for more information.

void enable (bool make_enabled)
void monitor (setter_type proc)

Public Attributes

std::string alt_text_m
HWND control_m
any_regular_t current_value_m
any_regular_t false_value_m
setter_type hit_proc_m
std::string name_m
theme_t theme_m
any_regular_t true_value_m

Friends

bool operator== (const checkbox_t &x, const checkbox_t &y)

Detailed Description

Model Of:

The semantics of a checkbox are that of a flag. One would use a checkbox when you want to have a selectable option turned on or off. There is a third state the checkbox can be in, the undetermined state, which is neither true or false. This is often represented with a dash or a filled checkbox.

Definition at line 75 of file macintosh/adobe/future/widgets/headers/platform_checkbox.hpp.


Member Typedef Documentation

The model type for this widget

Definition at line 78 of file macintosh/adobe/future/widgets/headers/platform_checkbox.hpp.

typedef boost::function<void (const model_type&)> setter_type
typedef boost::function<void (const model_type&)> setter_type

The controller callback proc type for this widget

Definition at line 81 of file macintosh/adobe/future/widgets/headers/platform_checkbox.hpp.


Constructor & Destructor Documentation

checkbox_t ( const std::string &  name,
const any_regular_t true_value,
const any_regular_t false_value,
theme_t  theme,
const std::string &  alt_text 
)
Parameters:
nameis the name of the widget
true_valueis the value to which the checkbox is set when it is checked
false_valueis the value to which the checkbox is set when it is unchecked
themedetails additional visual attributes for the widget
alt_textprovides additional help text for the widget when the user pauses over it
Note:
If the checkbox is set to a value other than true_value or false_value, the checkbox gets a 'dash' (undefined) state.
checkbox_t ( const std::string &  name,
const any_regular_t true_value,
const any_regular_t false_value,
theme_t  theme,
const std::string &  alt_text 
)

Member Function Documentation

void display ( const any_regular_t value )
Note:
When the new value is set for the checkbox_t it will be compared to the true- and false-values specified when the widget was created. If the new value matches the true-value, the checkbox will be checked. If the new value matches the false-value, the checkbox will not be checked. Otherwise, the checkbox will be set to an undetermined state.
void display ( const any_regular_t value )
void enable ( bool  make_enabled )
Note:
The following table outlines the state changes for a checkbox_t when it is clicked on:
Previous valueNew value
false-valuetrue-value
true-valuefalse-value
other valuetrue-value
void enable ( bool  make_enabled )
void measure ( extents_t result )
void measure ( extents_t result )
void monitor ( setter_type  proc )
Note:
The following table outlines the state changes for a checkbox_t when it is clicked on:
Previous valueNew value
false-valuetrue-value
true-valuefalse-value
other valuetrue-value
void monitor ( const setter_type proc )
void place ( const place_data_t place_data )
void place ( const place_data_t place_data )

Friends And Related Function Documentation

bool operator== ( const checkbox_t x,
const checkbox_t y 
) [friend]

Member Data Documentation

std::string name_m

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google