aboutsummaryrefslogtreecommitdiff
path: root/Src/external_dependencies/openmpt-trunk/mptrack/ScaleEnvPointsDlg.h
blob: e9738bf4e18eac0e354e61e3abfff08052e8c997 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 * ScaleEnvPointsDlg.h
 * -------------------
 * Purpose: Dialog for scaling instrument envelope points on x and y axis.
 * Notes  : (currently none)
 * Authors: OpenMPT Devs
 * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
 */


#pragma once

#include "openmpt/all/BuildSettings.hpp"

#include "CDecimalSupport.h"

OPENMPT_NAMESPACE_BEGIN

struct InstrumentEnvelope;

class CScaleEnvPointsDlg : public CDialog
{
protected:
	CNumberEdit m_EditX, m_EditY, m_EditOffset;
	InstrumentEnvelope &m_Env;
	static double m_factorX, m_factorY, m_offsetY;
	int m_nCenter;

public:
	CScaleEnvPointsDlg(CWnd* pParent, InstrumentEnvelope &env, int nCenter)
		: CDialog(IDD_SCALE_ENV_POINTS, pParent)
		, m_Env(env)
		, m_nCenter(nCenter)
	{ }

	void Apply();

protected:
	void OnOK() override;
	BOOL OnInitDialog() override;
};

OPENMPT_NAMESPACE_END