|
#include <Config.h>
Public Member Functions | |
| Config (SDF::Obj ocg_config) | |
| Creates a new optional-content configuration from an existing SDF/Cos object. | |
| bool | IsValid () const |
| |
| SDF::Obj | GetOrder () const |
| |
| void | SetOrder (SDF::Obj ocgs_array) |
| Sets the user interface display order of optional-content groups (OCGs) in this configuration. | |
| UString | GetName () const |
| |
| void | SetName (const UString &name) |
| Sets the name of an optional-content configuration (suitable for presentation in a user interface). | |
| UString | GetCreator () const |
| |
| void | SetCreator (const UString &name) |
| Sets the creator property of an optional-content configuration. | |
| const char * | GetInitBaseState () const |
| |
| SDF::Obj | GetInitOnStates () const |
| |
| SDF::Obj | GetInitOffStates () const |
| |
| void | SetInitBaseState (const char *state="ON") |
| Sets the base initialization state. | |
| void | SetInitOnStates (SDF::Obj on_array) |
| Sets the 'ON' initialization array in the configuration dictionary. | |
| void | SetInitOffStates (SDF::Obj off_array) |
| Sets the 'OFF' initialization array in the configuration dictionary. | |
| SDF::Obj | GetIntent () const |
| |
| void | SetIntent (SDF::Obj intent) |
| Sets the Intent entry in an optional-content configuration's SDF/Cos dictionary. | |
| SDF::Obj | GetLockedOCGs () const |
| |
| void | SetLockedOCGs (SDF::Obj locked_ocg_array) |
| Sets the array of locked OCGs. | |
| SDF::Obj | GetSDFObj () const |
| |
| Config (const Config &g) | |
| Copy constructor. | |
| Config & | operator= (const Config &g) |
Static Public Member Functions | |
| static Config | Create (PDFDoc &doc, bool default_config) |
| Creates a new optional-content configuration object in the document. | |
Configurations are typically used to initialize the OCG ON-OFF states for an optional-content context (OCG::Context). The OCG order in the configuration is the order in which the groups appear in the Layers panel of a PDF viewer. The configuration can also define a set of mutually exclusive OCGs, called a radio button group.
| pdftron::PDF::OCG::Config::Config | ( | SDF::Obj | ocg_config | ) |
Creates a new optional-content configuration from an existing SDF/Cos object.
| pdftron::PDF::OCG::Config::Config | ( | const Config & | g | ) |
Copy constructor.
Creates a new optional-content configuration object in the document.
| doc | The document in which the new OCG::Config will be created. | |
| default_config | If true, the configuration will be set as the default OCG configuration (i.e. listed as a D entry under 'OCProperies' dictionary). |
| bool pdftron::PDF::OCG::Config::IsValid | ( | ) | const [inline] |
| SDF::Obj pdftron::PDF::OCG::Config::GetOrder | ( | ) | const |
The order of OCGs in the array is used to represent the order in which the group names are displayed in the Layers panel of a PDF viewer application. For more information, please refer to Section 4.10.3 in the PDF Reference.
| void pdftron::PDF::OCG::Config::SetOrder | ( | SDF::Obj | ocgs_array | ) |
Sets the user interface display order of optional-content groups (OCGs) in this configuration.
This is the order in which the group names are displayed in the Layers panel of a PDF viewer.
| UString pdftron::PDF::OCG::Config::GetName | ( | ) | const |
| void pdftron::PDF::OCG::Config::SetName | ( | const UString & | name | ) |
Sets the name of an optional-content configuration (suitable for presentation in a user interface).
The method stores the specified string as the Name entry in the configuration's SDF/Cos dictionary.
| name | The new name string. |
| UString pdftron::PDF::OCG::Config::GetCreator | ( | ) | const |
The string is used to represent the name of the application or feature that created this configuration.
| void pdftron::PDF::OCG::Config::SetCreator | ( | const UString & | name | ) |
Sets the creator property of an optional-content configuration.
Stores the specified string as the Creator entry in the configuration's SDF/Cos dictionary.
| name | The new creator string. |
| const char* pdftron::PDF::OCG::Config::GetInitBaseState | ( | ) | const |
This state is used to initialize the states of all the OCGs in a document when this configuration is applied. The value of this entry must be one of the following names: ON: The states of all groups are turned ON. OFF: The states of all groups are turned OFF. Unchanged: The states of all groups are left unchanged.
After base initialization, the contents of the ON and OFF arrays are processed, overriding the state of the groups included in the arrays.
| SDF::Obj pdftron::PDF::OCG::Config::GetInitOnStates | ( | ) | const |
The returned object is an array of optional content groups whose state should be set to ON when this configuration is applied. Note: If the BaseState entry is ON, this entry is redundant.
| SDF::Obj pdftron::PDF::OCG::Config::GetInitOffStates | ( | ) | const |
The returned object is an array of optional content groups whose state should be set to OFF when this configuration is applied. Note: If the BaseState entry is OFF, this entry is redundant.
| void pdftron::PDF::OCG::Config::SetInitBaseState | ( | const char * | state = "ON" |
) |
Sets the base initialization state.
For more info, please see GetInitBaseState().
| state | new base state ("ON", "OFF", or "Unchanged"). |
| void pdftron::PDF::OCG::Config::SetInitOnStates | ( | SDF::Obj | on_array | ) |
Sets the 'ON' initialization array in the configuration dictionary.
For more info, please see SetInitOnStates() and section 4.10.3 in PDF Reference.
| void pdftron::PDF::OCG::Config::SetInitOffStates | ( | SDF::Obj | off_array | ) |
Sets the 'OFF' initialization array in the configuration dictionary.
For more info, please see SetInitOffStates() and section 4.10.3 in PDF Reference.
| SDF::Obj pdftron::PDF::OCG::Config::GetIntent | ( | ) | const |
An intent is a name object (or an array of name objects) broadly describing the intended use, which can be either "View" or "Design". A group's content is considered to be optional (that is, the group's state is considered in its visibility) if any intent in its list matches an intent of the context. The intent list of the context is usually set from the intent list of the document configuration. If the configuration has no Intent entry, the default value of "View" is used.
| void pdftron::PDF::OCG::Config::SetIntent | ( | SDF::Obj | intent | ) |
Sets the Intent entry in an optional-content configuration's SDF/Cos dictionary.
For more information, see GetIntent().
| intent | The new Intent entry value (a name object or an array of name objects). |
| SDF::Obj pdftron::PDF::OCG::Config::GetLockedOCGs | ( | ) | const |
The on/off state of a locked OCG cannot be toggled by the user through the user interface.
| void pdftron::PDF::OCG::Config::SetLockedOCGs | ( | SDF::Obj | locked_ocg_array | ) |
Sets the array of locked OCGs.
The on/off state of a locked OCG cannot be toggled by the user through the user interface.
| locked_ocg_array | An SDF/Cos array of OCG objects to be locked in this configuration, or an empty array if the configuration should not contain locked OCGs. The default is the empty array. |
| SDF::Obj pdftron::PDF::OCG::Config::GetSDFObj | ( | ) | const |