1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
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/>.
18 #if !defined(AFX_EDIT_SPINNER_H__CFDBE30D_F8C9_432E_9F17_0AFACE143BB0__INCLUDED_)
19 #define AFX_EDIT_SPINNER_H__CFDBE30D_F8C9_432E_9F17_0AFACE143BB0__INCLUDED_
27 #include "ps_wrapper.h"
28 #include "nel/3d/ps_plane_basis_maker.h"
29 #include "editable_range.h"
30 #include "particle_workspace.h"
34 class CEditSpinner
: public CDialog
38 CEditSpinner(NL3D::CPSBasisSpinner
*sf
, CParticleWorkspace::CNode
*ownerNode
, CWnd
*pParent
, IPopupNotify
*pn
);
44 void init(CWnd
*pParent
);
47 //{{AFX_DATA(CEditSpinner)
48 enum { IDD
= IDD_EDITSPINNER
};
49 // NOTE: the ClassWizard will add data members here
54 // ClassWizard generated virtual function overrides
55 //{{AFX_VIRTUAL(CEditSpinner)
57 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
62 NL3D::CPSBasisSpinner
*_Spinner
; // the spinner being edited
63 CDirectionAttr
*_DirDlg
;
64 CEditableRangeUInt
*_NbSamplesDlg
;
66 CParticleWorkspace::CNode
*_Node
;
68 // Generated message map functions
69 //{{AFX_MSG(CEditSpinner)
70 virtual BOOL
OnInitDialog();
71 afx_msg
void OnClose();
74 // wrapper to set the number of samples in the spinner
75 struct CNbSampleWrapper
: public IPSWrapperUInt
77 NL3D::CPSBasisSpinner
*S
;
78 uint32
get(void) const { return S
->_F
.getNumSamples(); }
79 void set(const uint32
&val
) { S
->_F
.setNumSamples(val
); }
83 // wrapper to set the axis of the spinner
84 struct CAxisWrapper
: public IPSWrapper
<NLMISC::CVector
>
86 NL3D::CPSBasisSpinner
*S
;
87 NLMISC::CVector
get(void) const { return S
->_F
.getAxis(); }
88 void set(const NLMISC::CVector
&axis
) { S
->_F
.setAxis(axis
); }
95 //{{AFX_INSERT_LOCATION}}
96 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
98 #endif // !defined(AFX_EDIT_SPINNER_H__CFDBE30D_F8C9_432E_9F17_0AFACE143BB0__INCLUDED_)