Config.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------------------
00002 // Copyright (c) 2001-2008 by PDFTron Systems Inc. All Rights Reserved.
00003 // Consult legal.txt regarding legal and license information.
00004 //---------------------------------------------------------------------------------------
00005 
00006 #ifndef   H_CPPPDFOCGConfig
00007 #define   H_CPPPDFOCGConfig
00008 
00009 #include <SDF/Obj.h>
00010 #include <PDF/PDFDoc.h>
00011 #include <C/PDF/OCG/TRN_OCGConfig.h>
00012 
00013 namespace pdftron {
00014         namespace PDF {
00015 
00016                 class PDFDoc;
00017 
00018                 namespace OCG {
00019 
00036 class Config
00037 {
00038 public: 
00039 
00048         static Config Create(PDFDoc& doc, bool default_config);
00049 
00053         Config(SDF::Obj ocg_config);
00054 
00058         bool IsValid() const { return mp_obj !=0; }
00059 
00067         SDF::Obj GetOrder() const;
00068 
00077         void SetOrder(SDF::Obj ocgs_array);
00078 
00083         UString GetName() const;
00084         
00091         void SetName(const UString& name);
00092 
00098         UString GetCreator() const;
00099 
00105         void SetCreator(const UString& name);
00106 
00121         const char* GetInitBaseState() const;
00122 
00129         SDF::Obj GetInitOnStates() const;
00130 
00137         SDF::Obj GetInitOffStates() const;
00138 
00143         void SetInitBaseState(const char* state = "ON");
00144 
00149         void SetInitOnStates(SDF::Obj on_array);
00150 
00155         void SetInitOffStates(SDF::Obj off_array);
00156 
00166         SDF::Obj GetIntent() const;
00167 
00173         void SetIntent(SDF::Obj intent);
00174 
00180         SDF::Obj GetLockedOCGs() const;
00181 
00190         void SetLockedOCGs(SDF::Obj locked_ocg_array);
00191 
00195         SDF::Obj GetSDFObj () const;
00196 
00200         Config (const Config& g);
00201         Config& operator=(const Config& g);
00202 
00204         Config(TRN_OCGConfig c) : mp_obj(c) {}
00205         TRN_OCGConfig mp_obj;
00207 };
00208 
00209                 };      // namespace OCG
00210         };      // namespace PDF
00211 };      // namespace pdftron
00212 
00213 #endif
00214 

© 2002-2008 PDFTron Systems Inc.