Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
 /// <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]);
 }
Ejemplo n.º 4
0
 /// <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);
 }
Ejemplo n.º 5
0
 /// <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);
 }
Ejemplo n.º 6
0
 /// <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);
 }
Ejemplo n.º 7
0
 /// <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);
 }
Ejemplo n.º 8
0
 /// <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);
 }
Ejemplo n.º 9
0
 /// <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);
 }
Ejemplo n.º 10
0
        /// <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);
        }
Ejemplo n.º 11
0
 /// <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);
 }
Ejemplo n.º 12
0
 /// <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;
 }
Ejemplo n.º 13
0
 /// <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);
 }
Ejemplo n.º 14
0
 /// <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);
 }
Ejemplo n.º 15
0
 /// <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);
 }
Ejemplo n.º 16
0
        /// <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;
        }
Ejemplo n.º 17
0
 /// <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;
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Function invoked after layout.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void postLayout(Skin.SkinBase skin)
 {
     base.postLayout(skin);
     handleOverflow();
 }
Ejemplo n.º 19
0
 /// <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);
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void render(Skin.SkinBase skin)
 {
 }
Ejemplo n.º 21
0
        /// <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();
 }
Ejemplo n.º 23
0
 /// <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);
 }
Ejemplo n.º 25
0
 /// <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);
 }
Ejemplo n.º 26
0
 protected override void RenderPanel(Skin.SkinBase skin)
 {
     base.RenderPanel(skin);
     skin.DrawTabControl(m_Panel);
 }
Ejemplo n.º 27
0
 /// <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);
 }
Ejemplo n.º 28
0
 /// <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);
 }
Ejemplo n.º 29
0
        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);
        }
Ejemplo n.º 30
0
 /// <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);
 }