Ejemplo n.º 1
0
 protected virtual void LayoutHorizontal(Skins.Skin skin)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawMenuItem(this, IsMenuOpen, m_Checkable ? m_Checked : false);
 }
Ejemplo n.º 3
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(Skins.Skin skin)
 {
     m_SliderBar.SetSize(15, Height);
     UpdateBarFromValue();
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Sets the control's skin.
        /// </summary>
        /// <param name="skin">New skin.</param>
        /// <param name="doChildren">Deterines whether to change children skin.</param>
        public virtual void SetSkin(Skins.Skin skin, bool doChildren = false)
        {
            if (m_Skin == skin)
                return;
            m_Skin = skin;
            Invalidate();
            Redraw();
            OnSkinChanged(skin);

            if (doChildren)
            {
                foreach (Control child in m_Children)
                {
                    child.SetSkin(skin, true);
                }
            }
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawNumericUpDownButton(this, IsDepressed, false);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     // no button look
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawPropertyTreeNode(this, m_InnerPanel.X, m_InnerPanel.Y);
 }
Ejemplo n.º 8
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(Skins.Skin skin)
 {
     UpdateScrollBars();
     base.Layout(skin);
 }
Ejemplo n.º 9
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(Skins.Skin skin)
        {
            base.Layout(skin);

            RefreshCursorBounds();
        }
Ejemplo n.º 10
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawScrollBar(this, IsHorizontal, m_Depressed);
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Renders the focus overlay.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void RenderFocus(Skins.Skin skin)
 {
     // nothing
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawComboBox(this, IsDepressed, IsOpen);
 }
Ejemplo n.º 13
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(Skins.Skin skin)
 {
     m_Button.Position(Pos.Right | Pos.CenterV, 4, 0);
     base.Layout(skin);
 }
Ejemplo n.º 14
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(Skins.Skin skin)
        {
            Vector2i largestTab = new Vector2i(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.º 15
0
 /// <summary>
 /// Renders under the actual control (shadows etc).
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void RenderUnder(Skins.Skin skin)
 {
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawCategoryInner(this, m_HeaderButton.ToggleState);
     base.Render(skin);
 }
Ejemplo n.º 17
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(Skins.Skin skin)
 {
     //TODO: We don't want to do vertical sizing the same as Menu, do nothing for now
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawSliderButton(this, IsHeld, IsHorizontal);
 }
Ejemplo n.º 19
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(Skins.Skin skin)
 {
     MoveTo(X, Y);
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawMenuDivider(this);
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawTabControl(this);
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     //skin.Renderer.rnd = new Random(1);
     base.Render(skin);
     m_NeedsRedraw = false;
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawListBoxLine(this, IsSelected, EvenRow);
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawSlider(this, true, m_SnapToNotches ? m_NotchCount : 0, m_SliderBar.Width);
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Renders the focus overlay.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void RenderFocus(Skins.Skin skin)
 {
 }
Ejemplo n.º 26
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(Skins.Skin skin)
 {
     TabStrip.IsHidden = (TabCount <= 1);
     UpdateTitleBar();
     base.Layout(skin);
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawTreeButton(this, ToggleState);
 }
Ejemplo n.º 28
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(Skins.Skin skin)
 {
     LayoutVertical(skin);
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     skin.DrawGroupBox(this, TextX, TextHeight, TextWidth);
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Renders the control using specified skin.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void Render(Skins.Skin skin)
 {
     base.Render(skin);
     skin.Renderer.DrawColor = m_DrawColor;
     skin.Renderer.DrawTexturedRect(imageHandle, RenderBounds, m_uv[0], m_uv[1], m_uv[2], m_uv[3]);
 }
Ejemplo n.º 31
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(Skins.Skin skin)
 {
     SizeToContents();
     base.Layout(skin);
 }