1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 // icon_wnd.h: interface for the CIconWnd class.
19 //////////////////////////////////////////////////////////////////////
21 #if !defined(AFX_ICON_WND_H__12893D3C_9A86_4A7A_A972_7965BDDBD2A2__INCLUDED_)
22 #define AFX_ICON_WND_H__12893D3C_9A86_4A7A_A972_7965BDDBD2A2__INCLUDED_
26 #endif // _MSC_VER > 1000
28 #include "nel/misc/bitmap.h"
30 class CIconWnd
: public CWnd
35 void create (DWORD wStyle
, RECT
&pos
, CWnd
*window
, uint dialogIndex
);
41 void blendIcons(NLMISC::CBitmap
&dst
, const NLMISC::CBitmap
&src
);
42 void modulateIcon(NLMISC::CBitmap
&dst
, const NLMISC::CRGBA
&col
);
44 bool loadIcon(const std::string
&filename
, NLMISC::CBitmap
&bmp
);
45 bool getColorFromStr(const std::string
&s
, NLMISC::CRGBA
&c
);
47 void addIconLayer(NLMISC::CBitmap
&dst
, const std::string iconStr
, const std::string iconCol
);
48 bool updateWnd(CWnd
*pWnd
, std::string
&str
);
54 // Pointer to control window
58 CWnd
*pWndIconBackColor
;
60 CWnd
*pWndIconOverColor
;
62 CWnd
*pWndIconOver2Color
;
65 // String containing window data
67 std::string strIconColor
;
68 std::string strIconBack
;
69 std::string strIconBackColor
;
70 std::string strIconOver
;
71 std::string strIconOverColor
;
72 std::string strIconOver2
;
73 std::string strIconOver2Color
;
75 // Bitmap printed on window
76 NLMISC::CBitmap bitmap
;
79 static std::string IconPath
;
85 // Generated message map functions
88 afx_msg
void OnPaint();
93 #endif // !defined(AFX_ICON_WND_H__12893D3C_9A86_4A7A_A972_7965BDDBD2A2__INCLUDED_)