Numworks Epsilon  1.4.1
Graphing Calculator Operating System
TextView Class Referenceabstract

#include <text_view.h>

Inheritance diagram for TextView:
View BufferTextView MessageTextView PointerTextView

Public Member Functions

 TextView (KDText::FontSize size=KDText::FontSize::Large, float horizontalAlignment=0.0f, float verticalAlignment=0.0f, KDColor textColor=KDColorBlack, KDColor backgroundColor=KDColorWhite)
 
void drawRect (KDContext *ctx, KDRect rect) const override
 
void setBackgroundColor (KDColor backgroundColor)
 
void setTextColor (KDColor textColor)
 
void setAlignment (float horizontalAlignment, float verticalAlignment)
 
KDSize minimalSizeForOptimalDisplay () const override
 
virtual const char * text () const =0
 
virtual void setText (const char *text)=0
 
void setFontSize (KDText::FontSize fontSize)
 
- Public Member Functions inherited from View
 View ()
 
virtual ~View ()
 
 View (const View &other)=delete
 
 View (View &&other)=delete
 
Viewoperator= (const View &other)=delete
 
Viewoperator= (View &&other)=delete
 
void resetSuperview ()
 
void setSize (KDSize size)
 
void setFrame (KDRect frame)
 
KDPoint pointFromPointInView (View *view, KDPoint point)
 
KDRect bounds () const
 
Viewsubview (int index)
 

Protected Attributes

KDText::FontSize m_fontSize
 
- Protected Attributes inherited from View
KDRect m_frame
 

Additional Inherited Members

- Protected Member Functions inherited from View
void markRectAsDirty (KDRect rect)
 

Detailed Description

Definition at line 7 of file text_view.h.

Constructor & Destructor Documentation

◆ TextView()

TextView::TextView ( KDText::FontSize  size = KDText::FontSize::Large,
float  horizontalAlignment = 0.0f,
float  verticalAlignment = 0.0f,
KDColor  textColor = KDColorBlack,
KDColor  backgroundColor = KDColorWhite 
)

Definition at line 3 of file text_view.cpp.

Member Function Documentation

◆ drawRect()

void TextView::drawRect ( KDContext ctx,
KDRect  rect 
) const
overridevirtual

Reimplemented from View.

Definition at line 39 of file text_view.cpp.

◆ minimalSizeForOptimalDisplay()

KDSize TextView::minimalSizeForOptimalDisplay ( ) const
overridevirtual

Reimplemented from View.

Definition at line 35 of file text_view.cpp.

◆ setAlignment()

void TextView::setAlignment ( float  horizontalAlignment,
float  verticalAlignment 
)

Definition at line 24 of file text_view.cpp.

◆ setBackgroundColor()

void TextView::setBackgroundColor ( KDColor  backgroundColor)

Definition at line 14 of file text_view.cpp.

◆ setFontSize()

void TextView::setFontSize ( KDText::FontSize  fontSize)

Definition at line 30 of file text_view.cpp.

◆ setText()

virtual void TextView::setText ( const char *  text)
pure virtual

◆ setTextColor()

void TextView::setTextColor ( KDColor  textColor)

Definition at line 19 of file text_view.cpp.

◆ text()

virtual const char* TextView::text ( ) const
pure virtual

Member Data Documentation

◆ m_fontSize

KDText::FontSize TextView::m_fontSize
protected

Definition at line 26 of file text_view.h.


The documentation for this class was generated from the following files: