コード例 #1
0
        public WindowWidget(GuiWidget clientArea)
        {
            windowBackground = new FlowLayoutWidget(FlowDirection.TopToBottom)
            {
                HAnchor = HAnchor.Stretch,
                VAnchor = VAnchor.Stretch,
                Margin  = new BorderDouble(grabWidth2),
            };

            AddChild(windowBackground);

            TitleBar = new TitleBarWidget(this)
            {
                Size    = new Vector2(0, 30 * GuiWidget.DeviceScale),
                HAnchor = HAnchor.Stretch,
            };
            windowBackground.AddChild(TitleBar);

            MinimumSize       = new Vector2(deviceGrabWidth * 8, deviceGrabWidth * 4 + TitleBar.Height * 2);
            WindowBorder      = new BorderDouble(1);
            WindowBorderColor = Color.Cyan;

            Position = clientArea.Position - new Vector2(deviceGrabWidth, deviceGrabWidth);
            Size     = clientArea.Size + new Vector2(deviceGrabWidth * 2, deviceGrabWidth * 2 + TitleBar.Height);

            AddGrabControls();

            ClientArea = clientArea;

            windowBackground.AddChild(ClientArea);
        }
コード例 #2
0
ファイル: WindowWidget.cs プロジェクト: jeske/agg-sharp
        public WindowWidget(RectangleDouble InBounds)
        {
            int sizeOfDragBar = 20;

            BackgroundColor = RGBA_Bytes.White;

            OriginRelativeParent = new Vector2(InBounds.Left, InBounds.Bottom);
            LocalBounds = new RectangleDouble(0, 0, InBounds.Width, InBounds.Height);

            DragBarColor = RGBA_Bytes.LightGray;
            dragBar = new TitleBarWidget(new RectangleDouble(0, InBounds.Height - sizeOfDragBar, InBounds.Width, InBounds.Height));
            //dragBar.DebugShowBounds = true;
            base.AddChild(dragBar);

            //clientArea.DebugShowBounds = true;
            base.AddChild(clientArea);
        }
コード例 #3
0
        public WindowWidget(RectangleDouble InBounds)
        {
            int sizeOfDragBar = 20;

            BackgroundColor = RGBA_Bytes.White;

            OriginRelativeParent = new Vector2(InBounds.Left, InBounds.Bottom);
            LocalBounds          = new RectangleDouble(0, 0, InBounds.Width, InBounds.Height);

            DragBarColor = RGBA_Bytes.LightGray;
            dragBar      = new TitleBarWidget(new RectangleDouble(0, InBounds.Height - sizeOfDragBar, InBounds.Width, InBounds.Height));
            //dragBar.DebugShowBounds = true;
            base.AddChild(dragBar);

            //clientArea.DebugShowBounds = true;
            base.AddChild(clientArea);
        }