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

Defines a one-line editable text field. More...

#include <ckTextField.h>

Inheritance diagram for CKTextField:
CKLabel CKFocusableControl CKControl CKTextableControl CKObject CKTextArea

Public Member Functions

 CKTextField (const CKControlInitParams &params)
 
virtual ~CKTextField ()
 
virtual void Redraw ()
 
virtual void Blurred ()
 
virtual void Focused ()
 
virtual void PrepareForDraw ()
 
virtual bool HandleEvent (const CKEvent &evt)
 
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 ()
 
virtual void RaisePropertyChange (const char *propertyName)
 
- 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 ()
 

Protected Member Functions

virtual void TECreated ()
 
- Protected Member Functions inherited from CKLabel
virtual void ResizeTE ()
 

Additional Inherited Members

- 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 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 one-line editable text field.

Constructor & Destructor Documentation

◆ CKTextField()

CKTextField::CKTextField ( const CKControlInitParams params)

◆ ~CKTextField()

CKTextField::~CKTextField ( )
virtual

Member Function Documentation

◆ Blurred()

void CKTextField::Blurred ( )
virtual

Reimplemented from CKFocusableControl.

◆ CanPerformPaste()

bool CKTextField::CanPerformPaste ( )
virtual

Reimplemented from CKFocusableControl.

◆ Focused()

void CKTextField::Focused ( )
virtual

Reimplemented from CKFocusableControl.

◆ HandleEvent()

bool CKTextField::HandleEvent ( const CKEvent evt)
virtual

Reimplemented from CKObject.

Reimplemented in CKTextArea.

◆ PerformClear()

void CKTextField::PerformClear ( )
virtual

Reimplemented from CKFocusableControl.

◆ PerformCopy()

void CKTextField::PerformCopy ( )
virtual

Reimplemented from CKFocusableControl.

◆ PerformCut()

void CKTextField::PerformCut ( )
virtual

Reimplemented from CKFocusableControl.

◆ PerformPaste()

void CKTextField::PerformPaste ( )
virtual

Reimplemented from CKFocusableControl.

◆ PrepareForDraw()

void CKTextField::PrepareForDraw ( )
virtual

Reimplemented from CKLabel.

Reimplemented in CKTextArea.

◆ Redraw()

void CKTextField::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 CKLabel.

Reimplemented in CKTextArea.

◆ TECreated()

void CKTextField::TECreated ( )
protectedvirtual

Reimplemented from CKLabel.

Reimplemented in CKTextArea.


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