Back to index

texmacs  1.0.7.15
Classes | Typedefs | Functions
stacker.hpp File Reference
#include "formatter.hpp"
#include "typesetter.hpp"
#include "Format/stack_border.hpp"
#include "Format/page_item.hpp"
#include "Format/line_item.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  stacker_rep

Typedefs

typedef stacker_repstacker

Functions

array< page_itemtypeset_stack (edit_env env, tree t, path ip, array< line_item > a, array< line_item > b, stack_border &sb)
void merge_stack (array< page_item > &l, stack_border &sb, array< page_item > l2, stack_border sb2)

Typedef Documentation

typedef stacker_rep* stacker

Definition at line 47 of file stacker.hpp.


Function Documentation

void merge_stack ( array< page_item > &  l,
stack_border sb,
array< page_item l2,
stack_border  sb2 
)

Definition at line 219 of file stacker.cpp.

{
  int i= N(l)-1, j=0;
  while ((i >= 0) && (l[i]->type != PAGE_LINE_ITEM)) i--;
  while ((j < N(l2)) && (l2[j]->type != PAGE_LINE_ITEM)) j++;

  if (j >= N(l2)) {
    // no real lines in l2
    sb->vspc_after = max (sb->vspc_after, sb2->vspc_after);
    sb->nobr_after = sb->nobr_after || sb2->nobr_after;
  }
  else {
    if (i < 0) {
      // no real lines in l1
      sb->height_before  = sb2->height_before;
      sb->sep_before     = sb2->sep_before;
      sb->ver_sep_before = sb2->ver_sep_before;
      sb->hor_sep_before = sb2->hor_sep_before;
      sb->top            = sb2->top;
      sb->vspc_before    = max (sb->vspc_before, sb2->vspc_before);
      sb->nobr_before    = sb->nobr_before || sb2->nobr_before;
      //sb->vspc_before    = sb2->vspc_before;
      //sb->nobr_before    = sb2->nobr_before;
    }
    else {
      // normal case
      l[i]= copy (l[i]);
      shove (l[i], l2[j], sb, sb2);
      l[i]->spc= l[i]->spc + max (sb->vspc_after, sb2->vspc_before);
      if (sb->nobr_after || sb2->nobr_before) l[i]->penalty= HYPH_INVALID;
    }
    sb->height    = sb2->height;
    sb->sep       = sb2->sep;
    sb->ver_sep   = sb2->ver_sep;
    sb->hor_sep   = sb2->hor_sep;
    sb->bot       = sb2->bot;
    sb->vspc_after= sb2->vspc_after;
    sb->nobr_after= sb2->nobr_after;
  }

  l << l2;
}

Here is the call graph for this function:

Here is the caller graph for this function:

array<page_item> typeset_stack ( edit_env  env,
tree  t,
path  ip,
array< line_item a,
array< line_item b,
stack_border sb 
)

Definition at line 497 of file lazy_paragraph.cpp.

{
  // cout << "Typeset stack " << t << "\n";
  lazy_paragraph par (env, ip);
  par->a= a;
  par->a << typeset_concat_or_table (env, t, ip);
  par->a << b;
  par->format_paragraph ();
  sb= par->sss->sb;
  return par->sss->l;
}

Here is the call graph for this function:

Here is the caller graph for this function: