PreferencesStdPages.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #ifndef CRYINCLUDE_EDITOR_PREFERENCESSTDPAGES_H
  9. #define CRYINCLUDE_EDITOR_PREFERENCESSTDPAGES_H
  10. #pragma once
  11. #include "Include/IPreferencesPage.h"
  12. #include <AzCore/std/functional.h>
  13. #include <AzCore/std/containers/vector.h>
  14. //////////////////////////////////////////////////////////////////////////
  15. class CStdPreferencesClassDesc
  16. : public IPreferencesPageClassDesc
  17. , public IPreferencesPageCreator
  18. {
  19. ULONG m_refCount;
  20. AZStd::vector< AZStd::function< IPreferencesPage*() > > m_pageCreators;
  21. public:
  22. CStdPreferencesClassDesc();
  23. virtual ~CStdPreferencesClassDesc() = default;
  24. //////////////////////////////////////////////////////////////////////////
  25. // IUnkown implementation.
  26. HRESULT STDMETHODCALLTYPE QueryInterface(const IID& riid, void** ppvObj) override;
  27. ULONG STDMETHODCALLTYPE AddRef() override;
  28. ULONG STDMETHODCALLTYPE Release() override;
  29. //////////////////////////////////////////////////////////////////////////
  30. REFGUID ClassID() override;
  31. //////////////////////////////////////////////////////////////////////////
  32. int GetPagesCount() override;
  33. IPreferencesPage* CreateEditorPreferencesPage(int index) override;
  34. };
  35. #endif // CRYINCLUDE_EDITOR_PREFERENCESSTDPAGES_H