Flutter Engine
 
Loading...
Searching...
No Matches
txt::Paragraph::Range< T > Struct Template Reference

#include <paragraph.h>

Public Member Functions

 Range ()
 
 Range (T s, T e)
 
bool operator== (const Range< T > &other) const
 
width () const
 
void Shift (T delta)
 

Public Attributes

start
 
end
 

Detailed Description

template<typename T>
struct txt::Paragraph::Range< T >

Definition at line 79 of file paragraph.h.

Constructor & Destructor Documentation

◆ Range() [1/2]

template<typename T >
txt::Paragraph::Range< T >::Range ( )
inline

Definition at line 80 of file paragraph.h.

◆ Range() [2/2]

template<typename T >
txt::Paragraph::Range< T >::Range ( s,
e 
)
inline

Definition at line 81 of file paragraph.h.

81: start(s), end(e) {}

Member Function Documentation

◆ operator==()

template<typename T >
bool txt::Paragraph::Range< T >::operator== ( const Range< T > &  other) const
inline

Definition at line 85 of file paragraph.h.

85 {
86 return start == other.start && end == other.end;
87 }

References txt::Paragraph::Range< T >::end, and txt::Paragraph::Range< T >::start.

◆ Shift()

template<typename T >
void txt::Paragraph::Range< T >::Shift ( delta)
inline

Definition at line 91 of file paragraph.h.

91 {
92 start += delta;
93 end += delta;
94 }

References txt::Paragraph::Range< T >::end, and txt::Paragraph::Range< T >::start.

◆ width()

template<typename T >
T txt::Paragraph::Range< T >::width ( ) const
inline

Definition at line 89 of file paragraph.h.

89{ return end - start; }

References txt::Paragraph::Range< T >::end, and txt::Paragraph::Range< T >::start.

Member Data Documentation

◆ end

◆ start


The documentation for this struct was generated from the following file: