Back to index

texmacs  1.0.7.15
Classes | Defines | Typedefs | Functions
concater.hpp File Reference
#include "typesetter.hpp"
#include "Format/line_item.hpp"
#include "Boxes/construct.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  concater_rep

Defines

#define MODE_JUSTIFY   0
#define MODE_LEFT   1
#define MODE_CENTER   2
#define MODE_RIGHT   3

Typedefs

typedef concater_repconcater

Functions

box typeset_as_concat (edit_env env, tree t, path ip)
array< line_itemtypeset_concat (edit_env env, tree t, path ip)
array< line_itemtypeset_concat_range (edit_env env, tree t, path ip, int i1, int i2)
array< line_itemtypeset_marker (edit_env env, path ip)

Define Documentation

#define MODE_CENTER   2

Definition at line 22 of file concater.hpp.

#define MODE_JUSTIFY   0

Definition at line 20 of file concater.hpp.

#define MODE_LEFT   1

Definition at line 21 of file concater.hpp.

#define MODE_RIGHT   3

Definition at line 23 of file concater.hpp.


Typedef Documentation

Definition at line 188 of file concater.hpp.


Function Documentation

box typeset_as_concat ( edit_env  env,
tree  t,
path  ip 
)

Definition at line 761 of file concater.cpp.

                                                  {
  concater ccc= tm_new<concater_rep> (env, true);
  ccc->typeset (t, ip);
  ccc->finish ();
  array<line_item> a= ccc->a;

  int i, n=N(a);
  if (n == 0) return empty_box (ip); // FIXME: n=0 should never happen
  array<box> items (n);
  array<SI>  spc (n);
  if (n>0) {
    spc[0]=0;
    for (i=0; i<n-1; i++) {
      items[i]  = a[i]->b;
      spc  [i+1]= a[i]->spc->def;
    }
    items[i]= a[i]->b;
  }
  box b= concat_box (ip, items, spc);

  tm_delete (ccc);
  return b;
}
array<line_item> typeset_concat ( edit_env  env,
tree  t,
path  ip 
)

Definition at line 742 of file concater.cpp.

                                               {
  concater ccc= tm_new<concater_rep> (env);
  ccc->typeset (t, ip);
  ccc->finish ();
  array<line_item> a= ccc->a;
  tm_delete (ccc);
  return a;
}
array<line_item> typeset_concat_range ( edit_env  env,
tree  t,
path  ip,
int  i1,
int  i2 
)

Definition at line 752 of file concater.cpp.

                                       {
  concater ccc= tm_new<concater_rep> (env);
  ccc->marker (ip);
  array<line_item> a= ccc->a;
  tm_delete (ccc);
  return a;
}