PCL
CodeEditor Event Handlers

Typedefs

using pcl::CodeEditor::cursor_event_handler = void(Control::*)(CodeEditor &sender, int line, int col)
 
using pcl::CodeEditor::editor_event_handler = void(Control::*)(CodeEditor &sender)
 
using pcl::CodeEditor::selection_event_handler = void(Control::*)(CodeEditor &sender, int fromLine, int fromCol, int toLine, int toCol)
 
using pcl::CodeEditor::state_event_handler = void(Control::*)(CodeEditor &sender, bool state)
 

Functions

void pcl::CodeEditor::OnCursorPositionUpdated (cursor_event_handler handler, Control &receiver)
 
void pcl::CodeEditor::OnDynamicWordWrapModeUpdated (state_event_handler handler, Control &receiver)
 
void pcl::CodeEditor::OnOverwriteModeUpdated (state_event_handler handler, Control &receiver)
 
void pcl::CodeEditor::OnSelectionModeUpdated (state_event_handler handler, Control &receiver)
 
void pcl::CodeEditor::OnSelectionUpdated (selection_event_handler handler, Control &receiver)
 
void pcl::CodeEditor::OnTextUpdated (editor_event_handler handler, Control &receiver)
 

Detailed Description

Typedef Documentation

◆ cursor_event_handler

using pcl::CodeEditor::cursor_event_handler = void (Control::*)( CodeEditor& sender, int line, int col )

Defines the prototype of a cursor event handler.

A cursor event is generated when the cursor position changes in a CodeEditor instance due to direct user interaction.

Parameters
senderThe control that sends a cursor event.
lineLine number of the new cursor position (>= 0).
colColumn number of the new cursor position (>= 0).

Definition at line 726 of file CodeEditor.h.

◆ editor_event_handler

using pcl::CodeEditor::editor_event_handler = void (Control::*)( CodeEditor& sender )

Defines the prototype of an editor event handler.

An editor event is generated when a CodeEditor instance changes its state or contents due to direct user interaction.

Parameters
senderThe control that sends an editor event.

Definition at line 710 of file CodeEditor.h.

◆ selection_event_handler

using pcl::CodeEditor::selection_event_handler = void (Control::*)( CodeEditor& sender, int fromLine, int fromCol, int toLine, int toCol )

Defines the prototype of a selection event handler.

A selection event is generated when the text selection changes in a CodeEditor instance due to direct user interaction.

Parameters
senderThe control that sends a selection event.
fromLineLine number of the starting position of the new text selection.
fromColColumn number of the starting position of the new text selection.
toLineLine number of the ending position of the new text selection.
toColColumn number of the ending position of the new text selection.

Definition at line 750 of file CodeEditor.h.

◆ state_event_handler

using pcl::CodeEditor::state_event_handler = void (Control::*)( CodeEditor& sender, bool state )

Defines the prototype of a state event handler.

A state event is generated when a Boolean property changes in a CodeEditor instance due to direct user interaction.

Parameters
senderThe control that sends a cursor event.
stateNew property state.

Definition at line 764 of file CodeEditor.h.

Function Documentation

◆ OnCursorPositionUpdated()

void pcl::CodeEditor::OnCursorPositionUpdated ( cursor_event_handler  handler,
Control receiver 
)

Sets the handler for cursor position updated events generated by this code editor. A cursor position updated event is generated each time the text cursor (also known as caret) moves in this editor as a result of a direct user interaction.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive cursor position updated events from this code editor.

◆ OnDynamicWordWrapModeUpdated()

void pcl::CodeEditor::OnDynamicWordWrapModeUpdated ( state_event_handler  handler,
Control receiver 
)

Sets the handler for dynamic word wrap mode updated events generated by this code editor. A dynamic word wrap mode updated event is generated each time the dynamic word wrap mode is enabled or disabled in this editor as a result of a direct user interaction.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive dynamic word wrap mode updated events from this code editor.

◆ OnOverwriteModeUpdated()

void pcl::CodeEditor::OnOverwriteModeUpdated ( state_event_handler  handler,
Control receiver 
)

Sets the handler for overwrite mode updated events generated by this code editor. An overwrite mode updated event is generated each time the overwrite mode is enabled or disabled in this editor (i.e., from overwrite mode to replace mode or vice-versa) as a result of a direct user interaction.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive overwrite mode updated events from this code editor.

◆ OnSelectionModeUpdated()

void pcl::CodeEditor::OnSelectionModeUpdated ( state_event_handler  handler,
Control receiver 
)

Sets the handler for selection mode updated events generated by this code editor. A selection mode updated event is generated each time the selection mode is changed in this editor (i.e., from line selection mode to block selection mode or vice-versa) as a result of a direct user interaction.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive selection mode updated events from this code editor.

◆ OnSelectionUpdated()

void pcl::CodeEditor::OnSelectionUpdated ( selection_event_handler  handler,
Control receiver 
)

Sets the handler for selection updated events generated by this code editor. A selection updated event is generated each time the text selection is changed in this editor as a result of a direct user interaction.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive selection updated events from this code editor.

◆ OnTextUpdated()

void pcl::CodeEditor::OnTextUpdated ( editor_event_handler  handler,
Control receiver 
)

Sets the handler for text updated events generated by this code editor. A text updated event is generated each time the text changes in this editor as a result of a direct user interaction.

Parameters
handlerThe event handler. Must be a member function of the receiver object's class.
receiverThe control that will receive text updated events from this code editor.