Adobe Source Libraries 2.0.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
layout_attributes.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_LAYOUT_ATTRIBUTES_HPP
9#define ADOBE_LAYOUT_ATTRIBUTES_HPP
10
11#include <adobe/config.hpp>
12#include <adobe/extents.hpp>
13
14#include <array>
15
20
21
22namespace adobe {
23
24/**************************************************************************************************/
25
49
56
61#if !defined(ADOBE_NO_DOCUMENTATION)
62 : public extents_slices_t,
65#endif
66{
68 spacing_m[1] = 10; /* REVISIT FIXED VALUE container_spacing */
69 }
70
71 typedef std::vector<int> spacing_t;
72
86
91 std::array<slice_t, 2> slice_m;
92
93 // containers only
95
98
101
102
103 int& height() { return extents_m.height(); }
104 int& width() { return extents_m.width(); }
105
106 const int& height() const { return extents_m.height(); }
107 const int& width() const { return extents_m.width(); }
108};
109
110/**************************************************************************************************/
111
116#if !defined(ADOBE_NO_DOCUMENTATION)
118#endif
119{
120 struct slice_t {
121#if !defined(ADOBE_NO_DOCUMENTATION)
123#endif
124
129 };
130
131 std::array<slice_t, 2> slice_m;
132
135
138};
139
140
144inline int top(const place_data_t& place_data) { return place_data.vertical().position_m; }
145
149inline int left(const place_data_t& place_data) { return place_data.horizontal().position_m; }
150
154inline int& top(place_data_t& place_data) { return place_data.vertical().position_m; }
155
159inline int& left(place_data_t& place_data) { return place_data.horizontal().position_m; }
160
164inline int height(const place_data_t& place_data) { return place_data.vertical().length_m; }
165
169inline int width(const place_data_t& place_data) { return place_data.horizontal().length_m; }
170
174inline int& height(place_data_t& place_data) { return place_data.vertical().length_m; }
175
179inline int& width(place_data_t& place_data) { return place_data.horizontal().length_m; }
180
184inline int bottom(const place_data_t& place_data) { return top(place_data) + height(place_data); }
185
189inline int right(const place_data_t& place_data) { return left(place_data) + width(place_data); }
190
191/**************************************************************************************************/
192} // namespace adobe
193
194
195#endif
int width(const place_data_t &place_data)
int right(const place_data_t &place_data)
int height(const place_data_t &place_data)
int bottom(const place_data_t &place_data)
int top(const place_data_t &place_data)
int left(const place_data_t &place_data)
std::pair< int, int > pair_long_t
Definition extents.hpp:43
std::vector< int > guide_set_t
Definition extents.hpp:45
A utility class for referencing the two slices of a extents_t.
Definition extents.hpp:60
An intrinsic geometry class for objects with a graphical representation.
Definition extents.hpp:71
A utility class for referencing the alignment characteristics in layout_attributes_t.
placeable object geometry for a single orientation of layout_attributes_t.
std::array< slice_t, 2 > slice_m
const slice_t & horizontal() const
const slice_t & vertical() const
Element geometry for a single orientation of place_data_t.
Layout data interface from the engine to the client.
std::array< slice_t, 2 > slice_m
const slice_t & horizontal() const
const slice_t & vertical() const