AeAssetEditor.h
1.87 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// AeAssetEditor.h
//
// This class contains the abstract and concrete definitions
// for editor clients of the database. Editors have both read
// and write access into the database.
//
// The AeBinEditor abstract class represents an editor for assets
// according to their type or bin. It could also be called a list
// editor since the assets are viewed in a list. This editor has
// lots of routines to support the list widget callbacks and must
// handle all the user input for each cell in the list.
//
// The AeAssetEditor, which edits all assets, and the AeBankEditor,
// which edits only bank assets, are implemented as AeBinEditors.
//
#ifndef __AeAssetEditor__
#define __AeAssetEditor__
#include "AeTypes.h"
#include "AeAsset.h"
#include "AeBinEditor.h"
class AeAssetBase;
class AeAssetBin;
class AeAsset;
class AeAssetWindow;
class AeAssetFile;
class AeAssetEditor : public AeBinEditor
{
public:
AeAssetEditor (void);
virtual ~AeAssetEditor (void);
enum AeDialogReply { YES, NO, CANCEL };
virtual void SetAssetBase (AeAssetBase *);
virtual void CreateAsset (AeAsset *, Boolean);
virtual void UpdateAsset (AeAsset *, Boolean);
virtual void DeleteAsset (AeAsset *, Boolean);
Boolean HasFile (void) { return fFile != NULL; }
virtual void OpenEditor (AeAsset *);
void OpenFile (const char * name);
void SaveFile (void);
void SaveAsFile (const char * name);
void CloseFile (void);
void ImportAsset (const char * name);
protected:
virtual Boolean binHasUI (AeAssetBin *);
private:
void createAssetUIs (void);
AeAssetFile * getAndReadFile (const char * name, Boolean);
void removeBankAsset (GList<AeAsset *> *);
AeDialogReply postSaveQuestion (void);
AeAssetWindow * fWindow;
AeAssetFile * fFile;
Boolean fSaveNeeded;
};
#endif __AeAssetEditor__