My Project
fs_rendition.h
Go to the documentation of this file.
1 
14 #ifndef FS_RENDITION_H_
15 #define FS_RENDITION_H_
16 
17 #include "common/fs_common.h"
19 
25 namespace foxit {
29 namespace pdf {
30 // forward declaration
31 class FileSpec;
32 class MediaPlayer;
33 
38 class Rendition FS_FINAL : public Base {
39  public:
46  typedef enum _MediaOptionType {
52 
60  typedef enum _MediaPermission {
70 
76  typedef enum _MediaPlayerType {
84 
92  typedef enum _MediaPlayerFitStyle {
123 
129  typedef enum _WindowType {
141  } WindowType;
142 
150  typedef enum _MonitorSpecifier {
166 
173  typedef enum _FloatingWindowRelatedWindowType {
183 
189  typedef enum _FloatingWindowResizeType {
197 
205  typedef enum _FloatingWindowOffscreenEvent {
213 
214 
224  Rendition(const PDFDoc& pdf_doc, objects::PDFDictionary* rendition_dict = NULL);
226  ~Rendition();
227 
233  Rendition(const Rendition& other);
241  Rendition& operator = (const Rendition& other);
249  bool operator == (const Rendition& other) const;
257  bool operator != (const Rendition& other) const;
265  bool IsEmpty() const;
266 
273 
281  WString GetRenditionName() const;
291  void SetRenditionName(const WString& name);
292 
299  bool HasMediaClip() const;
305  WString GetMediaClipName() const;
313  void SetMediaClipName(const WString& name);
319  FileSpec GetMediaClipFile() const;
330  void SetMediaClipFile(FileSpec file_specification);
331 
355  void SetMediaClipContentType(const char* content_type);
356 
378  void SetPermission(MediaPermission permission);
379 
401  void SetMediaDescriptions(const WStringArray &description_array);
402 
410  String GetMediaBaseURL() const;
423  void SetMediaBaseURL(const String& base_url, MediaOptionType opt_type = e_MediaOptionBestEffort);
424 
433  int GetMediaPlayerCount(MediaPlayerType type) const;
444  MediaPlayer GetMediaPlayer(MediaPlayerType type, int index) const;
462  int AddMediaPlayer(MediaPlayerType type, const MediaPlayer &player);
472  void RemoveMediaPlayer(MediaPlayerType type, const MediaPlayer &player);
473 
480  int GetVolume() const;
491  void SetVolume(int volume, MediaOptionType opt_type = e_MediaOptionBestEffort);
492 
501  bool IsControlBarVisible() const;
516  void EnableControlBarVisible(bool is_visible, MediaOptionType opt_type = e_MediaOptionBestEffort);
517 
544 
556  int GetDuration() const;
572  void SetDuration(int duration, MediaOptionType opt_type = e_MediaOptionBestEffort);
573 
582  bool IsAutoPlay() const;
595  void EnableAutoPlay(bool is_auto_play, MediaOptionType opt_type = e_MediaOptionBestEffort);
596 
603  int GetRepeatCount() const;
614  void SetRepeatCount(int count, MediaOptionType opt_type = e_MediaOptionBestEffort);
615 
623  WindowType GetWindowType() const;
635  void SetWindowType(WindowType window_type, MediaOptionType opt_type = e_MediaOptionBestEffort);
636 
643  RGB GetBackgroundColor() const;
655 
664  float GetBackgroundOpacity() const;
676  void SetBackgroundOpacity(float opacity, MediaOptionType opt_type = e_MediaOptionBestEffort);
677 
705 
713  int GetFloatingWindowWidth() const;
721  int GetFloatingWindowHeight() const;
735  void SetFloatingWindowSize(int width, int height, MediaOptionType opt_type = e_MediaOptionBestEffort);
736 
765 
793 
822 
832  bool HasFloatingWindowTitleBar() const;
846  void EnableFloatingWindowTitleBar(bool is_visible, MediaOptionType opt_type = e_MediaOptionBestEffort);
847 
859  bool HasFloatingWindowCloseButton() const;
876 
902 
928 
929  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
930  explicit Rendition(FS_HANDLE handle = NULL);
931 };
932 
936 class MediaPlayer FS_FINAL : public Base {
937  public:
951  MediaPlayer(objects::PDFDictionary* media_player_dict = NULL);
953  ~MediaPlayer();
954 
960  MediaPlayer(const MediaPlayer& other);
968  MediaPlayer& operator = (const MediaPlayer& other);
976  bool operator == (const MediaPlayer& other) const;
984  bool operator != (const MediaPlayer& other) const;
992  bool IsEmpty() const;
993 
1007  String GetSoftwareURI() const;
1018  void SetSoftwareURI(const String& uri);
1019 
1030  StringArray GetOSIdentifiers() const;
1043  void SetOSIdentifiers(const StringArray& identifier_array);
1044 
1045  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1046  explicit MediaPlayer(FS_HANDLE handle);
1047 };
1048 } // namespace pdf
1049 } // namespace foxit
1050 
1051 #endif // FS_RENDITION_H_
1052 
May not be resized.
Definition: fs_rendition.h:191
The monitor that contains the smallest section of the document window.
Definition: fs_rendition.h:154
The media's width and height are scaled independently so that the media and play rectangles are the s...
Definition: fs_rendition.h:109
void SetFloatingWindowTitles(const WStringArray &titles, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the multi-language text array which provides text to display on the floating window's title bar.
Definition: fs_rendition.h:936
int GetFloatingWindowHeight() const
Get the height of floating window, in pixels.
Allowed only if the document permissions allow content extraction, including for accessibility purpos...
Definition: fs_rendition.h:66
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:216
Definition: fs_filespec.h:38
FileSpec GetMediaClipFile() const
Get the file specification of the actual media data.
The document window.
Definition: fs_rendition.h:175
MediaOptionType
Enumeration for media option type.
Definition: fs_rendition.h:46
The monitor that contains the largest section of the document window.
Definition: fs_rendition.h:152
Definition: fs_basictypes.h:228
void SetFloatingWindowRelatedWindowType(FloatingWindowRelatedWindowType window_type, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the window relative type.
WString GetRenditionName() const
Get the name.
MediaPlayer GetMediaPlayer(MediaPlayerType type, int index) const
Get a media player object by index for specified type.
Any of players in this type may be used in playing the associated media clip.
Definition: fs_rendition.h:80
Position
Enumeration for watermark position in a PDF page.
Definition: fs_common.h:273
Move or resize.
Definition: fs_rendition.h:209
bool operator !=(const Rendition &other) const
Not equal operator.
void SetWindowType(WindowType window_type, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the type of window that the media should play in.
void EnableFloatingWindowTitleBar(bool is_visible, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set flag to specify if the floating window should have a title bar.
Window type: a floating window.
Definition: fs_rendition.h:131
WStringArray GetFloatingWindowTitles() const
Get the multi-language text array which provides text to display on the floating window's title bar.
void SetRepeatCount(int count, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the repeat count, similar to SMIL's repeatCount attribute.
void SetFloatingWindowOffscreenEvent(FloatingWindowOffscreenEvent offscreen_event, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the event type which specifies what should occur if the floating window is positioned totally or ...
void SetFloatingWindowSize(int width, int height, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the size of floating window, in pixels.
FloatingWindowResizeType
Enumeration for resize type of floating window.
Definition: fs_rendition.h:189
objects::PDFDictionary * GetDict() const
Get the PDF dictionary of current object.
Header file for common definitions and classes.
The full virtual desktop.
Definition: fs_rendition.h:179
void SetFloatingWindowPosition(common::Position position, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the position where floating window should be positioned to the related window.
bool IsEmpty() const
Check whether current object is empty or not.
void SetDuration(int duration, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the intrinsic duration.
void SetMediaClipFile(FileSpec file_specification)
Set the file specification of the actual media data.
Monitor with the greatest height (in pixels)
Definition: fs_rendition.h:162
FloatingWindowRelatedWindowType GetFloatingWindowRelatedWindowType() const
Get the window relative type.
void SetSoftwareURI(const String &uri)
Get software URI that identifies a piece of software.
~Rendition()
Destructor.
Primary monitor. If no monitor is considered primary, use case 0.
Definition: fs_rendition.h:156
Window type: a hidden window.
Definition: fs_rendition.h:135
Monitor with the greatest area (in pixels squared)
Definition: fs_rendition.h:160
Definition: fs_rendition.h:38
void SetMediaBaseURL(const String &base_url, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the base URL.
objects::PDFDictionary * GetDict() const
Get PDF dictionary of current object.
int GetRepeatCount() const
Get the repeat count, similar to SMIL's repeatCount attribute.
FloatingWindowOffscreenEvent
Enumeration for offscreen event type of floating window.
Definition: fs_rendition.h:205
Allowed only if the document permissions allow content extraction.
Definition: fs_rendition.h:64
May be resized without preserving aspect ratio.
Definition: fs_rendition.h:195
void SetMediaClipContentType(const char *content_type)
Set the content type (MIME type) of the media data.
void SetBackgroundOpacity(float opacity, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the background opacity. (ignored for full-screen and hidden windows)
RGB GetBackgroundColor() const
Get the background color for the rectangle in which the media is being played.
String GetMediaClipContentType() const
Get the content type (MIME type) of the media data.
WString GetMediaClipName() const
Get the name of the media clip, for use in user interface.
BYTE STRING CLASS.
Definition: fx_string.h:317
Options defined in this type must be honored for rendition object to be considered viable.
Definition: fs_rendition.h:48
bool IsControlBarVisible() const
Check whether to display a player-specific controller user interface (for example,...
MonitorSpecifier GetMonitorSpecifier() const
Get the monitor specifier type value.
MediaPlayerFitStyle
Enumeration for the fit style.
Definition: fs_rendition.h:92
bool operator !=(const MediaPlayer &other) const
Not equal operator.
MediaPermission GetPermission() const
Get the media permission.
WStringArray GetMediaDescriptions() const
Get the multi-language text array that provides alternate text descriptions for the media clip data i...
Consider the object non-viable.
Definition: fs_rendition.h:211
bool operator==(const Rendition &other) const
Equal operator.
The application window.
Definition: fs_rendition.h:177
String GetSoftwareURI() const
Get software URI that identifies a piece of software.
bool HasMediaClip() const
Check if current rendition object contains a media clip.
void EnableFloatingWindowCloseButton(bool is_visible, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the flag to specify if the floating window should include user interface elements that allow a us...
Depends on monitor specifier.
Definition: fs_rendition.h:181
void SetMonitorSpecifier(MonitorSpecifier monitor_specifier, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the monitor specifier type value.
bool IsEmpty() const
Check whether current object is empty or not.
Always allowed.
Definition: fs_rendition.h:68
Header file for PDF object related definitions and classes.
Nothing.
Definition: fs_rendition.h:207
void SetMediaClipName(const WString &name)
Set the name of the media clip, for use in user interface.
void SetMediaDescriptions(const WStringArray &description_array)
Set the multi-language text array that provides alternate text descriptions for the media clip data i...
Foxit namespace.
Definition: fs_connectedpdf.h:26
Options defined in this type need only be honored in a "best effort" sense.
Definition: fs_rendition.h:50
bool operator==(const MediaPlayer &other) const
Equal operator.
Window type: the rectangle occupied by the screen annotation which is associated with the rendition o...
Definition: fs_rendition.h:140
StringArray GetOSIdentifiers() const
Get the string array that represents operating system identifiers.
void SetFitStyle(MediaPlayerFitStyle fit_style, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the fit style.
void EnableControlBarVisible(bool is_visible, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the control bar visibility flag.
bool HasFloatingWindowTitleBar() const
Check if the floating window should have a title bar.
MediaPlayerType
Enumeration for PDF media player classified type.
Definition: fs_rendition.h:76
Monitor with the greatest color depth.
Definition: fs_rendition.h:158
Definition: fs_pdfobject.h:763
int AddMediaPlayer(MediaPlayerType type, const MediaPlayer &player)
Add a media player object for specified type.
May be resized only if aspect ratio is preserved.
Definition: fs_rendition.h:193
int GetDuration() const
Get the intrinsic duration.
float GetBackgroundOpacity() const
Get the background opacity. (ignored for full-screen and hidden windows)
FloatingWindowRelatedWindowType
Enumeration for the type of floating window's related window.
Definition: fs_rendition.h:173
MediaPlayerFitStyle GetFitStyle() const
Get the fit style.
void SetPermission(MediaPermission permission)
Set the media permission.
WindowType GetWindowType() const
Get the type of window that the media should play in.
The media's width and height are scaled while preserving the aspect ratio so that the play rectangle ...
Definition: fs_rendition.h:104
One of players in this type must be used in playing the associated media clip.
Definition: fs_rendition.h:78
MediaPlayer & operator=(const MediaPlayer &other)
Assign operator.
#define NULL
The null-pointer value.
Definition: fx_system.h:773
MediaPermission
Enumeration for PDF media player permission.
Definition: fs_rendition.h:60
bool IsAutoPlay() const
Check whether the media should automatically play when activated.
FloatingWindowOffscreenEvent GetFloatingWindowOffscreenEvent() const
Get the event type which specifies what should occur if the floating window is positioned totally or ...
uint32 RGB
RGB color type, 24 bits, ((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:214
Definition: fs_pdfdoc.h:338
~MediaPlayer()
Destructor.
void SetOSIdentifiers(const StringArray &identifier_array)
Set the string array that represents operating system identifiers.
void SetBackgroundColor(RGB color, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the background color for the rectangle in which the media is being played.
Rendition & operator=(const Rendition &other)
Assign operator.
The media is not scaled. A scrolling user interface is provided if the media rectangle is wider or ta...
Definition: fs_rendition.h:114
String GetMediaBaseURL() const
Get the base URL.
common::Position GetFloatingWindowPosition() const
Get the position where floating window should be positioned to the related window.
Definition: fs_basictypes.h:226
The media's width and height are scaled while preserving the aspect ratio so that the media and play ...
Definition: fs_rendition.h:98
void SetRenditionName(const WString &name)
Get the name.
Use the player's default setting (author has no preference).
Definition: fs_rendition.h:121
void RemoveMediaPlayer(MediaPlayerType type, const MediaPlayer &player)
Remove a media player object for specified type.
int GetFloatingWindowWidth() const
Get the width of floating window, in pixels.
void EnableAutoPlay(bool is_auto_play, MediaOptionType opt_type=e_MediaOptionBestEffort)
Check whether the media should automatically play when activated.
WIDE STRING CLASS.
Definition: fx_string.h:1470
MediaPlayer(objects::PDFDictionary *media_player_dict=0)
Constructor, with parameters.
The media is not scaled. Only the portions of the media rectangle that intersect the play rectangle a...
Definition: fs_rendition.h:119
MonitorSpecifier
Enumeration for monitor specifier type.
Definition: fs_rendition.h:150
int GetMediaPlayerCount(MediaPlayerType type) const
Get the count of media player objects for specified type.
bool HasFloatingWindowCloseButton() const
Check if the floating window should include user interface elements that allow a user to close a floa...
Monitor with the greatest width (in pixels)
Definition: fs_rendition.h:164
FloatingWindowResizeType GetFloatingWindowResizeType() const
Get the resize type which specifies whether the floating window may be resized by a user.
Rendition(const PDFDoc &pdf_doc, objects::PDFDictionary *rendition_dict=0)
Constructor, with parameters.
Never allowed.
Definition: fs_rendition.h:62
int GetVolume() const
Get the volume that specifies the desired volume level as a percentage of recorded volume level.
Definition: fs_basictypes.h:342
void SetVolume(int volume, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the volume that specifies the desired volume level as a percentage of recorded volume level.
void SetFloatingWindowResizeType(FloatingWindowResizeType resize_type, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the resize type which specifies whether the floating window may be resized by a user.
Window type: a full-screen window that obscures all other windows.
Definition: fs_rendition.h:133
WindowType
Enumeration for the type of window that the media should play in.
Definition: fs_rendition.h:129
Players in this type must not be used in playing the associated media clip.
Definition: fs_rendition.h:82

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.