C# Класс SIL.FieldWorks.Common.RootSites.IbusRootSiteEventHandler

Наследование: IIbusEventHandler
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CheckAttributesForCommittingKeyboard void
CreateTsStringUsingSelectionProps ITsString
GetSelectionProps ITsTextProps[]
OnCommitText void
OnPreeditClosed void
OnPreeditOpened void
OnUpdatePreeditText void
Reset bool
SetupForTypingEventHandler SelectionHelper
TrimBeginningBackspaces int
UpdateSelectionForReplacingPreeditText void

Открытые методы

Метод Описание
CommitOrReset ( ) : bool

Commits the or reset.

IbusRootSiteEventHandler ( SimpleRootSite simpleRootSite ) : System

Initializes a new instance of the SIL.FieldWorks.Common.RootSites.IbusRootSiteEventHandler class.

OnCommitText ( object ibusText ) : void

This method gets called when the IBus CommitText event is raised and indicates that the composition is ending. The temporarily inserted composition string will be replaced with ibusText. It's in the discretion of the IBus 'keyboard' to decide when it calls OnCommitText. Typically this is done when the user selects a string in the pop-up composition window, or when he types a character that isn't part of the previous composition sequence.

OnDeleteSurroundingText ( int offset, int nChars ) : void

Called when the IBus DeleteSurroundingText is raised to delete surrounding characters.

OnHidePreeditText ( ) : void

Called when the IBus HidePreeditText event is raised to cancel/remove the composition, e.g. after the user pressed the ESC key or the application lost focus.

OnIbusKeyPress ( int keySym, int scanCode, int index ) : void

Called when the IBus ForwardKeyEvent is raised, i.e. when IBus wants the application to process a key event. One example is when IBus raises the ForwardKeyEvent and passes backspace to delete the character to the left of the cursor so that it can be replaced with a new modified character.

Reset ( ) : bool

Called by the IBusKeyboardAdapter to cancel any open compositions, e.g. after the user pressed the ESC key or if the application loses focus.

Приватные методы

Метод Описание
CheckAttributesForCommittingKeyboard ( IBusText text ) : void
CreateTsStringUsingSelectionProps ( string text, ITsTextProps selectionProps, bool underLine ) : ITsString

Helper method that returns a TsString with properties read from Selection. TODO: typing next to verse numbers shouldn't preserve selection.

GetSelectionProps ( SelectionHelper selectionHelper ) : ITsTextProps[]
OnCommitText ( string text, bool checkIfFocused ) : void
OnPreeditClosed ( ) : void
OnPreeditOpened ( ) : void
OnUpdatePreeditText ( object obj, int cursorPos ) : void
Reset ( bool cancel ) : bool

Reset the selection and optionally cancel any open compositions.

SetupForTypingEventHandler ( bool checkIfFocused, bool rollBackPreviousTask ) : SelectionHelper
TrimBeginningBackspaces ( string &text ) : int

Trim beginning backspaces, if any. Return number trimmed.

UpdateSelectionForReplacingPreeditText ( SelectionHelper selHelper, int countBackspace ) : void

Описание методов

CommitOrReset() публичный Метод

Commits the or reset.
public CommitOrReset ( ) : bool
Результат bool

IbusRootSiteEventHandler() публичный Метод

Initializes a new instance of the SIL.FieldWorks.Common.RootSites.IbusRootSiteEventHandler class.
public IbusRootSiteEventHandler ( SimpleRootSite simpleRootSite ) : System
simpleRootSite SimpleRootSite
Результат System

OnCommitText() публичный Метод

This method gets called when the IBus CommitText event is raised and indicates that the composition is ending. The temporarily inserted composition string will be replaced with ibusText. It's in the discretion of the IBus 'keyboard' to decide when it calls OnCommitText. Typically this is done when the user selects a string in the pop-up composition window, or when he types a character that isn't part of the previous composition sequence.
public OnCommitText ( object ibusText ) : void
ibusText object
Результат void

OnDeleteSurroundingText() публичный Метод

Called when the IBus DeleteSurroundingText is raised to delete surrounding characters.
public OnDeleteSurroundingText ( int offset, int nChars ) : void
offset int The character offset from the cursor position of the text to be /// deleted. A negative value indicates a position before the cursor.
nChars int The number of characters to be deleted.
Результат void

OnHidePreeditText() публичный Метод

Called when the IBus HidePreeditText event is raised to cancel/remove the composition, e.g. after the user pressed the ESC key or the application lost focus.
public OnHidePreeditText ( ) : void
Результат void

OnIbusKeyPress() публичный Метод

Called when the IBus ForwardKeyEvent is raised, i.e. when IBus wants the application to process a key event. One example is when IBus raises the ForwardKeyEvent and passes backspace to delete the character to the left of the cursor so that it can be replaced with a new modified character.
public OnIbusKeyPress ( int keySym, int scanCode, int index ) : void
keySym int Key symbol.
scanCode int Scan code.
index int Index of the KeyCode vector. This more or less tells the state of /// the modifier keys: 0=unshifted, 1=shifted (the other values I don't know and are irrelevant). ///
Результат void

Reset() публичный Метод

Called by the IBusKeyboardAdapter to cancel any open compositions, e.g. after the user pressed the ESC key or if the application loses focus.
public Reset ( ) : bool
Результат bool