public SplitterPage() : base("Nested Splitters") { Padding = new BorderDouble(10); Splitter splitter1 = new Splitter(); splitter1.Panel1.AddChild(new TextWidget("left")); splitter1.Panel2.AddChild(new TextWidget("right")); AddChild(splitter1); }
public SplitterBar(Splitter splitter) { this.parentSplitter = splitter; this.Cursor = Cursors.VSplit; }
public MatterCadWidget() { SuspendLayout(); verticleSpliter = new Splitter(); { // pannel 1 stuff textSide = new FlowLayoutWidget(FlowDirection.TopToBottom); { matterScriptEditor = new TextEditWidget("", pixelWidth: 300, pixelHeight: 500, multiLine: true); matterScriptEditor.ShowBounds = true; //matterScriptEditor.LocalBounds = new rect_d(0, 0, 200, 300); textSide.AddChild(matterScriptEditor); textSide.Resize += new ResizeEventHandler(textSide_Resize); FlowLayoutWidget buttonBar = new FlowLayoutWidget(); { Button loadFile = new Button("Load Matter Script"); loadFile.Click += new ButtonBase.ButtonEventHandler(loadFile_Click); buttonBar.AddChild(loadFile); runMatterScript = new Button("Run Matter Script"); runMatterScript.Click += new ButtonBase.ButtonEventHandler(runMatterScript_Click); buttonBar.AddChild(runMatterScript); outputScad = new Button("Output SCAD"); outputScad.Click += new ButtonBase.ButtonEventHandler(outputScad_Click); buttonBar.AddChild(outputScad); } textSide.AddChild(buttonBar); } // pannel 2 stuff FlowLayoutWidget rightStuff = new FlowLayoutWidget(FlowDirection.TopToBottom); { previewWindowRayTrace = new PreviewWindowRayTrace(); rightStuff.AddChild(previewWindowRayTrace); previewWindowGL = new PreviewWindowGL(); previewWindowGL.DrawGlContent += new PreviewWindowGL.DrawGlContentEventHandler(glLightedView_DrawGlContent); rightStuff.AddChild(previewWindowGL); FlowLayoutWidget radioButtons = new FlowLayoutWidget(); { RadioButton rayTrace = new RadioButton("Ray Trace"); radioButtons.AddChild(rayTrace); RadioButton openGL = new RadioButton("OpenGL"); radioButtons.AddChild(openGL); rayTrace.CheckedStateChanged += new RadioButton.CheckedStateChangedEventHandler(rayTrace_CheckedStateChanged); openGL.CheckedStateChanged += new RadioButton.CheckedStateChangedEventHandler(openGL_CheckedStateChanged); //rayTrace.Checked = true; openGL.Checked = true; } rightStuff.AddChild(radioButtons); } verticleSpliter.Panel2.AddChild(rightStuff); verticleSpliter.Panel1.AddChild(textSide); } ResumeLayout(); AddChild(verticleSpliter); }