Browse Source

Add current widget attribute to application shell.

Afshin Darian 8 years ago
parent
commit
f65fa5aa26
1 changed files with 11 additions and 1 deletions
  1. 11 1
      src/application/shell.ts

+ 11 - 1
src/application/shell.ts

@@ -165,7 +165,17 @@ class ApplicationShell extends Widget {
   /**
    * A signal emitted when main area's current focus changes.
    */
-  currentChanged: ISignal<this, FocusTracker.ICurrentChangedArgs<Widget>>;
+  readonly currentChanged: ISignal<this, FocusTracker.ICurrentChangedArgs<Widget>>;
+
+  /**
+   * The current widget in the shell's main area.
+   *
+   * #### Notes
+   * This property is read-only.
+   */
+  get currentWidget(): Widget {
+    return this._dockPanel.currentWidget;
+  }
 
   /**
    * Add a widget to the top content area.