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

#include <FxUITextCursor.h>

Public Types

enum  FxUIMoveOperation {
  NoMove = 0 , Start = 1 , StartOfLine = 3 , StartOfBlock = 5 ,
  PreviousBlock = 6 , PreviousCharacter = 7 , PreviousWord = 8 , Up = 2 ,
  Left = 9 , WordLeft = 10 , End = 11 , EndOfLine = 13 ,
  EndOfWord = 14 , EndOfBlock = 15 , NextBlock = 16 , NextCharacter = 17 ,
  NextWord = 18 , Down = 12 , Right = 19 , WordRight = 20 ,
  NextCell = 21 , PreviousCell = 22 , NextRow = 23 , PreviousRow = 24
}
 
enum  FxUIMoveMode { MoveAnchor , KeepAnchor }
 

Public Member Functions

 CFxUITextCursor (CFxUITextView *view)
 
 ~CFxUITextCursor ()
 
bool movePosition (FxUIMoveOperation moveOperation, FxUIMoveMode moveMode, int n=1)
 
CFxUIString selectedText ()
 
void removeSelectedText ()
 
void deletePreviousChar ()
 
int position () const
 
void setPosition (int pos)
 

Protected Attributes

CFxUITextCursorImpl * m_pImpl = nullptr
 

Detailed Description

Class CFxUITextCursor handles all operations for CFxUITextView cursor.

Definition at line 26 of file FxUITextCursor.h.

Member Enumeration Documentation

◆ FxUIMoveMode

Enumerator
MoveAnchor 
KeepAnchor 

Definition at line 57 of file FxUITextCursor.h.

◆ FxUIMoveOperation

Enumerator
NoMove 
Start 
StartOfLine 
StartOfBlock 
PreviousBlock 
PreviousCharacter 
PreviousWord 
Up 
Left 
WordLeft 
End 
EndOfLine 
EndOfWord 
EndOfBlock 
NextBlock 
NextCharacter 
NextWord 
Down 
Right 
WordRight 
NextCell 
PreviousCell 
NextRow 
PreviousRow 

Definition at line 29 of file FxUITextCursor.h.

Constructor & Destructor Documentation

◆ CFxUITextCursor()

CFxUITextCursor::CFxUITextCursor ( CFxUITextView * view)

Constructor

◆ ~CFxUITextCursor()

CFxUITextCursor::~CFxUITextCursor ( )

Destructor

Member Function Documentation

◆ deletePreviousChar()

void CFxUITextCursor::deletePreviousChar ( )

Delete the previous char.

◆ movePosition()

bool CFxUITextCursor::movePosition ( FxUIMoveOperation moveOperation,
FxUIMoveMode moveMode,
int n = 1 )

Moves the cursor by performing the given operation n times, using the specified mode, and returns true if all operations were completed successfully; otherwise returns false.

Returns
bool

◆ position()

int CFxUITextCursor::position ( ) const

Returns the current position.

Returns
int

◆ removeSelectedText()

void CFxUITextCursor::removeSelectedText ( )

Removes the current selected text.

◆ selectedText()

CFxUIString CFxUITextCursor::selectedText ( )

Returns the current selected text.

Returns
CFxUIString

◆ setPosition()

void CFxUITextCursor::setPosition ( int pos)

Sets the current position.

Parameters
int

Member Data Documentation

◆ m_pImpl

CFxUITextCursorImpl* CFxUITextCursor::m_pImpl = nullptr
protected

Definition at line 109 of file FxUITextCursor.h.


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