public RmlWidgetComponent(RmlView view, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.AnomalousMvc.RmlView.RmlWidgetComponent.layout", viewHost) { this.context = context; this.eventController = view.createRocketEventController(context, viewHost); rmlImage = (ImageBox)widget; rocketWidget = new RocketWidget(rmlImage, viewHost.View.Transparent, false); imageHeight = widget.Height; imageWidth = widget.Width; if (view.RmlFile != null) { startRmlUpdate(); if (view.RmlFile != null) { rocketWidget.Context.ZoomLevel = view.ZoomLevel; documentName = RocketInterface.createValidFileUrl(context.ResourceProvider.getFullFilePath(view.RmlFile)); using (ElementDocument document = rocketWidget.Context.LoadDocument(documentName)) { if (document != null) { document.Show(); rocketWidget.removeFocus(); rocketWidget.renderOnNextFrame(); } } } endRmlUpdate(); } view._fireComponentCreated(this); }
internal void fireViewHostCreated(MyGUIViewHost viewHost) { if (ViewHostCreated != null) { ViewHostCreated.Invoke(viewHost); } }
public NavigationComponent(NavigationView view, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.AnomalousMvc.NavigationView.NavigationComponent.layout", viewHost) { this.view = view; this.context = context; iconScrollView = (ScrollView)widget; IntSize2 size = iconScrollView.CanvasSize; size.Width = CaptionPadding; iconScrollView.CanvasSize = size; }
public NotesGUI(NotesView wizardView, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.DistortionWizard.Notes.NotesGUI.layout", wizardView, context, viewHost) { stateNameTextBox = widget.findWidget("Notes/DistortionName") as EditBox; stateNameTextBox.EventEditTextChange += new MyGUIEvent(stateNameTextBox_EventEditTextChange); datePicker = widget.findWidget("Notes/DateCreated") as EditBox; distortionWizard = widget.findWidget("Notes/DistortionWizard") as EditBox; notes = widget.findWidget("Notes/NotesText") as EditBox; notes.EventEditTextChange += new MyGUIEvent(notes_EventEditTextChange); thumbnailPicker = new ThumbnailPickerGUI(context.ImageRenderer, widget.findWidget("Notes/Thumbnails") as ScrollView); thumbnailPicker.SelectedThumbnailChanged += thumbnailPicker_SelectedThumbnailChanged; }
public ViewHost createViewHost(View view, AnomalousMvcContext context) { MyGUIView myGUIView = view as MyGUIView; if (myGUIView != null) { MyGUIViewHost viewHost = new MyGUIViewHost(context, myGUIView); viewHost.setTopComponent(componentFactory.createViewHostComponent(myGUIView, context, viewHost)); myGUIView.fireViewHostCreated(viewHost); return(viewHost); } return(null); }
public DopplerGUI(DopplerView wizardView, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.DistortionWizard.Doppler.DopplerGUI.layout", wizardView, context, viewHost) { dopplerControl = new DopplerControl(widget); dopplerControl.CurrentStageChanged += new EventHandler(dopplerControl_CurrentStageChanged); this.presetSubDirectory = wizardView.PresetDirectory; lateralJointCameraButton = widget.findWidget("DopplerPanel/LateralJointCamera") as Button; superiorJointCameraButton = widget.findWidget("DopplerPanel/SuperiorJointCamera") as Button; bothJointsCameraButton = widget.findWidget("DopplerPanel/BothJointsCamera") as Button; lateralJointCameraButton.MouseButtonClick += new MyGUIEvent(lateralJointCameraButton_MouseButtonClick); superiorJointCameraButton.MouseButtonClick += new MyGUIEvent(superiorJointCameraButton_MouseButtonClick); bothJointsCameraButton.MouseButtonClick += new MyGUIEvent(bothJointsCameraButton_MouseButtonClick); }
public ViewHostComponent createViewHostComponent(MyGUIView view, AnomalousMvcContext context, MyGUIViewHost viewHost) { WizardView wizardView = view as WizardView; if (wizardView != null) { wizardView.TeethToolController = teethToolController; ViewHostComponent component = wizardView.createViewHost(context, viewHost); return(component); } return(null); }
public TeethHeightAdaptationGUI(TeethHeightAdaptationView wizardView, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.DistortionWizard.Teeth.TeethHeightAdaptationGUI.layout", wizardView, context, viewHost) { gridPropertiesControl = new GridPropertiesControl(context.MeasurementGrid, widget); gridPropertiesControl.GridSpacing = 2; startingPickingMode = context.AnatomyController.PickingMode; context.AnatomyController.PickingMode = AnatomyPickingMode.None; heightControl = new HeightControl(widget.findWidget("TeethAdaptPanel/LeftSideSlider") as ScrollBar, widget.findWidget("TeethAdaptPanel/RightSideSlider") as ScrollBar, widget.findWidget("TeethAdaptPanel/BothSidesSlider") as ScrollBar); teethMovementPanel = new TeethMovementGUI(widget, wizardView, context); undoButton = widget.findWidget("TeethAdaptPanel/UndoButton") as Button; makeNormalButton = widget.findWidget("TeethAdaptPanel/MakeNormalButton") as Button; undoButton.MouseButtonClick += new MyGUIEvent(undoButton_MouseButtonClick); makeNormalButton.MouseButtonClick += new MyGUIEvent(makeNormalButton_MouseButtonClick); }
public override ViewHostComponent createViewHost(AnomalousMvcContext context, MyGUIViewHost viewHost) { return(new ScrollViewDecorator(new LeftCondylarDegenerationGUI(this, context, viewHost))); }
public BoneManipulatorGUI(String panelFile, WizardViewType view, AnomalousMvcContext context, MyGUIViewHost viewHost) : base(panelFile, view, context, viewHost) { }
public override ViewHostComponent createViewHost(AnomalousMvcContext context, MyGUIViewHost viewHost) { return(new NotesGUI(this, context, viewHost)); }
public WizardComponent(String layoutFile, WizardViewType view, AnomalousMvcContext context, MyGUIViewHost viewHost) : base(layoutFile, viewHost) { this.wizardView = view; this.context = context; }
public abstract ViewHostComponent createViewHost(AnomalousMvcContext context, MyGUIViewHost viewHost);
public override ViewHostComponent createViewHost(AnomalousMvcContext context, MyGUIViewHost viewHost) { return(new ScrollViewDecorator(new RemoveTeethGUI("Medical.GUI.DistortionWizard.Teeth.RemoveTopTeethGUI.layout", this, context, viewHost))); }
public TeethAdaptationGUI(TeethAdaptationView wizardView, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.DistortionWizard.Teeth.TeethAdaptationGUI.layout", wizardView, context, viewHost) { gridPropertiesControl = new GridPropertiesControl(context.MeasurementGrid, widget); gridPropertiesControl.GridSpacing = 2; startingPickingMode = context.AnatomyController.PickingMode; context.AnatomyController.PickingMode = AnatomyPickingMode.None; teethMovementPanel = new TeethMovementGUI(widget, wizardView, context); undoButton = widget.findWidget("TeethAdaptationPanel/UndoButton") as Button; resetButton = widget.findWidget("TeethAdaptationPanel/ResetButton") as Button; undoButton.MouseButtonClick += new MyGUIEvent(undoButton_MouseButtonClick); resetButton.MouseButtonClick += new MyGUIEvent(resetButton_MouseButtonClick); }
public override ViewHostComponent createViewHost(AnomalousMvcContext context, MyGUIViewHost viewHost) { return(new ScrollViewDecorator(new DiscSpaceGUI(StateDirectory, this, context, viewHost))); }
public override ViewHostComponent createViewHost(AnomalousMvcContext context, MyGUIViewHost viewHost) { return(new ScrollViewDecorator(new FossaGUI("RightFossa", "Medical.GUI.DistortionWizard.Fossa.FossaGUIRight.layout", this, context, viewHost))); }
public ViewHostComponent createViewHostComponent(MyGUIView view, AnomalousMvcContext context, MyGUIViewHost viewHost) { if (view is NavigationBugView) { return(new NavigationBugComponent((NavigationBugView)view, context, viewHost)); } return(null); }
public override ViewHostComponent createViewHost(AnomalousMvcContext context, MyGUIViewHost viewHost) { return(new ScrollViewDecorator(new DopplerGUI(this, context, viewHost))); }
public ViewHostComponent createViewHostComponent(MyGUIView view, AnomalousMvcContext context, MyGUIViewHost viewHost) { ViewHostComponent component = null; foreach (ViewHostComponentFactory factory in concreteComponentFactories) { component = factory.createViewHostComponent(view, context, viewHost); if (component != null) { break; } } if (component == null) { return(component); } switch (view.ElementName.ViewType) { case ViewType.Window: MDIDialogDecorator dialogDecorator = new MDIDialogDecorator(mdiManager, component, view); switch (view.ElementName.LocationHint) { case ViewLocations.Left: dialogDecorator.CurrentDockLocation = DockLocation.Left; break; case ViewLocations.Right: dialogDecorator.CurrentDockLocation = DockLocation.Right; break; case ViewLocations.Top: dialogDecorator.CurrentDockLocation = DockLocation.Top; break; case ViewLocations.Bottom: dialogDecorator.CurrentDockLocation = DockLocation.Bottom; break; case ViewLocations.Floating: dialogDecorator.CurrentDockLocation = DockLocation.Floating; break; } component = dialogDecorator; break; case ViewType.Panel: switch (view.ElementName.LocationHint) { case ViewLocations.Left: component = new SidePanelDecorator(component, view.Buttons, view.Transparent); break; case ViewLocations.Right: component = new SidePanelDecorator(component, view.Buttons, view.Transparent); break; case ViewLocations.Top: component = new TopBottomPanelDecorator(component, view.Buttons, view.Transparent); break; case ViewLocations.Bottom: component = new TopBottomPanelDecorator(component, view.Buttons, view.Transparent); break; case ViewLocations.Floating: component = new FloatingPanelDecorator(component, view.Buttons, view); break; } break; } return(component); }
public ProfileDistortionGUI(ProfileDistortionView wizardView, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.DistortionWizard.Profile.ProfileDistortionGUI.layout", wizardView, context, viewHost) { rightSideCamera = widget.findWidget("ProfilePanel/RightCamera") as Button; rightMidCamera = widget.findWidget("ProfilePanel/RightMidCamera") as Button; midlineCamera = widget.findWidget("ProfilePanel/MidlineCamera") as Button; leftMidCamera = widget.findWidget("ProfilePanel/MidLeftCamera") as Button; leftSideCamera = widget.findWidget("ProfilePanel/LeftCamera") as Button; rightSideCamera.MouseButtonClick += new MyGUIEvent(rightSideCamera_MouseButtonClick); rightMidCamera.MouseButtonClick += new MyGUIEvent(rightMidCamera_MouseButtonClick); midlineCamera.MouseButtonClick += new MyGUIEvent(midlineCamera_MouseButtonClick); leftMidCamera.MouseButtonClick += new MyGUIEvent(leftMidCamera_MouseButtonClick); leftSideCamera.MouseButtonClick += new MyGUIEvent(leftSideCamera_MouseButtonClick); heightControl = new HeightControl(widget.findWidget("ProfilePanel/LeftSideSlider") as ScrollBar, widget.findWidget("ProfilePanel/RightSideSlider") as ScrollBar, widget.findWidget("ProfilePanel/BothSidesSlider") as ScrollBar); adaptButton = new CheckButton(widget.findWidget("ProfilePanel/AdaptButton") as Button); adaptButton.CheckedChanged += new MyGUIEvent(adaptButton_CheckedChanged); undoButton = widget.findWidget("ProfilePanel/UndoButton") as Button; makeNormalButton = widget.findWidget("ProfilePanel/MakeNormalButton") as Button; undoButton.MouseButtonClick += new MyGUIEvent(undoButton_MouseButtonClick); makeNormalButton.MouseButtonClick += new MyGUIEvent(makeNormalButton_MouseButtonClick); }
public RightCondylarDegenerationGUI(RightCondylarDegenerationView wizardView, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.DistortionWizard.Mandible.RightCondylarDegenerationGUI.layout", wizardView, context, viewHost) { rightCondyleDegenerationSlider = new BoneManipulatorSlider(widget.findWidget("RightCondyleDegen/CondyleSlider") as ScrollBar); rightLateralPoleSlider = new BoneManipulatorSlider(widget.findWidget("RightCondyleDegen/LateralPoleSlider") as ScrollBar); rightMedialPoleScaleSlider = new BoneManipulatorSlider(widget.findWidget("RightCondyleDegen/MedialPoleSlider") as ScrollBar); wearSlider = new BoneManipulatorSlider(widget.findWidget("RightCondyleDegen/WearSlider") as ScrollBar); addBoneManipulator(rightCondyleDegenerationSlider); addBoneManipulator(rightLateralPoleSlider); addBoneManipulator(rightMedialPoleScaleSlider); addBoneManipulator(wearSlider); wearSlider.ValueChanged += new EventHandler(wearSlider_ValueChanged); rightCondyleDegenerationSlider.ValueChanged += new EventHandler(otherSliders_ValueChanged); rightLateralPoleSlider.ValueChanged += new EventHandler(otherSliders_ValueChanged); rightMedialPoleScaleSlider.ValueChanged += new EventHandler(otherSliders_ValueChanged); undoButton = widget.findWidget("RightCondyleDegen/UndoButton") as Button; makeNormalButton = widget.findWidget("RightCondyleDegen/MakeNormalButton") as Button; undoButton.MouseButtonClick += new MyGUIEvent(undoButton_MouseButtonClick); makeNormalButton.MouseButtonClick += new MyGUIEvent(makeNormalButton_MouseButtonClick); gridPropertiesControl = new GridPropertiesControl(context.MeasurementGrid, widget); gridPropertiesControl.GridSpacing = 5; }
public DiscSpaceGUI(String subDirectory, DiscSpaceView wizardView, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.DistortionWizard.DiscSpace.DiscSpaceGUI.layout", wizardView, context, viewHost) { this.subDirectory = subDirectory; discSpaceControl = new DiscSpaceControl(widget); discSpaceControl.CurrentStageChanged += new EventHandler(discSpaceControl1_CurrentStageChanged); showDiscCheckBox = new CheckButton(widget.findWidget("DiscSpace/ShowDisc") as Button); showDiscCheckBox.CheckedChanged += new MyGUIEvent(showDiscCheckBox_CheckedChanged); Button resetButton = widget.findWidget("DiscSpace/Reset") as Button; resetButton.MouseButtonClick += new MyGUIEvent(resetButton_MouseButtonClick); }
public ViewHostComponent createViewHostComponent(MyGUIView view, AnomalousMvcContext context, MyGUIViewHost viewHost) { if (view is RmlView) { return(new RmlWidgetComponent((RmlView)view, context, viewHost)); } else if (view is RawRmlView) { return(new RmlWidgetComponent((RawRmlView)view, context, viewHost)); } return(null); }
public RemoveTeethGUI(String layoutFile, WizardView wizardView, AnomalousMvcContext context, MyGUIViewHost viewHost) : base(layoutFile, wizardView, context, viewHost) { Widget toothPanel = widget.findWidget("ToothPanel"); uint numChildren = toothPanel.ChildCount; for (uint i = 0; i < numChildren; ++i) { Button toothGUIButton = toothPanel.getChildAt(i) as Button; if (toothGUIButton != null) { ToothButton toothButton = new ToothButton(toothGUIButton); toothButtons.Add(toothButton); Tooth tooth = TeethController.getTooth(toothButton.ToothName); if (tooth != null) { toothButton.Extracted = tooth.Extracted; } toothButton.ExtractedStatusChanged += new EventHandler(toothButton_ExtractedStatusChanged); } } }
public override ViewHostComponent createViewHost(AnomalousMvcContext context, MyGUIViewHost viewHost) { return(new WizardComponent <WizardView>("Medical.GUI.DistortionWizard.Disclaimer.DisclaimerGUI.layout", this, context, viewHost)); }
public FossaGUI(String fossaName, String panelFile, WizardView view, AnomalousMvcContext context, MyGUIViewHost viewHost) : base(panelFile, view, context, viewHost) { eminanceSlider = new MinMaxScroll(widget.findWidget("FlatnessSlider") as ScrollBar); eminanceSlider.Minimum = 0; eminanceSlider.Maximum = 1000; eminanceSlider.ScrollChangePosition += new MyGUIEvent(eminanceSlider_ValueChanged); this.fossaName = fossaName; Button undoButton = widget.findWidget("UndoButton") as Button; undoButton.MouseButtonClick += new MyGUIEvent(undoButton_MouseButtonClick); Button makeNormalButton = widget.findWidget("MakeNormalButton") as Button; makeNormalButton.MouseButtonClick += new MyGUIEvent(makeNormalButton_MouseButtonClick); }
public PresetStateGUI(PresetStateView wizardView, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.DistortionWizard.Preset.PresetStateGUI.layout", wizardView, context, viewHost) { this.subDirectory = wizardView.PresetDirectory; presetListView = new SingleSelectButtonGrid(widget as ScrollView); presetListView.SelectedValueChanged += presetListView_SelectedValueChanged; imageAtlas = new ImageAtlas("PresetStateGUI_" + subDirectory, new IntSize2(100, 100)); }
public LeftCondylarGrowthGUI(LeftCondylarGrowthView view, AnomalousMvcContext context, MyGUIViewHost viewHost) : base("Medical.GUI.DistortionWizard.Mandible.LeftCondylarGrowthGUI.layout", view, context, viewHost) { leftRamusHeightSlider = new BoneManipulatorSlider(widget.findWidget("LeftCondyleGrowth/RamusHeightSlider") as ScrollBar); leftCondyleHeightSlider = new BoneManipulatorSlider(widget.findWidget("LeftCondyleGrowth/CondyleHeightSlider") as ScrollBar); leftCondyleRotationSlider = new BoneManipulatorSlider(widget.findWidget("LeftCondyleGrowth/CondyleRotationSlider") as ScrollBar); leftMandibularNotchSlider = new BoneManipulatorSlider(widget.findWidget("LeftCondyleGrowth/MandibularNotchSlider") as ScrollBar); leftAntegonialNotchSlider = new BoneManipulatorSlider(widget.findWidget("LeftCondyleGrowth/AntegonialNotchSlider") as ScrollBar); addBoneManipulator(leftRamusHeightSlider); addBoneManipulator(leftCondyleHeightSlider); addBoneManipulator(leftCondyleRotationSlider); addBoneManipulator(leftMandibularNotchSlider); addBoneManipulator(leftAntegonialNotchSlider); undoButton = widget.findWidget("LeftCondyleGrowth/UndoButton") as Button; makeNormalButton = widget.findWidget("LeftCondyleGrowth/MakeNormalButton") as Button; undoButton.MouseButtonClick += new MyGUIEvent(undoButton_MouseButtonClick); makeNormalButton.MouseButtonClick += new MyGUIEvent(makeNormalButton_MouseButtonClick); gridPropertiesControl = new GridPropertiesControl(context.MeasurementGrid, widget); gridPropertiesControl.GridSpacing = 5; }
public LayoutComponent(String layoutFile, MyGUIViewHost viewHost) { layout = LayoutManager.Instance.loadLayout(layoutFile); widget = layout.getWidget(0); this.viewHost = viewHost; }