Exemple #1
0
 protected virtual void LayoutHorizontal(Skins.Skin skin)
 {
     throw new NotImplementedException();
 }
Exemple #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);
 }
Exemple #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();
 }
Exemple #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);
                }
            }
        }
Exemple #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);
 }
Exemple #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
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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();
        }
Exemple #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);
 }
Exemple #11
0
 /// <summary>
 /// Renders the focus overlay.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void RenderFocus(Skins.Skin skin)
 {
     // nothing
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
        }
Exemple #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)
 {
 }
Exemple #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);
 }
Exemple #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
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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;
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #25
0
 /// <summary>
 /// Renders the focus overlay.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void RenderFocus(Skins.Skin skin)
 {
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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]);
 }
Exemple #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);
 }