Back to index

texmacs  1.0.7.15
Classes | Typedefs | Functions
tm_window.hpp File Reference
#include "server.hpp"
#include "tm_buffer.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tm_window_rep
class  tm_view_rep

Typedefs

typedef tm_buffer_reptm_buffer
typedef tm_view_reptm_view
typedef tm_window_reptm_window

Functions

widget texmacs_output_widget (tree doc)
widget texmacs_input_widget (tree doc, command cmd, bool continuous)
int window_handle ()
void window_create (int win, widget wid, string name, bool plain)
void window_create (int win, widget wid, string name, command quit)
void window_delete (int win)
void window_show (int win)
void window_hide (int win)
void windows_delayed_refresh (int ms)
void windows_refresh ()

Typedef Documentation

Definition at line 88 of file tm_window.hpp.

typedef tm_view_rep* tm_view

Definition at line 89 of file tm_window.hpp.

Definition at line 90 of file tm_window.hpp.


Function Documentation

widget texmacs_input_widget ( tree  doc,
command  cmd,
bool  continuous 
)

Definition at line 145 of file tm_window.cpp.

                                                              {
  (void) cmd; (void) continuous;
  doc= enrich_embedded_document (doc);
  tm_view   curvw=  get_server () -> get_view ();
  string    name = embedded_name ();
  tm_buffer buf  = create_buffer (url (name), doc);
  tm_view   vw   = get_passive_view (buf);
  tm_window win  = tm_new<tm_window_rep> (doc, command ());
  set_aux (name, name);
  vw->win= win;
  vw->buf->buf->in_menu= false;
  set_scrollable (win->wid, vw->ed);
  vw->ed->cvw= win->wid.rep;
  vw->ed->mvw= curvw;
  return wrapped_widget (win->wid, close_embedded_command (vw));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 178 of file tm_button.cpp.

                                 {
  doc= enrich_embedded_document (doc);
  drd_info drd ("none", std_drd);
  edit_env env= get_init_environment (doc, drd);
  tree t= extract (doc, "body");
  lazy lz= make_lazy (env, t, path ());
  format vf= make_query_vstream_width (array<line_item>(), array<line_item>());
  format rf= lz->query (LAZY_BOX, vf);
  SI w= ((format_vstream) rf)->width;
  box b= (box) lz->produce (LAZY_BOX, make_format_width (w));
  //cout << (b->w()>>8) << ", " << (b->h()>>8) << "\n";
  //SI dw1= env->get_length (PAGE_SCREEN_LEFT);
  //SI dw2= env->get_length (PAGE_SCREEN_RIGHT);
  //SI dh1= env->get_length (PAGE_SCREEN_BOT);
  //SI dh2= env->get_length (PAGE_SCREEN_TOP);
  color col= light_grey;
  return widget (tm_new<box_widget_rep> (b, col, false, 5, 0, 0));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void window_create ( int  win,
widget  wid,
string  name,
bool  plain 
)

Definition at line 409 of file tm_window.cpp.

                                                             {
  widget pww;
  if (plain)
    pww= plain_window_widget (wid, name);
  else
    pww= popup_window_widget (wid, name);
  window_table (win)= pww;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void window_create ( int  win,
widget  wid,
string  name,
command  quit 
)

Definition at line 419 of file tm_window.cpp.

                                                               {
  widget pww;
  pww= plain_window_widget (wid, name, quit);
  window_table (win)= pww;
}

Here is the call graph for this function:

void window_delete ( int  win)

Definition at line 426 of file tm_window.cpp.

                        {
  ASSERT (window_table->contains (win), "window does not exist");
  widget pww= window_table [win];
  window_table->reset (win);
  destroy_window_widget (pww);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int window_handle ( )

Definition at line 403 of file tm_window.cpp.

                 {
  static int window_next= 1;
  return window_next++;
}

Here is the caller graph for this function:

void window_hide ( int  win)

Definition at line 441 of file tm_window.cpp.

                      {
  ASSERT (window_table->contains (win), "window does not exist");
  widget pww= window_table [win];
  set_visibility (pww, false);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void window_show ( int  win)

Definition at line 434 of file tm_window.cpp.

                      {
  ASSERT (window_table->contains (win), "window does not exist");
  widget pww= window_table [win];
  set_visibility (pww, true);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void windows_delayed_refresh ( int  ms)

Definition at line 448 of file tm_window.cpp.

                                 {
  refresh_time= texmacs_time () + ms;
}

Here is the call graph for this function:

void windows_refresh ( )

Definition at line 453 of file tm_window.cpp.

                   {
  if (texmacs_time () < refresh_time) return;
  iterator<int> it= iterate (window_table);
  while (it->busy ()) {
    int id= it->next ();
    send_refresh (window_table[id]);
#ifndef QTTEXMACS
    refresh_size (window_table[id], false);
#endif
  }
  windows_delayed_refresh (1000000000);
}

Here is the call graph for this function:

Here is the caller graph for this function: