65 lines
2.0 KiB
C++
65 lines
2.0 KiB
C++
#ifndef _TOOLTIP_TOOLTIP_HPP_
|
|
#define _TOOLTIP_TOOLTIP_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _COMMON_COMMCTRL_HPP_
|
|
#include <common/commctrl.hpp>
|
|
#endif
|
|
#ifndef _COMMON_CALLBACK_HPP_
|
|
#include <common/callback.hpp>
|
|
#endif
|
|
class WinMsg;
|
|
class GUIWindow;
|
|
class GDIPoint;
|
|
class PureToolInfo;
|
|
class PureHitTestInfo;
|
|
|
|
class ToolTip
|
|
{
|
|
public:
|
|
enum{ControlID=101};
|
|
enum Style{AlwaysTip=TTS_ALWAYSTIP,NoPrefix=TTS_NOPREFIX};
|
|
enum DelayFlag{Automatic=TTDT_AUTOMATIC,Autopop=TTDT_AUTOPOP,Initial=TTDT_INITIAL,Reshow=TTDT_RESHOW};
|
|
ToolTip(GUIWindow &parentWindow,Style style=AlwaysTip);
|
|
virtual ~ToolTip();
|
|
operator HWND(void);
|
|
void activate(WORD activate)const;
|
|
WORD addTool(const PureToolInfo &somePureToolInfo)const;
|
|
void delTool(const PureToolInfo &somePureToolInfo)const;
|
|
WORD enumTools(UINT indexTool,const PureToolInfo &somePureToolInfo)const;
|
|
WORD getCurrentTool(PureToolInfo &somePureToolInfo)const;
|
|
void getText(PureToolInfo &somePureToolInfo)const;
|
|
DWORD getToolCount(void)const;
|
|
WORD getToolInfo(PureToolInfo &somePureToolInfo)const;
|
|
WORD hitTest(const PureHitTestInfo &somePureHitTestInfo)const;
|
|
void newToolInfo(const PureToolInfo &somePureToolInfo)const;
|
|
void relayEvent(const WinMsg &someWinMsg)const;
|
|
void setDelayTime(DelayFlag typeDelay,int timeDelay)const;
|
|
void setToolInfo(const PureToolInfo &somePureToolInfo)const;
|
|
void updateTipText(const PureToolInfo &somePureToolInfo)const;
|
|
HWND windowFromPoint(const GDIPoint &someGDIPoint)const;
|
|
WORD isOkay(void)const;
|
|
protected:
|
|
virtual void ttnShow(NMHDR &someNMHDR);
|
|
virtual void ttnPop(NMHDR &someNMHDR);
|
|
virtual void ttnNeedText(NMHDR &someNMHDR);
|
|
private:
|
|
ToolTip &operator=(const ToolTip &someToolTip);
|
|
void createToolTip(int viewFlags);
|
|
CallbackData::ReturnType notifyHandler(CallbackData &someCallbackData);
|
|
|
|
Callback<ToolTip> mNotifyHandler;
|
|
GUIWindow &mParentWindow;
|
|
HWND mhControlWnd;
|
|
};
|
|
|
|
inline
|
|
ToolTip::operator HWND(void)
|
|
{
|
|
return mhControlWnd;
|
|
}
|
|
#endif
|
|
|
|
|