|
Foxit PDF SDK
|
Public Types | |
| enum | OCGState { e_OCGStateOn = 0, e_OCGStateOff = 1, e_OCGStateToggle = 2 } |
| Enumeration for set ocg state to perform when the set ocg state action is triggered. More... | |
Public Types inherited from foxit::pdf::actions::Action | |
| enum | NewWindowFlag { e_NewWindowFlagFalse = 0, e_NewWindowFlagTrue = 1, e_NewWindowFlagNone = 2 } |
| Enumeration for new window flag. More... | |
| enum | Type { e_TypeUnknown = 0, e_TypeGoto = 1, e_TypeGoToR = 2, e_TypeGoToE = 3, e_TypeLaunch = 4, e_TypeThread = 5, e_TypeURI = 6, e_TypeSound = 7, e_TypeMovie = 8, e_TypeHide = 9, e_TypeNamed = 10, e_TypeSubmitForm = 11, e_TypeResetForm = 12, e_TypeImportData = 13, e_TypeJavaScript = 14, e_TypeSetOCGState = 15, e_TypeRendition = 16, e_TypeTrans = 17, e_TypeGoTo3DView = 18 } |
| Enumeration for action type. More... | |
Public Member Functions | |
| SetOCGStateAction (const Action &action) | |
| Constructor, with parent class object. More... | |
| OCGState | GetOCGState (int index) const |
| Get the state of OCG. More... | |
| objects::PDFDictionaryArray | GetOCGStateArray (int index) const |
| Get the OCG dictionary array. More... | |
| int | GetOCGStateCount () const |
| Get the count of OCG states. More... | |
| int | InsertOCGStates (const PDFDoc &document, int index, OCGState state, const objects::PDFDictionaryArray &ocg_dict_array) |
| Insert the OCG states to action. More... | |
| bool | IsRadioButtonStatePreserved () const |
| Get the radio-button preserved state. More... | |
| void | RemoveOCGStates (int index) |
| Remove the OCG state. More... | |
| bool | ReplaceOCGStates (const PDFDoc &document, int index, const objects::PDFDictionaryArray &ocg_dict_array) |
| Replace the OCG states array. More... | |
| void | SetRadioButtonStatePreserved (bool is_preserved) |
| Set the radio-button preserved state. More... | |
Public Member Functions inherited from foxit::pdf::actions::Action | |
| Action (const Action &action) | |
| Constructor, with another action object. More... | |
| Action (const PDFDoc &document, objects::PDFDictionary *action_dict) | |
| Constructor, with parameters. More... | |
| ~Action () | |
| Destructor. | |
| objects::PDFDictionary * | GetDict () const |
| Get PDF dictionary of current object. More... | |
| PDFDoc | GetDocument () |
| Get the PDF document, to which current action belongs. More... | |
| Action | GetSubAction (int index) |
| Get a sub-action by index. More... | |
| int | GetSubActionCount () |
| Get the count of sub-actions. More... | |
| Type | GetType () |
| Get action type. More... | |
| void | InsertSubAction (int index, const Action &sub_action) |
| Insert a new sub-action to the location specified by index. More... | |
| bool | IsEmpty () const |
| Check whether current object is empty or not. More... | |
| bool | operator!= (const Action &other) const |
| Not equal operator. More... | |
| Action & | operator= (const Action &other) |
| Assign operator. More... | |
| bool | operator== (const Action &other) const |
| Equal operator. More... | |
| void | RemoveAllSubActions () |
| Remove all the sub-actions. More... | |
| void | RemoveSubAction (int index) |
| Remove a sub-action, specified by index. More... | |
| void | SetSubAction (int index, const Action &sub_action) |
| Set a sub-action by index. More... | |
Public Member Functions inherited from foxit::Base | |
| FS_HANDLE | Handle () const |
| Get the handle of current object. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from foxit::pdf::actions::Action | |
| static Action | Create (const foxit::pdf::PDFDoc &document, Type action_type) |
| Create a new action, for specified action type. More... | |
Set-OCG-state action is to sets the state of one or more optional content groups. (For more details, please refer to <PDF Reference 1.7> P667 "Set-OCG-State Actions") Class actions::SetOCGStateAction is derived from Action and offers functions to get/set set-OCG-state action data.
Enumeration for set ocg state to perform when the set ocg state action is triggered.
Values of this enumeration should be used alone.
| Enumerator | |
|---|---|
| e_OCGStateOn | Sets the state of subsequent groups to ON. |
| e_OCGStateOff | Sets the state of subsequent groups to OFF. |
| e_OCGStateToggle | Reverses the state of subsequent groups. |
|
explicit |
Constructor, with parent class object.
| [in] | action | Parent class object. |
| OCGState foxit::pdf::actions::SetOCGStateAction::GetOCGState | ( | int | index | ) | const |
Get the state of OCG.
| [in] | index | The index of OCG state. Valid range: from 0 to (count-1). count is returned by function SetOCGStateAction::GetOCGStateCount. |
| objects::PDFDictionaryArray foxit::pdf::actions::SetOCGStateAction::GetOCGStateArray | ( | int | index | ) | const |
Get the OCG dictionary array.
| [in] | index | The index of OCG state. Valid range: from 0 to (count-1). count is returned by function SetOCGStateAction::GetOCGStateCount. |
| int foxit::pdf::actions::SetOCGStateAction::GetOCGStateCount | ( | ) | const |
Get the count of OCG states.
| int foxit::pdf::actions::SetOCGStateAction::InsertOCGStates | ( | const PDFDoc & | document, |
| int | index, | ||
| OCGState | state, | ||
| const objects::PDFDictionaryArray & | ocg_dict_array | ||
| ) |
Insert the OCG states to action.
| [in] | document | A valid PDF document object. |
| [in] | index | The index of OCG want to insert. The OCG state will be inserted after the index. Valid range: from 0 to (count-1). count is returned by function SetOCGStateAction::GetOCGStateCount. If this is below 0 or count of OCG state in current action is 0, parameter state is to be inserted to the first position. If this is larger than count of OCG state in current action, parameter state is to be added to the end. |
| [in] | state | The OCG state to insert. |
| [in] | ocg_dict_array | The OCG dictionary array to insert. |
| bool foxit::pdf::actions::SetOCGStateAction::IsRadioButtonStatePreserved | ( | ) | const |
Get the radio-button preserved state.
If true, indicates that radio-button state relationships between optional content groups should be preserved when the states in the State array are applied. If false, radio-button state relationships, if any, are ignored. Default value: true.
| void foxit::pdf::actions::SetOCGStateAction::RemoveOCGStates | ( | int | index | ) |
Remove the OCG state.
| [in] | index | The index of OCG to remove. Valid range: from 0 to (count-1). count is returned by function SetOCGStateAction::GetOCGStateCount. |
| bool foxit::pdf::actions::SetOCGStateAction::ReplaceOCGStates | ( | const PDFDoc & | document, |
| int | index, | ||
| const objects::PDFDictionaryArray & | ocg_dict_array | ||
| ) |
Replace the OCG states array.
| [in] | document | A valid PDF document object. |
| [in] | index | The index of OCG want to replace. Valid range: from 0 to (count-1). count is returned by function SetOCGStateAction::GetOCGStateCount. |
| [in] | ocg_dict_array | The OCG dictionary array to insert. |
| void foxit::pdf::actions::SetOCGStateAction::SetRadioButtonStatePreserved | ( | bool | is_preserved | ) |
Set the radio-button preserved state.
| [in] | is_preserved | The preserved state value. |