10#ifndef DROPDOWN_FUNC_H
11#define DROPDOWN_FUNC_H
18void ShowDropDownMenu(
Window *w, std::span<const StringID> strings,
int selected,
WidgetID button, uint32_t disabled_mask, uint32_t hidden_mask, uint width = 0, DropDownOptions options = {}, std::string *
const persistent_filter_text =
nullptr);
23std::unique_ptr<DropDownListItem>
MakeDropDownListStringItem(std::string &&str,
int value,
bool masked =
false,
bool shaded =
false);
37inline std::unique_ptr<DropDownListItem>
MakeDropDownListStringItem(std::string &&str, EnumType value,
bool masked =
false,
bool shaded =
false)
std::unique_ptr< DropDownListItem > MakeDropDownListDividerItem()
Creates new DropDownListDividerItem.
std::unique_ptr< DropDownListItem > MakeDropDownListIconItem(SpriteID sprite, PaletteID palette, StringID str, int value, bool masked=false, bool shaded=false)
Creates new DropDownListIconItem.
std::unique_ptr< DropDownListItem > MakeDropDownListStringItem(StringID str, int value, bool masked=false, bool shaded=false)
Creates new DropDownListStringItem.
std::unique_ptr< DropDownListItem > MakeDropDownListCheckedItem(bool checked, StringID str, int value, bool masked=false, bool shaded=false, uint indent=0)
Creates new DropDownListCheckedItem.
void ShowDropDownMenu(Window *w, std::span< const StringID > strings, int selected, WidgetID button, uint32_t disabled_mask, uint32_t hidden_mask, uint width=0, DropDownOptions options={}, std::string *const persistent_filter_text=nullptr)
Show a dropdown menu window near a widget of the parent window.
Types related to the drop down widget.
Type (helpers) for enums.
constexpr std::underlying_type_t< enum_type > to_underlying(enum_type e)
Implementation of std::to_underlying (from C++23).
constexpr bool is_scoped_enum_v
Implementation of std::is_scoped_enum_v (from C++23).
uint32_t SpriteID
The number of a sprite, without mapping bits and colourtables.
uint32_t PaletteID
The number of the palette.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Dimensions (a width and height) of a rectangle in 2D.
Data structure for an opened window.
Functions, definitions and such used only by the GUI.