CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
CFxUITextView Class Reference

#include <FxUITextView.h>

Inheritance diagram for CFxUITextView:
CFxUIBaseView CFxUIObject

Public Member Functions

 CFxUITextView (UIWidthSizePolicy width=eM)
 
 ~CFxUITextView ()
 
void setText (const CFxUIString &text)
 
void setHtmlText (const CFxUIString &htmlText)
 
void addText (const CFxUIString &text)
 
void insertHtmlText (const CFxUIString &htmlText)
 
void setMultiline (const bool multiLine)
 
void setReadOnly (const bool readOnly)
 
void setPlaceholderText (const CFxUIString &sText)
 
CFxUIString placeholderText () const
 
CFxUIString getContent () const
 
void setAdjustHeightToContent (const bool &bValue)
 
bool getAdjustHeightToContent () const
 
void clear ()
 
void insertText (const CFxUIString &text)
 
void deletePreviousCharacters (const int &count)
 
void grabKeyboard ()
 
void releaseKeyboard ()
 
CFxUIPoint getTextCursorPosition ()
 
void setTextFromMimeDataAccepted (bool bAccepted)
 
CFxUISignal< void(void)> & textChanged ()
 
CFxUISignal< void(void)> & focusInEventSignal ()
 
CFxUISignal< void(void)> & focusOutEventSignal ()
 
CFxUISignal< void(int, int, CFxUIString)> & keyPressed ()
 
CFxUISignal< void(CFxUIString)> & insertFromMimeData ()
 
- Public Member Functions inherited from CFxUIBaseView
 CFxUIBaseView ()
 
virtual ~CFxUIBaseView ()
 
void setDisabled (bool on)
 
void setEnabled (bool on)
 
bool isEnabled () const
 
CFxUIPalette::FxUIColorRole backgroundRole ()
 
void setPalette (const CFxUIPalette &)
 
const CFxUIPalettepalette () const
 
bool isVisible ()
 
void setVisible (bool bVisible)
 
bool isHidden ()
 
void setHidden (bool bHidden)
 
bool hasFocus () const
 
void setFocus ()
 
void setFocus (int iReason)
 
void setFocusPolicy (int iPolicy)
 
int width ()
 
void setWidth (int w)
 
int height ()
 
void setHeight (int h)
 
void update ()
 
void setBusyState (bool bBusy=false)
 
void resize (int w, int h)
 
void setCornerRadius (float radius)
 
void setBorderWidth (float width)
 
void setBorderWidth (float left, float top, float right, float bottom)
 
void setBorderColor (int r, int g, int b)
 
virtual void showEvent (CFxUIShowEvent *event)
 
virtual void hideEvent (CFxUIHideEvent *event)
 
virtual void paintEvent (CFxUIPaintEvent *event)
 
virtual void resizeEvent (CFxUIResizeEvent *event)
 
virtual void focusInEvent (CFxUIFocusEvent *focusInEvent)
 
virtual void focusOutEvent (CFxUIFocusEvent *focusOutEvent)
 
virtual void mousePressEvent (CFxUIMouseEvent *mouseEvent)
 
void setEventAccepted (bool bAccepted=false)
 
void setEventRejected (bool bRejected=false)
 
void addView (CFxUIBaseView *pChild, float fWeight=0.0)
 
void insertView (CFxUIBaseView *pChild, int index=0, float fWeight=0.0)
 
int indexOf (CFxUIBaseView *pChild)
 
void removeView (CFxUIBaseView *pChild)
 
void setPreferableSize (int w, int h)
 
void setMinimumWidth (int iWidth)
 
void setMinimumHeight (int iHeight)
 
void setMinimumSize (const CFxUISize &size)
 
void setMaximumWidth (int iWidth)
 
void setMaximumHeight (int iHeight)
 
void setMaximumSize (const CFxUISize &size)
 
int minimumWidth ()
 
int minimumHeight ()
 
int maximumWidth ()
 
int maximumHeight ()
 
void setToolTip (const CFxUIString &sToolTip)
 
const CFxUIString toolTip ()
 
bool underMouse ()
 
void setMask (const CFxUIRegion &region)
 
void move (const CFxUIPoint &pos)
 
CFxUISize sizeHint () const
 
CFxUIPoint mapToGlobal (const CFxUIPoint &pos)
 
void setMargin (int left, int top, int right, int bottom)
 
void setParentWidget (CFxUIBaseView *pParent)
 
float getViewOpacity () const
 
void setViewOpacity (const float &opacity)
 
CFxUISignal< void(void)> & aboutToPassEventToParent ()
 
CFxUISignal< void(void)> & aboutToShow ()
 
CFxUISignal< void(void)> & hoverEnter ()
 
CFxUISignal< void(void)> & hoverLeave ()
 
CFxUISignal< void(bool)> & visibilityChanged ()
 
- Public Member Functions inherited from CFxUIObject
 CFxUIObject ()
 
virtual ~CFxUIObject ()
 
FxNativeHandle getHandle () const
 
void setHandle (FxNativeHandle handle)
 
void setParent (CFxUIObject *parent)
 
CFxUIObjectparent ()
 
const CFxUIObjectparent () const
 
void setObjectName (const CFxUIString &objectName)
 
CFxUIString objectName () const
 
bool setProperty (const char *name, const CFxUIVariant &value)
 
CFxUIVariant property (const char *name)
 
CFxUIList< CFxUIObject * > children () const
 
template<typename T>
CFxUIList< T > findChildren (const CFxUIString &name=CFxUIString())
 
void blockSignals (bool block)
 
bool signalsBlocked () const
 

Additional Inherited Members

- Public Types inherited from CFxUIBaseView
enum  TextAlignment {
  AlignLeft = 0x0001 , AlignRight = 0x0002 , AlignHCenter = 0x0004 , AlignJustify = 0x0008 ,
  AlignTop = 0x0020 , AlignBottom = 0x0040 , AlignVCenter = 0x0080 , AlignBaseline = 0x0100 ,
  AlignCenter = AlignVCenter | AlignHCenter
}
 
enum  FocusPolicyType {
  eNoFocus = 0 , eTabFocus = 0x1 , eClickFocus = 0x2 , eStrongFocus = eTabFocus | eClickFocus | 0x8 ,
  eWheelFocus = eStrongFocus | 0x4 , eKeyboardOnSetfocus = 0x10
}
 
enum  UIWidthSizePolicy {
  eExpanding = -1 , eXS = 0 , eS , eM ,
  eL , eXL
}
 
enum  UIScrollBarPolicy { eScrollBarAsNeeded = 0 , eScrollBarAlwaysOff , eScrollBarAlwaysOn }
 
- Static Public Member Functions inherited from CFxUIBaseView
static void setTabOrder (CFxUIObject *first, CFxUIObject *second)
 
- Protected Member Functions inherited from CFxUIObject
CFxUIObjectsender ()
 
- Protected Attributes inherited from CFxUIObject
CFxUIObjectImpl * m_pImpl
 
CFxUIObjectData * m_pData
 

Detailed Description

Class CFxUITextView is a multi-line text editor.

Definition at line 25 of file FxUITextView.h.

Constructor & Destructor Documentation

◆ CFxUITextView()

CFxUITextView::CFxUITextView ( UIWidthSizePolicy width = eM)
explicit

Constructor

◆ ~CFxUITextView()

CFxUITextView::~CFxUITextView ( )

Destructor

Member Function Documentation

◆ addText()

void CFxUITextView::addText ( const CFxUIString & text)

Add the text in text editor.

Parameters
textInput

◆ clear()

void CFxUITextView::clear ( )

Clears the content of text editor.

◆ deletePreviousCharacters()

void CFxUITextView::deletePreviousCharacters ( const int & count)

Remove the previous characters equal to count from current cursor position in text editor.

Parameters
countInput

◆ focusInEventSignal()

CFxUISignal< void(void)> & CFxUITextView::focusInEventSignal ( )

Signal is emitted whenever text editor receives keyboard focus events (focus receive) for the view.

◆ focusOutEventSignal()

CFxUISignal< void(void)> & CFxUITextView::focusOutEventSignal ( )

Signal is emitted whenever text editor lose keyboard focus events (focus lose) for the view.

◆ getAdjustHeightToContent()

bool CFxUITextView::getAdjustHeightToContent ( ) const

Returns if the text editor height is set to content height.

Returns
bool Value returned is true if property adjustHeightContent is true, otherwise false.

◆ getContent()

CFxUIString CFxUITextView::getContent ( ) const

Returns the content i.e. text from editor.

Returns
string

◆ getTextCursorPosition()

CFxUIPoint CFxUITextView::getTextCursorPosition ( )

Get current text cursor position for text editor.

Returns
CFxUIPoint

◆ grabKeyboard()

void CFxUITextView::grabKeyboard ( )

Grab keyboard events for text editor.

◆ insertFromMimeData()

CFxUISignal< void(CFxUIString)> & CFxUITextView::insertFromMimeData ( )

Signal is emitted whenever text inserted from MimeData.

◆ insertHtmlText()

void CFxUITextView::insertHtmlText ( const CFxUIString & htmlText)

Inserts the html text at current cursor position in text editor.

Parameters
htmlTextInput

◆ insertText()

void CFxUITextView::insertText ( const CFxUIString & text)

Insert the simple text in text editor.

Parameters
textInput

◆ keyPressed()

CFxUISignal< void(int, int, CFxUIString)> & CFxUITextView::keyPressed ( )

Signal is emitted whenever text editor gets any key event.

◆ placeholderText()

CFxUIString CFxUITextView::placeholderText ( ) const

Return the placeholder text.

Returns
string

◆ releaseKeyboard()

void CFxUITextView::releaseKeyboard ( )

Release keyboard events for text editor.

◆ setAdjustHeightToContent()

void CFxUITextView::setAdjustHeightToContent ( const bool & bValue)

Sets the text editor height according to content height.

This property sets height of text editor automatically.

Parameters
bValueSets the height of text editor to content height if parameter is true.

◆ setHtmlText()

void CFxUITextView::setHtmlText ( const CFxUIString & htmlText)

Sets the html text in text editor.

This provides HTML interface to the text of the text edit.

Parameters
htmlTextInput

◆ setMultiline()

void CFxUITextView::setMultiline ( const bool multiLine)

Sets the text editor to multiline.

Parameters
multiLineThis property sets text editor to multiline if parameter is true.

◆ setPlaceholderText()

void CFxUITextView::setPlaceholderText ( const CFxUIString & sText)

Sets the placeholder text.

This setting display a grayed-out placeholder text as long as the text() is empty and the widget doesn't have focus.

Parameters
sTextInput

◆ setReadOnly()

void CFxUITextView::setReadOnly ( const bool readOnly)

Sets the content of text edit to read-only mode.

In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text (if echoMode() is Normal), but cannot edit it.

Parameters
readOnlyThe content is read only if parameter passed is true.

◆ setText()

void CFxUITextView::setText ( const CFxUIString & text)

Sets the text in text editor.

Parameters
textInput

◆ setTextFromMimeDataAccepted()

void CFxUITextView::setTextFromMimeDataAccepted ( bool bAccepted)

Accepts the text from MimeData in paste.

Parameters
bAcceptedwill accept the mime data text if it is true.

◆ textChanged()

CFxUISignal< void(void)> & CFxUITextView::textChanged ( )

Signal is emitted whenever the content of text edit is changed.


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