summaryrefslogtreecommitdiff
path: root/tools/gameevents/gameeventeditdoc.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /tools/gameevents/gameeventeditdoc.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'tools/gameevents/gameeventeditdoc.h')
-rw-r--r--tools/gameevents/gameeventeditdoc.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/tools/gameevents/gameeventeditdoc.h b/tools/gameevents/gameeventeditdoc.h
new file mode 100644
index 0000000..4b96c8b
--- /dev/null
+++ b/tools/gameevents/gameeventeditdoc.h
@@ -0,0 +1,94 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//===========================================================================//
+
+#ifndef GAMEEVENTEDITDOC_H
+#define GAMEEVENTEDITDOC_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+#include "dme_controls/inotifyui.h"
+#include "datamodel/dmehandle.h"
+#include "datamodel/dmelement.h"
+
+//-----------------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------------
+class ICommEditDocCallback;
+class CCommEditDoc;
+class CDmeCommentaryNodeEntity;
+
+typedef CDmrElementArray<CDmeCommentaryNodeEntity> CDmrCommentaryNodeEntityList;
+
+
+//-----------------------------------------------------------------------------
+// Contains all editable state
+//-----------------------------------------------------------------------------
+class CGameEventEditDoc : public IDmNotify
+{
+public:
+ CGameEventEditDoc();
+ ~CGameEventEditDoc();
+
+ // Inherited from INotifyUI
+ virtual void NotifyDataChanged( const char *pReason, int nNotifySource, int nNotifyFlags );
+
+ // Sets/Gets the file name
+ const char *GetTXTFileName();
+ void SetTXTFileName( const char *pFileName );
+
+ // Dirty bits (has it changed since the last time it was saved?)
+ void SetDirty( bool bDirty );
+ bool IsDirty() const;
+
+ // Saves/loads from file
+ bool LoadFromFile( const char *pFileName );
+ void SaveToFile( );
+
+ /*
+ // Returns the root object
+ CDmElement *GetRootObject();
+
+ // Called when data changes (see INotifyUI for flags)
+ void OnDataChanged( const char *pReason, int nNotifySource, int nNotifyFlags );
+
+ // Returns the entity list
+ CDmAttribute *GetEntityList();
+
+ // Adds a new info_target
+ void AddNewInfoTarget( void );
+ void AddNewInfoTarget( const Vector &vecOrigin, const QAngle &angAngles );
+
+ // Adds a new commentary node
+ void AddNewCommentaryNode( void );
+ void AddNewCommentaryNode( const Vector &vecOrigin, const QAngle &angAngles );
+
+ // Deletes a commentary node
+ void DeleteCommentaryNode( CDmElement *pNode );
+
+ // Returns the commentary node at the specified location
+ CDmeCommentaryNodeEntity *GetCommentaryNodeForLocation( Vector &vecOrigin, QAngle &angAbsAngles );
+
+ // For element choice lists. Return false if it's an unknown choice list type
+ virtual bool GetStringChoiceList( const char *pChoiceListType, CDmElement *pElement,
+ const char *pAttributeName, bool bArrayElement, StringChoiceList_t &list );
+ virtual bool GetElementChoiceList( const char *pChoiceListType, CDmElement *pElement,
+ const char *pAttributeName, bool bArrayElement, ElementChoiceList_t &list );*/
+
+
+private:
+ //ICommEditDocCallback *m_pCallback;
+ CDmeHandle< CDmElement > m_hRoot;
+ char m_pTXTFileName[512];
+ bool m_bDirty;
+};
+
+
+#endif // GAMEEVENTEDITDOC_H