You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Code/Sandbox/Editor/Include/IAssetViewer.h

51 lines
1.9 KiB
C

/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
// Original file Copyright Crytek GMBH or its affiliates, used under license.
// Description : This file declares a control which objective is to display
// multiple assets allowing selection and preview of such things
// It also handles scrolling and changes in the thumbnail display size
#ifndef CRYINCLUDE_EDITOR_INCLUDE_IASSETVIEWER_H
#define CRYINCLUDE_EDITOR_INCLUDE_IASSETVIEWER_H
#pragma once
#include "IObservable.h"
#include "IAssetItemDatabase.h"
struct IAssetItem;
struct IAssetItemDatabase;
// Description:
// Observer for the asset viewer events
struct IAssetViewerObserver
{
virtual void OnChangeStatusBarInfo(UINT nSelectedItems, UINT nVisibleItems, UINT nTotalItems) {};
virtual void OnSelectionChanged() {};
virtual void OnChangedPreviewedAsset(IAssetItem* pAsset) {};
virtual void OnAssetDblClick(IAssetItem* pAsset) {};
virtual void OnAssetFilterChanged() {};
};
// Description:
// The asset viewer interface for the asset database plugins to use
struct IAssetViewer
{
DEFINE_OBSERVABLE_PURE_METHODS(IAssetViewerObserver);
virtual HWND GetRenderWindow() = 0;
virtual void ApplyFilters(const IAssetItemDatabase::TAssetFieldFiltersMap& rFieldFilters) = 0;
virtual const IAssetItemDatabase::TAssetFieldFiltersMap& GetCurrentFilters() = 0;
virtual void ClearFilters() = 0;
};
#endif // CRYINCLUDE_EDITOR_INCLUDE_IASSETVIEWER_H