-
Notifications
You must be signed in to change notification settings - Fork 0
/
RobloxBasicDoc.h
52 lines (39 loc) · 1.36 KB
/
RobloxBasicDoc.h
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
/**
* RobloxBasicDoc.h
* Copyright (c) 2013 ROBLOX Corp. All Rights Reserved.
*/
#pragma once
#include <QIcon>
// Standard C/C++ Headers
#include <map>
// Roblox Studio Headers
#include "IRobloxDoc.h"
typedef std::map<QString, IExternalHandler*> HandlersMap;
class RobloxBasicDoc: public IRobloxDoc
{
public:
virtual const QIcon& titleIcon() const { return m_emptyIcon; }
virtual const QString& titleTooltip() const { return m_titleToolTip; }
virtual QString windowTitle() const { return displayName(); }
virtual void addExternalHandler(IExternalHandler* extHandler);
virtual void removeExternalHandler(const QString &handlerId);
virtual IExternalHandler* getExternalHandler(const QString &handlerId);
virtual void updateUI(bool state) {}
virtual bool handleDrop(const QString &fileName) { return true; }
virtual bool doHandleAction(const QString& actionID, bool isChecked) { return false; }
#ifdef _WIN32
bool close() sealed; // do not override -- sealed is CLI, so at least we prevent it at compile time in Windows.
#else
bool close(); // do not override
#endif
protected:
RobloxBasicDoc();
virtual ~RobloxBasicDoc();
HandlersMap m_handlersMap;
bool m_bActive;
QIcon m_emptyIcon;
QString m_titleToolTip;
private:
virtual bool doClose() = 0;
bool handleAction(const QString &actionID, bool isChecked = true);
};