2 template < typename _Iterator > struct iterator_traits {
3 typedef int difference_type;
5 template < typename _Iterator,
6 typename _Container > class __normal_iterator {
8 public:typedef typename iterator_traits <
10 difference_type difference_type;
11 explicit __normal_iterator(const _Iterator &
12 __i):_M_current(__i) {
13 } const _Iterator & base() const {
16 template < typename _IteratorL, typename _IteratorR,
17 typename _Container > inline typename __normal_iterator <
19 _Container >::difference_type operator-(const __normal_iterator <
22 const __normal_iterator <
24 _Container > &__rhs) {
25 return __lhs.base() - __rhs.base();
27 template < typename _Tp > class new_allocator {
28 public:typedef const _Tp *const_pointer;
29 typedef const _Tp & const_reference;
30 template < typename _Tp1 > struct rebind {
31 typedef new_allocator < _Tp1 > other;
40 template < typename _Tp >
41 class allocator:public __gnu_cxx::new_allocator < _Tp > {
43 template < typename _Tp, typename _Alloc > struct _Vector_base {
44 typedef typename _Alloc::template rebind <
45 _Tp >::other _Tp_alloc_type;
46 struct _Vector_impl:public _Tp_alloc_type {
50 public: _Vector_impl _M_impl;
52 template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class vector:protected _Vector_base < _Tp,
55 typedef _Vector_base < _Tp, _Alloc > _Base;
56 typedef vector < _Tp, _Alloc > vector_type;
57 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
58 public:typedef _Tp value_type;
59 typedef typename _Tp_alloc_type::const_pointer const_pointer;
60 typedef typename _Tp_alloc_type::
61 const_reference const_reference;
62 typedef __gnu_cxx::__normal_iterator < const_pointer,
63 vector_type > const_iterator;
64 unsigned int size() const {
65 return const_iterator(this->_M_impl._M_finish) -
66 const_iterator(this->_M_impl._M_start);
67 } const_reference operator[] (unsigned int __n)const {
73 public:class iterator;
75 unsigned lineIndex(iterator const &it) const;
78 Chunk const &chunk(Layout const *l) const {
83 std::vector < Character > _characters;
85 class Layout::iterator {
86 public:unsigned _char_index;
87 iterator(Layout const *p, unsigned c, int g):_char_index(c) {
89 inline Layout::iterator Layout::end() const {
90 return iterator(this, _characters.size(), _characters.size());
91 } inline unsigned Layout::lineIndex(iterator const &it) const {
92 return it._char_index ==
93 _characters.size()? 1 : _characters[0].chunk(this).in_line;
95 void sp_te_adjust_linespacing_screen(double by)
99 Text::Layout * layout;
101 unsigned line_count = layout->lineIndex(layout->end());
102 double all_lines_height;
103 double average_line_height = all_lines_height / line_count;
107 style->computed = by;
110 (average_line_height) / average_line_height;
115 (average_line_height) / average_line_height;