Back to index

texmacs  1.0.7.15
Public Member Functions | Public Attributes
typesetter_rep Class Reference

#include <impl_typesetter.hpp>

Collaboration diagram for typesetter_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 typesetter_rep (edit_env &env, tree et, path ip)
void insert_stack (array< page_item > l, stack_border sb)
void insert_parunit (tree t, path ip)
void insert_paragraph (tree t, path ip)
void insert_surround (array< line_item > a, array< line_item > b)
void insert_marker (tree st, path ip)
void local_start (array< page_item > &l, stack_border &sb)
void local_end (array< page_item > &l, stack_border &sb)
void determine_page_references (box b)
box typeset ()
box typeset (SI &x1, SI &y1, SI &x2, SI &y2)

Public Attributes

edit_envenv
bridge br
rectangles change_log
array< page_iteml
stack_border sb
array< line_itema
array< line_itemb
SI x1
SI y1
SI x2
SI y2
hashmap< string, treeold_patch
bool paper

Detailed Description

Definition at line 16 of file impl_typesetter.hpp.


Constructor & Destructor Documentation

typesetter_rep::typesetter_rep ( edit_env env,
tree  et,
path  ip 
)

Definition at line 19 of file typesetter.cpp.

                                                               :
  env (env2), old_patch (UNINIT)
{
  paper= (env->get_string (PAGE_MEDIUM) == "paper");
  br= make_bridge (this, et, ip);
  x1= y1= x2= y2=0;
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 123 of file typesetter.cpp.

                                                {
  hashmap<string,tree> h ("?");
  b->collect_page_numbers (h, "?");
  iterator<string> it= iterate (h);
  while (it->busy()) {
    string var= it->next ();
    tree   val= copy (h[var]);
    tree   old= env->local_ref [var];
    if (is_func (old, TUPLE, 2))
      env->local_ref (var)= tuple (old[0], val);
    else if (is_func (old, TUPLE, 3))
      env->local_ref (var)= tuple (old[0], val, old[2]);
    else env->local_ref (var)= tuple (old, val);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void typesetter_rep::insert_marker ( tree  st,
path  ip 
)

Definition at line 77 of file typesetter.cpp.

                                               {
  (void) st;
  // if (!is_multi_paragraph (st)) {
  array<line_item> a2= typeset_marker (env, descend (ip, 0));
  array<line_item> b2= typeset_marker (env, descend (ip, 1));
  insert_surround (a2, b2);
  // }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 52 of file typesetter.cpp.

                                                 {
  // cout << "Typesetting " << t << ", " << ip << "\n";
  stack_border     temp_sb;
  array<page_item> temp_l= typeset_stack (env, t, ip, a, b, temp_sb);
  insert_stack (temp_l, temp_sb);

  /*
  int i, n= N(temp_l);
  for (i=0; i<n; i++)
    cout << i << ", "
        << temp_l[i]->b->find_lip () << ", "
        << temp_l[i]->b->find_rip () << ",\t"
        << temp_l[i]->b << "\n";
  */
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 47 of file typesetter.cpp.

                                               {
  insert_paragraph (t, ip);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 42 of file typesetter.cpp.

                                                                   {
  merge_stack (l, sb, l2, sb2);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 69 of file typesetter.cpp.

                                                                          {
  a << a2;
  array<line_item> temp_b= b;
  b= copy (b2);
  b << temp_b;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 95 of file typesetter.cpp.

                                                                          {
  array<page_item> temp_l   = l;
  stack_border     temp_sb  = sb;
  l        = prev_l;
  sb       = prev_sb;
  prev_l   = temp_l;
  prev_sb  = temp_sb;
}

Here is the caller graph for this function:

Definition at line 87 of file typesetter.cpp.

                                                                            {
  prev_l   = l;
  prev_sb  = sb;
  l        = array<page_item> ();
  sb       = stack_border ();
}

Here is the caller graph for this function:

Definition at line 140 of file typesetter.cpp.

                         {
  old_patch= hashmap<string,tree> (UNINIT);
  l        = array<page_item> ();
  sb       = stack_border ();
  a        = array<line_item> ();
  b        = array<line_item> ();
  paper    = (env->get_string (PAGE_MEDIUM) == "paper");

  // Test whether we are doing a complete typesetting
  env->complete= br->my_typeset_will_be_complete ();
  tree st= br->st;
  int i= 0, n= N(st);
  if (is_compound (st[0], "show-preamble")) { i++; env->complete= false; }
  if (is_compound (st[0], "hide-preamble")) i++;
  for (; i<n && env->complete; i++) {
    if (is_compound (st[i], "hide-part")) env->complete= false;
    if (!is_compound (st[i], "show-part")) break;
  }

  // Typeset
  if (env->complete) env->local_aux= hashmap<string,tree> (UNINIT);
  br->typeset (PROCESSED+ WANTED_PARAGRAPH);
  pager ppp= tm_new<pager_rep> (br->ip, env, l);
  box b= ppp->make_pages ();
  if (env->complete && paper) determine_page_references (b);
  tm_delete (ppp);
  env->complete= false;

  return b;
}

Here is the call graph for this function:

Here is the caller graph for this function:

box typesetter_rep::typeset ( SI x1,
SI y1,
SI x2,
SI y2 
)

Definition at line 172 of file typesetter.cpp.

                                                           {
  x1= x1b; y1= y1b; x2=x2b; y2= y2b;
  box b= typeset ();
  // cout << "-------------------------------------------------------------\n";
  b->position_at (0, 0, change_log);
  change_log= requires_update (change_log);
  rectangle r (0, 0, 0, 0);
  if (!is_nil (change_log)) r= least_upper_bound (change_log);
  x1b= r->x1; y1b= r->y1; x2b= r->x2; y2b= r->y2;
  change_log= rectangles ();
  return b;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 24 of file impl_typesetter.hpp.

Definition at line 25 of file impl_typesetter.hpp.

Definition at line 19 of file impl_typesetter.hpp.

Definition at line 20 of file impl_typesetter.hpp.

Definition at line 18 of file impl_typesetter.hpp.

Definition at line 22 of file impl_typesetter.hpp.

Definition at line 28 of file impl_typesetter.hpp.

Definition at line 29 of file impl_typesetter.hpp.

Definition at line 23 of file impl_typesetter.hpp.

Definition at line 27 of file impl_typesetter.hpp.

Definition at line 27 of file impl_typesetter.hpp.

Definition at line 27 of file impl_typesetter.hpp.

Definition at line 27 of file impl_typesetter.hpp.


The documentation for this class was generated from the following files: