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 
18 #include <adobe/forest.hpp>
19 #include <adobe/extents.hpp>
20 #include <adobe/poly_placeable.hpp>
22 
23 /*************************************************************************************************/
24 
25 namespace adobe {
26 namespace implementation {
27 
28 /*************************************************************************************************/
29 
30 struct view_proxy_t;
31 
32 /*************************************************************************************************/
33 
34 } // namespace implementation
35 } // namespace adobe
36 
37 /*************************************************************************************************/
38 
39 #if !defined(ADOBE_NO_DOCUMENTATION)
40 namespace boost {
41 namespace detail {
42  template <>
43  struct is_pod_impl<adobe::implementation::view_proxy_t>
44  {
45  BOOST_STATIC_CONSTANT(bool, value = true);
46  };
47 }
48 }
49 #endif
50 
51 /*************************************************************************************************/
52 
53 namespace adobe {
54 
55 /*************************************************************************************************/
56 
57 
65 class eve_t
66 #if !defined(ADOBE_NO_DOCUMENTATION)
67  : boost::noncopyable, public extents_slices_t, public layout_attributes_placement_t
68 #endif
69 {
70  public:
71 
72 #if !defined(ADOBE_NO_DOCUMENTATION)
73  typedef forest<implementation::view_proxy_t> proxy_tree_t;
74  typedef proxy_tree_t::iterator iterator;
75 #endif
76 
77 
78 
79 
86  {
93  };
94 
95 /*
96  REVISIT (sparent) : I'm just starting a long cleanup of the Eve API - the steps should include
97  the following:
98 
99  * eliminate the container default proc in favor of an inital extents setting.
100  * rename calculate to calculate_horizontal - all calculation passes are optional (initial should
101  often suffice).
102 */
103 
104 
105 #if !defined(ADOBE_NO_DOCUMENTATION)
106  explicit eve_t();
107  ~eve_t();
108 #endif
109 
192  iterator add_placeable( iterator parent,
193  const layout_attributes_t& initial,
194  bool is_container_type,
196  bool reverse=false);
197 
202  void set_visible(iterator, bool);
203 
204 
216  std::pair<int, int> evaluate(evaluate_options_t options, int width = 0, int height = 0);
217 
218 
235  std::pair<int, int> adjust(evaluate_options_t options, int width, int height);
236 
237  private:
238  friend struct implementation::view_proxy_t;
239 
240  class implementation_t;
241  implementation_t* object_m;
242 };
243 
244 
245 /*************************************************************************************************/
246 
247 void set_margin(layout_attributes_t& container, int x);
248 
249 /*************************************************************************************************/
250 
251 } // namespace adobe
252 
253 /*************************************************************************************************/
254 
255 #endif
256 
257 /*************************************************************************************************/
258 
int height(const place_data_t &place_data)
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...
void set_margin(layout_attributes_t &container, int x)
void reverse(BidirectionalRange &range)
reverse implementation
Definition: reverse.hpp:96
adobe::poly 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:65
void set_visible(iterator, bool)
set_visible
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.
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
evaluate_options_t
Definition: eve.hpp:85
Representative of adobe::PlaceableConcept so that placeable models adobe::PlaceableConcept when T doe...
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...

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