2020-02-15 00:36:24 +01:00
|
|
|
/*****************************************************************************
|
2022-10-01 09:42:14 +02:00
|
|
|
* Copyright (c) 2014-2022 OpenRCT2 developers
|
2020-02-15 00:36:24 +01:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2020-02-23 16:33:01 +01:00
|
|
|
#pragma once
|
2020-02-15 00:36:24 +01:00
|
|
|
|
2020-04-24 16:58:01 +02:00
|
|
|
#ifdef ENABLE_SCRIPTING
|
2020-02-23 16:33:01 +01:00
|
|
|
|
|
|
|
# include "../interface/Window.h"
|
|
|
|
|
2022-07-29 18:45:10 +02:00
|
|
|
# include <memory>
|
2020-02-23 16:33:01 +01:00
|
|
|
# include <optional>
|
|
|
|
# include <string_view>
|
2020-02-15 00:36:24 +01:00
|
|
|
|
|
|
|
namespace OpenRCT2::Ui::Windows
|
|
|
|
{
|
2020-05-06 21:39:57 +02:00
|
|
|
class CustomListView;
|
|
|
|
|
2020-02-27 23:13:49 +01:00
|
|
|
std::string GetWindowTitle(rct_window* w);
|
2021-01-06 17:22:22 +01:00
|
|
|
void UpdateWindowTitle(rct_window* w, std::string_view value);
|
2022-08-31 23:13:02 +02:00
|
|
|
void UpdateWindowTab(rct_window* w, int32_t tabIndex);
|
2022-08-21 18:49:23 +02:00
|
|
|
void UpdateWidgetText(rct_window* w, WidgetIndex widget, std::string_view string_view);
|
|
|
|
void UpdateWidgetItems(rct_window* w, WidgetIndex widgetIndex, const std::vector<std::string>& items);
|
|
|
|
void UpdateWidgetColour(rct_window* w, WidgetIndex widgetIndex, colour_t colour);
|
|
|
|
void UpdateWidgetSelectedIndex(rct_window* w, WidgetIndex widgetIndex, int32_t selectedIndex);
|
|
|
|
std::vector<std::string> GetWidgetItems(rct_window* w, WidgetIndex widgetIndex);
|
|
|
|
colour_t GetWidgetColour(rct_window* w, WidgetIndex widgetIndex);
|
|
|
|
int32_t GetWidgetSelectedIndex(rct_window* w, WidgetIndex widgetIndex);
|
2021-01-06 17:22:22 +01:00
|
|
|
rct_window* FindCustomWindowByClassification(std::string_view classification);
|
2022-08-21 18:49:23 +02:00
|
|
|
std::optional<WidgetIndex> FindWidgetIndexByName(rct_window* w, std::string_view name);
|
|
|
|
std::string GetWidgetName(rct_window* w, WidgetIndex widgetIndex);
|
|
|
|
void SetWidgetName(rct_window* w, WidgetIndex widgetIndex, std::string_view name);
|
2022-10-03 20:50:19 +02:00
|
|
|
std::string GetWidgetTooltip(rct_window* w, WidgetIndex widgetIndex);
|
|
|
|
void SetWidgetTooltip(rct_window* w, WidgetIndex widgetIndex, std::string_view tooltip);
|
2022-08-21 18:49:23 +02:00
|
|
|
CustomListView* GetCustomListView(rct_window* w, WidgetIndex widgetIndex);
|
|
|
|
int32_t GetWidgetMaxLength(rct_window* w, WidgetIndex widgetIndex);
|
|
|
|
void SetWidgetMaxLength(rct_window* w, WidgetIndex widgetIndex, int32_t value);
|
2022-02-15 21:26:37 +01:00
|
|
|
void CloseWindowsOwnedByPlugin(std::shared_ptr<Plugin> plugin);
|
2020-02-22 14:29:18 +01:00
|
|
|
} // namespace OpenRCT2::Ui::Windows
|
2020-02-23 16:33:01 +01:00
|
|
|
|
|
|
|
#endif
|