Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
DlgFormatSelection.h
1#if !defined(AFX_CDlgFormatSelection_H__C5880C6E_7FA2_468E_9562_43061882A2D3__INCLUDED_)
2#define AFX_CDlgFormatSelection_H__C5880C6E_7FA2_468E_9562_43061882A2D3__INCLUDED_
3
4#ifdef _MSC_VER
5#pragma once
6#endif // _MSC_VER
7// CDlgFormatSelection.h : header file
8//
9
10#include "CustomData.h"
11#include "FileInfo.h"
12
13BEGIN_MOOTOOLS_NAMESPACE
14
15#undef DLL_SPECIFIC_EXPORT
16#ifdef MOOTOOLS_AUTODESK
17#define DLL_SPECIFIC_EXPORT
18#else
19#define DLL_SPECIFIC_EXPORT DLL_BMAPFUNCTION
20#endif
21
22typedef enum FormatSelectionConvertMode XEnumType(unsigned int)
23{
24 FORMATSEL_SAVE_KEEP_FORMAT = 0,
25 FORMATSEL_SAVE_CONVERT_FORMAT,
26} FormatSelectionConvertMode;
27
28typedef enum FormatSelectionParameters XEnumType(unsigned int)
29{
30 FORMATSEL_MODE_PARAM = MAKE_CUSTOM_ID('F', 'S', 'M', 'O'), // UInt, 0=FORMATSEL_SAVE_KEEP_FORMAT: keep the source file format, 1=FORMATSEL_SAVE_CONVERT_FORMAT: convert to the defined format. default: 0
31 FORMATSEL_FORMATCLASS_PARAM = MAKE_CUSTOM_ID('F', 'S', 'F', 'C'), // UInt, a file class tag as defined in fileinfo.h (ie. COLLADA_3D_FILE). Default: JPEG_FILE if FORMATSEL_BITMAP defined when calling CDlgFormatSelection::Init, WAVEFRONT_FILE if FORMATSEL_OBJECT defined when calling CDlgFormatSelection::Init
32 FORMATSEL_SHOW_COMMON_EXT = MAKE_CUSTOM_ID('F', 'S', 'C', 'E'), // Bool, when used in a dialog this show only the common extension. Default: true
33 FORMATSEL_LOAD_PROPERTIES = MAKE_CUSTOM_ID('F', 'S', 'L', 'O'), // CustomData, a custom data block that contains the input settings for the selected format. This block can be created calling C3DDlgFormatSelection for example
34 FORMATSEL_SAVE_PROPERTIES = MAKE_CUSTOM_ID('F', 'S', 'S', 'A'), // CustomData, a custom data block that contains the input settings for the selected format. This block can be created calling C3DDlgFormatSelection for example
35} FormatSelectionParameters;
36
37typedef enum FormatSelectionType XEnumType(unsigned int)
38{
39 FORMATSEL_ALL = 0xFF,
40 FORMATSEL_BITMAP = 0x01,
41 FORMATSEL_OBJECT = 0x02,
42 FORMATSEL_WEB = 0x04,
43 FORMATSEL_ENABLE_MODE = 0x100, // Keep format or save convert format radio button
44 FORMATSEL_ENABLE_PROPERTIES = 0x200, // properties button
45 FORMATSEL_LOAD_ONLY = 0x400, // Display only loadable files
46 FORMATSEL_SAVE_ONLY = 0x800, // Display only loadable files
47 FORMATSEL_DISABLE_COMMON_EXTENSION = 0x1000, // Remove the show common extension file only
48} FormatSelectionType;
49
50class DLL_SPECIFIC_EXPORT CFormatSelection
51{
52public:
53 static CCustomData GetFormatProperties(BOOL load, unsigned int formatClass, const CCustomData& data);
54 static void SetFormatProperties(BOOL load, unsigned int formatClass, CCustomData& data, const CCustomData& formatdata);
55 static FormatSelectionConvertMode GetMode(const CCustomData& data);
56 static void SetMode(CCustomData& data, FormatSelectionConvertMode mode);
57 static unsigned int GetFormat(const CCustomData& data, FormatSelectionType contentType, unsigned int defaultClass = UNKNOWN_CLASS);
58 static void SetFormat(CCustomData& data, unsigned int formatClass);
59};
60
61#if !defined(MOOTOOLS_CRUNCHERSDK) || defined(MOOTOOLS_AUTODESK)
62/////////////////////////////////////////////////////////////////////////////
63// CDlgFormatSelection window
64
65class CDefaultDlg;
66class CFileExt;
67class DLL_SPECIFIC_EXPORT CDlgFormatSelection : public CFormatSelection
68{
69protected:
70#ifdef _DEBUG
72#endif
73
76
79 unsigned int formatClass, formatMode;
81
82 CDefaultDlg *pParent;
86
87 int FindFormat(unsigned int lookfor);
88 void InitControls();
89
90// Attributes
91public:
93 virtual ~CDlgFormatSelection();
94 void Init(CDefaultDlg *pParent, int formatType, int defaultClass = UNKNOWN_CLASS);
95
96 void UpdateDialog();
99 void VerifyData(UINT nID, unsigned int notifyCode);
100
101 void InitData(CCustomData& data);
102 void SaveData(CCustomData& data);
103 void ExchangeData();
104
105#ifndef MOOTOOLS_NO_BITMAP
106 static BOOL ShowBitmapFormatProperty(BOOL load, unsigned int formatClass, CCustomData& formatProperty, CWnd* pParent);
107#endif
108};
109#endif
110
111END_MOOTOOLS_NAMESPACE
112
113#endif // !defined(AFX_CDlgFormatSelection_H__C5880C6E_7FA2_468E_9562_43061882A2D3__INCLUDED_)
CCustomData class is a handly class for storing any kind of data.
Contains many convenient functions for handling files, paths and give a way to add some custom format...
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
CCustomData is a handly class for storing any kind of data.
Definition CustomData.h:106
CFileExt is the class that allows to add a custom file parser for supporting a new file format....
Definition FileInfo.h:182
Definition DlgFormatSelection.h:51