merge the formfield patch from ooo-build
[ooovba.git] / autodoc / inc / ary_i / d_token.hxx
blob433eaf565194f5db695863a92fc0e0a8c0a0434a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: d_token.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef CSI_DSAPI_D_TOKEN_HXX
32 #define CSI_DSAPI_D_TOKEN_HXX
34 // BASE CLASSES
35 #include <ary_i/ci_text2.hxx>
36 #include <ary_i/ci_atag2.hxx>
39 namespace ary
41 namespace inf
43 class DocumentationDisplay;
49 namespace csi
51 namespace dsapi
54 using ary::inf::DocumentationDisplay;
57 class DT_Dsapi : public ary::inf::DocuToken
59 public:
60 virtual void DisplayAt(
61 DocumentationDisplay &
62 o_rDisplay ) const = 0;
63 virtual bool IsWhiteOnly() const;
68 class DT_TextToken : public DT_Dsapi
70 public:
71 explicit DT_TextToken(
72 const char * i_sText )
73 : sText(i_sText) {}
74 explicit DT_TextToken(
75 const String & i_sText )
76 : sText(i_sText) {}
77 virtual ~DT_TextToken();
79 virtual void DisplayAt(
80 DocumentationDisplay &
81 o_rDisplay ) const;
82 const char * GetText() const { return sText; }
83 const String & GetTextStr() const { return sText; }
85 String & Access_Text() { return sText; }
87 virtual bool IsWhiteOnly() const;
89 private:
90 String sText;
93 class DT_White : public DT_Dsapi
95 public:
96 DT_White() {}
97 virtual ~DT_White();
99 virtual void DisplayAt(
100 DocumentationDisplay &
101 o_rDisplay ) const;
102 virtual bool IsWhiteOnly() const;
106 class DT_MLTag : public DT_Dsapi
108 public:
109 enum E_Kind
111 k_unknown = 0,
112 k_begin,
113 k_end,
114 k_single
118 class DT_MupType : public DT_MLTag
120 public:
121 explicit DT_MupType( /// Constructor for End-Tag
122 bool ) /// Must be there, but is not evaluated.
123 : bIsBegin(false) {}
124 explicit DT_MupType( /// Constructor for Begin-Tag
125 const String & i_sScope )
126 : sScope(i_sScope), bIsBegin(true) {}
127 virtual ~DT_MupType();
129 virtual void DisplayAt(
130 DocumentationDisplay &
131 o_rDisplay ) const;
132 const String & Scope() const { return sScope; }
133 bool IsBegin() const { return bIsBegin; }
135 private:
136 String sScope;
137 bool bIsBegin;
140 class DT_MupMember : public DT_MLTag
142 public:
143 explicit DT_MupMember( /// Constructor for End-Tag
144 bool ) /// Must be there, but is not evaluated.
145 : bIsBegin(false) {}
146 DT_MupMember( /// Constructor for Begin-Tag
147 const String & i_sScope )
148 : sScope(i_sScope), bIsBegin(true) {}
149 virtual ~DT_MupMember();
151 virtual void DisplayAt(
152 DocumentationDisplay &
153 o_rDisplay ) const;
154 const String & Scope() const { return sScope; }
155 bool IsBegin() const { return bIsBegin; }
157 private:
158 String sScope;
159 bool bIsBegin;
162 class DT_MupConst : public DT_Dsapi
164 public:
165 DT_MupConst(
166 const char * i_sConstText )
167 : sConstText(i_sConstText) {}
168 virtual ~DT_MupConst();
170 virtual void DisplayAt(
171 DocumentationDisplay &
172 o_rDisplay ) const;
173 const char * GetText() const { return sConstText; }
175 private:
176 String sConstText; /// Without HTML.
180 class DT_Style : public DT_MLTag
182 public:
183 DT_Style(
184 const char * i_sPlainHtmlTag,
185 bool i_bNewLine )
186 : sText(i_sPlainHtmlTag), bNewLine(i_bNewLine) {}
187 virtual ~DT_Style();
189 virtual void DisplayAt(
190 DocumentationDisplay &
191 o_rDisplay ) const;
192 const char * GetText() const { return sText; }
193 bool IsStartOfNewLine() const
194 { return bNewLine; }
195 private:
196 String sText; /// With HTML.
197 E_Kind eKind;
198 bool bNewLine;
201 class DT_EOL : public DT_Dsapi
203 public:
204 DT_EOL() {}
205 virtual ~DT_EOL();
207 virtual void DisplayAt(
208 DocumentationDisplay &
209 o_rDisplay ) const;
210 virtual bool IsWhiteOnly() const;
214 class DT_AtTag : public ary::inf::AtTag2
216 public:
217 void AddToken(
218 DYN ary::inf::DocuToken &
219 let_drToken )
220 { aText.AddToken(let_drToken); }
221 void SetName(
222 const char * i_sName )
223 { sTitle = i_sName; }
225 protected:
226 DT_AtTag(
227 const char * i_sTitle )
228 : ary::inf::AtTag2(i_sTitle) {}
231 class DT_StdAtTag : public DT_AtTag
233 public:
234 explicit DT_StdAtTag(
235 const char * i_sTitle )
236 : DT_AtTag(i_sTitle) {}
237 virtual ~DT_StdAtTag();
239 virtual void DisplayAt(
240 DocumentationDisplay &
241 o_rDisplay ) const;
244 class DT_SeeAlsoAtTag : public DT_AtTag
246 public:
247 DT_SeeAlsoAtTag() : DT_AtTag("") {}
248 virtual ~DT_SeeAlsoAtTag();
250 virtual void DisplayAt(
251 DocumentationDisplay &
252 o_rDisplay ) const;
253 const String & LinkText() const { return sTitle; } // Missbrauch von sTitle
256 class DT_ParameterAtTag : public DT_AtTag
258 public:
259 DT_ParameterAtTag() : DT_AtTag("") {}
260 virtual ~DT_ParameterAtTag();
262 void SetTitle(
263 const char * i_sTitle );
264 virtual void DisplayAt(
265 DocumentationDisplay &
266 o_rDisplay ) const;
269 class DT_SinceAtTag : public DT_AtTag
271 public:
272 DT_SinceAtTag() : DT_AtTag("Since version") {}
273 virtual ~DT_SinceAtTag();
275 virtual void DisplayAt(
276 DocumentationDisplay &
277 o_rDisplay ) const;
281 } // namespace dsapi
282 } // namespace csi
284 #endif