Added aqua_speed for rite geo 50 tryker
[ryzomcore.git] / nel / tools / 3d / object_viewer / value_blender_dlg.cpp
blob0bb95d8e417d9def0ada641b75df5a8476a1f5a1
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/>.
19 // ValueBlenderDlg.cpp : implementation file
22 #include "std_afx.h"
23 #include "object_viewer.h"
24 #include "value_blender_dlg.h"
25 #include "edit_attrib_dlg.h"
26 #include "popup_notify.h"
29 /////////////////////////////////////////////////////////////////////////////
30 // CValueBlenderDlg dialog
33 CValueBlenderDlg::CValueBlenderDlg(IValueBlenderDlgClient *creationInterface,
34 bool destroyInterface,
35 CWnd* pParent,
36 IPopupNotify *pn,
37 CParticleWorkspace::CNode *ownerNode
39 : _CreateInterface(creationInterface),
40 CDialog(CValueBlenderDlg::IDD, pParent),
41 _PN(pn),
42 _DestroyInterface(destroyInterface),
43 _Node(ownerNode)
45 //{{AFX_DATA_INIT(CValueBlenderDlg)
46 //}}AFX_DATA_INIT
49 CValueBlenderDlg::~CValueBlenderDlg()
51 if (_DestroyInterface) delete _CreateInterface;
52 delete _Dlg1 ;
53 delete _Dlg2 ;
57 void CValueBlenderDlg::init(CWnd *pParent)
59 CDialog::Create(IDD_VALUE_BLENDER, pParent);
60 ShowWindow(SW_SHOW);
64 void CValueBlenderDlg::DoDataExchange(CDataExchange* pDX)
66 CDialog::DoDataExchange(pDX);
67 //{{AFX_DATA_MAP(CValueBlenderDlg)
68 DDX_Control(pDX, IDC_VALUE2, m_Value2);
69 DDX_Control(pDX, IDC_VALUE1, m_Value1);
70 //}}AFX_DATA_MAP
74 BEGIN_MESSAGE_MAP(CValueBlenderDlg, CDialog)
75 //{{AFX_MSG_MAP(CValueBlenderDlg)
76 ON_WM_CLOSE()
77 //}}AFX_MSG_MAP
78 END_MESSAGE_MAP()
80 /////////////////////////////////////////////////////////////////////////////
81 // CValueBlenderDlg message handlers
83 BOOL CValueBlenderDlg::OnInitDialog()
85 CDialog::OnInitDialog();
86 UpdateData() ;
87 nlassert(_CreateInterface) ;
88 _Dlg1 = _CreateInterface->createDialog(0, _Node) ;
89 _Dlg2 = _CreateInterface->createDialog(1, _Node) ;
90 RECT r, or ;
91 GetWindowRect(&or) ;
92 m_Value1.GetWindowRect(&r) ;
93 _Dlg1->init(r.left - or.left, r.top - or.top, this) ;
94 m_Value2.GetWindowRect(&r) ;
95 _Dlg2->init(r.left - or.left, r.top - or.top, this) ;
97 UpdateData(FALSE) ;
98 return TRUE; // return TRUE unless you set the focus to a control
99 // EXCEPTION: OCX Property Pages should return FALSE
106 void CValueBlenderDlg::OnClose()
108 if (_PN) _PN->childPopupClosed(this);
109 //CDialog::OnClose();