Exemplo n.º 1
0
void
tm_server_rep::refresh () {
  array<url> l= windows_list ();
  for (int i=0; i<N(l); i++) {
    url u= window_to_view (l[i]);
    if (!is_none (u)) concrete_view (u)->win->refresh ();
  }
}
Exemplo n.º 2
0
void
close_embedded_command_rep::apply () {
    //cout << "Destroy " << vw->buf->buf->name << "\n";
    ASSERT (!is_nil(vw->ed), "embedded command acting on deleted editor");
    url foc= abstract_window (vw->ed->mvw->win);
    if (is_none (foc)) {
        array<url> a= windows_list ();
        ASSERT (N(a) != 0, "no remaining windows");
        foc= a[0];
    }
    window_focus (foc);
    //cout << "Changed focus\n";
    tm_window win= vw->win;
    ASSERT (N (buffer_to_views (vw->buf->buf->name)) == 1,
            "invalid cloned embedded TeXmacs widget");
    remove_buffer (vw->buf->buf->name);
    //cout << "Deleted buffer\n";
    tm_delete (win);
    //cout << "Deleted window\n";
}