Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _ODI_STYLE_LIST_H_
00024 #define _ODI_STYLE_LIST_H_
00025
00026 #include <string>
00027 #include <vector>
00028
00029
00030 #include "ODi_ListenerState.h"
00031
00032
00033 class ODi_ListLevelStyle;
00034
00035
00036 class PD_Document;
00037
00038
00042 class ODi_Style_List
00043 : public ODi_ListenerState {
00044
00045 public:
00046
00047 ODi_Style_List(ODi_ElementStack& rElementStack) :
00048 ODi_ListenerState("StyleList", rElementStack),
00049 m_bListStyle(false)
00050 {
00051 }
00052
00053 virtual ~ODi_Style_List();
00054
00055 void startElement (const gchar* pName, const gchar** ppAtts,
00056 ODi_ListenerStateAction& rAction);
00057
00058 void endElement (const gchar* pName,
00059 ODi_ListenerStateAction& rAction);
00060
00061 void charData (const gchar* , int ) { };
00062
00063 void defineAbiList(PD_Document* pDocument);
00064 void redefine(PD_Document* pDocument, UT_uint32 iLevel);
00065
00066 ODi_ListLevelStyle* getLevelStyle(UT_uint32 level) const
00067 {
00068 UT_return_val_if_fail(level > 0, NULL);
00069 UT_return_val_if_fail(!m_levelStyles.empty(), NULL);
00070 UT_return_val_if_fail(level <= m_levelStyles.size(), NULL);
00071
00072
00073 return m_levelStyles[level-1];
00074 }
00075
00076 UT_sint32 getLevelCount() const
00077 {
00078 return m_levelStyles.size();
00079 }
00080
00081 void buildAbiPropertiesString() const;
00082
00083 private:
00084
00085 std::string m_name;
00086
00087
00088 std::string m_displayName;
00089
00090
00091
00092
00093 std::vector<ODi_ListLevelStyle*> m_levelStyles;
00094 bool m_bListStyle;
00095 };
00096
00097 #endif //_ODI_STYLE_LIST_H_