Esempio n. 1
0
  void onExecute(Context* context) override {
    Workspace* workspace = App::instance()->getMainWindow()->getWorkspace();

    std::vector<DocumentView*> docViews;
    for (auto view : *workspace) {
      DocumentView* docView = dynamic_cast<DocumentView*>(view);
      if (docView)
        docViews.push_back(docView);
    }

    for (auto docView : docViews) {
      if (!workspace->closeView(docView))
        break;
    }
  }
Esempio n. 2
0
 void onExecute(Context* context) override {
   Workspace* workspace = App::instance()->getMainWindow()->getWorkspace();
   WorkspaceView* view = workspace->activeView();
   if (view)
     workspace->closeView(view);
 }