wxPdfDocument 1.2.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
wxPdfLayer Class Reference

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

#include <pdflayer.h>

Inheritance diagram for wxPdfLayer:
wxPdfOcg

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.
 
- Public Member Functions inherited from wxPdfOcg
 wxPdfOcg ()
 Constructor.
 
virtual ~wxPdfOcg ()
 Destructor.
 
void SetIndex (int index)
 Set OCG index.
 
int GetIndex () const
 Get OCG index.
 
void SetObjIndex (int n)
 Set object index.
 
int GetObjIndex () const
 Get object index.
 
bool IsOk () const
 Check whether OCG is initialized.
 
wxPdfOcgType GetType () const
 Get.
 

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.
 

Additional Inherited Members

- Protected Attributes inherited from wxPdfOcg
wxPdfOcgType m_type
 Type of OCG.
 

Detailed Description

Class for a layer with optional content.

Constructor & Destructor Documentation

◆ wxPdfLayer() [1/2]

wxPdfLayer::wxPdfLayer ( const wxString & name)

Constructor.

Creates a new layer.

Parameters
namethe name of the layer

◆ ~wxPdfLayer()

virtual wxPdfLayer::~wxPdfLayer ( )
virtual

Destructor.

◆ wxPdfLayer() [2/2]

wxPdfLayer::wxPdfLayer ( const wxPdfLayer & encoding)
protected

Copy constructor.

Member Function Documentation

◆ AddChild()

bool wxPdfLayer::AddChild ( wxPdfLayer * child)

Add child layer.

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

Parameters
childthe child layer

◆ AllocateUsage()

wxPdfDictionary * wxPdfLayer::AllocateUsage ( )
protected

Allocate the usage dictonary.

◆ ClearIntent()

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

◆ CreateTitle()

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

◆ GetChildren()

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

◆ GetIntent()

int wxPdfLayer::GetIntent ( ) const
inline

Get Optional Content Group (OCG) Intent.

Returns
the current combination of wxPDF_OCG_INTENT_* values

◆ GetName()

wxString wxPdfLayer::GetName ( ) const
inline

Get the name of the layer.

Returns
the layer name

◆ GetParent()

wxPdfLayer * wxPdfLayer::GetParent ( ) const
inline

Get parent layer.

Gets the parent layer.

Returns
the parent layer or null if the layer has no parent

◆ GetTitle()

wxString wxPdfLayer::GetTitle ( ) const
inline

Get the layer title.

Returns
the layer title

◆ GetUsage()

wxPdfDictionary * wxPdfLayer::GetUsage ( ) const
inline

Get the usage dictionary.

Returns
a reference to the usage dictionary

◆ HasChildren()

bool wxPdfLayer::HasChildren ( ) const
inline

◆ IsOn()

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

◆ IsOnPanel()

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

◆ operator=()

wxPdfLayer & wxPdfLayer::operator= ( const wxPdfLayer & encoding)
protected

Assignment operator.

◆ SetCreatorInfo()

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

◆ SetExport()

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

◆ SetIntent()

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

◆ SetLanguage()

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

◆ SetOn()

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

◆ SetOnPanel()

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

◆ SetParent()

bool wxPdfLayer::SetParent ( wxPdfLayer * parent)
protected

Set the parent of the layer.

◆ SetPrint()

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

◆ SetView()

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

◆ SetZoom()

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: