209 lines
3.9 KiB
Plaintext
209 lines
3.9 KiB
Plaintext
#ifndef _TOOLTIP_TOOLINFO_HPP_
|
|
#define _TOOLTIP_TOOLINFO_HPP_
|
|
#ifndef _COMMON_COMMCTRL_HPP_
|
|
#include <common/commctrl.hpp>
|
|
#endif
|
|
#ifndef _COMMON_RECTANGLE_HPP_
|
|
#include <common/rect.hpp>
|
|
#endif
|
|
|
|
class PureToolInfo : private TOOLINFO
|
|
{
|
|
public:
|
|
enum Flags{IDIsHwnd=TTF_IDISHWND,CenterTip=TTF_CENTERTIP,RTLReading=TTF_RTLREADING,SubClass=TTF_SUBCLASS};
|
|
PureToolInfo(void);
|
|
PureToolInfo(const PureToolInfo &somePureToolInfo);
|
|
PureToolInfo(const TOOLINFO &someTOOLINFO);
|
|
~PureToolInfo();
|
|
PureToolInfo &operator=(const PureToolInfo &somePureToolInfo);
|
|
PureToolInfo &operator=(const TOOLINFO &someTOOLINFO);
|
|
WORD operator==(const PureToolInfo somePureToolInfo)const;
|
|
operator TOOLINFO&(void);
|
|
UINT flags(void)const;
|
|
void flags(UINT flags);
|
|
HWND hwnd(void)const;
|
|
void hwnd(HWND hWnd);
|
|
UINT toolID(void)const;
|
|
void toolID(UINT toolID);
|
|
Rect rect(void)const;
|
|
void rect(const Rect &toolRect);
|
|
HINSTANCE resInst(void)const;
|
|
void resInst(HINSTANCE resInst);
|
|
LPTSTR szText(void)const;
|
|
void szText(LPTSTR szText);
|
|
private:
|
|
UINT sizeInfo(void)const;
|
|
void sizeInfo(UINT sizeInfo);
|
|
void zeroInit(void);
|
|
};
|
|
|
|
inline
|
|
PureToolInfo::PureToolInfo(void)
|
|
{
|
|
zeroInit();
|
|
sizeInfo(sizeof(TOOLINFO));
|
|
}
|
|
|
|
inline
|
|
PureToolInfo::PureToolInfo(const PureToolInfo &somePureToolInfo)
|
|
{
|
|
sizeInfo(sizeof(TOOLINFO));
|
|
*this=somePureToolInfo;
|
|
}
|
|
|
|
inline
|
|
PureToolInfo::PureToolInfo(const TOOLINFO &someTOOLINFO)
|
|
{
|
|
sizeInfo(sizeof(TOOLINFO));
|
|
*this=someTOOLINFO;
|
|
}
|
|
|
|
inline
|
|
PureToolInfo::~PureToolInfo()
|
|
{
|
|
}
|
|
|
|
inline
|
|
PureToolInfo::operator TOOLINFO&(void)
|
|
{
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
PureToolInfo &PureToolInfo::operator=(const PureToolInfo &somePureToolInfo)
|
|
{
|
|
flags(somePureToolInfo.flags());
|
|
hwnd(somePureToolInfo.hwnd());
|
|
toolID(somePureToolInfo.toolID());
|
|
rect(somePureToolInfo.rect());
|
|
resInst(somePureToolInfo.resInst());
|
|
szText(somePureToolInfo.szText());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
PureToolInfo &PureToolInfo::operator=(const TOOLINFO &someTOOLINFO)
|
|
{
|
|
flags(someTOOLINFO.uFlags);
|
|
hwnd(someTOOLINFO.hwnd);
|
|
toolID(someTOOLINFO.uId);
|
|
rect(someTOOLINFO.rect);
|
|
resInst(someTOOLINFO.hinst);
|
|
szText(someTOOLINFO.lpszText);
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
WORD PureToolInfo::operator==(const PureToolInfo somePureToolInfo)const
|
|
{
|
|
return (flags()==somePureToolInfo.flags()&&
|
|
hwnd()==somePureToolInfo.hwnd()&&
|
|
toolID()==somePureToolInfo.toolID()&&
|
|
rect()==somePureToolInfo.rect()&&
|
|
resInst()==somePureToolInfo.resInst()&&
|
|
szText()==somePureToolInfo.szText());
|
|
}
|
|
|
|
inline
|
|
UINT PureToolInfo::flags(void)const
|
|
{
|
|
return TOOLINFO::uFlags;
|
|
}
|
|
|
|
inline
|
|
void PureToolInfo::flags(UINT flags)
|
|
{
|
|
TOOLINFO::uFlags=flags;
|
|
}
|
|
|
|
inline
|
|
HWND PureToolInfo::hwnd(void)const
|
|
{
|
|
return TOOLINFO::hwnd;
|
|
}
|
|
|
|
inline
|
|
void PureToolInfo::hwnd(HWND hWnd)
|
|
{
|
|
TOOLINFO::hwnd=hWnd;
|
|
}
|
|
|
|
inline
|
|
UINT PureToolInfo::toolID(void)const
|
|
{
|
|
return TOOLINFO::uId;
|
|
}
|
|
|
|
inline
|
|
void PureToolInfo::toolID(UINT toolID)
|
|
{
|
|
TOOLINFO::uId=toolID;
|
|
}
|
|
|
|
inline
|
|
Rect PureToolInfo::rect(void)const
|
|
{
|
|
return TOOLINFO::rect;
|
|
}
|
|
|
|
inline
|
|
void PureToolInfo::rect(const Rect &toolRect)
|
|
{
|
|
TOOLINFO::rect.left=toolRect.left();
|
|
TOOLINFO::rect.top=toolRect.top();
|
|
TOOLINFO::rect.right=toolRect.right();
|
|
TOOLINFO::rect.bottom=toolRect.bottom();
|
|
}
|
|
|
|
inline
|
|
HINSTANCE PureToolInfo::resInst(void)const
|
|
{
|
|
return TOOLINFO::hinst;
|
|
|
|
}
|
|
|
|
inline
|
|
void PureToolInfo::resInst(HINSTANCE resInst)
|
|
{
|
|
TOOLINFO::hinst=resInst;
|
|
}
|
|
|
|
inline
|
|
LPTSTR PureToolInfo::szText(void)const
|
|
{
|
|
return TOOLINFO::lpszText;
|
|
}
|
|
|
|
inline
|
|
void PureToolInfo::szText(LPTSTR szText)
|
|
{
|
|
TOOLINFO::lpszText=szText;
|
|
}
|
|
|
|
inline
|
|
UINT PureToolInfo::sizeInfo(void)const
|
|
{
|
|
return TOOLINFO::cbSize;
|
|
}
|
|
|
|
inline
|
|
void PureToolInfo::sizeInfo(UINT sizeInfo)
|
|
{
|
|
TOOLINFO::cbSize=sizeInfo;
|
|
}
|
|
|
|
inline
|
|
void PureToolInfo::zeroInit(void)
|
|
{
|
|
TOOLINFO::cbSize=0;
|
|
TOOLINFO::uFlags=0;
|
|
TOOLINFO::hwnd=0;
|
|
TOOLINFO::uId=0;
|
|
TOOLINFO::rect.left=0;
|
|
TOOLINFO::rect.top=0;
|
|
TOOLINFO::rect.right=0;
|
|
TOOLINFO::rect.bottom=0;
|
|
TOOLINFO::hinst=0;
|
|
TOOLINFO::lpszText=0;
|
|
}
|
|
#endif |