Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

pdftemplate.h

Go to the documentation of this file.
///////////////////////////////////////////////////////////////////////////////
// Name:        pdftemplate.h
// Purpose:     
// Author:      Ulrich Telle
// Modified by:
// Created:     2006-07-13
// Copyright:   (c) Ulrich Telle
// Licence:     wxWindows licence
///////////////////////////////////////////////////////////////////////////////

/// \file pdftemplate.h Interface of the wxPdfTemplate class

#ifndef _PDFTEMPLATE_H_
#define _PDFTEMPLATE_H_

// wxWidgets headers
#include "wx/pdfdocdef.h"

#include "wx/pdfdoc.h"
#include "wx/pdfparser.h"

/// Class representing a template (For internal use only)
00023 class WXDLLIMPEXP_PDFDOC wxPdfTemplate
{
public:
  /// Constructor
  wxPdfTemplate(int templateId);

  /// Destructor
  virtual ~wxPdfTemplate();

  /// Get index of the template
00033   int    GetIndex()  { return m_templateId; }

  /// Get X position of template
00036   double GetX()      { return m_x; }

  /// Get Y position of template
00039   double GetY()      { return m_y; }

  /// Get width of template
00042   double GetWidth()  { return m_w; }

  /// Get height of template
00045   double GetHeight() { return m_h; }

  /// Set object index
00048   void SetObjIndex(int n) { m_n = n; }

  /// Get object index
00051   int  GetObjIndex() { return m_n; }

  /// Set the associated parser
00054   void SetParser(wxPdfParser* parser) { m_parser = parser; }

  /// Get the associated parser
00057   wxPdfParser* GetParser() { return m_parser; }

  /// Set the array of page resource objects
00060   void SetResources(wxPdfObject* resources) { m_resources = resources; }

  /// Get the array of page resource objects
00063   wxPdfObject* GetResources() { return m_resources; }

private:
00066   int                  m_templateId;        ///< Index of template
00067   int                  m_n;                 ///< Object number of template
00068   bool                 m_used;              ///< Flag whether the template has been used

00070   double               m_x;                 ///< X position of template
00071   double               m_y;                 ///< Y position of template
00072   double               m_h;                 ///< Height of template
00073   double               m_w;                 ///< Width of template

00075   wxPdfFontHashMap*    m_fonts;             ///< array of used fonts
00076   wxPdfImageHashMap*   m_images;            ///< array of used images
00077   wxPdfTemplatesMap*   m_templates;         ///< array of templates

00079   wxPdfParser*         m_parser;            ///< Associated parser
00080   wxPdfObject*         m_resources;         ///< Array of page resource objects

00082   double               m_xSave;             ///< Saved X position
00083   double               m_ySave;             ///< Saved Y position
00084   bool                 m_autoPageBreakSave; ///< State of auto page break
00085   double               m_bMarginSave;       ///< Saved bottom margin
00086   double               m_tMarginSave;       ///< Saved top margin
00087   double               m_lMarginSave;       ///< Saved left margin
00088   double               m_rMarginSave;       ///< Saved right margin
00089   double               m_hSave;             ///< Saved height
00090   double               m_wSave;             ///< Saved width

00092   wxMemoryOutputStream m_buffer;            ///< Buffer holding in-memory PDF

  friend class wxPdfDocument;
};

#endif


Generated by  Doxygen 1.6.0   Back to index