140 lines
3.3 KiB
C++
140 lines
3.3 KiB
C++
#ifndef _IMAGELIST_TREEVIEWNOTIFY_HPP_
|
|
#define _IMAGELIST_TREEVIEWNOTIFY_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _COMMON_GDIPOINT_HPP_
|
|
#include <common/gdipoint.hpp>
|
|
#endif
|
|
#ifndef _IMAGELIST_NOTIFYMESSAGEHEADER_HPP_
|
|
#include <imagelst/notify.hpp>
|
|
#endif
|
|
|
|
class TreeViewNotify : private NM_TREEVIEW
|
|
{
|
|
public:
|
|
TreeViewNotify(void);
|
|
TreeViewNotify(const TreeViewNotify &someTreeViewNotify);
|
|
~TreeViewNotify();
|
|
NotifyMessageHeader &hdr(void);
|
|
UINT action(void)const;
|
|
TreeViewItem &itemOld(void);
|
|
TreeViewItem &itemNew(void);
|
|
GDIPoint &dragPoint(void);
|
|
private:
|
|
TreeViewNotify &operator=(const TreeViewNotify &someTreeViewNotify);
|
|
WORD operator==(const TreeViewNotify &someTreeViewNotify)const;
|
|
void hdr(const NotifyMessageHeader &someNotifyMessageHeader);
|
|
void itemOld(const TreeViewItem &someTreeViewItem);
|
|
void itemNew(const TreeViewItem &someTreeViewItem);
|
|
void dragPoint(const GDIPoint &someGDIPoint);
|
|
void action(UINT action);
|
|
void clearData(void);
|
|
};
|
|
|
|
inline
|
|
TreeViewNotify::TreeViewNotify(void)
|
|
{
|
|
clearData();
|
|
}
|
|
|
|
inline
|
|
TreeViewNotify::TreeViewNotify(const TreeViewNotify &someTreeViewNotify)
|
|
{
|
|
clearData();
|
|
*this=someTreeViewNotify;
|
|
}
|
|
|
|
inline
|
|
TreeViewNotify::~TreeViewNotify()
|
|
{
|
|
}
|
|
|
|
inline
|
|
TreeViewNotify &TreeViewNotify::operator=(const TreeViewNotify &someTreeViewNotify)
|
|
{
|
|
hdr(((TreeViewNotify&)someTreeViewNotify).hdr());
|
|
itemOld(((TreeViewNotify&)someTreeViewNotify).itemOld());
|
|
itemNew(((TreeViewNotify&)someTreeViewNotify).itemNew());
|
|
dragPoint(((TreeViewNotify&)someTreeViewNotify).dragPoint());
|
|
action(((TreeViewNotify&)someTreeViewNotify).action());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
WORD TreeViewNotify::operator==(const TreeViewNotify &someTreeViewNotify)const
|
|
{
|
|
return (((TreeViewNotify&)*this).hdr()==((TreeViewNotify&)someTreeViewNotify).hdr()&&
|
|
((TreeViewNotify&)*this).itemOld()==((TreeViewNotify&)someTreeViewNotify).itemOld()&&
|
|
((TreeViewNotify&)*this).itemNew()==((TreeViewNotify&)someTreeViewNotify).itemNew()&&
|
|
((TreeViewNotify&)*this).dragPoint()==((TreeViewNotify&)someTreeViewNotify).dragPoint()&&
|
|
((TreeViewNotify&)*this).action()==((TreeViewNotify&)someTreeViewNotify).action());
|
|
}
|
|
|
|
inline
|
|
NotifyMessageHeader &TreeViewNotify::hdr(void)
|
|
{
|
|
return (NotifyMessageHeader&)NM_TREEVIEW::hdr;
|
|
}
|
|
|
|
inline
|
|
void TreeViewNotify::hdr(const NotifyMessageHeader &someNotifyMessageHeader)
|
|
{
|
|
((NotifyMessageHeader&)NM_TREEVIEW::hdr)=someNotifyMessageHeader;
|
|
}
|
|
|
|
inline
|
|
UINT TreeViewNotify::action(void)const
|
|
{
|
|
return NM_TREEVIEW::action;
|
|
}
|
|
|
|
inline
|
|
void TreeViewNotify::action(UINT action)
|
|
{
|
|
NM_TREEVIEW::action=action;
|
|
}
|
|
|
|
inline
|
|
TreeViewItem &TreeViewNotify::itemOld(void)
|
|
{
|
|
return (TreeViewItem&)NM_TREEVIEW::itemOld;
|
|
}
|
|
|
|
inline
|
|
void TreeViewNotify::itemOld(const TreeViewItem &someTreeViewItem)
|
|
{
|
|
(TreeViewItem&)NM_TREEVIEW::itemOld=someTreeViewItem;
|
|
}
|
|
|
|
inline
|
|
TreeViewItem &TreeViewNotify::itemNew(void)
|
|
{
|
|
return (TreeViewItem&)NM_TREEVIEW::itemNew;
|
|
}
|
|
|
|
inline
|
|
void TreeViewNotify::itemNew(const TreeViewItem &someTreeViewItem)
|
|
{
|
|
(TreeViewItem&)NM_TREEVIEW::itemNew=someTreeViewItem;
|
|
}
|
|
|
|
inline
|
|
GDIPoint &TreeViewNotify::dragPoint(void)
|
|
{
|
|
return (GDIPoint&)NM_TREEVIEW::ptDrag;
|
|
}
|
|
|
|
inline
|
|
void TreeViewNotify::dragPoint(const GDIPoint &someGDIPoint)
|
|
{
|
|
(GDIPoint&)NM_TREEVIEW::ptDrag=someGDIPoint;
|
|
}
|
|
|
|
inline
|
|
void TreeViewNotify::clearData(void)
|
|
{
|
|
::memset((char*)&((NM_TREEVIEW&)*this),0,sizeof(NM_TREEVIEW));
|
|
}
|
|
#endif
|