Back to index

texmacs  1.0.7.15
Public Member Functions | Public Attributes | Private Attributes
stacker_rep Struct Reference

#include <stacker.hpp>

Collaboration diagram for stacker_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void set_env_vars (SI h, SI s, SI hs, SI vs, SI bot, SI top)
void print (box b, array< lazy > fl=0, int nr_cols=1)
void print (tree t, int nr_cols=1, bool before=false)
void print (space spc)
void flush ()
void penalty (int pen)
void new_paragraph (space par_sep)
void vspace_before (space spc)
void vspace_after (space spc)
void no_page_break_before ()
void no_page_break_after ()
 stacker_rep ()

Public Attributes

path ip
array< page_iteml
stack_border sb

Private Attributes

bool unit_flag
int unit_start
stack_border unit_sb
array< page_itemunit_ctrl

Detailed Description

Definition at line 20 of file stacker.hpp.


Constructor & Destructor Documentation

Definition at line 19 of file stacker.cpp.

                         :
  l (0), unit_flag (false), unit_start (0) {}

Member Function Documentation

Definition at line 334 of file stacker.cpp.

                    {
  l << unit_ctrl;
  unit_ctrl= array<page_item> (0);
}

Here is the caller graph for this function:

void stacker_rep::new_paragraph ( space  par_sep)

Definition at line 268 of file stacker.cpp.

                                         {
  if (unit_start == 0) {
    sb->vspc_before= unit_sb->vspc_before + par_sep;
    sb->vspc_after = unit_sb->vspc_after + par_sep;
    sb->nobr_before= unit_sb->nobr_before;
    sb->nobr_after = unit_sb->nobr_after;
  }
  else {
    int i= unit_start-1;
    while ((i>=0) && (l[i]->type == PAGE_CONTROL_ITEM)) i--;
    if (i<0) return;
    l[i]->spc= l[i]->spc + unit_sb->vspc_before;
    sb->vspc_after= unit_sb->vspc_after;
    if (unit_sb->nobr_before) l[i]->penalty= HYPH_INVALID;
    sb->nobr_after= unit_sb->nobr_after;
  }

  int i1= unit_start, i2= N(l)-1, mul= 100;
  while ((i1<=i2) && (mul>1)) {
    while ((i1<i2) && (l[i1]->type == PAGE_CONTROL_ITEM)) i1++;
    while ((i1<i2) && (l[i2]->type == PAGE_CONTROL_ITEM)) i2--;
    if (l[i1]->type != PAGE_CONTROL_ITEM)
      if (l[i1]->penalty < HYPH_INVALID)
       l[i1]->penalty *= mul;
    if (l[i2]->type != PAGE_CONTROL_ITEM)
      if (l[i2]->penalty < HYPH_INVALID)
       if (i1<i2) l[i2]->penalty *= mul;
    mul /= 10; i1++; i2--;
  }

  unit_sb->vspc_before= unit_sb->vspc_after;
  unit_sb->vspc_after = space (0);
  unit_sb->nobr_before= unit_sb->nobr_after;
  unit_sb->nobr_after = false;
  unit_start          = N(l);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 321 of file stacker.cpp.

                                  {
  unit_sb->nobr_after= true;
}

Here is the caller graph for this function:

Definition at line 316 of file stacker.cpp.

                                   {
  unit_sb->nobr_before= true;
}

Here is the caller graph for this function:

void stacker_rep::penalty ( int  pen)

Definition at line 326 of file stacker.cpp.

                             {
  int i= N(l)-1;
  while ((i>=0) && (l[i]->type == PAGE_CONTROL_ITEM)) i--;
  if (i<0) return;
  l[i]->penalty = pen;  
}

Here is the call graph for this function:

Here is the caller graph for this function:

void stacker_rep::print ( box  b,
array< lazy fl = 0,
int  nr_cols = 1 
)

Definition at line 189 of file stacker.cpp.

                                                      {
  int i= N(l)-1;
  while ((i>=0) && (l[i]->type == PAGE_CONTROL_ITEM)) i--;
  l << page_item (b, fl, nr_cols);
  if ((!unit_flag) && (i>=0)) {
    l[i]= copy (l[i]);
    shove (l[i], l[N(l)-1], sb, sb);
  }
  unit_flag= false;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void stacker_rep::print ( tree  t,
int  nr_cols = 1,
bool  before = false 
)

Definition at line 201 of file stacker.cpp.

                                                    {
  if (before) l << page_item (t, nr_cols);
  else unit_ctrl << page_item (t, nr_cols);
}
void stacker_rep::print ( space  spc)

Definition at line 207 of file stacker.cpp.

                             {
  int i= N(l)-1;
  while ((i>=0) && (l[i]->type == PAGE_CONTROL_ITEM)) i--;
  if (i<0) return;
  l[i]->spc = l[i]->spc + spc;
}

Here is the call graph for this function:

void stacker_rep::set_env_vars ( SI  h,
SI  s,
SI  hs,
SI  vs,
SI  bot,
SI  top 
)

Definition at line 23 of file stacker.cpp.

{
  sb->height_before = sb->height = height2;
  sb->sep_before    = sb->sep    = sep2;
  sb->hor_sep_before= sb->hor_sep= hor_sep2;
  sb->ver_sep_before= sb->ver_sep= ver_sep2;
  sb->bot           = bot2;
  sb->top           = top2;
}

Here is the caller graph for this function:

Definition at line 311 of file stacker.cpp.

                                    {
  unit_sb->vspc_after= max (unit_sb->vspc_after, spc);
}

Here is the caller graph for this function:

Definition at line 306 of file stacker.cpp.

                                     {
  unit_sb->vspc_before= max (unit_sb->vspc_before, spc);
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 21 of file stacker.hpp.

Definition at line 22 of file stacker.hpp.

Definition at line 23 of file stacker.hpp.

Definition at line 29 of file stacker.hpp.

bool stacker_rep::unit_flag [private]

Definition at line 26 of file stacker.hpp.

Definition at line 28 of file stacker.hpp.

int stacker_rep::unit_start [private]

Definition at line 27 of file stacker.hpp.


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