PTScreen
@interface PTScreen : PTAnnot
A screen annotation (PDF 1.5) specifies a region of a page upon which media clips may be played. It also serves as an object from which actions can be triggered.
-
Creates a Screen annotation and initializes it using given Cos/SDF object.
Note
The constructor does not copy any data, but is instead the logical equivalent of a type cast.Parameters
d
The Cos/SDF object to initialze the annotation with.
-
Undocumented
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
-
Creates a new Screen annotation in the specified document.
Declaration
Parameters
doc
A document to which the annotation is added.
pos
A rectangle specifying the annotation’s bounds in default user space units.
Return Value
A newly created blank Screen annotation.
-
Returns the title of the annotation.
Declaration
Objective-C
- (NSString *)GetTitle;
Swift
func getTitle() -> String!
Return Value
A string representing the title of the annotation.
-
Sets the title of the Annotation. (Optional)
Declaration
Objective-C
- (void)SetTitle:(NSString *)title;
Swift
func setTitle(_ title: String!)
Parameters
title
A string representing the title of the annotation.
-
Sets the action of the Screen annotation (Optional; PDF 1.1 )
Note
The action is an action that shall be performed when the annotation is activated.Declaration
Objective-C
- (void)SetAction:(PTAction *)action;
Swift
func setAction(_ action: PTAction!)
Parameters
action
An action object representing the action of the annotation.
-
Returns the number indicating border color space of the annotation.
Declaration
Objective-C
- (int)GetBorderColorCompNum;
Swift
func getBorderColorCompNum() -> Int32
Return Value
An integer indicating a color space value from the ColorSpace::Type enum. That is, 1 corresponding to “e_device_gray”, 3 corresponding to “e_device_rgb”, and 4 corresponding to “e_device_cmyk”. 0 means this annotation had no color assigned.
-
Returns the border color of the annotation.
Note
The color can be in different color spaces: Gray, RGB, or CMYK. Call “GetBorderColorCompNum” to access the color space information corresponding to the border color.Return Value
A color object that denotes the color of the Screen border.
-
Sets the border color of the annotation. (Optional)
Declaration
Objective-C
- (void)SetBorderColor:(PTColorPt *)col numcomp:(int)numcomp;
Swift
func setBorderColor(_ col: PTColorPt!, numcomp: Int32)
Parameters
col
A color object that denotes the color of the screen border.
numcomp
An integer which value indicates the color space used for the parameter c.
-
Returns the number indicating background color space of the annotation.
Declaration
Objective-C
- (int)GetBackgroundColorCompNum;
Swift
func getBackgroundColorCompNum() -> Int32
Return Value
An integer indicating a color space value from the ColorSpace::Type enum. That is, 1 corresponding to “e_device_gray”, 3 corresponding to “e_device_rgb”, and 4 corresponding to “e_device_cmyk” if color space is applicable, 0 means no background color was assigned.
-
Returns the background color of the annotation.
Note
The color can be in different color spaces: Gray, RGB, or CMYK. Call “GetBackgroundColorCompNum” to access the color space information corresponding to the border color.Declaration
Objective-C
- (PTColorPt *)GetBackgroundColor;
Swift
func getBackgroundColor() -> PTColorPt!
Return Value
A color object that denotes the color of the Screen background.
-
Sets the background color of the annotation. (Optional)
Declaration
Objective-C
- (void)SetBackgroundColor:(PTColorPt *)col numcomp:(int)numcomp;
Swift
func setBackgroundColor(_ col: PTColorPt!, numcomp: Int32)
Parameters
col
A color point that denotes the color of the screen background.
numcomp
An integer which value indicates the color space used for the parameter c.
-
Returns static caption text of the annotation.
Note
The static caption is the annotation’s normal caption, which shall be displayed when it is not interacting with the user.Declaration
Objective-C
- (NSString *)GetStaticCaptionText;
Swift
func getStaticCaptionText() -> String!
Return Value
A string containing the static caption text of the annotation.
-
Sets static caption text of the annotation. (Optional; button fields only)
Note
The static caption is the annotation’s normal caption, which shall be displayed when it is not interacting with the user.Declaration
Objective-C
- (void)SetStaticCaptionText:(NSString *)contents;
Swift
func setStaticCaptionText(_ contents: String!)
Parameters
contents
A string containing the static caption text of the annotation.
-
Returns the rollover caption text of the annotation.
Note
The rollover caption shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.Declaration
Objective-C
- (NSString *)GetRolloverCaptionText;
Swift
func getRolloverCaptionText() -> String!
Return Value
A string containing the rollover caption text of the annotation.
-
Sets the roll over caption text of the annotation. (Optional; button fields only)
Note
The rollover caption shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.Declaration
Objective-C
- (void)SetRolloverCaptionText:(NSString *)contents;
Swift
func setRolloverCaptionText(_ contents: String!)
Parameters
contents
A string containing the roll over caption text of the annotation.
-
Returns the button down caption text of the annotation.
Note
The button down caption shall be displayed when the mouse button is pressed within its active area.Declaration
Objective-C
- (NSString *)GetMouseDownCaptionText;
Swift
func getMouseDownCaptionText() -> String!
Return Value
A string containing the button down text of the annotation.
-
Sets the button down caption text of the annotation. (Optional; button fields only)
Note
The button down caption shall be displayed when the mouse button is pressed within its active area.Declaration
Objective-C
- (void)SetMouseDownCaptionText:(NSString *)contents;
Swift
func setMouseDownCaptionText(_ contents: String!)
Parameters
contents
A string containing the button down text of the annotation.
-
Returns the static icon associated with the annotation.
Note
The static icon object is a form XObject defining the annotation’s normal icon, which shall be displayed when it is not interacting with the user.Return Value
An SDF object that represents the static icon associated with the annotation.
-
Sets the static icon associated with the annotation. (Optional; button fields only)
Note
The static icon object is a form XObject defining the annotation’s normal icon, which shall be displayed when it is not interacting with the user.Declaration
Objective-C
- (void)SetStaticIcon:(PTObj *)icon;
Swift
func setStaticIcon(_ icon: PTObj!)
Parameters
icon
An SDF object that represents the static icon associated with the annotation.
-
Returns the rollover icon associated with the annotation.
Note
The rollover icon object is a form XObject defining the annotation’s rollover icon, which shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.Return Value
An SDF object that represents the rollover icon associated with the annotation.
-
Sets the rollover icon associated with the annotation. (Optional; button fields only)
Note
The rollover icon object is a form XObject defining the annotation’s rollover icon, which shall be displayed when the user rolls the cursor into its active area without pressing the mouse button.Declaration
Objective-C
- (void)SetRolloverIcon:(PTObj *)icon;
Swift
func setRolloverIcon(_ icon: PTObj!)
Parameters
icon
An SDF object that represents the rollover icon associated with the annotation.
-
Returns the Mouse Down icon associated with the annotation.
Note
The Mouse Down icon object is a form XObject defining the annotation’s alternate (down) icon, which shall be displayed when the mouse button is pressed within its active area.Return Value
An SDF object that represents the Mouse Down icon associated with the annotation.
-
Sets the Mouse Down icon associated with the annotation. (Optional; button fields only)
Note
The Mouse Down icon object is a form XObject defining the annotation’s alternate (down) icon, which shall be displayed when the mouse button is pressed within its active area.Declaration
Objective-C
- (void)SetMouseDownIcon:(PTObj *)icon;
Swift
func setMouseDownIcon(_ icon: PTObj!)
Parameters
icon
An SDF object that represents the Mouse Down icon associated with the annotation.
-
Returns the Icon and caption relationship of the annotation.
See
IconCaptionRelationDeclaration
Objective-C
- (PTScreenIconCaptionRelation)GetIconCaptionRelation;
Swift
func getIconCaptionRelation() -> PTScreenIconCaptionRelation
Return Value
A value of the “IconCaptionRelation” enum type. Default value: e_NoIcon.
-
Sets the Icon and caption relationship of the annotation. (Optional; pushbutton fields only)
See
IconCaptionRelationDeclaration
Objective-C
- (void)SetIconCaptionRelation:(PTScreenIconCaptionRelation)icr;
Swift
func setIconCaptionRelation(_ icr: PTScreenIconCaptionRelation)
Parameters
icr
A value of the “IconCaptionRelation” enum type. Default value: e_NoIcon.
-
Returns the condition under which the icon should be scaled.
See
ScaleConditionDeclaration
Objective-C
- (PTScreenScaleCondition)GetScaleCondition;
Swift
func getScaleCondition() -> PTScreenScaleCondition
Return Value
A value of the “ScaleCondition” enum type. Default value: e_Always.
-
Sets the condition under which the icon should be scaled. (Optional)
Declaration
Objective-C
- (void)SetScaleCondition:(PTScreenScaleCondition)sc;
Swift
func setScaleCondition(_ sc: PTScreenScaleCondition)
Parameters
sc
A value of the “ScaleCondition” enum type. Default value: e_Always.
-
Returns the Scale Type of the annotation.
See
ScaleTypeDeclaration
Objective-C
- (PTScreenScaleType)GetScaleType;
Swift
func getScaleType() -> PTScreenScaleType
Return Value
A value of the “ScaleType” enum which represents the Scale Type of the annotation. Default value: P.
-
Sets the Scale Type of the annotation. (Optional)
See
ScaleTypeDeclaration
Objective-C
- (void)SetScaleType:(PTScreenScaleType)st;
Swift
func setScaleType(_ st: PTScreenScaleType)
Parameters
st
An entry of the “ScaleType” enum which represents the Scale Type of the annotation. Default value: P.
-
Returns the horizontal leftover space of the icon within the annotation.
Note
the horizontal leftover is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left. A value of 0.0 shall position the icon at the left of the annotation rectangle. A value of 0.5 shall center it in the horizontal direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.Declaration
Objective-C
- (double)GetHIconLeftOver;
Swift
func getHIconLeftOver() -> Double
Return Value
A number indicating the horizontal leftover space of the icon within the annotation.
-
Sets the horizontal leftover space of the icon within the annotation. (Optional)
Note
the horizontal leftover space is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the left. A value of 0.0 shall position the icon at the left of the annotation rectangle. A value of 0.5 shall center it in the horizontal direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.Declaration
Objective-C
- (void)SetHIconLeftOver:(double)hl;
Swift
func setHIconLeftOver(_ hl: Double)
Parameters
hl
A number indicating the horizontal leftover space of the icon within the annotation.
-
Returns the vertical leftover space of the icon within the annotation.
Note
the vertical leftover space is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the bottom of the icon. A value of 0.0 shall position the icon at the bottom of the annotation rectangle. A value of 0.5 shall center it in the vertical direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.Declaration
Objective-C
- (double)GetVIconLeftOver;
Swift
func getVIconLeftOver() -> Double
Return Value
a number indicating the vertical leftover space of the icon within the annotation.
-
Sets the vertical leftover space of the icon within the annotation. (Optional)
Note
the vertical leftover space is a number that shall be between 0.0 and 1.0 indicating the fraction of leftover space to allocate at the bottom of the icon. A value of 0.0 shall position the icon at the bottom of the annotation rectangle. A value of 0.5 shall center it in the vertical direction within the rectangle. This entry shall be used only if the icon is scaled proportionally. Default value: 0.5.Declaration
Objective-C
- (void)SetVIconLeftOver:(double)vl;
Swift
func setVIconLeftOver(_ vl: Double)
Parameters
vl
A number indicating the vertical leftover space of the icon within the annotation.
-
Returns the “fit full” flag.
Note
the fit full flag, if true, indicates that the button appearance shall be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border. Default value: false.Declaration
Objective-C
- (BOOL)GetFitFull;
Swift
func getFitFull() -> Bool
Return Value
A boolean value indicating the “fit full” flag value.
-
Sets the “fit full” flag. (Optional)
Note
the fit full flag, if true, indicates that the button appearance shall be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border. Default value: false.Declaration
Objective-C
- (void)SetFitFull:(BOOL)ff;
Swift
func setFitFull(_ ff: Bool)
Parameters
ff
A boolean value indicating the “fit full” flag value.