Clapkit
Loading...
Searching...
No Matches
CKTextArea Class Reference

Defines a multi-line text area that can optionally be editable. More...

#include <ckTextArea.h>

Inheritance diagram for CKTextArea:
CKTextField CKLabel CKFocusableControl CKControl CKTextableControl CKObject

Public Member Functions

 CKTextArea (const CKControlInitParams &params)
 
 ~CKTextArea ()
 
virtual void PrepareForDraw ()
 
virtual void Redraw ()
 
virtual void RaisePropertyChange (const char *propertyName)
 
virtual bool HandleEvent (const CKEvent &evt)
 
virtual void __UpdateTextScroll (int vDelta, int hDelta)
 This is only to be called from the UPPs for the scrollbar.
 
virtual int __GetLineHeight ()
 This is only to be called from the UPPs for the scrollbar.
 
virtual int __GetPageHeight ()
 This is only to be called from the UPPs for the scrollbar.
 
- Public Member Functions inherited from CKTextField
 CKTextField (const CKControlInitParams &params)
 
virtual ~CKTextField ()
 
virtual void Blurred ()
 
virtual void Focused ()
 
virtual void PerformCut ()
 
virtual void PerformCopy ()
 
virtual void PerformPaste ()
 
virtual void PerformClear ()
 
virtual bool CanPerformPaste ()
 
- Public Member Functions inherited from CKLabel
 CKLabel (const CKControlInitParams &params)
 
virtual ~CKLabel ()
 
virtual void AddedToWindow (CKWindow *window)
 
virtual void RemovedFromWindow ()
 
virtual void SetText (const char *text)
 
virtual const char * GetText ()
 
void AutoHeight (int maxHeight=0)
 Increase the height until it fits.
 
void SetFont (short fontId)
 
short GetFont ()
 
void DoTEIdle ()
 
- Public Member Functions inherited from CKControl
 CKControl (const CKControlInitParams &params, CKControlType type=CKControlType::Unknown)
 
virtual ~CKControl ()
 
virtual void MarkAsDirty ()
 
- Public Member Functions inherited from CKObject
 CKObject ()
 
virtual ~CKObject ()
 
virtual void AddHandler (CKEventType type, CKEventHandlerFunc cb)
 
virtual void RemoveHandler (CKEventType type)
 
virtual bool HasHandler (CKEventType type) const
 
virtual void SetPropertyObserver (CKPropertyObserverFunc cb)
 
virtual void UnsetPropertyObserver ()
 
- Public Member Functions inherited from CKTextableControl
 CKTextableControl ()
 
virtual ~CKTextableControl ()
 
- Public Member Functions inherited from CKFocusableControl
 CKFocusableControl ()
 
virtual ~CKFocusableControl ()
 
virtual void PerformUndo ()
 

Public Attributes

CKProperty< CKScrollTypescrollType
 
- Public Attributes inherited from CKLabel
CKProperty< bool > bold = false
 
CKProperty< bool > italic = false
 
CKProperty< bool > underline = false
 
CKProperty< bool > multiline = false
 
CKProperty< CKColorcolor
 
CKProperty< int > fontSize
 
CKProperty< CKTextJustificationjustification
 
- Public Attributes inherited from CKControl
CKProperty< CKWindow * > owner = nullptr
 
CKProperty< CKRectrect
 
CKProperty< bool > enabled = true
 
CKProperty< bool > visible
 
- Public Attributes inherited from CKFocusableControl
CKProperty< bool > focused
 
const bool undoable = false
 
const bool copyable = true
 
const bool pastable = true
 
const bool cutable = true
 
const bool clearable = true
 

Protected Member Functions

virtual void ResizeTE ()
 
virtual void TECreated ()
 

Protected Attributes

ControlHandle __vScrollBar = nullptr
 
ControlHandle __hScrollBar = nullptr
 
bool __needsFullRedraw = true
 
- Protected Attributes inherited from CKLabel
short __fontNumber
 
TEHandle __teHandle = nullptr
 
char * __tempTextStorage = nullptr
 
bool __needsPreparing = true
 
- Protected Attributes inherited from CKObject
std::map< CKEventType, CKEventHandlerFunc__handlers
 
CKPropertyObserverFunc propertyObserverCB = nullptr
 
- Protected Attributes inherited from CKTextableControl
char * __text
 

Detailed Description

Defines a multi-line text area that can optionally be editable.

Constructor & Destructor Documentation

◆ CKTextArea()

CKTextArea::CKTextArea ( const CKControlInitParams params)

◆ ~CKTextArea()

CKTextArea::~CKTextArea ( )

Member Function Documentation

◆ __GetLineHeight()

virtual int CKTextArea::__GetLineHeight ( )
inlinevirtual

This is only to be called from the UPPs for the scrollbar.

◆ __GetPageHeight()

virtual int CKTextArea::__GetPageHeight ( )
inlinevirtual

This is only to be called from the UPPs for the scrollbar.

◆ __UpdateTextScroll()

void CKTextArea::__UpdateTextScroll ( int  vDelta,
int  hDelta 
)
virtual

This is only to be called from the UPPs for the scrollbar.

◆ HandleEvent()

bool CKTextArea::HandleEvent ( const CKEvent evt)
virtual

Reimplemented from CKTextField.

◆ PrepareForDraw()

void CKTextArea::PrepareForDraw ( )
virtual

Reimplemented from CKTextField.

◆ RaisePropertyChange()

void CKTextArea::RaisePropertyChange ( const char *  propertyName)
virtual

Reimplemented from CKLabel.

◆ Redraw()

void CKTextArea::Redraw ( )
virtual

Called by CKApp when the control needs to (re-)draw itself, usually due to an event like mouseDown or updateEvt.

YOU MOST LIKELY DO NOT NEED TO CALL THIS. USE MarkAsDirty!

Reimplemented from CKTextField.

◆ ResizeTE()

void CKTextArea::ResizeTE ( )
protectedvirtual

Reimplemented from CKLabel.

◆ TECreated()

void CKTextArea::TECreated ( )
protectedvirtual

Reimplemented from CKTextField.

Member Data Documentation

◆ __hScrollBar

ControlHandle CKTextArea::__hScrollBar = nullptr
protected

◆ __needsFullRedraw

bool CKTextArea::__needsFullRedraw = true
protected

◆ __vScrollBar

ControlHandle CKTextArea::__vScrollBar = nullptr
protected

◆ scrollType

CKProperty<CKScrollType> CKTextArea::scrollType

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