2
/******************************************************************************
4
* DESCRIPTION: Bridge between logical and physically typesetted document
5
* COPYRIGHT : (C) 1999 Joris van der Hoeven
6
*******************************************************************************
7
* This software falls under the GNU general public license version 3 or later.
8
* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
9
* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
10
******************************************************************************/
14
#include "typesetter.hpp"
15
#include "Concat/concater.hpp"
16
#include "Stack/stacker.hpp"
17
#include "Format/page_item.hpp"
18
#include "Page/vpenalty.hpp"
19
#include "Page/skeleton.hpp"
20
#include "Page/pager.hpp"
27
#define WANTED_PARAGRAPH 0
28
#define WANTED_PARUNIT 2
30
#define MACRO_ASSIGN 0
31
#define MACRO_INSERT 1
32
#define MACRO_REMOVE 2
35
class bridge_rep: public abstract_struct {
37
typesetter ttt; // the underlying typesetter
38
edit_env& env; // the environment
39
tree st; // the present subtree
40
path ip; // source location of the paragraph
41
int status; // status among above values
42
hashmap<string,tree> changes; // changes in the environment
44
array<page_item> l; // the typesetted lines of st
45
stack_border sb; // border properties of l
46
link_repository link_env; // loci and links declared inside bridge
49
bridge_rep (typesetter ttt, tree st, path ip);
50
inline virtual ~bridge_rep () {}
52
virtual void notify_assign (path p, tree u) = 0;
53
virtual void notify_insert (path p, tree u);
54
virtual void notify_remove (path p, int nr);
55
virtual void notify_split (path p);
56
virtual void notify_join (path p);
57
virtual bool notify_macro (int type, string var, int l, path p, tree u) = 0;
58
virtual void notify_change () = 0;
60
virtual void my_clean_links ();
61
virtual void my_exec_until (path p);
62
virtual bool my_typeset_will_be_complete ();
63
virtual void my_typeset (int desired_status);
64
virtual void exec_until (path p, bool skip_flag= false);
65
void typeset (int desired_status);
69
ABSTRACT_NULL(bridge);
70
bool operator == (bridge br2);
71
bool operator != (bridge br2);
72
friend bridge make_bridge (typesetter ttt, tree st, path ip);
73
friend void replace_bridge (bridge& br, tree st, path ip);
75
ABSTRACT_NULL_CODE(bridge);
77
bridge make_bridge (typesetter ttt, tree t, path p);
78
ostream& operator << (ostream& out, bridge br);
79
extern bridge nil_bridge;
80
tree substitute (tree t, path p, tree u);
82
#include "impl_typesetter.hpp"
84
#endif // defined BRIDGE_H