예제 #1
0
        protected virtual void OnEnable()
        {
            if (this._windowAdapter == null)
            {
                this._windowAdapter = new EditorWindowAdapter(this);
            }

            this._windowAdapter.OnEnable();

            RenderBox rootRenderBox;

            using (this._windowAdapter.getScope()) {
                rootRenderBox = this.createRenderBox();
            }

            if (rootRenderBox != null)
            {
                this._windowAdapter.attachRootRenderBox(rootRenderBox);
                return;
            }

            Widget rootWidget;

            using (this._windowAdapter.getScope()) {
                rootWidget = this.createWidget();
            }

            this._windowAdapter.attachRootWidget(rootWidget);
        }
예제 #2
0
        public override IDisposable getScope() {
            WindowAdapter oldInstance = (WindowAdapter) _instance;
            _instance = this;

            if (this._binding == null) {
                this._binding = new WidgetsBinding();
            }

            SchedulerBinding._instance = this._binding;

            return new WindowDisposable(this, oldInstance);
        }
예제 #3
0
        void OnEnable() {
            if (this._windowAdapter == null) {
                this._windowAdapter = new EditorWindowAdapter(this);
            }

            this._windowAdapter.OnEnable();

            var rootRenderBox = this.rootRenderBox();
            if (rootRenderBox != null) {
                this._windowAdapter.attachRootRenderBox(rootRenderBox);
                return;
            }

            this._windowAdapter.attachRootWidget(this.rootWidget());
        }
예제 #4
0
 public WindowDisposable(WindowAdapter window)
 {
     this._window = window;
 }
예제 #5
0
 public WindowDisposable(WindowAdapter window, WindowAdapter oldWindow)
 {
     this._window    = window;
     this._oldWindow = oldWindow;
 }