wxPdfDocument 0.9.2
Public Member Functions | Static Public Member Functions | Protected Member Functions
wxPdfLayer Class Reference

Class for a layer with optional content. More...

#include <pdflayer.h>

Inheritance diagram for wxPdfLayer:
wxPdfOcg

List of all members.

Public Member Functions

 wxPdfLayer (const wxString &name)
 Constructor.
virtual ~wxPdfLayer ()
 Destructor.
wxString GetName () const
 Get the name of the layer.
wxString GetTitle () const
 Get the layer title.
void SetIntent (const unsigned int intent)
 Set Optional Content Group (OCG) Intent.
int GetIntent () const
 Get Optional Content Group (OCG) Intent.
void ClearIntent (const unsigned int intent)
 Clear Optional Content Group (OCG) Intent.
void SetOn (bool on)
 Set the initial visibility of the layer.
bool IsOn () const
 Get the initial visibility of the layer.
void SetOnPanel (bool onPanel)
 Set the visibility of the layer on the layer panel.
bool IsOnPanel () const
 Get the layer visibility on the layer panel.
bool AddChild (wxPdfLayer *child)
 Add child layer.
wxPdfLayerGetParent () const
 Get parent layer.
bool HasChildren () const
wxPdfArrayLayer GetChildren () const
 Get the list of child layers.
void SetCreatorInfo (const wxString &creator, const wxString &subtype)
 Set the creator's info.
void SetLanguage (const wxString &lang, bool preferred)
 Set the language.
void SetExport (bool exportState)
 Set the export state.
void SetZoom (double min, double max)
 Set the range of zoom magnification.
void SetPrint (const wxString &subtype, bool printState)
 Set the print state.
void SetView (bool viewState)
 Set the view state.
wxPdfDictionaryGetUsage () const
 Get the usage dictionary.

Static Public Member Functions

static wxPdfLayerCreateTitle (const wxString &title)
 Create a title layer.

Protected Member Functions

 wxPdfLayer (const wxPdfLayer &encoding)
 Copy constructor.
wxPdfLayeroperator= (const wxPdfLayer &encoding)
 Assignment operator.
bool SetParent (wxPdfLayer *parent)
 Set the parent of the layer.
wxPdfDictionaryAllocateUsage ()
 Allocate the usage dictonary.

Detailed Description

Class for a layer with optional content.


Constructor & Destructor Documentation

wxPdfLayer::wxPdfLayer ( const wxString &  name)

Constructor.

Creates a new layer.

Parameters:
namethe name of the layer
virtual wxPdfLayer::~wxPdfLayer ( ) [virtual]

Destructor.

wxPdfLayer::wxPdfLayer ( const wxPdfLayer encoding) [protected]

Copy constructor.


Member Function Documentation

bool wxPdfLayer::AddChild ( wxPdfLayer child)

Add child layer.

Adds a child layer. Nested layers can only have one parent.

Parameters:
childthe child layer
wxPdfDictionary* wxPdfLayer::AllocateUsage ( ) [protected]

Allocate the usage dictonary.

void wxPdfLayer::ClearIntent ( const unsigned int  intent) [inline]

Clear Optional Content Group (OCG) Intent.

Parameters:
[in]intentCombination of the defined wxPDF_OCG_INTENT_???? values to clear
static wxPdfLayer* wxPdfLayer::CreateTitle ( const wxString &  title) [static]

Create a title layer.

Creates a title layer. A title layer is not really a layer but a collection of layers under the same title heading.

Parameters:
titlethe title text
Returns:
the title layer
wxPdfArrayLayer wxPdfLayer::GetChildren ( ) const [inline]

Get the list of child layers.

Gets the child layers.

Returns:
the child layers or an empty list if the layer has no children
int wxPdfLayer::GetIntent ( ) const [inline]

Get Optional Content Group (OCG) Intent.

Returns:
the current combination of wxPDF_OCG_INTENT_* values
wxString wxPdfLayer::GetName ( ) const [inline]

Get the name of the layer.

Returns:
the layer name
wxPdfLayer* wxPdfLayer::GetParent ( ) const [inline]

Get parent layer.

Gets the parent layer.

Returns:
the parent layer or null if the layer has no parent
wxString wxPdfLayer::GetTitle ( ) const [inline]

Get the layer title.

Returns:
the layer title
wxPdfDictionary* wxPdfLayer::GetUsage ( ) const [inline]

Get the usage dictionary.

Returns:
a reference to the usage dictionary
bool wxPdfLayer::HasChildren ( ) const [inline]
bool wxPdfLayer::IsOn ( ) const [inline]

Get the initial visibility of the layer.

Gets the initial visibility of the layer.

Returns:
the initial visibility of the layer
bool wxPdfLayer::IsOnPanel ( ) const [inline]

Get the layer visibility on the layer panel.

Gets the layer visibility in Acrobat's layer panel

Returns:
the layer visibility in Acrobat's layer panel
wxPdfLayer& wxPdfLayer::operator= ( const wxPdfLayer encoding) [protected]

Assignment operator.

void wxPdfLayer::SetCreatorInfo ( const wxString &  creator,
const wxString &  subtype 
)

Set the creator's info.

Used by the creating application to store application-specific data associated with this optional content group.

Parameters:
creatora text string specifying the application that created the group
subtypea string defining the type of content controlled by the group. Suggested values include but are not limited to Artwork, for graphic-design or publishing applications, and Technical, for technical designs such as building plans or schematics
void wxPdfLayer::SetExport ( bool  exportState)

Set the export state.

Specifies the recommended state for content in this group when the document (or part of it) is saved by a viewer application to a format that does not support optional content (for example, an earlier version of PDF or a raster image format).

Parameters:
exportStatethe export state
void wxPdfLayer::SetIntent ( const unsigned int  intent) [inline]

Set Optional Content Group (OCG) Intent.

Parameters:
[in]intentCombination of the defined wxPDF_OCG_INTENT_???? values to set
void wxPdfLayer::SetLanguage ( const wxString &  lang,
bool  preferred 
)

Set the language.

Specifies the language of the content controlled by this optional content group

Parameters:
langa language string which specifies a language and possibly a locale (for example, es-MX represents Mexican Spanish)
preferredused by viewer applications when there is a partial match but no exact match between the system language and the language strings in all usage dictionaries
void wxPdfLayer::SetOn ( bool  on) [inline]

Set the initial visibility of the layer.

Sets the initial visibility of the layer.

Parameters:
onthe initial visibility of the layer
void wxPdfLayer::SetOnPanel ( bool  onPanel) [inline]

Set the visibility of the layer on the layer panel.

Sets the visibility of the layer in Acrobat's layer panel. If false the layer cannot be directly manipulated by the user. Note that any children layers will also be absent from the panel.

Parameters:
onPanelthe visibility of the layer in Acrobat's layer panel
bool wxPdfLayer::SetParent ( wxPdfLayer parent) [protected]

Set the parent of the layer.

void wxPdfLayer::SetPrint ( const wxString &  subtype,
bool  printState 
)

Set the print state.

Specifies that the content in this group is intended for use in printing

Parameters:
subtypea name specifying the kind of content controlled by the group; for example, Trapping, PrintersMarks and Watermark
printStateindicates that the group should be set to that state when the document is printed from a viewer application
void wxPdfLayer::SetView ( bool  viewState)

Set the view state.

Indicates that the group should be set to that state when the document is opened in a viewer application.

Parameters:
viewStatethe view state
void wxPdfLayer::SetZoom ( double  min,
double  max 
)

Set the range of zoom magnification.

Specifies a range of magnifications at which the content in this optional content group is best viewed.

Parameters:
minthe minimum recommended magnification factors at which the group should be ON. A negative value will set the default to 0
maxthe maximum recommended magnification factor at which the group should be ON. A negative value will set the largest possible magnification supported by the viewer application

The documentation for this class was generated from the following file: