DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
True Drop Box
FTP/SFTP Hosting
Group Account
Team Anywhere
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Cloud-to-Cloud Backup
|
DVR/Camera Backup
FTP, Email & Web Service
FTP/SFTP Hosting
|
Email Hosting
|
Web Hosting
|
Webcam Hosting
Cloud Surveillance & Remote Desktop
Team Anywhere
|
Access Remote PC
|
Cloud Surveillance
|
Virtual CCTV NVR
Quick Links
Security and Privacy
Customer Support
Service Manual
Use Cases
Group Account
Online Help
Support Forum
Contact Us
About DriveHQ
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
Cloud Surveillance & Remote Desktop
Team Anywhere (Remote Desktop Service)
CameraFTP Cloud Surveillance
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
CameraFTP Software & Apps
DriveHQ Team Anywhere
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
CameraFTP Cloud Recording Service Plans
DriveHQ Team Anywhere Service Plans
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Sign up
Help
Support Home
Support Forum
Service Manual
Online Help
Tutorial videos
Remote Support
About DriveHQ
Contact
CameraFTP Support
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
//============================================================================= #ifndef SUBWINDOW_H #define SUBWINDOW_H #include
#include
#define NEG_INF INT_MIN #define POS_INF INT_MAX class interval { public: interval() : start_(POS_INF), end_(NEG_INF) {} interval(int start, int end) : start_(start), end_(end) {} int getStart() const { return start_; } int getEnd() const { return end_; } int length() const { return end_-start_; } void setInstant( int frm ) { start_=frm; end_=frm; } bool isJustBefore( int frm ) { return (frm==start_-1); } bool isJustAfter( int frm ) { return (frm==end_+1); } bool isAdjacent( int frm ) { return isJustBefore(frm) || isJustAfter(frm);} bool isNever() { return end_
=start_) && (frm<=end_); } interval operator+( int frm ) const; interval &operator+=( int frm ); interval operator&( const interval &oth ) const; static const interval NEVER; private: int start_, end_; }; class subWindow { public: subWindow() {} subWindow( int centerX, int centerY, int sizeX, int sizeY ); subWindow( const subWindow &src ); subWindow &operator=( const subWindow &src ); int centerX() const { return centerX_; } int centerY() const { return centerY_; } int sizeX() const { return sizeX_; } int sizeY() const { return sizeY_; } int &sizeX() { return sizeX_; } int &sizeY() { return sizeY_; } int upperLeftX() const { return centerX_-sizeX_/2; } int upperLeftY() const { return centerY_-sizeY_/2; } int lowerRightX() const { return centerX_+sizeX_/2; } int lowerRightY() const { return centerY_+sizeY_/2; } bool overlaps( const subWindow &src ) const; subWindow operator*( float scale ); private: int centerX_, centerY_; int sizeX_, sizeY_; }; class subWindowList { public: void addSubWindow( const subWindow &subWin ); subWindow getSubWindow( int i ); subWindow operator[]( int i ) { return getSubWindow(i); } void delSubWindow( int i ); int getSize(); subWindowList &operator=( const subWindowList &src ); private: vector
subWinList_; }; class sortedSubWindowList { public: void addSubWindow( float key, const subWindow &subWin ); subWindow getSubWindow( int i ); subWindow operator[]( int i ) { return getSubWindow(i); } void delSubWindow( int i ); int getSize(); sortedSubWindowList &operator=( const sortedSubWindowList &src ); void scaleAllKeys( float max, float min ); private: struct keyComp{ bool operator()(float k1,float k2) const { return k1>k2; } }; private: multimap
subWinList_; }; class subWindowListAnim { public: subWindowListAnim() {} void addSubWindow( int frm, const subWindow &subWin ); const subWindow &getSubWindow( int frm ) const; subWindow &getSubWindow( int frm ); const subWindow &operator[]( int frm ) { return getSubWindow(frm); } const interval &getInterval() const { return itv_; } bool includesFrame( int frm ) const { return itv_.includes(frm); } int getLength() const { return list_.size(); } private: vector
list_; interval itv_; }; inline interval interval::operator&( const interval &oth ) const { return interval( start_>oth.start_ ? start_ : oth.start_, end_
subWindow.h
Page URL
File URL
Prev
42/50
Next
Download
( 3 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.