Destination.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_CPPPDFDestination
00007 #define   H_CPPPDFDestination
00008 
00009 #include <C/PDF/TRN_Destination.h>
00010 #include <SDF/Obj.h>
00011 
00012 namespace pdftron { 
00013         namespace PDF {
00014 
00015 class Page;      // Forward declaration
00016 
00017 
00031 class Destination
00032 {
00033 public:
00034 
00047         enum FitType
00048         {
00049                 e_XYZ,
00050                 e_Fit,   
00051                 e_FitH,          
00052                 e_FitV,          
00053                 e_FitR,          
00054                 e_FitB,          
00055                 e_FitBH,         
00056                 e_FitBV          
00057         };
00058 
00069          static Destination CreateXYZ(Page page, double left, double top, double zoom);
00070                 
00080          static Destination CreateFit(Page page);
00081 
00090          static Destination CreateFitH(Page page, double top);
00091 
00100          static Destination CreateFitV(Page page, double left);
00101 
00113          static Destination CreateFitR(Page page, 
00114                 double left, double bottom,     double right, double top);
00115 
00126          static Destination CreateFitB(Page page);
00127 
00136          static Destination CreateFitBH(Page page, double top);
00137 
00146          static Destination CreateFitBV(Page page, double left);
00147 
00163          Destination (SDF::Obj dest);
00164 
00168          Destination (const Destination& d);
00169 
00173          Destination& operator=(const Destination& d);
00174 
00181          bool IsValid() const;
00182 
00187          FitType GetFitType();
00188 
00193          Page GetPage();
00194 
00201          void SetPage(Page page);
00202 
00211          SDF::Obj GetSDFObj () const;
00212 
00219          SDF::Obj GetExplicitDestObj ();
00220 
00221          Destination(TRN_Destination impl);
00222 
00224         TRN_Destination mp_dest;
00226 };
00227 
00228 
00229         };      // namespace PDF
00230 };      // namespace pdftron
00231 
00232 
00233 
00234 #include <Impl/Page.inl>
00235 #endif
00236 

© 2002-2008 PDFTron Systems Inc.