public FocusBoxController(Sandbox sandbox) : this() { if (sandbox != null) { this.InterlinWordControl = sandbox; } }
/// <summary> /// NOTE: currently needs to get called after sandbox.MakeRoot, since that's when RightToLeftWritingSystem is valid. /// </summary> /// <param name="sandbox"></param> private void AdjustControlsForRightToLeftWritingSystem(Sandbox sandbox) { if (sandbox.RightToLeftWritingSystem && btnConfirmChanges.Location.X != 0) { panelSandbox.Anchor = AnchorStyles.Right | AnchorStyles.Top; // make buttons RightToLeft oriented. btnConfirmChanges.Anchor = AnchorStyles.Left; btnConfirmChanges.Location = new Point(0, btnConfirmChanges.Location.Y); btnConfirmChangesForWholeText.Anchor = AnchorStyles.Left; btnConfirmChangesForWholeText.Location = new Point(btnConfirmChanges.Width, btnConfirmChangesForWholeText.Location.Y); btnUndoChanges.Anchor = AnchorStyles.Left; btnUndoChanges.Location = new Point( btnConfirmChanges.Width + btnConfirmChangesForWholeText.Width, btnUndoChanges.Location.Y); btnMenu.Anchor = AnchorStyles.Right; btnMenu.Location = new Point(panelControlBar.Width - btnMenu.Width, btnMenu.Location.Y); } }
internal virtual IAnalysisControlInternal CreateNewSandbox(AnalysisOccurrence selected) { Sandbox sandbox = new Sandbox(selected.Analysis.Cache, m_mediator, m_propertyTable, m_stylesheet, m_lineChoices, selected, this); sandbox.SizeToContent = true; // Layout will ignore size. //sandbox.Mediator = Mediator; sandbox.ShowMorphBundles = true; sandbox.StyleSheet = m_stylesheet; panelSandbox.Controls.Add(sandbox); // Makes it real and may give it a root box. // Note: adding sandbox to Controls doesn't always MakeRoot(), because OnHandleCreated happens // only when the parent control is Visible. if (sandbox.RootBox == null) { sandbox.MakeRoot(); } AdjustControlsForRightToLeftWritingSystem(sandbox); // this is needed for the Undo button. sandbox.SandboxChangedEvent += m_sandbox_SandboxChangedEvent; return(sandbox as IAnalysisControlInternal); }
/// <summary> /// NOTE: currently needs to get called after sandbox.MakeRoot, since that's when RightToLeftWritingSystem is valid. /// </summary> /// <param name="sandbox"></param> private void AdjustControlsForRightToLeftWritingSystem(Sandbox sandbox) { if (sandbox.RightToLeftWritingSystem && btnConfirmChanges.Location.X != 0) { panelSandbox.Anchor = AnchorStyles.Right | AnchorStyles.Top; // make buttons RightToLeft oriented. btnConfirmChanges.Anchor = AnchorStyles.Left; btnConfirmChanges.Location = new Point(0, btnConfirmChanges.Location.Y); btnConfirmChangesForWholeText.Anchor = AnchorStyles.Left; btnConfirmChangesForWholeText.Location = new Point(btnConfirmChanges.Width, btnConfirmChangesForWholeText.Location.Y); btnUndoChanges.Anchor = AnchorStyles.Left; btnUndoChanges.Location = new Point( btnConfirmChanges.Width + btnConfirmChangesForWholeText.Width, btnUndoChanges.Location.Y); btnMenu.Anchor = AnchorStyles.Right; btnMenu.Location = new Point(panelControlBar.Width - btnMenu.Width, btnMenu.Location.Y); } }
internal virtual IAnalysisControlInternal CreateNewSandbox(AnalysisOccurrence selected) { Sandbox sandbox = new Sandbox(selected.Analysis.Cache, m_mediator, m_stylesheet, m_lineChoices, selected, this); sandbox.SizeToContent = true; // Layout will ignore size. //sandbox.Mediator = Mediator; sandbox.ShowMorphBundles = true; sandbox.StyleSheet = m_stylesheet; panelSandbox.Controls.Add(sandbox); // Makes it real and may give it a root box. // Note: adding sandbox to Controls doesn't always MakeRoot(), because OnHandleCreated happens // only when the parent control is Visible. if (sandbox.RootBox == null) sandbox.MakeRoot(); AdjustControlsForRightToLeftWritingSystem(sandbox); // this is needed for the Undo button. sandbox.SandboxChangedEvent += m_sandbox_SandboxChangedEvent; return sandbox as IAnalysisControlInternal; }
private Sandbox CreateNewSandbox(int hvoNewAnnotation, int hvoNewAnalysis) { Sandbox sandbox = new Sandbox(this.Cache, this.Mediator, this.StyleSheet, m_vc.LineChoices, hvoNewAnnotation, this); sandbox.SizeToContent = true; // Layout will ignore size. //sandbox.Mediator = Mediator; sandbox.ShowMorphBundles = m_vc.ShowMorphBundles; sandbox.StyleSheet = this.StyleSheet; sandbox.Visible = false; return sandbox; }
private void ChangeSandboxRoot(Sandbox sandbox, int hvoNewAnnotation, int hvoNewAnalysis) { sandbox.Visible = false; sandbox.SwitchWord(hvoNewAnnotation, true); }