stlab.adobe.com Adobe Systems Incorporated

button_t Struct Reference
[Concrete Widget Library (Carbon)]

Button widget. More...

#include <platform_button.hpp>

List of all members.


Public Types

typedef any_regular_t model_type
typedef any_regular_t model_type

Public Member Functions

 button_t (bool is_default, bool is_cancel, modifiers_t modifier_mask, const button_state_descriptor_t *first, const button_state_descriptor_t *last, theme_t theme)
 button_t (bool is_default, bool is_cancel, modifiers_t modifier_mask, const button_state_descriptor_t *first, const button_state_descriptor_t *last, theme_t theme)
void display (const any_regular_t &item)
void enable (bool make_enabled)
bool handle_key (key_type key, bool pressed, modifiers_t modifiers)
void measure (extents_t &result)
void place (const place_data_t &place_data)
void set (modifiers_t modifiers, const model_type &value)
void set (modifiers_t modifiers, const model_type &value)
void set_contributing (modifiers_t modifiers, const dictionary_t &value)
void set_contributing (modifiers_t modifiers, const dictionary_t &value)
any_regular_t underlying_handler ()
Controller Concept Operations
See the Controller concept and controller::hpp for more information.

void enable (bool make_enabled)
KeyboardHandler Concept Operations
bool handle_key (key_type key, bool pressed, modifiers_t modifiers)
any_regular_t underlying_handler ()
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)

Public Attributes

HWND control_m
bool enabled_m
bool is_cancel_m
bool is_default_m
modifiers_t modifier_mask_m
modifiers_t modifiers_m
button_state_set_t state_set_m
theme_t theme_m

Detailed Description

Model Of:
The semantics of a button are that of a latch. It retains information about a cell or set of cells in the property model. The button also has one or more actions to which it is bound. The user selects which action they would like to employ by holding down various modifier keys (alt, ctrl, etc.) When the user clicks on a button, the retained state is sent along with the current action to a notifier callback, where it is processed.

Definition at line 92 of file macintosh/adobe/future/widgets/headers/platform_button.hpp.


Member Typedef Documentation

The model type for this widget

Definition at line 95 of file macintosh/adobe/future/widgets/headers/platform_button.hpp.


Constructor & Destructor Documentation

button_t ( bool  is_default,
bool  is_cancel,
modifiers_t  modifier_mask,
const button_state_descriptor_t first,
const button_state_descriptor_t last,
theme_t  theme 
)

Parameters:
is_default denotes whether or not this button is the 'default' button. On some platforms this has specific visual (e.g., pulsing) and behavioral (e.g., firing when the RETURN key is pressed) attributes.
is_cancel denotes whether or not this button is the default 'cancel' button. On some platforms this has specific behavioral attributes (e.g., firing when the user presses the ESC key).
modifier_mask represents a mask of all the possible modifier key states by which this button may change.
first is the first button state descriptor
last is one-past-the-last button state descriptor
theme details additional visual attributes for the widget

button_t ( bool  is_default,
bool  is_cancel,
modifiers_t  modifier_mask,
const button_state_descriptor_t first,
const button_state_descriptor_t last,
theme_t  theme 
)


Member Function Documentation

void display ( const any_regular_t item  ) 

void enable ( bool  make_enabled  ) 

void enable ( bool  make_enabled  ) 

Note:
(fbrereto) : this should probably take place on a per-state basis.

bool handle_key ( key_type  key,
bool  pressed,
modifiers_t  modifiers 
)

bool handle_key ( key_type  key,
bool  pressed,
modifiers_t  modifiers 
)

Parameters:
key is the relevant key for this keyboard event
pressed denotes whether this event is key-down or key-up
modifiers is an bitflag set denoting the currently-depressed modifier keys
Returns:
true if this widget consumed the event; false otherwise.

void measure ( extents_t result  ) 

void measure ( extents_t result  ) 

void place ( const place_data_t place_data  ) 

void place ( const place_data_t place_data  ) 

void set ( modifiers_t  modifiers,
const model_type value 
)

void set ( modifiers_t  modifiers,
const model_type value 
)

Parameters:
modifiers specifies to which state this value will apply
value is the information to retain for this sublatch in the button

void set_contributing ( modifiers_t  modifiers,
const dictionary_t value 
)

void set_contributing ( modifiers_t  modifiers,
const dictionary_t value 
)

Parameters:
modifiers specifies to which state this contributing set will apply
value is the contributing set information for this sublatch in the button

any_regular_t underlying_handler (  ) 

any_regular_t underlying_handler (  ) 

Returns:
the platform-specific handler for this widget that models the requirements of a keyboard event handler.

Definition at line 167 of file macintosh/adobe/future/widgets/headers/platform_button.hpp.


Member Data Documentation

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