Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef ACTBUSYDOC_H
  9. #define ACTBUSYDOC_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. #include "dme_controls/inotifyui.h"
  14. #include "datamodel/dmehandle.h"
  15. //-----------------------------------------------------------------------------
  16. // Forward declarations
  17. //-----------------------------------------------------------------------------
  18. class IActBusyDocCallback;
  19. //-----------------------------------------------------------------------------
  20. // Contains all editable state
  21. //-----------------------------------------------------------------------------
  22. class CActBusyDoc : public IDmNotify
  23. {
  24. public:
  25. CActBusyDoc( IActBusyDocCallback *pCallback );
  26. ~CActBusyDoc();
  27. // Inherited from INotifyUI
  28. virtual void NotifyDataChanged( const char *pReason, int nNotifySource, int nNotifyFlags );
  29. // Sets/Gets the file name
  30. const char *GetFileName();
  31. void SetFileName( const char *pFileName );
  32. // Dirty bits (has it changed since the last time it was saved?)
  33. void SetDirty( bool bDirty );
  34. bool IsDirty() const;
  35. // Creates a new act busy list
  36. void CreateNew();
  37. // Saves/loads from file
  38. bool LoadFromFile( const char *pFileName );
  39. void SaveToFile( );
  40. // Returns the root object
  41. CDmElement *GetRootObject();
  42. // Called when data changes
  43. void OnDataChanged( const char *pReason, int nNotifySource, int nNotifyFlags );
  44. // Creates a new actbusy
  45. void CreateActBusy();
  46. private:
  47. IActBusyDocCallback *m_pCallback;
  48. CDmeHandle< CDmElement > m_hRoot;
  49. char m_pFileName[512];
  50. bool m_bDirty;
  51. };
  52. #endif // ACTBUSYDOC_H