TNB Library
C:
Home
Private
TnbLibrary
TnbInc
TnbDisabledDrawer.h
[詳解]
1
#pragma once
11
#include "
TnbDrawable.h
"
12
13
14
15
//TNB Library
16
namespace
TNB
17
{
18
19
20
35
class
CDisabledDrawer
:
public
IDrawable
36
{
37
DEFSUPER(
IDrawable
);
38
IDrawable::Ptr
m_pDraw;
40
static
BOOL CALLBACK s_DrawIconProc(HDC hDC, LPARAM lParam, WPARAM wParam,
int
cx,
int
cy)
41
{
42
const
CDisabledDrawer
* P =
reinterpret_cast<
const
CDisabledDrawer
*
>
(lParam);
43
P->m_pDraw->
Draw
(hDC, 0, 0);
44
return
TRUE;
45
}
46
public
:
47
52
CDisabledDrawer
(
const
IDrawable
& draw)
53
{
54
m_pDraw = draw.
Clone
();
55
}
56
62
virtual
IDrawable
*
Clone
(
void
)
const
63
{
64
return
new
CDisabledDrawer
(*m_pDraw);
65
}
66
74
virtual
bool
GetSize
(SIZE& _size)
const
75
{
76
return
m_pDraw->
GetSize
(_size);
77
}
78
87
virtual
bool
Resize
(
const
SIZE& size)
88
{
89
return
m_pDraw->
Resize
(size);
90
}
91
99
virtual
void
Draw
(HDC dc,
int
x = 0,
int
y = 0)
const
100
{
101
SIZE sz;
102
if
( m_pDraw->
GetSize
(sz) )
103
{
104
::DrawState(dc, NULL, &s_DrawIconProc,
reinterpret_cast<
LPARAM
>
(
this
), 0, x, y, sz.cx, sz.cy, DST_COMPLEX | DSS_DISABLED);
105
}
106
}
107
};
108
109
110
111
};
112
TnbDrawable.h
描画情報関係のヘッダ
TNB::CDisabledDrawer
Disabled描画クラス
Definition:
TnbDisabledDrawer.h:36
TNB::CDisabledDrawer::Draw
virtual void Draw(HDC dc, int x=0, int y=0) const
[描画] 描画.
Definition:
TnbDisabledDrawer.h:99
TNB::CDisabledDrawer::CDisabledDrawer
CDisabledDrawer(const IDrawable &draw)
コンストラクタ
Definition:
TnbDisabledDrawer.h:52
TNB::CDisabledDrawer::Resize
virtual bool Resize(const SIZE &size)
[設定] サイズ設定.
Definition:
TnbDisabledDrawer.h:87
TNB::CDisabledDrawer::GetSize
virtual bool GetSize(SIZE &_size) const
[取得] サイズ取得.
Definition:
TnbDisabledDrawer.h:74
TNB::CDisabledDrawer::Clone
virtual IDrawable * Clone(void) const
[作成] クローン作成.
Definition:
TnbDisabledDrawer.h:62
TNB::CPointerHandleT< IDrawable >
TNB
TNB Library
Definition:
TnbDoxyTitle.txt:2
TNB::IDrawable
描画情報インターフェース
Definition:
TnbDrawable.h:37
TNB::IDrawable::Resize
virtual bool Resize(const SIZE &size)=0
[設定] サイズ設定.
TNB::IDrawable::GetSize
virtual bool GetSize(SIZE &_size) const =0
[取得] サイズ取得.
TNB::IDrawable::Clone
virtual IDrawable * Clone(void) const =0
[作成] クローン作成.
TNB::IDrawable::Draw
virtual void Draw(HDC dc, int x=0, int y=0) const =0
[描画] 描画.
2023年02月05日(日) 07時21分31秒作成 - TNB Library / 構成:
1.9.3