Beispiel #1
0
        internal TabStrip()
        {
            var xbox = new HBox();

            Add(xbox);

            vBox = new TabStripVBox()
            {
                TabStrip = this
            };
            hBox = new TabStripHBox()
            {
                TabStrip = this
            };
            box = hBox;

            xbox.PackStart(hBox as Widget, false, false, 0);
            xbox.PackStart(vBox as Widget, false, false, 0);

            ShowAll();
            vBox.Hide();
            bottomFiller.Hide();
            BottomPadding = 3;
            WidthRequest  = 0;

            box.TabRemoved += HandleRemoved;
        }
Beispiel #2
0
        public void Flip()
        {
            var a = isVertical ? vBox : hBox;
            var b = isVertical ? hBox : vBox;

            a.TabRemoved -= HandleRemoved;

            while (a.Children.Count() > 0)
            {
                var child = a.Children.First();
                a.Remove(child);
                b.Add(child);
                if (child is DockItemTitleTab)
                {
                    (child as DockItemTitleTab).UpdateBehavior();
                }
            }

            box.Hide();
            box             = b;
            box.TabRemoved += HandleRemoved;
            box.Show();
            box.QueueDraw();
            QueueResize();

            var dc = Parent as DockContainer;

            if (dc != null)
            {
                dc.RecalcLayout();
            }
        }