Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
eve.hpp
Go to the documentation of this file.
1/*
2 Copyright 2013 Adobe
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5*/
6/**************************************************************************************************/
7
8#ifndef ADOBE_EVE_HPP
9#define ADOBE_EVE_HPP
10
11#include <adobe/config.hpp>
12
13#include <utility>
14
15#include <boost/noncopyable.hpp>
16
17#include <adobe/extents.hpp>
18#include <adobe/forest.hpp>
21
22/**************************************************************************************************/
23
24namespace adobe {
25namespace implementation {
26
27/**************************************************************************************************/
28
29struct view_proxy_t;
30
31/**************************************************************************************************/
32
33} // namespace implementation
34} // namespace adobe
35
36/**************************************************************************************************/
37
38namespace adobe {
39
40/**************************************************************************************************/
41
42
49
50class eve_t
51#if !defined(ADOBE_NO_DOCUMENTATION)
52 : boost::noncopyable,
53 public extents_slices_t,
55#endif
56{
57public:
58#if !defined(ADOBE_NO_DOCUMENTATION)
61#endif
62
63
67
68
77
78 /*
79 REVISIT (sparent) : I'm just starting a long cleanup of the Eve API - the steps should
80 include the following:
81
82 * eliminate the container default proc in favor of an inital extents setting.
83 * rename calculate to calculate_horizontal - all calculation passes are optional (initial
84 should often suffice).
85 */
86
87
88#if !defined(ADOBE_NO_DOCUMENTATION)
89 explicit eve_t();
91#endif
92
179
181 bool is_container_type, poly_placeable_t& placeable,
182 bool reverse = false);
183
187
189
193
195
211
212 std::pair<int, int> evaluate(evaluate_options_t options, int width = 0, int height = 0);
213
214
230
231 std::pair<int, int> adjust(evaluate_options_t options, int width, int height);
232
240 void print_debug(std::ostream& os);
241
242private:
243 friend struct implementation::view_proxy_t;
244
245 class implementation_t;
246 implementation_t* object_m;
247};
248
249
250/**************************************************************************************************/
251
252void set_margin(layout_attributes_t& container, int x);
253
254/**************************************************************************************************/
255
256} // namespace adobe
257
258/**************************************************************************************************/
259
260#endif
261
262/**************************************************************************************************/
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 print_debug(std::ostream &os)
Print the current state of the view proxy forest to stderr.
forest< implementation::view_proxy_t > proxy_tree_t
Definition eve.hpp:59
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 s...
evaluate_options_t
Definition eve.hpp:69
@ evaluate_nested
Definition eve.hpp:70
@ evaluate_flat
Definition eve.hpp:73
void set_visible(iterator, bool)
set_visible
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,...
void set_layout_attributes(iterator, const layout_attributes_t &)
set_layout_attributes
proxy_tree_t::iterator iterator
Definition eve.hpp:60
A homogeneous hierarchical structure class.
Definition forest.hpp:555
implementation::forest_iterator< implementation::view_proxy_t > iterator
Definition forest.hpp:564
void set_margin(layout_attributes_t &container, int x)
int width(const place_data_t &place_data)
int height(const place_data_t &place_data)
poly< placeable > poly_placeable_t
convenience typedef.
void reverse(BidirectionalRange &range)
reverse implementation
Definition reverse.hpp:92
A utility class for referencing the two slices of a extents_t.
Definition extents.hpp:60
Layout data interface from the client to the engine.
Representative of PlaceableConcept so that placeable models PlaceableConcept when T does.