Exemplo n.º 1
0
void Workspace::onNewInputPriority(InputChainElement* newElement)
{
  WorkspaceView* view = activeView();
  InputChainElement* activeElement = (view ? view->onGetInputChainElement(): nullptr);
  if (activeElement)
    activeElement->onNewInputPriority(newElement);
}
Exemplo n.º 2
0
void Workspace::onCancel(Context* ctx)
{
  WorkspaceView* view = activeView();
  InputChainElement* activeElement = (view ? view->onGetInputChainElement(): nullptr);
  if (activeElement)
    activeElement->onCancel(ctx);
}
Exemplo n.º 3
0
void MainWindow::onContextMenuTab(Tabs* tabs, TabView* tabView)
{
  WorkspaceView* view = dynamic_cast<WorkspaceView*>(tabView);
  ASSERT(view);
  if (view)
    view->onTabPopup(m_workspace);
}
Exemplo n.º 4
0
bool MainWindow::canCloneTab(Tabs* tabs, TabView* tabView)
{
  ASSERT(tabView)

  WorkspaceView* view = dynamic_cast<WorkspaceView*>(tabView);
  return view->canCloneWorkspaceView();
}
Exemplo n.º 5
0
bool Workspace::onClear(Context* ctx)
{
  WorkspaceView* view = activeView();
  InputChainElement* activeElement = (view ? view->onGetInputChainElement(): nullptr);
  if (activeElement)
    return activeElement->onClear(ctx);
  else
    return false;
}
Exemplo n.º 6
0
void MainWindow::onCloneTab(Tabs* tabs, TabView* tabView, int pos)
{
  EditorView::SetScrollUpdateMethod(EditorView::KeepOrigin);

  WorkspaceView* view = dynamic_cast<WorkspaceView*>(tabView);
  WorkspaceView* clone = view->cloneWorkspaceView();
  ASSERT(clone);

  m_workspace->addViewToPanel(
    static_cast<WorkspaceTabs*>(tabs)->panel(), clone, true, pos);

  clone->onClonedFrom(view);
}
Exemplo n.º 7
0
void Workspace::duplicateActiveView()
{
  WorkspaceView* view = activeView();
  if (!view)
    return;

  WorkspaceView* clone = view->cloneWorkspaceView();
  if (!clone)
    return;

  WorkspacePanel* panel = getViewPanel(view);
  addViewToPanel(panel, clone, false, -1);
  clone->onClonedFrom(view);
  setActiveView(clone);
}