コード例 #1
0
ファイル: DockItemToolbar.cs プロジェクト: rdafoe/Cage
 internal DockItemToolbar(DockItem parentItem, PositionType position)
 {
     this.parentItem = parentItem;
     frame = new CustomFrame ();
     switch (position) {
         case PositionType.Top:
             frame.SetMargins (0, 0, 1, 1);
             frame.SetPadding (0, 2, 2, 0);
             break;
         case PositionType.Bottom:
             frame.SetMargins (0, 1, 1, 1);
             frame.SetPadding (2, 2, 2, 0);
             break;
         case PositionType.Left:
             frame.SetMargins (0, 1, 1, 0);
             frame.SetPadding (0, 0, 2, 2);
             break;
         case PositionType.Right:
             frame.SetMargins (0, 1, 0, 1);
             frame.SetPadding (0, 0, 2, 2);
             break;
     }
     this.position = position;
     if (position == PositionType.Top || position == PositionType.Bottom)
         box = new HBox (false, 3);
     else
         box = new VBox (false, 3);
     box.Show ();
     frame.Add (box);
     frame.GradientBackround = true;
 }
コード例 #2
0
        internal DockItemToolbar(DockItem parentItem, PositionType position)
        {
            this.parentItem = parentItem;
            frame           = new CustomFrame();
            switch (position)
            {
            case PositionType.Top:
                frame.SetMargins(0, 0, 1, 1);
                frame.SetPadding(0, 2, 2, 0);
                break;

            case PositionType.Bottom:
                frame.SetMargins(0, 1, 1, 1);
                frame.SetPadding(2, 2, 2, 0);
                break;

            case PositionType.Left:
                frame.SetMargins(0, 1, 1, 0);
                frame.SetPadding(0, 0, 2, 2);
                break;

            case PositionType.Right:
                frame.SetMargins(0, 1, 0, 1);
                frame.SetPadding(0, 0, 2, 2);
                break;
            }
            this.position = position;
            if (position == PositionType.Top || position == PositionType.Bottom)
            {
                box = new HBox(false, 3);
            }
            else
            {
                box = new VBox(false, 3);
            }
            box.Show();
            frame.Add(box);
            frame.GradientBackround = true;
        }