C# 클래스 SIL.FieldWorks.Common.Widgets.InnerFwTextBox

InnerFwTextBox implements the main body of an FwTextBox. Has to be public so combo box can return its text box.
상속: SIL.FieldWorks.Common.RootSites.SimpleRootSite, IVwNotifyChange, IWritingSystemAndStylesheet
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AdjustHeight bool
BaseMakeSelectionVisible void
CreateTempWritingSystemFactory void
RemoveNonRootNotifications void
ReplaceAll ITsString
RestoreNonRootNotifications void
ShutDownTempWsFactory void
SubstringCount int

공개 메소드들

메소드 설명
ApplyWS ( int hvoWs ) : void

Applies the specified writing system to the current selection

GetAvailWidth ( IVwRootBox prootb ) : int

Simulate infinite width if needed.

InnerFwTextBox ( ) : System

Default constructor

MakeRoot ( ) : void

Create the root box and initialize it. We want this one to work even in design mode, and since we supply the cache and data ourselves, that's possible.

PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void

Any change to this private data access must be a change to our string, so check its length.

Select ( int start, int length ) : void

Selects a range of text in the text box.

If you want to set the start position to the first character in the control's text, set the start parameter to 0. You can use this method to select a substring of text, such as when searching through the text of the control and replacing information. Note: You can programmatically move the caret within the text box by setting the start parameter to the position within the text box where you want the caret to move to and set the length parameter to a value of zero (0). The text box must have focus in order for the caret to be moved.

보호된 메소드들

메소드 설명
CreateEditingHelper ( ) : EditingHelper

Creates a special extended editing helper for this text box.

Dispose ( bool disposing ) : void

Clean up any resources being used.

ExtToIntIndex ( int extIndex ) : int

Converts the external string index to the internal string index. They might be different because a line break character is used internally to represent a new line and CRLF is used externally on Windows to represent a new line.

IntToExtIndex ( int intIndex ) : int

Converts the internal string index to the external string index. They might be different because a line break character is used internally to represent a new line and CRLF is used externally on Windows to represent a new line.

MakeSelectionVisible ( IVwSelection sel, bool fWantOneLineSpace ) : bool

First try to make everything visible, if possible. This is especially helpful with RTL text.

OnKeyDown ( KeyEventArgs e ) : void

watch for keys to do the cut/copy/paste operations

OnKeyPress ( KeyPressEventArgs e ) : void

Override to suppress Enter key if it is not allowed.

OnMouseMoveSetCursor ( Point mousePos ) : void

show default cursor for read-only text boxes.

OnSizeChanged ( EventArgs e ) : void

When the edit box gets resized, recalc the maximum line height (when setting a Tss string, applying styles, or setting the WS, we need to reduce the font size if necessary to keep the text from being clipped by the height of the box).

비공개 메소드들

메소드 설명
AdjustHeight ( ) : bool

Adjusts text height after a style change.

BaseMakeSelectionVisible ( IVwSelection sel ) : void
CreateTempWritingSystemFactory ( ) : void

Make a writing system factory that is based on the Languages folder (ICU-based). This is only used in Designer, tests, and momentarily (during construction) in production, until the client sets supplies a real one.

RemoveNonRootNotifications ( ) : void
ReplaceAll ( ITsString tss, string oldSubStr, string newSubStr ) : ITsString
RestoreNonRootNotifications ( ) : void
ShutDownTempWsFactory ( ) : void

Shut down the writing system factory and release it explicitly.

SubstringCount ( string str, string substr ) : int

메소드 상세

ApplyWS() 공개 메소드

Applies the specified writing system to the current selection
public ApplyWS ( int hvoWs ) : void
hvoWs int The ID of the writing system to apply
리턴 void

CreateEditingHelper() 보호된 메소드

Creates a special extended editing helper for this text box.
protected CreateEditingHelper ( ) : EditingHelper
리턴 EditingHelper

Dispose() 보호된 메소드

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

ExtToIntIndex() 보호된 메소드

Converts the external string index to the internal string index. They might be different because a line break character is used internally to represent a new line and CRLF is used externally on Windows to represent a new line.
protected ExtToIntIndex ( int extIndex ) : int
extIndex int The external string index.
리턴 int

GetAvailWidth() 공개 메소드

Simulate infinite width if needed.
public GetAvailWidth ( IVwRootBox prootb ) : int
prootb IVwRootBox
리턴 int

InnerFwTextBox() 공개 메소드

Default constructor
public InnerFwTextBox ( ) : System
리턴 System

IntToExtIndex() 보호된 메소드

Converts the internal string index to the external string index. They might be different because a line break character is used internally to represent a new line and CRLF is used externally on Windows to represent a new line.
protected IntToExtIndex ( int intIndex ) : int
intIndex int The internal string index.
리턴 int

MakeRoot() 공개 메소드

Create the root box and initialize it. We want this one to work even in design mode, and since we supply the cache and data ourselves, that's possible.
public MakeRoot ( ) : void
리턴 void

MakeSelectionVisible() 보호된 메소드

First try to make everything visible, if possible. This is especially helpful with RTL text.
protected MakeSelectionVisible ( IVwSelection sel, bool fWantOneLineSpace ) : bool
sel IVwSelection The sel.
fWantOneLineSpace bool if set to true [f want one line space].
리턴 bool

OnKeyDown() 보호된 메소드

watch for keys to do the cut/copy/paste operations
protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
리턴 void

OnKeyPress() 보호된 메소드

Override to suppress Enter key if it is not allowed.
protected OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
리턴 void

OnMouseMoveSetCursor() 보호된 메소드

show default cursor for read-only text boxes.
protected OnMouseMoveSetCursor ( Point mousePos ) : void
mousePos Point
리턴 void

OnSizeChanged() 보호된 메소드

When the edit box gets resized, recalc the maximum line height (when setting a Tss string, applying styles, or setting the WS, we need to reduce the font size if necessary to keep the text from being clipped by the height of the box).
protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
리턴 void

PropChanged() 공개 메소드

Any change to this private data access must be a change to our string, so check its length.
public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
리턴 void

Select() 공개 메소드

Selects a range of text in the text box.
If you want to set the start position to the first character in the control's text, set the start parameter to 0. You can use this method to select a substring of text, such as when searching through the text of the control and replacing information. Note: You can programmatically move the caret within the text box by setting the start parameter to the position within the text box where you want the caret to move to and set the length parameter to a value of zero (0). The text box must have focus in order for the caret to be moved.
/// The value assigned to either the start parameter or the length parameter is less than zero. ///
public Select ( int start, int length ) : void
start int The position of the first character in the current text selection within the text box.
length int The number of characters to select.
리턴 void