private void UpdateSplitters(ABMCommonRoutines.enModes mode) { bool updateVerticalSplitter = false; bool updateHorizontalSplitter = false; switch (mode) { case ABMCommonRoutines.enModes.Normal: updateHorizontalSplitter = !HorizontalSplitter.ControlToHide.Visible; updateVerticalSplitter = !VerticalSplitter.ControlToHide.Visible; break; case ABMCommonRoutines.enModes.New: case ABMCommonRoutines.enModes.Edition: updateHorizontalSplitter = HorizontalSplitter.ControlToHide.Visible; break; case ABMCommonRoutines.enModes.Query: case ABMCommonRoutines.enModes.Search: updateVerticalSplitter = VerticalSplitter.ControlToHide.Visible; updateHorizontalSplitter = HorizontalSplitter.ControlToHide.Visible; break; } if (updateVerticalSplitter) { VerticalSplitter.ToggleState(); } if (updateHorizontalSplitter) { HorizontalSplitter.ToggleState(); } }
public ComplexSplitContainer(string name, Docking dock, IWidgetStyle style) : base(name, dock, style) { /*** * PanelLeft = new ScrollableContainer ("panelleft", Docking.Fill, new SplitContainerPanelStyle ()); * PanelCenter = new ScrollableContainer ("panelcenter", Docking.Fill, new SplitContainerPanelStyle ()); * PanelBottom = new ScrollableContainer ("panelbottom", Docking.Fill, new SplitContainerPanelStyle ()); * PanelRight = new ScrollableContainer ("panelright", Docking.Fill, new SplitContainerPanelStyle ()); ***/ PanelLeft = new ScrollableContainer("panelleft", Docking.Fill, new SplitContainerPanelStyle()); PanelCenter = new ScrollableContainer("panelcenter", Docking.Fill, new EmptyWidgetStyle()); PanelBottom = new ScrollableContainer("panelbottom", Docking.Fill, new EmptyWidgetStyle()); PanelRight = new ScrollableContainer("panelright", Docking.Fill, new EmptyWidgetStyle()); SplitterLeft = new VerticalSplitter("leftsplitter", new SplitContainerTransparentSplitterStyle()); SplitterBottom = new HorizontalSplitter("bottomsplitter", new SplitContainerTransparentSplitterStyle()); SplitterRight = new VerticalSplitter("rightsplitter", new SplitContainerTransparentSplitterStyle()); PanelCenter.Dock = Docking.Fill; Children.Add(SplitterLeft); Children.Add(SplitterBottom); Children.Add(SplitterRight); Children.Add(PanelLeft); Children.Add(PanelCenter); Children.Add(PanelBottom); Children.Add(PanelRight); SplitterLeft.Distance = 0.25f; SplitterBottom.Distance = -0.25f; SplitterRight.Distance = -0.25f; }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); VerticalSplitter splitter = new VerticalSplitter(this); splitter.Dock = Pos.Fill; // LeftPanel m_LeftPanel = new Base(splitter); m_LeftPanel.Dock = Pos.Fill; m_LeftPanel.Margin = new Margin(1); Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(m_LeftPanel); label.Margin = new Margin(5, 3, 5, 9); label.Text = "AltGUI.HtmlRenderer\n" + "Demos"; label.TextColor = Color.Yellow; label.AutoSizeToContents = true; label.Dock = Pos.Top; // RightPanel m_RightPanel = new Base(splitter); //m_RightPanel.DrawBorder = true; //m_RightPanel.BorderColor = Color.DodgerBlue; splitter.SetPanel(0, m_LeftPanel); splitter.SetPanel(1, m_RightPanel); splitter.SetHValue(0.2f); // ExamplesTreeView m_ExamplesTreeView = new TreeControl(m_LeftPanel); m_ExamplesTreeView.Selected += OnSamplesTreeViewAfterSelect; m_ExamplesTreeView.ShouldDrawBackground = false; m_ExamplesTreeView.Dock = Pos.Fill; // LoadSamples(); LoadCustomFonts(); }
public QuatSplitter(string name, Docking dock, IWidgetStyle style) : base(name, dock, style) { Panel1 = new ScrollableContainer("panel1", Docking.Fill, new SplitContainerPanelStyle()); Panel2 = new ScrollableContainer("panel2", Docking.Fill, new SplitContainerPanelStyle()); Panel3 = new ScrollableContainer("panel3", Docking.Fill, new SplitContainerPanelStyle()); Panel4 = new ScrollableContainer("panel4", Docking.Fill, new SplitContainerPanelStyle()); Splitter1 = new HorizontalSplitter(); Splitter2 = new VerticalSplitter(); Children.Add(Splitter1); Children.Add(Splitter2); Children.Add(Panel1); Children.Add(Panel2); Children.Add(Panel3); Children.Add(Panel4); }
protected override void OnCreated() { m_Window = View as Window; m_Folders = GetControl <TreeControl>("Folders"); m_Items = GetControl <ListBox>("Items"); m_Path = GetControl <TextBox>("Path"); m_SelectedName = GetControl <TextBox>("SelectedName"); m_Filters = GetControl <ComboBox>("Filters"); m_Ok = GetControl <Button>("Ok"); m_NewFolder = GetControl <Button>("NewFolder"); m_NameFilterSplitter = GetControl <VerticalSplitter>("NameFilterSplitter"); m_FileNameLabel = GetControl <Label>("FileNameLabel"); UpdateFolders(); m_OnClosing = false; m_CurrentFolder = CurrentDirectory; m_CurrentFilter = "*.*"; m_Filters.AddItem("All files (*.*)", "All files (*.*)", "*.*"); }
public TripleSplitContainer(string name, SplitOrientation orientation, Docking dock, IWidgetStyle style) : base(name, dock, style) { Orientation = orientation; /*** * Panel1 = new ScrollableContainer ("panel1", Docking.Fill, new SplitContainerPanelStyle ()); * Panel2 = new ScrollableContainer ("panel2", Docking.Fill, new SplitContainerPanelStyle ()); * Panel3 = new ScrollableContainer ("panel3", Docking.Fill, new SplitContainerPanelStyle ()); ***/ Panel1 = new ScrollableContainer("panel1", Docking.Fill, new EmptyWidgetStyle()); Panel2 = new ScrollableContainer("panel2", Docking.Fill, new EmptyWidgetStyle()); Panel3 = new ScrollableContainer("panel3", Docking.Fill, new EmptyWidgetStyle()); if (orientation == SplitOrientation.Horizontal) { Splitter1 = new HorizontalSplitter("splitter1", new SplitContainerTransparentSplitterStyle()); Splitter2 = new HorizontalSplitter("splitter2", new SplitContainerTransparentSplitterStyle()); } else { Splitter1 = new VerticalSplitter("splitter1", new SplitContainerTransparentSplitterStyle()); Splitter2 = new VerticalSplitter("splitter2", new SplitContainerTransparentSplitterStyle()); } Children.Add(Panel1); Children.Add(Splitter1); Children.Add(Panel2); Children.Add(Splitter2); Children.Add(Panel3); //if (distance != 0) Splitter1.Distance = 0.334f; Splitter2.Distance = 0.334f; }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); VerticalSplitter splitter = new VerticalSplitter(this); splitter.Dock = Pos.Fill; Alt.GUI.Temporary.Gwen.Control.Base leftContainer = new Alt.GUI.Temporary.Gwen.Control.Base(splitter); leftContainer.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill; leftContainer.Margin = new Alt.GUI.Temporary.Gwen.Margin(1); Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(leftContainer); label.Margin = new Alt.GUI.Temporary.Gwen.Margin(5, 3, 5, 9); label.Text = "AltGUI.ZedGraph Demos"; label.TextColor = Color.Yellow; label.AutoSizeToContents = true; label.Dock = Alt.GUI.Temporary.Gwen.Pos.Top; m_ExamplesTreeView = new TreeControl(leftContainer); m_ExamplesTreeView.Selected += NodeSelected; m_ExamplesTreeView.ShouldDrawBackground = false; m_ExamplesTreeView.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill; Base rightPanel = new Base(splitter); splitter.SetPanel(0, leftContainer); splitter.SetPanel(1, rightPanel); splitter.SetHValue(0.3f); // Caption m_Caption = new Alt.GUI.Temporary.Gwen.Control.Label(rightPanel); m_Caption.Dock = Alt.GUI.Temporary.Gwen.Pos.Top; m_Caption.AutoSizeToContents = true; m_Caption.TextColor = Color.Cyan; m_Caption.Margin = new Alt.GUI.Temporary.Gwen.Margin(2, 3, 10, 5); m_Caption.Text = ""; // InfoBox m_InfoBox = new Alt.GUI.Temporary.Gwen.Control.Label(rightPanel); m_InfoBox.Dock = Alt.GUI.Temporary.Gwen.Pos.Bottom; m_InfoBox.AutoSizeToContents = true; m_InfoBox.TextColor = Color.LightBlue; m_InfoBox.Margin = new Margin(10, 10, 10, 10); m_InfoBox.Text = ""; // ZedGraphPanel m_ZedGraphPanel = new Base(rightPanel); m_ZedGraphPanel.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill; demos = new Hashtable(); typeToNodeTable = new Hashtable(); BuildPrimaryTree(); LoadDemos(); m_ExamplesTreeView.ExpandAll(); //Init("Combo Demo"); Init("Initial Sample"); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); VerticalSplitter splitter = new VerticalSplitter(this); splitter.Dock = Pos.Fill; Alt.GUI.Temporary.Gwen.Control.Base leftContainer = new Alt.GUI.Temporary.Gwen.Control.Base(splitter); leftContainer.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill; leftContainer.Margin = new Alt.GUI.Temporary.Gwen.Margin(1); Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(leftContainer); label.Margin = new Alt.GUI.Temporary.Gwen.Margin(5, 3, 5, 9); label.Text = "AltGUI.OxyPlot Demos"; label.TextColor = Color.Yellow; label.AutoSizeToContents = true; label.Dock = Alt.GUI.Temporary.Gwen.Pos.Top; m_ExamplesTreeView = new TreeControl(leftContainer); m_ExamplesTreeView.Selected += NodeSelected; m_ExamplesTreeView.ShouldDrawBackground = false; m_ExamplesTreeView.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill; Base rightPanel = new Base(splitter); splitter.SetPanel(0, leftContainer); splitter.SetPanel(1, rightPanel); splitter.SetHValue(0.3); // Caption m_Caption = new Alt.GUI.Temporary.Gwen.Control.Label(rightPanel); m_Caption.Dock = Alt.GUI.Temporary.Gwen.Pos.Top; m_Caption.AutoSizeToContents = true; m_Caption.TextColor = Color.Cyan; m_Caption.Margin = new Alt.GUI.Temporary.Gwen.Margin(2, 3, 10, 5); m_Caption.Text = ""; // Info m_Info = new Alt.GUI.Temporary.Gwen.Control.Label(rightPanel); m_Info.Dock = Alt.GUI.Temporary.Gwen.Pos.Bottom; m_Info.AutoSizeToContents = true; m_Info.TextColor = Color.LightBlue; m_Info.Margin = new Alt.GUI.Temporary.Gwen.Margin(2, 10, 3, 5); m_Info.Text = "Use the mouse-wheel or right mouse button to manipulate with graph"; // ZedGraphPanel m_OxyPlotPanel = new Base(rightPanel); m_OxyPlotPanel.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill; PlotModel plotModel = new PlotModel(); plotModel.Annotations = null; plotModel.AutoAdjustPlotMargins = true; plotModel.Axes = null; plotModel.AxisTierDistance = 4D; plotModel.Background = null; plotModel.Culture = null; plotModel.DefaultColors = null; plotModel.DefaultFont = "Arial";//Segoe UI"; plotModel.DefaultFontSize = 12D; plotModel.IsLegendVisible = true; plotModel.LegendBackground = null; plotModel.LegendBorder = null; plotModel.LegendBorderThickness = 1D; plotModel.LegendColumnSpacing = 0D; plotModel.LegendFont = null; plotModel.LegendFontSize = 12D; plotModel.LegendFontWeight = 400D; plotModel.LegendItemAlignment = global::OxyPlot.HorizontalAlignment.Left; plotModel.LegendItemOrder = global::OxyPlot.LegendItemOrder.Normal; plotModel.LegendItemSpacing = 24D; plotModel.LegendMargin = 8D; plotModel.LegendOrientation = global::OxyPlot.LegendOrientation.Vertical; plotModel.LegendPadding = 8D; plotModel.LegendPlacement = global::OxyPlot.LegendPlacement.Inside; plotModel.LegendPosition = global::OxyPlot.LegendPosition.RightTop; plotModel.LegendSymbolLength = 16D; plotModel.LegendSymbolMargin = 4D; plotModel.LegendSymbolPlacement = global::OxyPlot.LegendSymbolPlacement.Left; plotModel.LegendTextColor = null; plotModel.LegendTitle = null; plotModel.LegendTitleColor = null; plotModel.LegendTitleFont = null; plotModel.LegendTitleFontSize = 12D; plotModel.LegendTitleFontWeight = 700D; plotModel.PlotAreaBackground = null; plotModel.PlotAreaBorderColor = null; plotModel.PlotAreaBorderThickness = 1D; plotModel.PlotType = global::OxyPlot.PlotType.XY; plotModel.Series = null; plotModel.Subtitle = null; plotModel.SubtitleColor = null; plotModel.SubtitleFont = null; plotModel.SubtitleFontSize = 14D; plotModel.SubtitleFontWeight = 400D; plotModel.TextColor = null; plotModel.Title = null; plotModel.TitleColor = null; plotModel.TitleFont = null; plotModel.TitleFontSize = 18D; plotModel.TitleFontWeight = 700D; plotModel.TitlePadding = 6D; m_Plot = new Plot(rightPanel); m_Plot.Dock = Pos.Fill; m_Plot.KeyboardPanHorizontalStep = 0.1D; m_Plot.KeyboardPanVerticalStep = 0.1D; m_Plot.Model = plotModel; m_Plot.Name = "m_Plot"; m_Plot.PanCursor = GUI.Cursors.Hand; m_Plot.ZoomHorizontalCursor = GUI.Cursors.SizeWE; m_Plot.ZoomRectangleCursor = GUI.Cursors.SizeNWSE; m_Plot.ZoomVerticalCursor = GUI.Cursors.SizeNS; // InitTree(); // Start example foreach (var ex in vm.Examples) { if (ex.Category == "HeatMapSeries" && ex.Title == "Peaks") { vm.SelectedExample = ex; InitPlot(); } } }
public ExamplesHolder(Base parent) : base(parent) { Dock = Pos.Fill; Base mainLeftContainer = new Base(this); Base leftContainer = new Base(mainLeftContainer); leftContainer.Dock = Pos.Fill; leftContainer.Margin = new Margin(1); Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(leftContainer); label.Margin = new Margin(7, 4, 5, 3); label.Text = "AltGUI Examples"; label.TextColor = Color.LimeGreen * 1.4; //label.Alignment = Pos.Center; label.AutoSizeToContents = true; label.Dock = Pos.Top; Base examplesContainer = new Base(leftContainer); examplesContainer.Dock = Pos.Fill; m_ExamplesList = new CollapsibleList(examplesContainer); m_ExamplesList.Dock = Pos.Fill; m_ExamplesList.Margin = new Margin(0, 6, 0, 3); m_ExamplesList.ShouldDrawBackground = false; m_StatusBar = new Alt.GUI.Temporary.Gwen.Control.StatusBar(this); m_StatusBar.ShouldDrawBackground = false; #if !DEBUG m_StatusBar.Hide(); #endif m_StatusBar.Dock = Pos.Bottom; m_ExamplesList.ShouldCacheToTexture = true; m_Center = new CenterControl(this); m_Center.Dock = Pos.Fill; m_Center.Margin = new Margin(1, 1, 1, 1); VerticalSplitter splitter = new VerticalSplitter(this); splitter.Dock = Pos.Fill; splitter.SetPanel(0, mainLeftContainer); splitter.SetPanel(1, m_Center); splitter.SetHValue(0.21f); Alt.GUI.Temporary.Gwen.Control.Button startButton = null; bool cat_ShouldCacheToTexture = false; { Color categoryColor = Color.Cyan * 1.2; Color color = Color.WhiteSmoke; CollapsibleCategory cat; cat = AddCategory("HTML", categoryColor); cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; //color = Color.Red; RegisterDemo("HTML/CSS2 Renderer", cat, typeof(Example_HtmlRenderer_Multi), color); //color = Color.Red; RegisterDemo("HTML/CSS2 Renderer (Bitmap)", cat, typeof(Example_HtmlRenderer_RenderToBitmap), color); } //cat.IsCollapsed = true; #if !WINDOWS_PHONE && !WINDOWS_PHONE_7 && !WINDOWS_PHONE_71 && !ANDROID && !__IOS__ || SILVERLIGHT cat = AddCategory("GIS", categoryColor); cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; // GMap.NET Intractive Demo //color = Color.CadetBlue; #if SILVERLIGHT || UNITY_WEBPLAYER RegisterDemo("GMap.NET (Interactive)", cat, typeof(Example_GMap_NotAvailable), color); #else RegisterDemo("GMap.NET (Interactive)", cat, typeof(Example_GMap), color); #endif // GMap.NET //color = Color.CadetBlue; #if SILVERLIGHT || UNITY_WEBPLAYER RegisterDemo("GMap.NET (Big Map Maker)", cat, typeof(Example_GMap_BigMapMaker_NotAvailable), color); #else RegisterDemo("GMap.NET (Big Map Maker)", cat, typeof(Example_GMap_BigMapMaker), color); #endif } //cat.IsCollapsed = true; #endif cat = AddCategory("Plot (Interactive)", categoryColor); cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; // NPlot color = Color.WhiteSmoke;// OliveDrab; RegisterDemo("NPlot", cat, typeof(Example_NPlot_Multi), color); // OxyPlot //color = Color.OliveDrab; RegisterDemo("OxyPlot", cat, typeof(Example_OxyPlot_Multi), color); // PieChart color = Color.WhiteSmoke;// OliveDrab; RegisterDemo("Pie Chart", cat, typeof(Example_PieChart), color); // ZedGraph //color = Color.OliveDrab; RegisterDemo("ZedGraph", cat, typeof(Example_ZedGraph_Multi), color); } //cat.IsCollapsed = true; cat = AddCategory("AltNETType = FreeType.NET", categoryColor);//"Drawing" cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; color = Color.WhiteSmoke; RegisterDemo("FreeType 2 Step 1", cat, typeof(Example_AltNETType_FreeType2_Step1), color); RegisterDemo("FreeType 2 Step 2 Simple", cat, typeof(Example_AltNETType_FreeType2_Step2_Simple), color); RegisterDemo("FreeType 2 Step 2 Advanced", cat, typeof(Example_AltNETType_FreeType2_Step2_Advanced), color); RegisterDemo("Simple Font Cache Manager", cat, typeof(Example_AltNETType_SimpleFontCacheManager), color); RegisterDemo("Outline Transformations", cat, typeof(Example_AltNETType_Outline_Transformations), color); RegisterDemo("Font Atlas", cat, typeof(Example_AltNETType_FontAtlas), color); } //cat.IsCollapsed = true; cat = AddCategory("Geometry (Interactive)", categoryColor); cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; // Vector Text color = Color.WhiteSmoke; startButton = RegisterDemo("Transformed Text (Single Path)", cat, typeof(Example_VectorText_TransformedCurve1), color); RegisterDemo("Transformed Text (Double Path)", cat, typeof(Example_VectorText_TransformedCurve2), color); //TEMP RegisterDemo("Vector Text Transformations", cat, typeof(Example_VectorText_Transformations), color); // Boolean RegisterDemo("Boolean (CombinedGeometry)", cat, typeof(Example_CombinedGeometry), color); // Simple SVG RegisterDemo("Simple SVG", cat, typeof(Example_SimpleSVG), color); // Lens Effect RegisterDemo("Lens Effect SVG", cat, typeof(Example_LensEffectSVG), color); // Bilinear / Perspective Transformations RegisterDemo("Bilinear / Perspective", cat, typeof(Example_Bilinear_Perspective), color); // Polar Transform RegisterDemo("Polar Transform", cat, typeof(Example_PolarTransform), color); // Sin Transform RegisterDemo("Sin Transform", cat, typeof(Example_SinTransform), color); // Outline RegisterDemo("Outline SVG", cat, typeof(Example_Outline_SVG), color); // BSpline RegisterDemo("Interactive B-Spline", cat, typeof(Example_BSpline), color); // Contour RegisterDemo("Contour Tool & Poly Orientation", cat, typeof(Example_Contour), color); // Text Outline RegisterDemo("Text Outline", cat, typeof(Example_TextOutline), color); // Affine Transformer RegisterDemo("Affine Transformer", cat, typeof(Example_AffineTransformer), color); } //cat.IsCollapsed = true; cat = AddCategory("Graphics", categoryColor);//"Drawing" cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; //#if !ANDROID //&& !SILVERLIGHT && !WINDOWS_PHONE && !WINDOWS_PHONE_7 && !WINDOWS_PHONE_71 #if !UNITY_5 // ExtBrush color = Color.WhiteSmoke; RegisterDemo("ExtBrush", cat, typeof(Example_ExtBrush), color); #endif //#endif // Clipper color = Color.WhiteSmoke; RegisterDemo("Clipper", cat, typeof(Example_Clipper), color); // SVG color = Color.WhiteSmoke; RegisterDemo("SVG", cat, typeof(Example_SVG), color); // Alpha Mask color = Color.WhiteSmoke; //TEMP RegisterDemo("Alpha Mask", cat, typeof(Example_AlphaMask), color); // Brushes color = Color.WhiteSmoke; //RegisterDemo("Brushes", cat, typeof(Example_Brushes), color); } //cat.IsCollapsed = true; cat = AddCategory("Doc", categoryColor); cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; // PdfSharp //color = Color.Red; RegisterDemo("PdfSharp", cat, typeof(Example_PdfSharp_Multi), color); } //cat.IsCollapsed = true; cat = AddCategory("Scientific Computing", categoryColor); cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; // AForge color = Color.WhiteSmoke;// OliveDrab; RegisterDemo("AForge.NET", cat, typeof(Example_AForge_Multi), color); } //cat.IsCollapsed = true; cat = AddCategory("GUI", categoryColor); cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; // Gwen color = Color.WhiteSmoke;// CadetBlue; if (Alt.Sketch.Config.Font_NoAntiAliasMaxSize < 10) { color = Color.White; } RegisterDemo("Gwen Skinned", cat, typeof(Example_Gwen_UnitTest_Skin), color); RegisterDemo("Gwen Simple", cat, typeof(Example_Gwen_UnitTest_Simple), color); // QuickFont //color = Color.LightBlue; RegisterDemo("QuickFont", cat, typeof(Example_QuickFont), color); // start long time background initialization Example_QuickFont.Initialize(); // Gif color = Color.WhiteSmoke; RegisterDemo("Animated Gif in PictureBox", cat, typeof(Example_GifInPictureBox), color); } //cat.IsCollapsed = true; cat = AddCategory("Game Physics", categoryColor); cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; // Phisics color = Color.WhiteSmoke; RegisterDemo("Box2D", cat, typeof(Example_Box2D), color); // Can't load type FarseerPhysics World (or some member of it) - needs researches #if !WINDOWS_PHONE && !WINDOWS_PHONE_7 && !WINDOWS_PHONE_71 RegisterDemo("Farseer Physics", cat, typeof(Example_FarseerPhysics), color); #endif } //cat.IsCollapsed = true; #if !WINDOWS_PHONE && !WINDOWS_PHONE_7 && !WINDOWS_PHONE_71 && !ANDROID && !__IOS__ cat = AddCategory("THIRD PARTY", categoryColor); cat.CollapsingEnabled = false; { cat.ShouldCacheToTexture = cat_ShouldCacheToTexture; // SVG color = Color.WhiteSmoke; RegisterDemo("Awesomium Web Browser", cat, typeof(Example_Awesomium), color); } //cat.IsCollapsed = true; #endif } PrintText("AltGUI Gwen Demo Started!"); OnExampleSelect(startButton); }
public CrossSplitter(ControlBase parent) : base(parent) { m_CurZoom = 0; m_Splitter = new Control.CrossSplitter(this); m_Splitter.Dock = Dock.Fill; { VerticalSplitter splitter = new VerticalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.Text = "Vertical left"; Control.Button button2 = new Control.Button(splitter); button2.Text = "Vertical right"; splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(0, splitter); } { HorizontalSplitter splitter = new HorizontalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.Text = "Horizontal up"; Control.Button button2 = new Control.Button(splitter); button2.Text = "Horizontal down"; splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(1, splitter); } { HorizontalSplitter splitter = new HorizontalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.Text = "Horizontal up"; Control.Button button2 = new Control.Button(splitter); button2.Text = "Horizontal down"; splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(2, splitter); } { VerticalSplitter splitter = new VerticalSplitter(m_Splitter); Control.Button button1 = new Control.Button(splitter); button1.Text = "Vertical left"; Control.Button button2 = new Control.Button(splitter); button2.Text = "Vertical right"; splitter.SetPanel(0, button1); splitter.SetPanel(1, button2); m_Splitter.SetPanel(3, splitter); } //Status bar to hold unit testing buttons Control.StatusBar pStatus = new Control.StatusBar(this); pStatus.Dock = Dock.Bottom; { Control.Button pButton = new Control.Button(pStatus); pButton.Text = "Zoom"; pButton.Clicked += ZoomTest; pStatus.AddControl(pButton, false); } { Control.Button pButton = new Control.Button(pStatus); pButton.Text = "UnZoom"; pButton.Clicked += UnZoomTest; pStatus.AddControl(pButton, false); } { Control.Button pButton = new Control.Button(pStatus); pButton.Text = "CenterPanels"; pButton.Clicked += CenterPanels; pStatus.AddControl(pButton, true); } { Control.Button pButton = new Control.Button(pStatus); pButton.Text = "Splitters"; pButton.Clicked += ToggleSplitters; pStatus.AddControl(pButton, true); } }
protected void Splitter2_Toggle_Status() { VerticalSplitter.ToggleState(); }
public Form1() { InitializeComponent(); var scene = new Scene(); var view0 = new DrawableView(new SceneCameraView(scene)) { ClearColor = new Color4(0.4f, 0.2f, 0.2f, 1) }; var view1 = new D2DView() { ClearColor = new Color4(0.2f, 0.4f, 0.2f, 1) }; var splitter = new VerticalSplitter(view0, view1); _disposable.Add(splitter); // setup docks var hierarchy = new SceneHierarchyContent(node => { Logger.Debug("Selected: {0}", node.Name); scene.Selected = node; }); AddContent("scene hierarchy", hierarchy, DockState.DockRight); var selected = new SelectedNodeContent(scene.SelectedObservable); AddContent("selected node", selected, DockState.DockRight); selected.DockTo(hierarchy.Pane, DockStyle.Bottom, 1); var d3d = new D3DContent(splitter); _disposable.Add(d3d); AddContent("selected", d3d, DockState.Document); var json = new JsonContent(); AddContent("json", json, DockState.DockLeft); var jsonNode = new JsonNodeContent(); AddContent("jsonnode", jsonNode, DockState.DockLeft); jsonNode.Selected.Subscribe(x => { if (x.IsValid) { var p = x.Pointer(); toolStripStatusLabel1.Text = $"{p}"; } else { toolStripStatusLabel1.Text = ""; } }); // setup scene _loader.SourceObservableOnCurrent.Subscribe(async source => { json.SetAssetSource(source); jsonNode.SetAssetSource(source); //LoadAsset(x); if (source.GLTF == null) { this.Text = ""; return; } var path = Path.GetFileName(source.Path); this.Text = $"[{path}] {source.GLTF.TriangleCount} tris"; var asset = await Task.Run(() => AssetContext.Load(source)); // update treeview hierarchy.SetTreeNode(asset); // update scene scene.Asset = asset; }); scene.Updated .ObserveOn(SynchronizationContext.Current) .Subscribe(_ => { d3d.Invalidate(); }) ; }