Initial
This commit is contained in:
110
tooltip/HITTEST.HPP
Normal file
110
tooltip/HITTEST.HPP
Normal file
@@ -0,0 +1,110 @@
|
||||
#ifndef _TOOLTIP_HITTESTINFO_HPP_
|
||||
#define _TOOLTIP_HITTESTINFO_HPP_
|
||||
#ifndef _COMMON_COMMCTRL_HPP_
|
||||
#include <common/commctrl.hpp>
|
||||
#endif
|
||||
#ifndef _TOOLTIP_TOOLINFO_HPP_
|
||||
#include <tooltip/toolinfo.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_POINT_HPP_
|
||||
#include <common/point.hpp>
|
||||
#endif
|
||||
|
||||
class PureHitTestInfo : private TTHITTESTINFO
|
||||
{
|
||||
public:
|
||||
PureHitTestInfo(void);
|
||||
PureHitTestInfo(const PureHitTestInfo &somePureHitTestInfo);
|
||||
~PureHitTestInfo();
|
||||
PureHitTestInfo &operator=(const PureHitTestInfo &somePureHitTestInfo);
|
||||
WORD operator==(const PureHitTestInfo &somePureHitTestInfo)const;
|
||||
HWND hwnd(void)const;
|
||||
void hwnd(HWND hWnd);
|
||||
Point point(void)const;
|
||||
void point(const Point &point);
|
||||
PureToolInfo toolInfo(void)const;
|
||||
void toolInfo(const PureToolInfo &somePureToolInfo);
|
||||
private:
|
||||
void zeroInit(void);
|
||||
};
|
||||
|
||||
inline
|
||||
PureHitTestInfo::PureHitTestInfo(void)
|
||||
{
|
||||
zeroInit();
|
||||
}
|
||||
|
||||
inline
|
||||
PureHitTestInfo::PureHitTestInfo(const PureHitTestInfo &somePureHitTestInfo)
|
||||
{
|
||||
*this=somePureHitTestInfo;
|
||||
}
|
||||
|
||||
inline
|
||||
PureHitTestInfo::~PureHitTestInfo()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
PureHitTestInfo &PureHitTestInfo::operator=(const PureHitTestInfo &somePureHitTestInfo)
|
||||
{
|
||||
hwnd(somePureHitTestInfo.hwnd());
|
||||
point(somePureHitTestInfo.point());
|
||||
toolInfo(somePureHitTestInfo.toolInfo());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD PureHitTestInfo::operator==(const PureHitTestInfo &somePureHitTestInfo)const
|
||||
{
|
||||
return (hwnd()==somePureHitTestInfo.hwnd()&&
|
||||
point()==somePureHitTestInfo.point()&&
|
||||
toolInfo()==somePureHitTestInfo.toolInfo());
|
||||
}
|
||||
|
||||
inline
|
||||
HWND PureHitTestInfo::hwnd(void)const
|
||||
{
|
||||
return TTHITTESTINFO::hwnd;
|
||||
}
|
||||
|
||||
inline
|
||||
void PureHitTestInfo::hwnd(HWND hWnd)
|
||||
{
|
||||
TTHITTESTINFO::hwnd=hWnd;
|
||||
}
|
||||
|
||||
inline
|
||||
Point PureHitTestInfo::point(void)const
|
||||
{
|
||||
return Point(TTHITTESTINFO::pt.x,TTHITTESTINFO::pt.y);
|
||||
}
|
||||
|
||||
inline
|
||||
void PureHitTestInfo::point(const Point &point)
|
||||
{
|
||||
TTHITTESTINFO::pt.x=point.x();
|
||||
TTHITTESTINFO::pt.y=point.y();
|
||||
}
|
||||
|
||||
inline
|
||||
PureToolInfo PureHitTestInfo::toolInfo(void)const
|
||||
{
|
||||
return PureToolInfo(TTHITTESTINFO::ti);
|
||||
}
|
||||
|
||||
inline
|
||||
void PureHitTestInfo::toolInfo(const PureToolInfo &somePureToolInfo)
|
||||
{
|
||||
((PureToolInfo&)TTHITTESTINFO::ti)=somePureToolInfo;
|
||||
}
|
||||
|
||||
inline
|
||||
void PureHitTestInfo::zeroInit(void)
|
||||
{
|
||||
TTHITTESTINFO::hwnd=0;
|
||||
TTHITTESTINFO::pt.x=0;
|
||||
TTHITTESTINFO::pt.y=0;
|
||||
((PureToolInfo&)TTHITTESTINFO::ti)=PureToolInfo();
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user