Linux multi-monitor fullscreen support
[ryzomcore.git] / ryzom / tools / leveldesign / georges_dll / icon_wnd.h
blob681b9af6baf32e6ada97a6e0a18fb0af5755aaf7
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
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.
8 //
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_
24 #if _MSC_VER > 1000
25 #pragma once
26 #endif // _MSC_VER > 1000
28 #include "nel/misc/bitmap.h"
30 class CIconWnd : public CWnd
32 // Operations
33 public:
34 CIconWnd();
35 void create (DWORD wStyle, RECT &pos, CWnd *window, uint dialogIndex);
37 private:
38 bool updateStr();
39 void updateIcon();
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);
50 // Attributes
51 public:
52 uint Id;
54 // Pointer to control window
55 CWnd *pWndIcon;
56 CWnd *pWndIconColor;
57 CWnd *pWndIconBack;
58 CWnd *pWndIconBackColor;
59 CWnd *pWndIconOver;
60 CWnd *pWndIconOverColor;
61 CWnd *pWndIconOver2;
62 CWnd *pWndIconOver2Color;
64 private:
65 // String containing window data
66 std::string strIcon;
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;
78 // Directory of icons
79 static std::string IconPath;
81 // Implementation
82 public:
83 virtual ~CIconWnd();
85 // Generated message map functions
86 protected:
87 //{{AFX_MSG(CIconWnd)
88 afx_msg void OnPaint();
89 //}}AFX_MSG
90 DECLARE_MESSAGE_MAP()
93 #endif // !defined(AFX_ICON_WND_H__12893D3C_9A86_4A7A_A972_7965BDDBD2A2__INCLUDED_)