예제 #1
0
        // =================================================================================
        // Display.
        // ---------------------------------------------------------------------------------
        public new void OnGUI()
        {
            // Wait until window is configured.
            if (!IsInitialized())
            {
                return;
            }

            myMainView.Display(new Rect(0, 0, position.width, position.height));
        }
        // ======================================================================
        // MainView implementation.
        // ----------------------------------------------------------------------
        void MainViewDisplay(DSCellView view, Rect displayArea)
        {
            float titleHeight = TitleAreaHeight();
            float bodyHeight  = displayArea.height - titleHeight;

            if (titleHeight >= displayArea.height)
            {
                titleHeight = displayArea.height;
                bodyHeight  = 0;
            }
            myTitleArea = new Rect(displayArea.x, displayArea.y, displayArea.width, titleHeight);
            myTitleSubview.Display(myTitleArea);
            InvokeDisplayDelegate(new Rect(displayArea.x, displayArea.y + titleHeight, displayArea.width, bodyHeight));
        }
 // ======================================================================
 // DSView implementation.
 // ----------------------------------------------------------------------
 public override void Display(Rect frameArea)
 {
     myMainView.Display(frameArea);
 }