Ejemplo n.º 1
0
        //ImportExport.Base*		m_Exporter;
        //ImportExport::Base*		m_Importer;

        public Document(Gwen.Control.Base parent, string name)
            : base(parent)
        {
            Dock    = Pos.Fill;
            Padding = new Padding(1, 1, 1, 1);

            // The main horizontal splitter separates the document from the tree/properties
            var pSplitter = new Gwen.Control.VerticalSplitter(this);

            pSplitter.Dock = Pos.Fill;
            //pSplitter.SetScaling( true, 200 );

            // The white background
            DocumentInner pInner = new DocumentInner(pSplitter);

            pInner.Dock = Pos.Fill;

            // The vertical splitter on the right containing the tree/properties
            var pRightSplitter = new Gwen.Control.HorizontalSplitter(pSplitter);

            pRightSplitter.Dock = Pos.Fill;
            pRightSplitter.SetSize(200, 200);
            //pRightSplitter.SetScaling( false, 200 );

            pSplitter.SetPanel(0, pInner);
            pSplitter.SetPanel(1, pRightSplitter);


            // The actual canvas onto which we drop controls
            Canvas                   = new DocumentCanvas(pInner);
            Canvas.Dock              = Pos.Fill;
            Canvas.HierachyChanged  += OnHierachyChanged;
            Canvas.SelectionChanged += OnSelectionChanged;


            // The controls on the right
            Hierarchy = new Hierarchy(pRightSplitter);
            Hierarchy.WatchCanvas(Canvas);
            Hierarchy.Dock = Pos.Fill;

            m_pPropreties = new ReflectionProperties(pRightSplitter); //new Properties( pRightSplitter );
            m_pPropreties.Setup(Canvas);
            m_pPropreties.Dock = Pos.Fill;

            pRightSplitter.SetPanel(0, Hierarchy);
            pRightSplitter.SetPanel(1, m_pPropreties);
        }
Ejemplo n.º 2
0
        //ImportExport.Base*		m_Exporter;
        //ImportExport::Base*		m_Importer;
        public Document(Gwen.Control.Base parent, string name)
            : base(parent)
        {
            Dock = Pos.Fill;
            Padding = new Padding( 1, 1, 1, 1 );

            // The main horizontal splitter separates the document from the tree/properties
            var pSplitter = new Gwen.Control.VerticalSplitter(this);
            pSplitter.Dock = Pos.Fill;
            //pSplitter.SetScaling( true, 200 );

            // The white background
            DocumentInner pInner = new DocumentInner(pSplitter);
            pInner.Dock = Pos.Fill;

            // The vertical splitter on the right containing the tree/properties
            var pRightSplitter = new Gwen.Control.HorizontalSplitter(pSplitter);
            pRightSplitter.Dock = Pos.Fill;
            pRightSplitter.SetSize( 200, 200 );
            //pRightSplitter.SetScaling( false, 200 );

            pSplitter.SetPanel(0,pInner);
            pSplitter.SetPanel(1,pRightSplitter);

            // The actual canvas onto which we drop controls
            Canvas = new DocumentCanvas( pInner );
            Canvas.Dock = Pos.Fill;
            Canvas.HierachyChanged += OnHierachyChanged;
            Canvas.SelectionChanged += OnSelectionChanged;

            // The controls on the right
            Hierarchy = new Hierarchy( pRightSplitter );
            Hierarchy.WatchCanvas( Canvas );
            Hierarchy.Dock = Pos.Fill;

            m_pPropreties = new ReflectionProperties(pRightSplitter); //new Properties( pRightSplitter );
            m_pPropreties.Setup(Canvas);
            m_pPropreties.Dock = Pos.Fill;

            pRightSplitter.SetPanel(0, Hierarchy);
            pRightSplitter.SetPanel(1, m_pPropreties);
        }
Ejemplo n.º 3
0
        public CrossSplitter(Base parent)
            : base(parent)
        {
            m_CurZoom = 0;

            m_Splitter = new Control.CrossSplitter(this);
            m_Splitter.SetPosition(0, 0);
            m_Splitter.Dock = Pos.Fill;

            {
                VerticalSplitter splitter = new VerticalSplitter(m_Splitter);
                Control.Button button1 = new Control.Button(splitter);
                button1.SetText("Vertical left");
                Control.Button button2 = new Control.Button(splitter);
                button2.SetText("Vertical right");
                splitter.SetPanel(0, button1);
                splitter.SetPanel(1, button2);
                m_Splitter.SetPanel(0, splitter);
            }

            {
                HorizontalSplitter splitter = new HorizontalSplitter(m_Splitter);
                Control.Button button1 = new Control.Button(splitter);
                button1.SetText("Horizontal up");
                Control.Button button2 = new Control.Button(splitter);
                button2.SetText("Horizontal down");
                splitter.SetPanel(0, button1);
                splitter.SetPanel(1, button2);
                m_Splitter.SetPanel(1, splitter);
            }

            {
                HorizontalSplitter splitter = new HorizontalSplitter(m_Splitter);
                Control.Button button1 = new Control.Button(splitter);
                button1.SetText("Horizontal up");
                Control.Button button2 = new Control.Button(splitter);
                button2.SetText("Horizontal down");
                splitter.SetPanel(0, button1);
                splitter.SetPanel(1, button2);
                m_Splitter.SetPanel(2, splitter);
            }

            {
                VerticalSplitter splitter = new VerticalSplitter(m_Splitter);
                Control.Button button1 = new Control.Button(splitter);
                button1.SetText("Vertical left");
                Control.Button button2 = new Control.Button(splitter);
                button2.SetText("Vertical right");
                splitter.SetPanel(0, button1);
                splitter.SetPanel(1, button2);
                m_Splitter.SetPanel(3, splitter);
            }

            //Status bar to hold unit testing buttons
            Control.StatusBar pStatus = new Control.StatusBar(this);
            pStatus.Dock = Pos.Bottom;

            {
                Control.Button pButton = new Control.Button(pStatus);
                pButton.SetText("Zoom");
                pButton.Clicked += ZoomTest;
                pStatus.AddControl(pButton, false);
            }

            {
                Control.Button pButton = new Control.Button(pStatus);
                pButton.SetText("UnZoom");
                pButton.Clicked += UnZoomTest;
                pStatus.AddControl(pButton, false);
            }

            {
                Control.Button pButton = new Control.Button(pStatus);
                pButton.SetText("CenterPanels");
                pButton.Clicked += CenterPanels;
                pStatus.AddControl(pButton, true);
            }

            {
                Control.Button pButton = new Control.Button(pStatus);
                pButton.SetText("Splitters");
                pButton.Clicked += ToggleSplitters;
                pStatus.AddControl(pButton, true);
            }
        }