Adobe Source Libraries 1.49.0
A collection of C++ libraries.
|
Eve engine. More...
#include <eve.hpp>
Public Types | |
enum | evaluate_options_t { evaluate_nested , evaluate_flat } |
typedef forest< implementation::view_proxy_t > | proxy_tree_t |
typedef proxy_tree_t::iterator | iterator |
Public Types inherited from extents_slices_t | |
enum | slice_select_t { horizontal , vertical } |
Public Types inherited from layout_attributes_placement_t | |
enum | placement_t { place_leaf , place_column , place_row , place_overlay } |
Public Member Functions | |
eve_t () | |
~eve_t () | |
iterator | add_placeable (iterator parent, const layout_attributes_t &initial, bool is_container_type, poly_placeable_t &placeable, bool reverse=false) |
Adds a new view element to the view hierarchy being formed for layout. | |
void | set_visible (iterator, bool) |
set_visible | |
void | set_layout_attributes (iterator, const layout_attributes_t &) |
set_layout_attributes | |
std::pair< int, int > | evaluate (evaluate_options_t options, int width=0, int height=0) |
This call performs the layout, it will call each element to get its dimentions, solve the layout, and place each item. Specifying a width and height less than the solved width and height will give undefined results. To resize a view, call evaluate() to get the minimum size then use adjust() . | |
std::pair< int, int > | adjust (evaluate_options_t options, int width, int height) |
Adjusts the solved view layout to fit within the newly specified dimensions. Eve will relay the new solved layout information to individual placeable objects through thier place() functions. Specifying a width or hight less than that returned by evaluate() results in undefined behavior. | |
void | print_debug (std::ostream &os) |
Print the current state of the view proxy forest to stderr. |
typedef forest<implementation::view_proxy_t> proxy_tree_t |
typedef proxy_tree_t::iterator iterator |
enum evaluate_options_t |
Specifies the coordinate system origin for the place_data_t of a given view.
|
explicit |
~eve_t | ( | ) |
iterator add_placeable | ( | iterator | parent, |
const layout_attributes_t & | initial, | ||
bool | is_container_type, | ||
poly_placeable_t & | placeable, | ||
bool | reverse = false ) |
parent | the parent of this view. Specify a default-constructed adobe::eve_t::iterator if this view is to be the topmost view. There can only be one topmost view when Eve goes to solve for the layout. |
initial | initial layout attributes |
is_container_type | whether or not the new node is to be a container view or not, irrespective of whether or not it will actually contain subviews. |
Name | Possible Values | Default | Notes |
---|---|---|---|
child_horizontal | Any of the adobe::layout_attributes_alignment_t::alignment_t enumeration labels as an adobe::name_t | align_default | |
child_vertical | Any of the adobe::layout_attributes_alignment_t::alignment_t enumeration labels as an adobe::name_t | align_default | |
guide_mask | array containing any of [ guide_baseline, guide_label ] | empty (no suppression) | Suppression of horizontal and/or vertical guides |
horizontal | Any of the adobe::layout_attributes_alignment_t::alignment_t enumeration labels as an adobe::name_t | align_default | |
indent | integer | 0 | |
placement | Any of the adobe::layout_attributes_placement_t enumeration labels as an adobe::name_t | place_leaf | |
spacing | array of integers | [ 0 ] | A single value here will propagate for all needed spacing values |
vertical | Any of the adobe::layout_attributes_alignment_t::alignment_t enumeration labels as an adobe::name_t | align_default |
placeable | must be a poly_placeable_t (which might be castable via poly_cast a poly_placeable_twopass_t). |
reverse | if false (default), this element should be added as last child of parent. If true, then the add as first child of parent. reverse is intended for implementing support for right-to-left languages. See Implementing Right-To-Left Layout. |
parent
parameter in another call to add_placeable to place subviews inside this one. void set_visible | ( | iterator | , |
bool | ) |
void set_layout_attributes | ( | iterator | , |
const layout_attributes_t & | ) |
std::pair< int, int > evaluate | ( | evaluate_options_t | options, |
int | width = 0, | ||
int | height = 0 ) |
options | options to be passed to the solution engine. |
width | if not zero, width is used for the width of the layout rather than the solved width. |
height | if not zero, height is used for the height of the layout rather than the solved height. |
std::pair< int, int > adjust | ( | evaluate_options_t | options, |
int | width, | ||
int | height ) |
width | if not zero, the new width for the view layout. |
height | if not zero, the new height for the view layout. |
options | options to be passed to the solution engine. |
void print_debug | ( | std::ostream & | os | ) |
The name of each widget will be the type_info of underlying placeable. Parameters for each widget include view proxy attribute values for bounds (top, left, width, height), horizontal/vertical placement, and alignment.