Linux multi-monitor fullscreen support
[ryzomcore.git] / nel / tools / 3d / object_viewer / texture_chooser.h
blob0f72ba365b77309599aa9b90ecdbab56899c1afa
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
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 #if !defined(AFX_TEXTURE_CHOOSER_H__FE10F78E_0B69_4EB0_8FC7_A48FAEB904FD__INCLUDED_)
18 #define AFX_TEXTURE_CHOOSER_H__FE10F78E_0B69_4EB0_8FC7_A48FAEB904FD__INCLUDED_
20 #if _MSC_VER > 1000
21 #pragma once
22 #endif // _MSC_VER > 1000
23 // texture_chooser.h : header file
27 #include "edit_attrib_dlg.h"
28 #include "popup_notify.h"
29 #include "ps_wrapper.h"
30 #include "particle_workspace.h"
32 #include "nel/misc/smart_ptr.h"
34 #include "nel/3d/texture.h"
36 using NLMISC::CSmartPtr ;
38 namespace NL3D
40 class CPSMultiTexturedParticle;
43 class CMultiTexDlg;
46 /////////////////////////////////////////////////////////////////////////////
47 // CTextureChooser dialog
49 class CTextureChooser : public CEditAttribDlg, IPopupNotify
51 // Construction
52 public:
53 // construct the object with the given texture
54 CTextureChooser(NL3D::CPSMultiTexturedParticle *mtp, CParticleWorkspace::CNode *ownerNode); // standard constructor
56 ~CTextureChooser();
58 /// when initing, you can also provide a point to a mutltitextured particle
59 virtual void init(uint32 x, uint32 y, CWnd *pParent = NULL) ;
61 BOOL EnableWindow( BOOL bEnable);
63 // set a wrapper to get the datas
64 void setWrapper(IPSWrapperTexture *wrapper) { _Wrapper = wrapper ; }
67 /// enable to remove texture. the default is false
68 void enableRemoveButton(void) { _EnableRemoveButton = true ; }
69 // Dialog Data
70 //{{AFX_DATA(CTextureChooser)
71 enum { IDD = IDD_TEXTURE_CHOOSER };
72 CButton m_MultiTexCtrl;
73 //}}AFX_DATA
76 // Overrides
77 // ClassWizard generated virtual function overrides
78 //{{AFX_VIRTUAL(CTextureChooser)
79 protected:
80 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
81 //}}AFX_VIRTUAL
83 // Implementation
84 protected:
85 bool _EnableRemoveButton;
86 CParticleWorkspace::CNode *_Node;
87 IPSWrapperTexture *_Wrapper ;
88 NL3D::CPSMultiTexturedParticle *_MTP;
89 CMultiTexDlg *_MultiTexDlg;
90 // handle to the current bitmap being displayed
91 HBITMAP _CurrBitmap ;
93 // update the current bitmap
94 void textureToBitmap() ;
96 // the current texture
97 CSmartPtr<NL3D::ITexture> _Texture ;
99 // Generated message map functions
100 //{{AFX_MSG(CTextureChooser)
101 virtual BOOL OnInitDialog();
102 afx_msg void OnPaint();
103 afx_msg void OnRemoveTexture();
104 afx_msg void OnEditMultitexturing();
105 afx_msg void OnEnableMultitexturing();
106 afx_msg void OnBrowseTexture();
107 //}}AFX_MSG
108 DECLARE_MESSAGE_MAP() ;
110 /// inherited from IPopupNotify
111 void childPopupClosed(CWnd *child);
113 void updateMultiTexCtrl();
120 //{{AFX_INSERT_LOCATION}}
121 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
123 #endif // !defined(AFX_TEXTURE_CHOOSER_H__FE10F78E_0B69_4EB0_8FC7_A48FAEB904FD__INCLUDED_)