/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawPropertyTreeNode(this, m_Panel.X, m_Panel.Y); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawStatusBar(this); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { base.Render(skin); skin.Renderer.DrawColor = m_DrawColor; skin.Renderer.DrawTexturedRect(m_Texture, RenderBounds, m_uv[0], m_uv[1], m_uv[2], m_uv[3]); }
/// <summary> /// Renders under the actual control (shadows etc). /// </summary> /// <param name="skin">Skin to use.</param> protected override void RenderUnder(Skin.SkinBase skin) { base.RenderUnder(skin); skin.DrawShadow(this); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawTabTitleBar(this); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawPropertyTreeNode(this, m_InnerPanel.ActualLeft, m_InnerPanel.ActualTop); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void render(Skin.SkinBase skin) { skin.DrawTreeButton(this, ToggleState); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void render(Skin.SkinBase skin) { skin.DrawCategoryInner(this, headerButton.ToggleState); base.render(skin); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawCategoryInner(this, m_HeaderButton.ActualHeight, m_HeaderButton.ToggleState); base.Render(skin); }
/// <summary> /// Lays out the control's interior according to alignment, padding, dock etc. /// </summary> /// <param name="skin">Skin to use.</param> protected override void layout(Skin.SkinBase skin) { Point largestTab = new Point(5, 5); int num = 0; foreach (var child in Children) { TabButton button = child as TabButton; if (null == button) { continue; } button.SizeToContents(); Margin m = new Margin(); int notFirst = num > 0 ? -1 : 0; if (Dock == Pos.Top) { m.Left = notFirst; button.Dock = Pos.Left; } if (Dock == Pos.Left) { m.Top = notFirst; button.Dock = Pos.Top; } if (Dock == Pos.Right) { m.Top = notFirst; button.Dock = Pos.Top; } if (Dock == Pos.Bottom) { m.Left = notFirst; button.Dock = Pos.Left; } largestTab.X = Math.Max(largestTab.X, button.Width); largestTab.Y = Math.Max(largestTab.Y, button.Height); button.Margin = m; num++; } if (Dock == Pos.Top || Dock == Pos.Bottom) { SetSize(Width, largestTab.Y); } if (Dock == Pos.Left || Dock == Pos.Right) { SetSize(largestTab.X, Height); } base.layout(skin); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawNumericUpDownButton(this, IsDepressed, true); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void render(Skin.SkinBase skin) { //skin.Renderer.rnd = new Random(1); base.render(skin); needsRedraw = false; }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawWindowCloseButton(this, IsDepressed && IsHovered, IsHovered && ShouldDrawHover, !m_Window.IsOnTop); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawMenuItem(this, IsMenuOpen, m_Checkable ? m_Checked : false); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.Renderer.DrawColor = m_Color; skin.Renderer.DrawFilledRect(RenderBounds); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { base.Render(skin); if (ShouldDrawBackground) { skin.DrawTextBox(this); } if (!HasFocus) { return; } Rectangle oldClipRegion = skin.Renderer.ClipRegion; skin.Renderer.SetClipRegion(this.Container.Bounds); int verticalSize = this.LineHeight; // Draw selection.. if selected.. if (m_CursorPos != m_CursorEnd) { if (StartPoint.Y == EndPoint.Y) { Point pA = GetCharacterPosition(StartPoint); Point pB = GetCharacterPosition(EndPoint); Rectangle selectionBounds = new Rectangle(); selectionBounds.X = Math.Min(pA.X, pB.X); selectionBounds.Y = pA.Y; selectionBounds.Width = Math.Max(pA.X, pB.X) - selectionBounds.X; selectionBounds.Height = verticalSize; skin.Renderer.DrawColor = Skin.Colors.TextBox.Background_Selected; skin.Renderer.DrawFilledRect(selectionBounds); } else { /* Start */ Point pA = GetCharacterPosition(StartPoint); Point pB = GetCharacterPosition(new Point(m_Text[StartPoint.Y].Length, StartPoint.Y)); Rectangle selectionBounds = new Rectangle(); selectionBounds.X = Math.Min(pA.X, pB.X); selectionBounds.Y = pA.Y; selectionBounds.Width = Math.Max(pA.X, pB.X) - selectionBounds.X; selectionBounds.Height = verticalSize; skin.Renderer.DrawColor = Skin.Colors.TextBox.Background_Selected; skin.Renderer.DrawFilledRect(selectionBounds); /* Middle */ for (int i = 1; i < EndPoint.Y - StartPoint.Y; i++) { pA = GetCharacterPosition(new Point(0, StartPoint.Y + i)); pB = GetCharacterPosition(new Point(m_Text[StartPoint.Y + i].Length, StartPoint.Y + i)); selectionBounds = new Rectangle(); selectionBounds.X = Math.Min(pA.X, pB.X); selectionBounds.Y = pA.Y; selectionBounds.Width = Math.Max(pA.X, pB.X) - selectionBounds.X; selectionBounds.Height = verticalSize; skin.Renderer.DrawColor = Skin.Colors.TextBox.Background_Selected; skin.Renderer.DrawFilledRect(selectionBounds); } /* End */ pA = GetCharacterPosition(new Point(0, EndPoint.Y)); pB = GetCharacterPosition(EndPoint); selectionBounds = new Rectangle(); selectionBounds.X = Math.Min(pA.X, pB.X); selectionBounds.Y = pA.Y; selectionBounds.Width = Math.Max(pA.X, pB.X) - selectionBounds.X; selectionBounds.Height = verticalSize; skin.Renderer.DrawColor = Skin.Colors.TextBox.Background_Selected; skin.Renderer.DrawFilledRect(selectionBounds); } } // Draw caret float time = Platform.Platform.GetTimeInSeconds() - m_LastInputTime; if ((time % 1.0f) <= 0.5f) { skin.Renderer.DrawColor = Skin.Colors.TextBox.Caret; skin.Renderer.DrawFilledRect(m_CaretBounds); } skin.Renderer.ClipRegion = oldClipRegion; }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { base.Render(skin); m_NeedsRedraw = false; }
/// <summary> /// Function invoked after layout. /// </summary> /// <param name="skin">Skin to use.</param> protected override void postLayout(Skin.SkinBase skin) { base.postLayout(skin); handleOverflow(); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawRadioButton(this, IsChecked, IsDepressed); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void render(Skin.SkinBase skin) { }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { bool hasFocus = IsOnTop; skin.DrawToolWindow(this, m_vertical, m_vertical ? m_DragBar.ActualHeight : m_DragBar.ActualWidth); }
/// <summary> /// Lays out the control's interior according to alignment, padding, dock etc. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Layout(Skin.SkinBase skin) { m_SliderBar.SetSize(15, Height); UpdateBarFromValue(); }
/// <summary> /// Renders the focus overlay. /// </summary> /// <param name="skin">Skin to use.</param> protected override void RenderFocus(Skin.SkinBase skin) { }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawSlider(this, true, 0, m_SliderBar.Width); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void render(Skin.SkinBase skin) { skin.DrawScrollBar(this, IsHorizontal, depressed); }
protected override void RenderPanel(Skin.SkinBase skin) { base.RenderPanel(skin); skin.DrawTabControl(m_Panel); }
/// <summary> /// Lays out the control's interior according to alignment, padding, dock etc. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Layout(Skin.SkinBase skin) { MoveTo(X, Y); }
/// <summary> /// Renders the control using specified skin. /// </summary> /// <param name="skin">Skin to use.</param> protected override void Render(Skin.SkinBase skin) { skin.DrawListBox(this); }
protected override void Render(Skin.SkinBase skin) { m_StatusBar.Text = String.Format("GWEN.Net Unit Test - {0:F0} fps. {1}", Fps, Note); base.Render(skin); }
/// <summary> /// Lays out the control's interior according to alignment, padding, dock etc. /// </summary> /// <param name="skin">Skin to use.</param> protected override void layout(Skin.SkinBase skin) { button.Position(Pos.Right | Pos.CenterV, 4, 0); base.layout(skin); }