コード例 #1
0
 void OnSelectionChanged(List <Gwen.Control.Base> selection)
 {
     if (selection.Count > 0)
     {
         m_pPropreties.Setup(selection[0]);
     }
 }
コード例 #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);
        }
コード例 #3
0
ファイル: Document.cs プロジェクト: esdrubal/guieditor
        //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);
        }