Debian Codegraph @

editor/ProceduralDialog.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #if !defined(AFX_PROCEDURALDIALOG_H__F9603B01_1586_11D2_9798_006097D5770E__INCLUDED_)
20 #define AFX_PROCEDURALDIALOG_H__F9603B01_1586_11D2_9798_006097D5770E__INCLUDED_
21
22 #if _MSC_VER >= 1000
23 #pragma once
24 #endif // _MSC_VER >= 1000
25 // ProceduralDialog.h : header file
26 //
27
28 #include "gr.h"
29 #include "gametexture.h"
30
31 /////////////////////////////////////////////////////////////////////////////
32 // CProceduralDialog dialog
33
34 class CProceduralDialog : public CDialog {
35 // Construction
36 public:
37 CProceduralDialog(CWnd *pParent = NULL); // standard constructor
38
39 // Dialog Data
40 //{{AFX_DATA(CProceduralDialog)
41 enum { IDD = IDD_PROCEDURAL_DIALOG };
42 CSliderCtrl m_heat_slider;
43 CSliderCtrl m_freq_slider;
44 CSliderCtrl m_size_slider;
45 CSliderCtrl m_speed_slider;
46 //}}AFX_DATA
47
48 // Overrides
49 // ClassWizard generated virtual function overrides
50 //{{AFX_VIRTUAL(CProceduralDialog)
51 public:
52 virtual BOOL DestroyWindow();
53
54 protected:
55 virtual void DoDataExchange(CDataExchange *pDX); // DDX/DDV support
56 //}}AFX_VIRTUAL
57
58 // Implementation
59 protected:
60 // Generated message map functions
61 //{{AFX_MSG(CProceduralDialog)
62 virtual BOOL OnInitDialog();
63 afx_msg void OnTimer(UINT nIDEvent);
64 afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
65 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
66 afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
67 afx_msg void OnClearProcedurals();
68 afx_msg void OnSelendokProceduralPulldown();
69 afx_msg void OnKillfocusProcRedEdit();
70 afx_msg void OnProceduralUpdate();
71 afx_msg void OnImportPalette();
72 afx_msg void OnDefaultPalette();
73 afx_msg void OnCopyProcedural();
74 //}}AFX_MSG
75 DECLARE_MESSAGE_MAP()
76
77 private:
78 void UpdateDialog(void);
79 void UpdateProcView(void);
80 void MakeCurColor(void);
81 void HarvestValue(int, uint8_t *);
82 void PrintValue(int, uint8_t);
83 static_proc_element *CreateElement(int, int);
84
85 private:
86 grHardwareSurface m_TextureSurf;
87 grHardwareSurface m_PaletteSurf;
88 int m_window_bitmap;
89 int m_palette_bitmap;
90 int m_button_down;
91 int m_proc_type;
92 int m_save_x, m_save_y;
93 uint8_t m_cur_color;
94 uint8_t m_speed, m_saturate, m_frequency;
95 uint8_t m_size;
96 };
97
98 //{{AFX_INSERT_LOCATION}}
99 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
100
101 #endif // !defined(AFX_PROCEDURALDIALOG_H__F9603B01_1586_11D2_9798_006097D5770E__INCLUDED_)