155 lines
3.4 KiB
C++
155 lines
3.4 KiB
C++
#ifndef _DIALOG_DIALOGITEMTEMPLATE_HPP_
|
|
#define _DIALOG_DIALOGITEMTEMPLATE_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _COMMON_RECTANGLE_HPP_
|
|
#include <common/rect.hpp>
|
|
#endif
|
|
#ifndef _COMMON_STRING_HPP_
|
|
#include <common/string.hpp>
|
|
#endif
|
|
|
|
class DialogItemTemplate : private DLGITEMTEMPLATE
|
|
{
|
|
public:
|
|
DialogItemTemplate(void);
|
|
DialogItemTemplate(const DialogItemTemplate &someDialogItemTemplate);
|
|
~DialogItemTemplate();
|
|
DialogItemTemplate &operator=(const DialogItemTemplate &someDialogItemTemplate);
|
|
WORD operator==(const DialogItemTemplate &someDialogItemTemplate)const;
|
|
String className(void)const;
|
|
void className(const String &className);
|
|
String titleText(void)const;
|
|
void titleText(const String &titleText);
|
|
DWORD style(void)const;
|
|
void style(DWORD style);
|
|
DWORD extendedStyle(void)const;
|
|
void extendedStyle(DWORD extendedStyle);
|
|
Rect posRect(void)const;
|
|
void posRect(const Rect &posRect);
|
|
WORD itemID(void)const;
|
|
void itemID(WORD itemID);
|
|
private:
|
|
String mClassName;
|
|
String mTitleText;
|
|
};
|
|
|
|
inline
|
|
DialogItemTemplate::DialogItemTemplate(void)
|
|
{
|
|
style(0);
|
|
extendedStyle(0);
|
|
posRect(Rect(0,0,0,0));
|
|
itemID(0);
|
|
}
|
|
|
|
inline
|
|
DialogItemTemplate::DialogItemTemplate(const DialogItemTemplate &someDialogItemTemplate)
|
|
{
|
|
*this=someDialogItemTemplate;
|
|
}
|
|
|
|
inline
|
|
DialogItemTemplate::~DialogItemTemplate()
|
|
{
|
|
}
|
|
|
|
inline
|
|
DialogItemTemplate &DialogItemTemplate::operator=(const DialogItemTemplate &someDialogItemTemplate)
|
|
{
|
|
style(someDialogItemTemplate.style());
|
|
extendedStyle(someDialogItemTemplate.extendedStyle());
|
|
posRect(someDialogItemTemplate.posRect());
|
|
itemID(someDialogItemTemplate.itemID());
|
|
className(someDialogItemTemplate.className());
|
|
titleText(someDialogItemTemplate.titleText());
|
|
return *this;
|
|
}
|
|
|
|
inline
|
|
WORD DialogItemTemplate::operator==(const DialogItemTemplate &someDialogItemTemplate)const
|
|
{
|
|
return (style()==someDialogItemTemplate.style()&&
|
|
extendedStyle()==someDialogItemTemplate.extendedStyle()&&
|
|
posRect()==someDialogItemTemplate.posRect()&&
|
|
itemID()==someDialogItemTemplate.itemID()&&
|
|
className()==someDialogItemTemplate.className()&&
|
|
titleText()==someDialogItemTemplate.titleText());
|
|
}
|
|
|
|
inline
|
|
DWORD DialogItemTemplate::style(void)const
|
|
{
|
|
return DLGITEMTEMPLATE::style;
|
|
}
|
|
|
|
inline
|
|
void DialogItemTemplate::style(DWORD style)
|
|
{
|
|
DLGITEMTEMPLATE::style=style;
|
|
}
|
|
|
|
inline
|
|
DWORD DialogItemTemplate::extendedStyle(void)const
|
|
{
|
|
return DLGITEMTEMPLATE::dwExtendedStyle;
|
|
}
|
|
|
|
inline
|
|
void DialogItemTemplate::extendedStyle(DWORD extendedStyle)
|
|
{
|
|
DLGITEMTEMPLATE::dwExtendedStyle=extendedStyle;
|
|
}
|
|
|
|
inline
|
|
Rect DialogItemTemplate::posRect(void)const
|
|
{
|
|
return Rect(DLGITEMTEMPLATE::x,DLGITEMTEMPLATE::y,DLGITEMTEMPLATE::cx,DLGITEMTEMPLATE::cy);
|
|
}
|
|
|
|
inline
|
|
void DialogItemTemplate::posRect(const Rect &posRect)
|
|
{
|
|
DLGITEMTEMPLATE::x=posRect.left();
|
|
DLGITEMTEMPLATE::y=posRect.top();
|
|
DLGITEMTEMPLATE::cx=posRect.right();
|
|
DLGITEMTEMPLATE::cy=posRect.bottom();
|
|
}
|
|
|
|
inline
|
|
WORD DialogItemTemplate::itemID(void)const
|
|
{
|
|
return DLGITEMTEMPLATE::id;
|
|
}
|
|
|
|
inline
|
|
void DialogItemTemplate::itemID(WORD itemID)
|
|
{
|
|
DLGITEMTEMPLATE::id=itemID;
|
|
}
|
|
|
|
inline
|
|
String DialogItemTemplate::className(void)const
|
|
{
|
|
return mClassName;
|
|
}
|
|
|
|
inline
|
|
void DialogItemTemplate::className(const String &className)
|
|
{
|
|
mClassName=className;
|
|
}
|
|
|
|
inline
|
|
String DialogItemTemplate::titleText(void)const
|
|
{
|
|
return mTitleText;
|
|
}
|
|
|
|
inline
|
|
void DialogItemTemplate::titleText(const String &titleText)
|
|
{
|
|
mTitleText=titleText;
|
|
}
|
|
#endif |