OpenRCT2/src/openrct2-ui/UiContext.h

47 lines
1.6 KiB
C
Raw Normal View History

/*****************************************************************************
* Copyright (c) 2014-2019 OpenRCT2 developers
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#pragma once
#include <memory>
#include <openrct2/common.h>
2018-06-22 23:22:29 +02:00
#include <string>
struct SDL_Window;
namespace OpenRCT2
{
interface IContext;
2017-06-11 13:53:37 +02:00
interface IPlatformEnvironment;
namespace Ui
{
2018-06-22 23:22:29 +02:00
struct FileDialogDesc;
class InGameConsole;
interface IUiContext;
interface IPlatformUiContext
{
virtual ~IPlatformUiContext() = default;
virtual void SetWindowIcon(SDL_Window * window) abstract;
virtual bool IsSteamOverlayAttached() abstract;
2018-06-22 23:22:29 +02:00
virtual void ShowMessageBox(SDL_Window * window, const std::string& message) abstract;
virtual void OpenFolder(const std::string& path) abstract;
2018-06-22 23:22:29 +02:00
virtual std::string ShowFileDialog(SDL_Window * window, const FileDialogDesc& desc) abstract;
virtual std::string ShowDirectoryDialog(SDL_Window * window, const std::string& title) abstract;
};
2018-04-27 19:47:57 +02:00
std::unique_ptr<IUiContext> CreateUiContext(const std::shared_ptr<IPlatformEnvironment>& env);
2018-06-22 23:22:29 +02:00
IPlatformUiContext* CreatePlatformUiContext();
2018-03-11 23:25:34 +01:00
InGameConsole& GetInGameConsole();
2018-05-04 22:40:09 +02:00
} // namespace Ui
} // namespace OpenRCT2