Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CrossSplitter"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public CrossSplitter(ControlBase parent)
            : base(parent)
        {
            m_Sections = new ControlBase[4];

            m_VSplitter = new SplitterBar(this);
            m_VSplitter.SetPosition(0, 128);
            m_VSplitter.Dragged += OnVerticalMoved;
            m_VSplitter.Cursor   = Cursors.SizeNS;

            m_HSplitter = new SplitterBar(this);
            m_HSplitter.SetPosition(128, 0);
            m_HSplitter.Dragged += OnHorizontalMoved;
            m_HSplitter.Cursor   = Cursors.SizeWE;

            m_CSplitter = new SplitterBar(this);
            m_CSplitter.SetPosition(128, 128);
            m_CSplitter.Dragged += OnCenterMoved;
            m_CSplitter.Cursor   = Cursors.SizeAll;

            m_HVal = 0.5f;
            m_VVal = 0.5f;

            SetPanel(0, null);
            SetPanel(1, null);
            SetPanel(2, null);
            SetPanel(3, null);

            SplitterSize     = 5;
            SplittersVisible = false;

            m_ZoomedSection = -1;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CrossSplitter"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public CrossSplitter(ControlBase parent)
            : base(parent)
        {
            sections = new ControlBase[4];

            vSplitter = new SplitterBar(this);
            vSplitter.SetPosition(0, 128);
            vSplitter.Dragged += onVerticalMoved;
            vSplitter.Cursor   = Cursors.SizeNS;

            hSplitter = new SplitterBar(this);
            hSplitter.SetPosition(128, 0);
            hSplitter.Dragged += onHorizontalMoved;
            hSplitter.Cursor   = Cursors.SizeWE;

            cSplitter = new SplitterBar(this);
            cSplitter.SetPosition(128, 128);
            cSplitter.Dragged += onCenterMoved;
            cSplitter.Cursor   = Cursors.SizeAll;

            hVal = 0.5f;
            vVal = 0.5f;

            SetPanel(0, null);
            SetPanel(1, null);
            SetPanel(2, null);
            SetPanel(3, null);

            SplitterSize     = 5;
            SplittersVisible = false;

            zoomedSection = -1;
        }
Example #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Properties" /> class.
 /// </summary>
 /// <param name="parent">Parent control.</param>
 public Properties(Base parent) : base(parent)
 {
     mSplitterBar = new SplitterBar(this);
     mSplitterBar.SetPosition(80, 0);
     mSplitterBar.Cursor   = Cursors.SizeWe;
     mSplitterBar.Dragged += OnSplitterMoved;
     mSplitterBar.ShouldDrawBackground = false;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Properties"/> class.
 /// </summary>
 /// <param name="parent">Parent control.</param>
 public Properties(ControlBase parent)
     : base(parent)
 {
     splitterBar = new SplitterBar(this);
     splitterBar.SetPosition(80, 0);
     splitterBar.Cursor   = Cursors.SizeWE;
     splitterBar.Dragged += onSplitterMoved;
     splitterBar.ShouldDrawBackground = false;
 }
Example #5
0
 // todo: rename?
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyTable"/> class.
 /// </summary>
 /// <param name="parent">Parent control.</param>
 public PropertyTable(ControlBase parent, int StartingBarPosition = 80)
     : base(parent)
 {
     Width         = StartingBarPosition + 50;
     m_SplitterBar = new SplitterBar(null);
     m_SplitterBar.SetPosition(StartingBarPosition, 0);
     m_SplitterBar.Cursor   = Cursors.SizeWE;
     m_SplitterBar.Dragged += OnSplitterMoved;
     m_SplitterBar.ShouldDrawBackground = false;
     PrivateChildren.Add(m_SplitterBar);
     m_Panel.AutoSizeToContents = true;
 }
Example #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Properties"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public Properties(ControlBase parent)
            : base(parent)
        {
            m_SplitterBar          = new SplitterBar(this);
            m_SplitterBar.Width    = 3;
            m_SplitterBar.Cursor   = Cursor.SizeWE;
            m_SplitterBar.Dragged += OnSplitterMoved;
            m_SplitterBar.ShouldDrawBackground = false;

            m_LabelWidth = DefaultLabelWidth;

            m_InnerPanel = new Layout.VerticalLayout(this);
        }
Example #7
0
        public Splitter()
        {
            splitterBar = new SplitterBar(this)
            {
                BackgroundColor = Color.Transparent,
                Width           = 6,
            };

            SplitterDistance = 120;

            AddChild(Panel1);
            AddChild(Panel2);
            AddChild(splitterBar);

            AnchorAll();
        }
Example #8
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CrossSplitter"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public VerticalSplitter(ControlBase parent)
            : base(parent)
        {
            m_Sections = new ControlBase[2];

            m_HSplitter          = new SplitterBar(this);
            m_HSplitter.Dragged += OnHorizontalMoved;
            m_HSplitter.Cursor   = Cursor.SizeWE;

            m_HVal = 0.5f;

            SetPanel(0, null);
            SetPanel(1, null);

            SplitterSize     = 5;
            SplittersVisible = false;

            m_ZoomedSection = -1;
        }
Example #9
0
        private int mZoomedSection; // 0-1

        /// <summary>
        ///     Initializes a new instance of the <see cref="CrossSplitter" /> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public HorizontalSplitter(Base parent) : base(parent)
        {
            mSections = new Base[2];

            mVSplitter = new SplitterBar(this);
            mVSplitter.SetPosition(0, 128);
            mVSplitter.Dragged += OnVerticalMoved;
            mVSplitter.Cursor   = Cursors.SizeNs;

            mVVal = 0.5f;

            SetPanel(0, null);
            SetPanel(1, null);

            SplitterSize     = 5;
            SplittersVisible = false;

            mZoomedSection = -1;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CrossSplitter"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public HorizontalSplitter(ControlBase parent)
            : base(parent)
        {
            sections = new ControlBase[2];

            vSplitter = new SplitterBar(this);
            vSplitter.SetPosition(0, 128);
            vSplitter.Dragged += onVerticalMoved;
            vSplitter.Cursor   = Cursors.SizeNS;

            vVal = 0.5f;

            SetPanel(0, null);
            SetPanel(1, null);

            SplitterSize     = 5;
            SplittersVisible = false;

            zoomedSection = -1;
        }
Example #11
0
 private void UpdateHSplitter(SplitterBar split)
 {
     split.MoveTo((Width - split.Width) * (m_HVal[m_HSplitter.IndexOf(split)]), split.Y);
 }