Initial
This commit is contained in:
115
imagelst/HITTEST.HPP
Normal file
115
imagelst/HITTEST.HPP
Normal file
@@ -0,0 +1,115 @@
|
||||
#ifndef _IMAGELIST_HITTEST_HPP_
|
||||
#define _IMAGELIST_HITTEST_HPP_
|
||||
#ifndef _COMMON_WINDOWS_HPP_
|
||||
#include <common/windows.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_COMMCTRL_HPP_
|
||||
#include <common/commctrl.hpp>
|
||||
#endif
|
||||
#ifndef _COMMON_GDIPOINT_HPP_
|
||||
#include <common/gdipoint.hpp>
|
||||
#endif
|
||||
|
||||
class HitTestInfo : private TV_HITTESTINFO
|
||||
{
|
||||
public:
|
||||
enum{HitTestAbove=TVHT_ABOVE,HitTestBelow=TVHT_BELOW,HitTestNoWhere=TVHT_NOWHERE,
|
||||
HitTestOnItem=TVHT_ONITEM,HitTestOnItemButton=TVHT_ONITEMBUTTON,
|
||||
HitTestOnItemIcon=TVHT_ONITEMICON,HitTestOnItemIndent=TVHT_ONITEMINDENT,
|
||||
HitTestOnItemLabel=TVHT_ONITEMLABEL,HitTestOnItemRight=TVHT_ONITEMRIGHT,
|
||||
HitTestToLeft=TVHT_TOLEFT,HitTestToRight=TVHT_TORIGHT};
|
||||
HitTestInfo(void);
|
||||
HitTestInfo(const HitTestInfo &someHitTestInfo);
|
||||
~HitTestInfo();
|
||||
HitTestInfo &operator=(const HitTestInfo &someHitTestInfo);
|
||||
WORD operator==(const HitTestInfo &someHitTestInfo);
|
||||
operator TV_HITTESTINFO&(void);
|
||||
GDIPoint point(void)const;
|
||||
void point(const GDIPoint &somePoint);
|
||||
UINT flags(void)const;
|
||||
void flags(UINT flags);
|
||||
HTREEITEM item(void)const;
|
||||
void item(HTREEITEM item);
|
||||
private:
|
||||
};
|
||||
|
||||
inline
|
||||
HitTestInfo::HitTestInfo(void)
|
||||
{
|
||||
point(GDIPoint(0,0));
|
||||
flags(0);
|
||||
item(0);
|
||||
}
|
||||
|
||||
inline
|
||||
HitTestInfo::HitTestInfo(const HitTestInfo &someHitTestInfo)
|
||||
{
|
||||
*this=someHitTestInfo;
|
||||
}
|
||||
|
||||
inline
|
||||
HitTestInfo::~HitTestInfo()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
HitTestInfo &HitTestInfo::operator=(const HitTestInfo &someHitTestInfo)
|
||||
{
|
||||
point(someHitTestInfo.point());
|
||||
flags(someHitTestInfo.flags());
|
||||
item(someHitTestInfo.item());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
WORD HitTestInfo::operator==(const HitTestInfo &someHitTestInfo)
|
||||
{
|
||||
return (point()==someHitTestInfo.point()&&
|
||||
flags()==someHitTestInfo.flags()&&
|
||||
item()==someHitTestInfo.item());
|
||||
}
|
||||
|
||||
inline
|
||||
HitTestInfo::operator TV_HITTESTINFO&(void)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
GDIPoint HitTestInfo::point(void)const
|
||||
{
|
||||
return GDIPoint(TV_HITTESTINFO::pt.x,TV_HITTESTINFO::pt.y);
|
||||
}
|
||||
|
||||
inline
|
||||
void HitTestInfo::point(const GDIPoint &somePoint)
|
||||
{
|
||||
TV_HITTESTINFO::pt.x=somePoint.x();
|
||||
TV_HITTESTINFO::pt.y=somePoint.y();
|
||||
}
|
||||
|
||||
inline
|
||||
UINT HitTestInfo::flags(void)const
|
||||
{
|
||||
return TV_HITTESTINFO::flags;
|
||||
}
|
||||
|
||||
inline
|
||||
void HitTestInfo::flags(UINT flags)
|
||||
{
|
||||
TV_HITTESTINFO::flags=flags;
|
||||
}
|
||||
|
||||
inline
|
||||
HTREEITEM HitTestInfo::item(void)const
|
||||
{
|
||||
return TV_HITTESTINFO::hItem;
|
||||
}
|
||||
|
||||
inline
|
||||
void HitTestInfo::item(HTREEITEM item)
|
||||
{
|
||||
TV_HITTESTINFO::hItem=item;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user