First attempt at debianization
[erwise] / Cl / WWWLibrary / HTHistory.h
1 #ifndef HTHISTORY_H
2 #define HTHISTORY_H
3
4 #include "HTAnchor.h"
5
6 #ifdef SHORT_NAMES
7 #define HTHistory_record                HTHiReco
8 #define HTHistory_backtrack             HTHiBack
9 #define HTHistory_canBacktrack          HTHiCaBa
10 #define HTHistory_moveBy                HTHiMoBy
11 #define HTHistory_canMoveBy             HTHiCaMo
12 #define HTHistory_read                  HTHiRead
13 #define HTHistory_recall                HTHiReca
14 #define HTHistory_count                 HTHiCoun
15 #define HTHistory_leavingFrom           HTHiLeFr
16 #endif
17
18 /*                              Navigation
19 **                              ==========
20 */
21
22 /*              Record the jump to an anchor
23 **              ----------------------------
24 */
25
26 extern void HTHistory_record
27   PARAMS(
28     (HTAnchor * destination)
29   );
30
31 /*              Go back in history (find the last visited node)
32 **              ------------------
33 */
34
35 extern HTAnchor * HTHistory_backtrack
36   NOPARAMS;  /* FIXME: Should we add a `sticky' option ? */
37
38 extern BOOL HTHistory_canBacktrack
39   NOPARAMS;
40
41 /*              Browse through references in the same parent node
42 **              -------------------------------------------------
43 **
44 **      Take the n-th child's link after or before the one we took to get here.
45 **      Positive offset means go towards most recently added children.
46 */
47
48 extern HTAnchor * HTHistory_moveBy
49   PARAMS(
50      (int offset)
51      );
52
53 extern BOOL HTHistory_canMoveBy
54   PARAMS(
55      (int offset)
56      );
57
58 #define HTHistory_next (HTHistory_moveBy (+1))
59 #define HTHistory_canNext (HTHistory_canMoveBy (+1))
60 #define HTHistory_previous (HTHistory_moveBy (-1))
61 #define HTHistory_canPrevious (HTHistory_canMoveBy (-1))
62
63
64 /*                              Retrieval
65 **                              =========
66 */
67
68 /*              Read numbered visited anchor (1 is the oldest)
69 **              ----------------------------
70 */
71
72 extern HTAnchor * HTHistory_read
73   PARAMS(
74     (int number)
75   );
76
77 /*              Recall numbered visited anchor (1 is the oldest)
78 **              ------------------------------
79 **      This reads the anchor and stores it again in the list, except if last.
80 */
81
82 extern HTAnchor * HTHistory_recall
83   PARAMS(
84     (int number)
85   );
86
87 /*              Number of Anchors stored
88 **              ------------------------
89 **
90 **      This is needed in order to check the validity of certain commands
91 **      for menus, etc.
92 (not needed for now. Use canBacktrack, etc.)
93 extern int HTHistory_count NOPARAMS;
94 */
95
96 /*              Change last history entry
97 **              -------------------------
98 **
99 **      Sometimes we load a node by one anchor but leave by a different
100 **      one, and it is the one we left from which we want to remember.
101 */
102 extern void HTHistory_leavingFrom
103   PARAMS(
104     (HTAnchor * anchor)
105   );
106
107 #endif /* HTHISTORY_H */