internal EditableTextLine(EditableTextFlowLayer ownerFlowLayer) { this.EditableFlowLayer = ownerFlowLayer; _actualLineHeight = ownerFlowLayer.DefaultLineHeight; //we start with default line height #if DEBUG this.dbugLineId = dbugLineTotalCount; dbugLineTotalCount++; #endif }
public TextLineReader(EditableTextFlowLayer flowlayer) { #if DEBUG this.dbug_MyId = dbugTotalId; dbugTotalId++; #endif _textFlowLayer = flowlayer; flowlayer.Reflow += new EventHandler(flowlayer_Reflow); _currentLine = flowlayer.GetTextLine(0); if (_currentLine.FirstRun != null) { _currentTextRun = _currentLine.FirstRun; } }
public TextEditRenderBox( RootGraphic rootgfx, int width, int height, bool isMultiLine, bool isEditable = true) : base(rootgfx, width, height) { _isEditable = isEditable; if (isEditable) { GlobalCaretController.RegisterCaretBlink(rootgfx); // _myCaret = new CaretRenderElement(rootgfx, 2, 17); _myCaret.TransparentForAllEvents = true; } RenderBackground = RenderCaret = RenderSelectionRange = RenderMarkers = true; // MayHasViewport = true; BackgroundColor = Color.White;// Color.Transparent; _currentSpanStyle = new TextSpanStyle(); _currentSpanStyle.FontColor = Color.Black;//set default _currentSpanStyle.ReqFont = rootgfx.DefaultTextEditFontInfo; // _textLayer = new EditableTextFlowLayer(this); //presentation _internalTextLayerController = new InternalTextLayerController(_textLayer); //controller _isMultiLine = isMultiLine; if (isMultiLine) { _textLayer.SetUseDoubleCanvas(false, true); } else { _textLayer.SetUseDoubleCanvas(true, false); } NeedClipArea = true; IsBlockElement = false; NumOfWhitespaceForSingleTab = 4;//default?, configurable? }
internal InternalTextLayerController(EditableTextFlowLayer textLayer) { //this controller control the editaible-textflow-layer _textLayer = textLayer; //write to textflow-layer with text-line-writer (handle the writing line) _textLineWriter = new TextLineWriter(textLayer); //and record editing hx, support undo-redo _commandHistoryList = new DocumentCommandCollection(this); #if DEBUG if (dbugEnableTextManRecorder) { _dbugActivityRecorder = new debugActivityRecorder(); _textLineWriter.dbugTextManRecorder = _dbugActivityRecorder; throw new NotSupportedException(); _dbugActivityRecorder.Start(null); } #endif }
public TextLineWriter(EditableTextFlowLayer textLayer) : base(textLayer) { }