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 
MediaPermission
Enumeration for PDF media player permission.
Definition: fs_rendition.h:60
common::Position GetFloatingWindowPosition() const
Get the position where floating window should be positioned to the related window.
float GetBackgroundOpacity() const
Get the background opacity. (ignored for full-screen and hidden windows)
void SetFloatingWindowSize(int width, int height, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the size of floating window, in pixels.
void SetMediaDescriptions(const WStringArray &description_array)
Set the multi-language text array that provides alternate text descriptions for the media clip data i...
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 ...
Window type: a floating window.
Definition: fs_rendition.h:131
Any of players in this type may be used in playing the associated media clip.
Definition: fs_rendition.h:80
int GetRepeatCount() const
Get the repeat count, similar to SMIL's repeatCount attribute.
int AddMediaPlayer(MediaPlayerType type, const MediaPlayer &player)
Add a media player object for specified type.
Move or resize.
Definition: fs_rendition.h:209
void SetMediaClipFile(FileSpec file_specification)
Set the file specification of the actual media data.
Players in this type must not be used in playing the associated media clip.
Definition: fs_rendition.h:82
objects::PDFDictionary * GetDict() const
Get the PDF dictionary of current object.
Position
Enumeration for watermark position in a PDF page.
Definition: fs_common.h:271
void EnableFloatingWindowTitleBar(bool is_visible, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set flag to specify if the floating window should have a title bar.
void SetFitStyle(MediaPlayerFitStyle fit_style, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the fit style.
MonitorSpecifier GetMonitorSpecifier() const
Get the monitor specifier type value.
int GetMediaPlayerCount(MediaPlayerType type) const
Get the count of media player objects for specified type.
MediaPlayerFitStyle GetFitStyle() const
Get the fit style.
bool HasFloatingWindowTitleBar() const
Check if the floating window should have a title bar.
objects::PDFDictionary * GetDict() const
Get PDF dictionary of current object.
int GetVolume() const
Get the volume that specifies the desired volume level as a percentage of recorded volume level...
May not be resized.
Definition: fs_rendition.h:191
FloatingWindowOffscreenEvent
Enumeration for offscreen event type of floating window.
Definition: fs_rendition.h:205
The full virtual desktop.
Definition: fs_rendition.h:179
Definition: fs_rendition.h:38
Definition: fs_basictypes.h:223
void SetMonitorSpecifier(MonitorSpecifier monitor_specifier, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the monitor specifier type value.
uint32 RGB
RGB color type, 24 bits, ((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:211
The monitor that contains the largest section of the document window.
Definition: fs_rendition.h:152
bool operator!=(const MediaPlayer &other) const
Not equal operator.
WindowType GetWindowType() const
Get the type of window that the media should play in.
bool HasFloatingWindowCloseButton() const
Check if the floating window should include user interface elements that allow a user to close a floa...
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...
FloatingWindowResizeType GetFloatingWindowResizeType() const
Get the resize type which specifies whether the floating window may be resized by a user...
The document window.
Definition: fs_rendition.h:175
String GetMediaClipContentType() const
Get the content type (MIME type) of the media data.
bool IsEmpty() const
Check whether current object is empty or not.
WIDE STRING CLASS.
Definition: fx_string.h:1463
void SetPermission(MediaPermission permission)
Set the media permission.
Allowed only if the document permissions allow content extraction.
Definition: fs_rendition.h:64
Definition: fs_pdfdoc.h:338
void EnableControlBarVisible(bool is_visible, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the control bar visibility flag.
May be resized without preserving aspect ratio.
Definition: fs_rendition.h:195
FloatingWindowRelatedWindowType GetFloatingWindowRelatedWindowType() const
Get the window relative type.
FloatingWindowOffscreenEvent GetFloatingWindowOffscreenEvent() const
Get the event type which specifies what should occur if the floating window is positioned totally or ...
Primary monitor. If no monitor is considered primary, use case 0.
Definition: fs_rendition.h:156
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&#39;s title bar...
Monitor with the greatest height (in pixels)
Definition: fs_rendition.h:162
MediaPlayer GetMediaPlayer(MediaPlayerType type, int index) const
Get a media player object by index for specified type.
String GetMediaBaseURL() const
Get the base URL.
WStringArray GetFloatingWindowTitles() const
Get the multi-language text array which provides text to display on the floating window&#39;s title bar...
Always allowed.
Definition: fs_rendition.h:68
Window type: a hidden window.
Definition: fs_rendition.h:135
void SetSoftwareURI(const String &uri)
Get software URI that identifies a piece of software.
Rendition(const PDFDoc &pdf_doc, objects::PDFDictionary *rendition_dict=0)
Constructor, with parameters.
Depends on monitor specifier.
Definition: fs_rendition.h:181
Monitor with the greatest area (in pixels squared)
Definition: fs_rendition.h:160
WindowType
Enumeration for the type of window that the media should play in.
Definition: fs_rendition.h:129
void SetRepeatCount(int count, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the repeat count, similar to SMIL&#39;s repeatCount attribute.
int GetDuration() const
Get the intrinsic duration.
Options defined in this type need only be honored in a "best effort" sense.
Definition: fs_rendition.h:50
String GetSoftwareURI() const
Get software URI that identifies a piece of software.
MediaOptionType
Enumeration for media option type.
Definition: fs_rendition.h:46
bool IsEmpty() const
Check whether current object is empty or not.
FileSpec GetMediaClipFile() const
Get the file specification of the actual media data.
void SetBackgroundOpacity(float opacity, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the background opacity. (ignored for full-screen and hidden windows)
WString GetMediaClipName() const
Get the name of the media clip, for use in user interface.
int GetFloatingWindowHeight() const
Get the height of floating window, in pixels.
void SetRenditionName(const WString &name)
Get the name.
Options defined in this type must be honored for rendition object to be considered viable...
Definition: fs_rendition.h:48
May be resized only if aspect ratio is preserved.
Definition: fs_rendition.h:193
bool operator==(const MediaPlayer &other) const
Equal operator.
One of players in this type must be used in playing the associated media clip.
Definition: fs_rendition.h:78
Consider the object non-viable.
Definition: fs_rendition.h:211
The application window.
Definition: fs_rendition.h:177
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
Header file for common definitions and classes.
MediaPlayer & operator=(const MediaPlayer &other)
Assign operator.
RGB GetBackgroundColor() const
Get the background color for the rectangle in which the media is being played.
Nothing.
Definition: fs_rendition.h:207
The media&#39;s width and height are scaled while preserving the aspect ratio so that the media and play ...
Definition: fs_rendition.h:98
void SetDuration(int duration, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the intrinsic duration.
Header file for PDF object related definitions and classes.
void SetBackgroundColor(RGB color, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the background color for the rectangle in which the media is being played.
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...
WString GetRenditionName() const
Get the name.
Definition: fs_basictypes.h:333
Definition: fs_basictypes.h:225
Definition: fs_rendition.h:936
MediaPermission GetPermission() const
Get the media permission.
The media is not scaled. A scrolling user interface is provided if the media rectangle is wider or ta...
Definition: fs_rendition.h:114
WStringArray GetMediaDescriptions() const
Get the multi-language text array that provides alternate text descriptions for the media clip data i...
Rendition & operator=(const Rendition &other)
Assign operator.
Definition: fs_filespec.h:24
~MediaPlayer()
Destructor.
void SetFloatingWindowPosition(common::Position position, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the position where floating window should be positioned to the related window.
bool operator!=(const Rendition &other) const
Not equal operator.
Window type: the rectangle occupied by the screen annotation which is associated with the rendition o...
Definition: fs_rendition.h:140
~Rendition()
Destructor.
void EnableAutoPlay(bool is_auto_play, MediaOptionType opt_type=e_MediaOptionBestEffort)
Check whether the media should automatically play when activated.
Definition: fs_pdfobject.h:762
StringArray GetOSIdentifiers() const
Get the string array that represents operating system identifiers.
bool operator==(const Rendition &other) const
Equal operator.
Monitor with the greatest color depth.
Definition: fs_rendition.h:158
void RemoveMediaPlayer(MediaPlayerType type, const MediaPlayer &player)
Remove a media player object for specified type.
Foxit namespace.
Definition: fs_connectedpdf.h:26
The media&#39;s width and height are scaled while preserving the aspect ratio so that the play rectangle ...
Definition: fs_rendition.h:104
BYTE STRING CLASS.
Definition: fx_string.h:317
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...
bool IsAutoPlay() const
Check whether the media should automatically play when activated.
MonitorSpecifier
Enumeration for monitor specifier type.
Definition: fs_rendition.h:150
Never allowed.
Definition: fs_rendition.h:62
void SetWindowType(WindowType window_type, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the type of window that the media should play in.
Window type: a full-screen window that obscures all other windows.
Definition: fs_rendition.h:133
Monitor with the greatest width (in pixels)
Definition: fs_rendition.h:164
#define NULL
The null-pointer value.
Definition: fx_system.h:767
void SetMediaClipContentType(const char *content_type)
Set the content type (MIME type) of the media data.
MediaPlayerFitStyle
Enumeration for the fit style.
Definition: fs_rendition.h:92
The monitor that contains the smallest section of the document window.
Definition: fs_rendition.h:154
FloatingWindowRelatedWindowType
Enumeration for the type of floating window&#39;s related window.
Definition: fs_rendition.h:173
FloatingWindowResizeType
Enumeration for resize type of floating window.
Definition: fs_rendition.h:189
void SetOSIdentifiers(const StringArray &identifier_array)
Set the string array that represents operating system identifiers.
Use the player&#39;s default setting (author has no preference).
Definition: fs_rendition.h:121
Allowed only if the document permissions allow content extraction, including for accessibility purpos...
Definition: fs_rendition.h:66
void SetFloatingWindowRelatedWindowType(FloatingWindowRelatedWindowType window_type, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the window relative type.
void SetMediaBaseURL(const String &base_url, MediaOptionType opt_type=e_MediaOptionBestEffort)
Set the base URL.
MediaPlayer(objects::PDFDictionary *media_player_dict=0)
Constructor, with parameters.
int GetFloatingWindowWidth() const
Get the width of floating window, in pixels.
void SetMediaClipName(const WString &name)
Set the name of the media clip, for use in user interface.
The media&#39;s width and height are scaled independently so that the media and play rectangles are the s...
Definition: fs_rendition.h:109
bool IsControlBarVisible() const
Check whether to display a player-specific controller user interface (for example, play/pause/stop controls) when playing.
MediaPlayerType
Enumeration for PDF media player classified type.
Definition: fs_rendition.h:76
The media is not scaled. Only the portions of the media rectangle that intersect the play rectangle a...
Definition: fs_rendition.h:119

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