Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches

Eve engine. More...

#include <eve.hpp>

Inheritance diagram for eve_t:
extents_slices_t layout_attributes_placement_t

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.

Detailed Description

Definition at line 50 of file eve.hpp.

Member Typedef Documentation

◆ proxy_tree_t

typedef forest<implementation::view_proxy_t> proxy_tree_t

Definition at line 59 of file eve.hpp.

◆ iterator

Definition at line 60 of file eve.hpp.

Member Enumeration Documentation

◆ evaluate_options_t

Specifies the coordinate system origin for the place_data_t of a given view.

Enumerator
evaluate_nested 

Specifies the origin of the coordinate system to be the top left point of the parent view

evaluate_flat 

Specifies the origin of the coordinate system to be the top left point of the topmost view in the hierarchy.

Definition at line 69 of file eve.hpp.

Constructor & Destructor Documentation

◆ eve_t()

eve_t ( )
explicit

◆ ~eve_t()

~eve_t ( )

Member Function Documentation

◆ add_placeable()

iterator add_placeable ( iterator parent,
const layout_attributes_t & initial,
bool is_container_type,
poly_placeable_t & placeable,
bool reverse = false )
Parameters
parentthe 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.
initialinitial layout attributes
is_container_typewhether or not the new node is to be a container view or not, irrespective of whether or not it will actually contain subviews.
Available Parameter Keys
NamePossible ValuesDefaultNotes
child_horizontalAny of the adobe::layout_attributes_alignment_t::alignment_t enumeration labels as an adobe::name_talign_default
child_verticalAny of the adobe::layout_attributes_alignment_t::alignment_t enumeration labels as an adobe::name_talign_default
guide_maskarray containing any of [ guide_baseline, guide_label ]empty (no suppression)Suppression of horizontal and/or vertical guides
horizontalAny of the adobe::layout_attributes_alignment_t::alignment_t enumeration labels as an adobe::name_talign_default
indentinteger0
placementAny of the adobe::layout_attributes_placement_t enumeration labels as an adobe::name_tplace_leaf
spacingarray of integers[ 0 ]A single value here will propagate for all needed spacing values
verticalAny of the adobe::layout_attributes_alignment_t::alignment_t enumeration labels as an adobe::name_talign_default
Parameters
placeablemust be a poly_placeable_t (which might be castable via poly_cast a poly_placeable_twopass_t).
reverseif 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.
Returns
An opaque adobe::eve_t::iterator, which can be used as the parent parameter in another call to add_placeable to place subviews inside this one.

◆ set_visible()

void set_visible ( iterator ,
bool  )

◆ set_layout_attributes()

void set_layout_attributes ( iterator ,
const layout_attributes_t &  )

◆ evaluate()

std::pair< int, int > evaluate ( evaluate_options_t options,
int width = 0,
int height = 0 )
Parameters
optionsoptions to be passed to the solution engine.
widthif not zero, width is used for the width of the layout rather than the solved width.
heightif not zero, height is used for the height of the layout rather than the solved height.
See also
evaluate_options_t

◆ adjust()

std::pair< int, int > adjust ( evaluate_options_t options,
int width,
int height )
Parameters
widthif not zero, the new width for the view layout.
heightif not zero, the new height for the view layout.
optionsoptions to be passed to the solution engine.
See also
evaluate_options_t

◆ print_debug()

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.