#pragma once
#include "../ui/toolkit.h"
struct UiIcon {
virtual winrt::Microsoft::
UI::Xaml::Controls::IconElement getIcon() =
0;
};
struct UiSymbolIcon : UiIcon {
winrt::Microsoft::
UI::Xaml::Controls::Symbol symbol;
UiSymbolIcon(winrt::Microsoft::
UI::Xaml::Controls::Symbol sym);
~UiSymbolIcon();
winrt::Microsoft::
UI::Xaml::Controls::IconElement getIcon();
};
struct UiImageIcon : UiIcon {
winrt::Windows::Foundation::Uri uri{ nullptr };
UiImageIcon(
const char* uristr);
~UiImageIcon();
winrt::Microsoft::
UI::Xaml::Controls::IconElement getIcon();
};
struct UiBitmapIcon : UiIcon {
winrt::Microsoft::
UI::Xaml::Media::Imaging::BitmapSource bitmap{ nullptr };
UiBitmapIcon(winrt::Microsoft::
UI::Xaml::Media::Imaging::BitmapSource bitmap);
~UiBitmapIcon();
winrt::Microsoft::
UI::Xaml::Controls::IconElement getIcon();
};
winrt::Microsoft::
UI::Xaml::Controls::IconElement ui_get_icon(
const char* name);
winrt::Microsoft::
UI::Xaml::Media::Imaging::WriteableBitmap ui_dllicon2bitmap(
const char* dll,
int iconindex, bool large);
UiIcon* ui_dllicon(
const char* dll,
int iconindex, bool large);