• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

pt_Types.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 #ifndef PT_TYPES_H
00021 #define PT_TYPES_H
00022 
00023 #include "ut_types.h"
00024 
00026 typedef UT_uint32 PT_BufIndex;
00028 typedef UT_uint32 PT_AttrPropIndex;
00029 
00031 typedef UT_uint32 PT_DocPosition;
00033 typedef UT_uint32 PT_BlockOffset;
00034 
00035 class PD_Document;
00041 class ABI_EXPORT PD_DocumentRange
00042 {
00043 public:
00046     PD_DocumentRange(void)
00047         : m_pDoc(NULL), m_pos1(0), m_pos2(0)
00048         {
00049         }
00050 
00052     PD_DocumentRange(PD_Document * pDoc, PT_DocPosition k1, PT_DocPosition k2)
00053         : m_pDoc(pDoc), m_pos1(k1), m_pos2(k2)
00054         {
00055         }
00056 
00058     void set(PD_Document * pDoc, PT_DocPosition k1, PT_DocPosition k2)
00059         {
00060             m_pDoc = pDoc;
00061             m_pos1 = k1;
00062             m_pos2 = k2;
00063         }
00064 
00066     PD_Document *       m_pDoc;
00068     PT_DocPosition      m_pos1;
00070     PT_DocPosition      m_pos2;
00071 };
00072 
00074 enum PTStruxType
00075 {
00076     PTX_Section = 0,        // 0 -- maker sure that we can cast into uint
00077     PTX_Block,              // 1
00078     PTX_SectionHdrFtr,      // 2
00079     PTX_SectionEndnote,     // 3
00080     PTX_SectionTable,       // 4
00081     PTX_SectionCell,        // 5
00082     PTX_SectionFootnote,    // 6
00083     PTX_SectionMarginnote,  // 7
00084     PTX_SectionAnnotation,  // 8
00085     PTX_SectionFrame,       // 9
00086     PTX_SectionTOC,         // 10
00087     PTX_EndCell,            // 11
00088     PTX_EndTable,
00089         PTX_EndFootnote,
00090         PTX_EndMarginnote,
00091         PTX_EndEndnote,
00092     PTX_EndAnnotation,
00093         PTX_EndFrame,
00094     PTX_EndTOC,
00095     PTX_StruxDummy
00096 };
00097 
00099 
00100 enum PTObjectType
00101 {
00102     PTO_Image = 0,
00103     PTO_Field,
00104     PTO_Bookmark,
00105     PTO_Hyperlink,
00106     PTO_Math,
00107     PTO_Embed,
00108     PTO_Annotation,
00109     PTO_RDFAnchor
00110 };
00111 
00113 enum PTState { PTS_Create=0, PTS_Loading=1, PTS_Editing=2 };
00115 enum PTChangeFmt
00116 {
00117   PTC_AddFmt = 0,
00118   PTC_RemoveFmt = 1,
00119   PTC_AddStyle = 2,
00120   PTC_SetFmt = 3,
00121   PTC_SetExactly = 4
00122 };
00123 
00124 enum PLListenerType
00125 {
00126     PTL_UNKNOWN,
00127     PTL_DocLayout,
00128     PTL_CollabExport,
00129     PTL_CollabServiceExport
00130     /* add more types here ONLY as necessary */
00131 };
00132 
00134 typedef UT_uint32 PL_ListenerId;
00135 
00136 #define PT_PROPS_ATTRIBUTE_NAME         (static_cast<const gchar *>("props"))
00137 #define PT_STYLE_ATTRIBUTE_NAME         (static_cast<const gchar *>("style"))
00138 #define PT_LEVEL_ATTRIBUTE_NAME         (static_cast<const gchar *>("level"))
00139 #define PT_LISTID_ATTRIBUTE_NAME        (static_cast<const gchar *>("listid"))
00140 #define PT_PARENTID_ATTRIBUTE_NAME      (static_cast<const gchar *>("parentid"))
00141 #define PT_NAME_ATTRIBUTE_NAME          (static_cast<const gchar *>("name"))
00142 #define PT_TYPE_ATTRIBUTE_NAME          (static_cast<const gchar *>("type"))
00143 #define PT_BASEDON_ATTRIBUTE_NAME       (static_cast<const gchar *>("basedon"))
00144 #define PT_FOLLOWEDBY_ATTRIBUTE_NAME    (static_cast<const gchar *>("followedby"))
00145 #define PT_ID_ATTRIBUTE_NAME            (static_cast<const gchar *>("id"))
00146 #define PT_HEADER_ATTRIBUTE_NAME        (static_cast<const gchar *>("header"))
00147 #define PT_HEADEREVEN_ATTRIBUTE_NAME    (static_cast<const gchar *>("header-even"))
00148 #define PT_HEADERFIRST_ATTRIBUTE_NAME   (static_cast<const gchar *>("header-first"))
00149 #define PT_HEADERLAST_ATTRIBUTE_NAME    (static_cast<const gchar *>("header-last"))
00150 #define PT_FOOTER_ATTRIBUTE_NAME        (static_cast<const gchar *>("footer"))
00151 #define PT_FOOTEREVEN_ATTRIBUTE_NAME    (static_cast<const gchar *>("footer-even"))
00152 #define PT_FOOTERFIRST_ATTRIBUTE_NAME   (static_cast<const gchar *>("footer-first"))
00153 #define PT_FOOTERLAST_ATTRIBUTE_NAME    (static_cast<const gchar *>("footer-last"))
00154 #define PT_REVISION_ATTRIBUTE_NAME      (static_cast<const gchar *>("revision"))
00155 #define PT_REVISION_DESC_ATTRIBUTE_NAME      (static_cast<const gchar *>("revision-desc"))
00156 #define PT_REVISION_TIME_ATTRIBUTE_NAME      (static_cast<const gchar *>("revision-time"))
00157 #define PT_REVISION_VERSION_ATTRIBUTE_NAME      (static_cast<const gchar *>("revision-ver"))
00158 #define PT_DOCPROP_ATTRIBUTE_NAME      (static_cast<const gchar *>("docprop"))
00159 #define PT_STRUX_IMAGE_DATAID           (static_cast<const gchar *>("strux-image-dataid"))
00160 #define PT_XID_ATTRIBUTE_NAME           (static_cast<const gchar *>("xid"))
00161 #define PT_DATAITEM_ATTRIBUTE_NAME           (static_cast<const gchar *>("dataitem"))
00162 #define PT_IMAGE_DATAID           (static_cast<const gchar *>("dataid"))
00163 #define PT_IMAGE_TITLE           (static_cast<const gchar *>("title"))
00164 #define PT_IMAGE_DESCRIPTION           (static_cast<const gchar *>("alt"))
00165 #define PT_DATA_PREVIEW           (static_cast<const gchar *>("preview"))
00166 #define PT_HYPERLINK_TARGET_NAME  (static_cast<const gchar *>("xlink:href"))
00167 #define PT_AUTHOR_NAME          (static_cast<const gchar *>("author"))
00168 #define PT_ANNOTATION_NUMBER     (static_cast<const gchar *>("annotation"))
00169 #define PT_RDF_XMLID             (static_cast<const gchar *>("xml:id"))
00170 #define PT_XMLID                 (static_cast<const gchar *>("xml:id"))
00171 #define PT_RDF_END               (static_cast<const gchar *>("rdf:end"))
00172 #define PT_CHANGETRACKING_SPLIT_ID     (static_cast<const gchar *>("ct:split-id"))
00173 #define PT_CHANGETRACKING_SPLIT_ID_REF (static_cast<const gchar *>("ct:split-id-ref"))
00174 #define PT_CHANGETRACKING_SPLIT_IS_NEW (static_cast<const gchar *>("ct:split-is-new"))
00175 
00176 
00177 #define ABIATTR_PARA_START_DELETED_REVISION (static_cast<const gchar *>("abi-para-start-deleted-revision"))
00178 #define ABIATTR_PARA_END_DELETED_REVISION   (static_cast<const gchar *>("abi-para-end-deleted-revision"))
00179 #define ABIATTR_PARA_DELETED_REVISION   (static_cast<const gchar *>("abi-para-deleted-revision"))
00180 
00181 #endif /* PT_TYPES_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1