Foxit PDF SDK
foxit::FloatingInfo Class Reference

Inherits Object.

Public Types

enum  OffScreenAction { e_OffScreenAllow = 0, e_OffScreenForceOnScreen = 1, e_OffScreenCancel = 2 }
 Enumeration for the action can be taken if the floating window is positioned totally or partially offscreen. More...
 
enum  RelativeTarget { e_RelativeTargetPageWindow = 0, e_RelativeTargetAppWindow = 1, e_RelativeTargetDesktop = 2, e_RelativeTargetMonitor = 3 }
 Enumeration for the values used to set relative position of floating window. More...
 
enum  ResizeType { e_ResizeTypeNo = 0, e_ResizeTypeKeepRatio = 1, e_ResizeTypeYes = 2 }
 Enumeration for the resize type, which specifies whether a floating window may be resized by the user. More...
 
enum  WindowPosition {
  e_WindowPositionTopLeft = 0, e_WindowPositionTopCenter = 1, e_WindowPositionTopRight = 2, e_WindowPositionCenterLeft = 3,
  e_WindowPositionCenter = 4, e_WindowPositionCenterRight = 5, e_WindowPositionBottomLeft = 6, e_WindowPositionBottomCenter = 7,
  e_WindowPositionBottomRight = 8
}
 Enumeration for the window position used for media player. More...
 

Public Member Functions

 FloatingInfo ()
 Constructor.
 
 FloatingInfo (WindowPosition window_pos, RelativeTarget relative_target, ResizeType resize_type, bool has_close, bool has_title, const wchar_t *title, OffScreenAction off_screen, const RectF &rect)
 Constructor, with parameters. More...
 
 FloatingInfo (const FloatingInfo &floating_info)
 Constructor, with another floating infomation object. More...
 
FloatingInfooperator= (const FloatingInfo &floating_info)
 Assign operator. More...
 
void Set (WindowPosition window_pos, RelativeTarget relative_target, ResizeType resize_type, bool has_close, bool has_title, const wchar_t *title, OffScreenAction off_screen, const RectF &rect)
 Set values. More...
 

Public Attributes

bool has_close
 true means the floating window should have a close window control button, while false means not.
 
bool has_title
 true means a title should be displayed in the title bar, while false means not.
 
OffScreenAction off_screen
 Specify what action should be taken if the floating window is positioned totally or partially offscreen. Please refer to values starting from FloatingInfo::e_OffScreenAllow and this should be one of these values.
 
RectF rect
 A rectangle specifies the location and size of the floating window in device coordinate system.
 
RelativeTarget relative_target
 Specify the target to which the floating window is to be aligned. Please refer to values starting from FloatingInfo::e_RelativeTargetPageWindow and this should be one of these values.
 
ResizeType resize_type
 Specify whether the floating window may be resized by the user. Please refer to values starting from FloatingInfo::e_ResizeTypeNo and this should be one of these values.
 
WString title
 This title to be displayed if has_title is true.
 
WindowPosition window_pos
 Specify how the floating window is to be positioned relative to the window specified by the relative_target . Please refer to values starting from FloatingInfo::e_WindowPositionTopLeft and this should be one of these values.
 

Detailed Description

This class represents floating imformation.

Member Enumeration Documentation

◆ OffScreenAction

Enumeration for the action can be taken if the floating window is positioned totally or partially offscreen.

Values of this enumeration should be used alone.

Enumerator
e_OffScreenAllow 

Off screen action: take no action.

e_OffScreenForceOnScreen 

Off screen action: move or resize the window so that it is on-screen.

e_OffScreenCancel 

Off screen action: cancel playing the media clip.

◆ RelativeTarget

Enumeration for the values used to set relative position of floating window.

Values of this enumeration should be used alone.

Enumerator
e_RelativeTargetPageWindow 

Relative type: align the floating window relative to the document (page) window.

e_RelativeTargetAppWindow 

Relative type: align the floating window relative to the application window.

e_RelativeTargetDesktop 

Relative type: align the floating window relative to the full virtual desktop.

e_RelativeTargetMonitor 

Relative type: align the floating window relative to the (selected) monitor display screen.

◆ ResizeType

Enumeration for the resize type, which specifies whether a floating window may be resized by the user.

Values of this enumeration should be used alone.

Enumerator
e_ResizeTypeNo 

Resize type: may not be resized.

e_ResizeTypeKeepRatio 

Resize type: may be resized only if the aspect ratio is preserved.

e_ResizeTypeYes 

Resize type: may be resized without preserving the aspect ratio.

◆ WindowPosition

Enumeration for the window position used for media player.

Values of this enumeration should be used alone.

Enumerator
e_WindowPositionTopLeft 

Window position: at the top left corner.

e_WindowPositionTopCenter 

Window position: at the top center.

e_WindowPositionTopRight 

Window position: at the top right corner.

e_WindowPositionCenterLeft 

Window position: at the center left.

e_WindowPositionCenter 

Window position: at the center.

e_WindowPositionCenterRight 

Window position: at the center right.

e_WindowPositionBottomLeft 

Window position: at the bottom left corner.

e_WindowPositionBottomCenter 

Window position: at the bottom center.

e_WindowPositionBottomRight 

Window position: at the bottom right corner.

Constructor & Destructor Documentation

◆ FloatingInfo() [1/2]

foxit::FloatingInfo::FloatingInfo ( WindowPosition  window_pos,
RelativeTarget  relative_target,
ResizeType  resize_type,
bool  has_close,
bool  has_title,
const wchar_t *  title,
OffScreenAction  off_screen,
const RectF rect 
)
inline

Constructor, with parameters.

Parameters
[in]window_posSpecify how the floating window is to be positioned relative to the window specified by the relative_target .
[in]relative_targetSpecify the window to which the floating window is to be aligned.
[in]resize_typeSpecify whether the floating window may be resized by the user.
[in]has_closetrue means the floating window should have a close window control button, while false means not.
[in]has_titletrue means a title should be displayed in the title bar, while false means not.
[in]titleThis title to be displayed if has_title is true.
[in]off_screenSpecify what action should be taken if the floating window is positioned totally or partially offscreen.
[in]rectA rectangle specifies the location and size of the floating window in device coordinate system.

◆ FloatingInfo() [2/2]

foxit::FloatingInfo::FloatingInfo ( const FloatingInfo floating_info)
inline

Constructor, with another floating infomation object.

Parameters
[in]floating_infoAnother floating infomation object.

Member Function Documentation

◆ operator=()

FloatingInfo& foxit::FloatingInfo::operator= ( const FloatingInfo floating_info)
inline

Assign operator.

Parameters
[in]floating_infoAnother floating infomation object.
Returns
Reference to current object itself.

◆ Set()

void foxit::FloatingInfo::Set ( WindowPosition  window_pos,
RelativeTarget  relative_target,
ResizeType  resize_type,
bool  has_close,
bool  has_title,
const wchar_t *  title,
OffScreenAction  off_screen,
const RectF rect 
)
inline

Set values.

Parameters
[in]window_posSpecify how the floating window is to be positioned relative to the window specified by the relative_target .
[in]relative_targetSpecify the window to which the floating window is to be aligned.
[in]resize_typeSpecify whether the floating window may be resized by the user.
[in]has_closetrue means the floating window should have a close window control button, while false means not.
[in]has_titletrue means a title should be displayed in the title bar, while false means not.
[in]titleThis title to be displayed if has_title is true.
[in]off_screenSpecify what action should be taken if the floating window is positioned totally or partially offscreen.
[in]rectA rectangle specifies the location and size of the floating window in device coordinate system.
Returns
None.