示例#1
0
 protected virtual void LayoutHorizontal(Skins.Skin skin)
 {
     throw new NotImplementedException();
 }
示例#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);
 }
示例#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();
 }
示例#4
0
文件: Control.cs 项目: tritao/flood
        /// <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);
                }
            }
        }
示例#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);
 }
示例#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
 }
示例#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);
 }
示例#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);
 }
示例#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();
        }
示例#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);
 }
示例#11
0
 /// <summary>
 /// Renders the focus overlay.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void RenderFocus(Skins.Skin skin)
 {
     // nothing
 }
示例#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);
 }
示例#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);
 }
示例#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);
        }
示例#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)
 {
 }
示例#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);
 }
示例#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
 }
示例#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);
 }
示例#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);
 }
示例#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);
 }
示例#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);
 }
示例#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;
 }
示例#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);
 }
示例#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);
 }
示例#25
0
 /// <summary>
 /// Renders the focus overlay.
 /// </summary>
 /// <param name="skin">Skin to use.</param>
 protected override void RenderFocus(Skins.Skin skin)
 {
 }
示例#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);
 }
示例#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);
 }
示例#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);
 }
示例#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);
 }
示例#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]);
 }
示例#31
0
文件: Text.cs 项目: aldyjepara/flood
 /// <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);
 }