public FormattedText(IFlags flags, IElementFrameFactory frameFactory, ITextScoper textScoper) { this.text = string.Empty; this.flags = flags; this.frame = frameFactory.Create(flags); this.textScoper = textScoper; }
/// <summary> /// Initializes a new instance of the <see cref="DocumentBuffer"/> class. /// </summary> /// <param name="elementFactory"></param> /// <param name="data"></param> public DocumentBuffer(IElementFactory elementFactory, ITextScoper textScoper, IDocumentData data = null) { // TODO: Init the document deleter this.Deleter = null; this.elements = new List <BufferElement>(); this.elementFactory = elementFactory; this.textScoper = textScoper; }
public Document(IKeyboardInputProvider keyboardInput, ICursor cursor, IElementFactory elementFactory, ITextScoper textScoper, IDocumentData data) { documentCount++; this.keyboardInput = keyboardInput; this.keyboardInput.RegisterCallback(this.HandleKeyboardInput); this.cursor = cursor; this.elementFactory = elementFactory; this.textScoper = textScoper; this.frame = (IButton)Global.FrameProvider.CreateFrame(FrameType.Button, "GHD_Document" + documentCount); if (data != null) { this.Load(data); } else { this.New(); } }
public DocumentMenu(IMenuHandler menuHandler) { var metaCatagory = new MetaCatagoryProfileGenerator(this.Undo, this.Redo, this.Revert, this.Save); var profileGenerator = new DocumentMenuProfileGenerator(metaCatagory); this.textScoper = new TextScoper(); var elementFrameFactory = new ElementFrameFactory(); var pageProperties = new PageProperties() { Width = 550, Height = 750, }; this.elementFactory = new ElementFactory(textScoper, elementFrameFactory, pageProperties); //this.elementFactory = new ElementFactory() // TODO this.inputProvider = new TextBoxInputInterpreter(); this.cursor = new Cursor(); this.menu = menuHandler.CreateMenu(profileGenerator.GenerateMenuProfile()); this.SetupDocumentArea(this.menu.GetFrameById(DocumentMenuLabels.DocumentArea) as IFrame); }
public ElementFactory(ITextScoper textScoper, IElementFrameFactory elementFrameFactory, IPageProperties pageProperties) { this.textScoper = textScoper; this.elementFrameFactory = elementFrameFactory; this.pageProperties = pageProperties; }
public Document(IKeyboardInputProvider keyboardInput, ICursor cursor, IElementFactory elementFactory, ITextScoper textScoper) : this(keyboardInput, cursor, elementFactory, textScoper, null) { }