Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
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
 
T width () const
 
void Shift (T delta)
 

Public Attributes

T start
 
T end
 

Detailed Description

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

Definition at line 91 of file paragraph.h.

Constructor & Destructor Documentation

◆ Range() [1/2]

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

Definition at line 92 of file paragraph.h.

◆ Range() [2/2]

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

Definition at line 93 of file paragraph.h.

93: start(s), end(e) {}
struct MyStruct s

Member Function Documentation

◆ operator==()

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

Definition at line 97 of file paragraph.h.

97 {
98 return start == other.start && end == other.end;
99 }

◆ Shift()

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

Definition at line 103 of file paragraph.h.

103 {
104 start += delta;
105 end += delta;
106 }

◆ width()

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

Definition at line 101 of file paragraph.h.

101{ return end - start; }

Member Data Documentation

◆ end

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

Definition at line 95 of file paragraph.h.

◆ start

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

Definition at line 95 of file paragraph.h.


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