stlab.adobe.com Adobe Systems Incorporated
eve.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2005-2007 Adobe Systems Incorporated
3  Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
4  or a copy at http://stlab.adobe.com/licenses.html)
5 */
6 
7 /*************************************************************************************************/
8 
9 #ifndef ADOBE_EVE_HPP
10 #define ADOBE_EVE_HPP
11 
12 #include <adobe/config.hpp>
13 
14 #include <utility>
15 
16 #include <boost/noncopyable.hpp>
17 #include <boost/version.hpp>
18 
19 #include <adobe/forest.hpp>
20 #include <adobe/extents.hpp>
21 #include <adobe/poly_placeable.hpp>
23 
24 /*************************************************************************************************/
25 
26 namespace adobe {
27 namespace implementation {
28 
29 /*************************************************************************************************/
30 
31 struct view_proxy_t;
32 
33 /*************************************************************************************************/
34 
35 } // namespace implementation
36 } // namespace adobe
37 
38 /*************************************************************************************************/
39 
40 #if !defined(ADOBE_NO_DOCUMENTATION)
41 namespace boost {
42 #if BOOST_VERSION >= 106000
43  template <>
44  struct is_pod<adobe::implementation::view_proxy_t>
45  : true_type
46  {
47  };
48 #else
49 namespace detail {
50  template <>
51  struct is_pod_impl<adobe::implementation::view_proxy_t>
52  {
53  BOOST_STATIC_CONSTANT(bool, value = true);
54  };
55 }
56 #endif
57 }
58 #endif
59 
60 /*************************************************************************************************/
61 
62 namespace adobe {
63 
64 /*************************************************************************************************/
65 
66 
74 class eve_t
75 #if !defined(ADOBE_NO_DOCUMENTATION)
76  : boost::noncopyable, public extents_slices_t, public layout_attributes_placement_t
77 #endif
78 {
79  public:
80 
81 #if !defined(ADOBE_NO_DOCUMENTATION)
82  typedef forest<implementation::view_proxy_t> proxy_tree_t;
83  typedef proxy_tree_t::iterator iterator;
84 #endif
85 
86 
87 
88 
95  {
96  evaluate_nested,
99  evaluate_flat
102  };
103 
104 /*
105  REVISIT (sparent) : I'm just starting a long cleanup of the Eve API - the steps should include
106  the following:
107 
108  * eliminate the container default proc in favor of an inital extents setting.
109  * rename calculate to calculate_horizontal - all calculation passes are optional (initial should
110  often suffice).
111 */
112 
113 
114 #if !defined(ADOBE_NO_DOCUMENTATION)
115  explicit eve_t();
116  ~eve_t();
117 #endif
118 
201  iterator add_placeable( iterator parent,
202  const layout_attributes_t& initial,
203  bool is_container_type,
205  bool reverse=false);
206 
211  void set_visible(iterator, bool);
212 
213 
225  std::pair<int, int> evaluate(evaluate_options_t options, int width = 0, int height = 0);
226 
227 
244  std::pair<int, int> adjust(evaluate_options_t options, int width, int height);
245 
246  private:
247  friend struct implementation::view_proxy_t;
248 
249  class implementation_t;
250  implementation_t* object_m;
251 };
252 
253 
254 /*************************************************************************************************/
255 
256 void set_margin(layout_attributes_t& container, int x);
257 
258 /*************************************************************************************************/
259 
260 } // namespace adobe
261 
262 /*************************************************************************************************/
263 
264 #endif
265 
266 /*************************************************************************************************/
267 
int height(const place_data_t &place_data)
void set_margin(layout_attributes_t &container, int x)
void reverse(BidirectionalRange &range)
reverse implementation
Definition: reverse.hpp:96
adobe::poly<foo> will be a runtime polymorphic value type wrapper modelling a concept represented by ...
Definition: poly.hpp:414
int width(const place_data_t &place_data)
Layout data interface from the client to the engine.
Eve engine.
Definition: eve.hpp:74
evaluate_options_t
Definition: eve.hpp:94
A utility class for referencing the two slices of a extents_t.
Definition: extents.hpp:68
A homogeneous hierarchical structure class.
Definition: forest.hpp:333
Representative of adobe::PlaceableConcept so that placeable models adobe::PlaceableConcept when T doe...

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