]> git.saurik.com Git - wxWidgets.git/blame_incremental - utils/tex2rtf/src/tex2rtf.h
Added some WXDLLEXPORTs
[wxWidgets.git] / utils / tex2rtf / src / tex2rtf.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: tex2any.h
3// Purpose: tex2RTF conversion header
4// Author: Julian Smart
5// Modified by:
6// Created: 7.9.93
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef NO_GUI
13// Define a new application type
14class MyApp: public wxApp
15{ public:
16 bool OnInit();
17 int OnExit();
18};
19
20// Define a new frame type
21class MyFrame: public wxFrame
22{ public:
23 wxTextCtrl *textWindow;
24 MyFrame(wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size);
25 void OnMenuCommand(int id);
26
27 void OnCloseWindow(wxCloseEvent& event);
28 void OnExit(wxCommandEvent& event);
29 void OnGo(wxCommandEvent& event);
30 void OnSetInput(wxCommandEvent& event);
31 void OnSetOutput(wxCommandEvent& event);
32 void OnSaveFile(wxCommandEvent& event);
33 void OnViewOutput(wxCommandEvent& event);
34 void OnViewLatex(wxCommandEvent& event);
35 void OnLoadMacros(wxCommandEvent& event);
36 void OnShowMacros(wxCommandEvent& event);
37 void OnModeRTF(wxCommandEvent& event);
38 void OnModeWinHelp(wxCommandEvent& event);
39 void OnModeHTML(wxCommandEvent& event);
40 void OnModeXLP(wxCommandEvent& event);
41 void OnOptionsCurleyBrace(wxCommandEvent& event);
42 void OnOptionsSyntaxChecking(wxCommandEvent& event);
43 void OnHelp(wxCommandEvent& event);
44 void OnAbout(wxCommandEvent& event);
45
46DECLARE_EVENT_TABLE()
47};
48
49#ifdef __WXMSW__
50#include "wx/dde.h"
51
52class Tex2RTFConnection: public wxDDEConnection
53{
54 public:
55 Tex2RTFConnection(char *buf, int size);
56 ~Tex2RTFConnection(void);
57 bool OnExecute(const wxString& topic, char *data, int size, int format);
58 char *OnRequest(const wxString& topic, const wxString& item, int *size, int format);
59};
60
61class Tex2RTFServer: public wxDDEServer
62{
63 public:
64 wxConnectionBase *OnAcceptConnection(const wxString& topic);
65};
66
67#endif // __WXMSW__
68
69#endif // NO_GUI
70
71/*
72 * Itemize/enumerate structure: put on a stack for
73 * getting the indentation right
74 *
75 */
76
77#define LATEX_ENUMERATE 1
78#define LATEX_ITEMIZE 2
79#define LATEX_DESCRIPTION 3
80#define LATEX_TWOCOL 5
81#define LATEX_INDENT 6
82
83class ItemizeStruc: public wxObject
84{
85 public:
86 int listType;
87 int currentItem;
88 int indentation;
89 int labelIndentation;
90 inline ItemizeStruc(int lType, int indent = 0, int labIndent = 0)
91 { listType = lType; currentItem = 0;
92 indentation = indent; labelIndentation = labIndent; }
93};
94
95// ID for the menu quit command
96#define TEX_QUIT 1
97#define TEX_GO 2
98
99#define TEX_SET_INPUT 3
100#define TEX_SET_OUTPUT 4
101
102#define TEX_VIEW_LATEX 5
103#define TEX_VIEW_OUTPUT 6
104
105#define TEX_VIEW_CUSTOM_MACROS 7
106#define TEX_LOAD_CUSTOM_MACROS 8
107
108#define TEX_MODE_RTF 9
109#define TEX_MODE_WINHELP 10
110#define TEX_MODE_HTML 11
111#define TEX_MODE_XLP 12
112
113#define TEX_OPTIONS_CURELY_BRACE 13
114#define TEX_OPTIONS_SYNTAX_CHECKING 14
115
116#define TEX_HELP 15
117#define TEX_ABOUT 16
118#define TEX_SAVE_FILE 17
119
120extern TexChunk *currentMember;
121extern bool startedSections;
122extern char *contentsString;
123extern bool suppressNameDecoration;
124extern wxList itemizeStack;
125
126extern FILE *Contents;
127extern FILE *Chapters;
128extern FILE *Sections;
129extern FILE *Subsections;
130extern FILE *Subsubsections;
131
132extern char *InputFile;
133extern char *OutputFile;
134extern char *MacroFile;
135
136extern char *FileRoot;
137extern char *ContentsName; // Contents page from last time around
138extern char *TmpContentsName; // Current contents page
139extern char *TmpFrameContentsName; // Current frame contents page
140extern char *WinHelpContentsFileName; // WinHelp .cnt file
141extern char *RefName; // Reference file name
142extern char *bulletFile;
143
144#ifndef NO_GUI
145void ChooseOutputFile(bool force = FALSE);
146void ChooseInputFile(bool force = FALSE);
147#endif
148
149void RTFOnMacro(int macroId, int no_args, bool start);
150bool RTFOnArgument(int macroId, int arg_no, bool start);
151
152void HTMLOnMacro(int macroId, int no_args, bool start);
153bool HTMLOnArgument(int macroId, int arg_no, bool start);
154
155void XLPOnMacro(int macroId, int no_args, bool start);
156bool XLPOnArgument(int macroId, int arg_no, bool start);
157
158bool RTFGo(void);
159bool HTMLGo(void);
160bool XLPGo(void);
161
162#define ltHARDY 10000