Back to index

texmacs  1.0.7.15
Public Member Functions | Public Attributes
lazy_table_rep Struct Reference
Inheritance diagram for lazy_table_rep:
Inheritance graph
[legend]
Collaboration diagram for lazy_table_rep:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 lazy_table_rep (table T2, path ip)
 operator tree ()
lazy produce (lazy_type request, format fm)
format query (lazy_type request, format fm)
virtual void append (lazy lz)

Public Attributes

table T
lazy_type type
path ip
int ref_count

Detailed Description

Definition at line 807 of file table.cpp.


Constructor & Destructor Documentation

lazy_table_rep::lazy_table_rep ( table  T2,
path  ip 
) [inline]

Definition at line 809 of file table.cpp.

: lazy_rep (LAZY_TABLE, ip), T (T2) {}

Member Function Documentation

void lazy_rep::append ( lazy  lz) [virtual, inherited]

Definition at line 92 of file formatter.cpp.

                         {
  (void) lz;
  cout << "\nThe lazy structure was " << ((tree) (*this)) << "\n";
  FAILED ("lazy structure is not a stream");
}
lazy_table_rep::operator tree ( ) [inline, virtual]

Implements lazy_rep.

Definition at line 810 of file table.cpp.

{ return "Table"; }
lazy lazy_table_rep::produce ( lazy_type  request,
format  fm 
) [virtual]

Reimplemented from lazy_rep.

Definition at line 836 of file table.cpp.

                                                     {
  //cout << "produce= " << request << "\n";
  //cout << "  format= " << fm << "\n";
  //cout << "  par= " << T->env->as_length ("1par") << "\n";
  if (request == type) return this;
  if (request == LAZY_VSTREAM) {
    if (fm->type == FORMAT_VSTREAM) {
      format_vstream fs= (format_vstream) fm;
      string s= as_string (T->var[TABLE_WIDTH]);
      if (ends (s, "par"))
       T->width= max ((SI) (as_double (s (0, N(s)-3)) * fs->width), 1);
    }
    T->position_columns ();
    T->finish_horizontal ();
    T->position_rows ();
    array<box> bs= T->var_finish ();
    tree old1= T->env->local_begin (PAR_LEFT, "0tmpt");
    tree old2= T->env->local_begin (PAR_RIGHT, "0tmpt");
    // FIXME: check whether we should also set the other
    // paragraph formatting variables, as in cell_rep::typeset
    lazy tmp= make_lazy_paragraph (T->env, bs, ip);
    T->env->local_end (PAR_RIGHT, old2);
    T->env->local_end (PAR_LEFT, old1);
    return tmp->produce (request, fm);
  }
  return lazy_rep::produce (request, fm);
}

Here is the call graph for this function:

format lazy_table_rep::query ( lazy_type  request,
format  fm 
) [virtual]

Reimplemented from lazy_rep.

Definition at line 823 of file table.cpp.

                                                   {
  //cout << "Query= " << request << "\n";
  //cout << "  format= " << fm << "\n";
  //cout << "  par= " << T->env->as_length ("1par") << "\n";
  if ((request == LAZY_BOX) && (fm->type == QUERY_VSTREAM_WIDTH)) {
    SI tmw, tlw, trw;
    T->compute_width (tmw, tlw, trw);
    return make_format_width (max (tmw, 1));
  }
  return lazy_rep::query (request, fm);
}

Here is the call graph for this function:


Member Data Documentation

path lazy_rep::ip [inherited]

Definition at line 69 of file formatter.hpp.

int abstract_struct::ref_count [inherited]

Definition at line 142 of file basic.hpp.

Definition at line 808 of file table.cpp.

Definition at line 68 of file formatter.hpp.


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