Debian Codegraph @

sys/HyperPage.h

raw
1 #ifndef _HyperPage_h_
2 #define _HyperPage_h_
3 /* HyperPage.h
4 *
5 * Copyright (C) 1992-2024 Paul Boersma
6 *
7 * This code is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 *
12 * This code is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 * See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this work. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "ScriptEditor.h"
22 #include "Collection.h"
23 #include "Graphics.h"
24 Thing_declare (PraatApplication);
25 Thing_declare (PraatObjects);
26 Thing_declare (PraatPicture);
27
28 Thing_define (HyperLink, Daata) {
29 double x1DC, x2DC, y1DC, y2DC;
30 };
31
32 autoHyperLink HyperLink_create (conststring32 name, double x1, double x2, double y1, double y2);
33
34 Thing_define (HyperPage, Editor) {
35 GuiDrawingArea drawingArea;
36 GuiScrollBar verticalScrollBar;
37 bool d_hasExtraRowOfTools;
38 autoGraphics graphics;
39 Graphics ps;
40 double d_x, d_y, rightMargin, previousBottomSpacing;
41 integer d_printingPageNumber;
42 CollectionOf<structHyperLink> links;
43 bool printing, mirror;
44 double top;
45 conststring32 insideHeader, middleHeader, outsideHeader;
46 conststring32 insideFooter, middleFooter, outsideFooter;
47 autostring32 entryHint; double entryPosition;
48 struct { autostring32 page; double top; } history [20];
49 int historyPointer;
50 autostring32 optionalCurrentPageTitle;
51 GuiMenuItem fontSizeButton_10, fontSizeButton_12, fontSizeButton_14, fontSizeButton_18, fontSizeButton_24;
52 PraatApplication praatApplication;
53 PraatObjects praatObjects;
54 PraatPicture praatPicture;
55 structMelderFolder rootDirectory;
56
57 void v9_destroy () noexcept
58 override;
59 bool v_hasEditMenu ()
60 override { return false; }
61 void v_createMenus ()
62 override;
63 void v_createChildren ()
64 override;
65 void v1_dataChanged (Editor sender)
66 override;
67
68 virtual void v_draw () { }
69 virtual integer v_getNumberOfPages () { return 0; }
70 virtual integer v_getCurrentPageNumber () { return 0; }
71 virtual int v_goToPage (conststring32 /* title */) { return 0; }
72 virtual void v_goToPage_number (integer /* goToPageNumber */) { }
73 virtual void v_defaultHeaders (EditorCommand /* cmd */) { }
74 virtual bool v_hasHistory () { return false; }
75 virtual bool v_isOrdered () { return false; }
76
77 #include "HyperPage_prefs.h"
78 };
79
80 void HyperPage_clear (HyperPage me);
81
82 /* "Methods" */
83 #define HyperPage_ADD_BORDER 1
84 #define HyperPage_USE_ENTRY_HINT 2
85 #define HyperPage_EXECUTABLE 4
86
87 void HyperPage_any (HyperPage me, conststring32 text, kGraphics_font font, double size, int style, double minFooterDistance,
88 double x, double secondIndent, double topSpacing, double bottomSpacing, uint32 method);
89 void HyperPage_pageTitle (HyperPage me, conststring32 title);
90 void HyperPage_intro (HyperPage me, conststring32 text);
91 void HyperPage_entry (HyperPage me, conststring32 title);
92 void HyperPage_subheader (HyperPage me, conststring32 title);
93 void HyperPage_paragraph (HyperPage me, conststring32 text);
94 void HyperPage_listItem (HyperPage me, conststring32 text);
95 void HyperPage_listItem1 (HyperPage me, conststring32 text);
96 void HyperPage_listItem2 (HyperPage me, conststring32 text);
97 void HyperPage_listItem3 (HyperPage me, conststring32 text);
98 void HyperPage_listTag (HyperPage me, conststring32 text);
99 void HyperPage_listTag1 (HyperPage me, conststring32 text);
100 void HyperPage_listTag2 (HyperPage me, conststring32 text);
101 void HyperPage_listTag3 (HyperPage me, conststring32 text);
102 void HyperPage_definition (HyperPage me, conststring32 text);
103 void HyperPage_definition1 (HyperPage me, conststring32 text);
104 void HyperPage_definition2 (HyperPage me, conststring32 text);
105 void HyperPage_definition3 (HyperPage me, conststring32 text);
106 void HyperPage_code0 (HyperPage me, conststring32 text);
107 void HyperPage_code (HyperPage me, conststring32 text);
108 void HyperPage_code1 (HyperPage me, conststring32 text);
109 void HyperPage_code2 (HyperPage me, conststring32 text);
110 void HyperPage_code3 (HyperPage me, conststring32 text);
111 void HyperPage_code4 (HyperPage me, conststring32 text);
112 void HyperPage_code5 (HyperPage me, conststring32 text);
113 void HyperPage_caption (HyperPage me, conststring32 text);
114 void HyperPage_quote (HyperPage me, conststring32 text);
115 void HyperPage_quote1 (HyperPage me, conststring32 text);
116 void HyperPage_quote2 (HyperPage me, conststring32 text);
117 void HyperPage_quote3 (HyperPage me, conststring32 text);
118 void HyperPage_prototype (HyperPage me, conststring32 text);
119 void HyperPage_formula (HyperPage me, conststring32 formula);
120 void HyperPage_picture (HyperPage me, double width_inches, double height_inches, void (*draw) (Graphics g));
121 void HyperPage_script (HyperPage me, double width_inches, double height_inches, conststring32 script,
122 Graphics cacheGraphics, conststring32 cacheInfo);
123
124 int HyperPage_goToPage (HyperPage me, conststring32 title);
125 void HyperPage_goToPage_number (HyperPage me, integer goToPageNumber);
126
127 void HyperPage_init (HyperPage me, conststring32 title, Daata data);
128 void HyperPage_init1 (HyperPage me, conststring32 title, Daata data, bool backquoteIsVerbatim);
129 void HyperPage_init2 (HyperPage me, conststring32 title, Daata data);
130
131 void HyperPage_setEntryHint (HyperPage me, conststring32 entry);
132 void HyperPage_initSheetOfPaper (HyperPage me);
133
134 /* End of file HyperPage.h */
135 #endif