1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #pragma once
30
31 #include "../ui/toolkit.h"
32
33
34
35 struct UiIcon {
36
37
38 virtual winrt::Microsoft::
UI::Xaml::Controls::IconElement getIcon() =
0;
39 };
40
41 struct UiSymbolIcon : UiIcon {
42 winrt::Microsoft::
UI::Xaml::Controls::Symbol symbol;
43
44 UiSymbolIcon(winrt::Microsoft::
UI::Xaml::Controls::Symbol sym);
45
46 ~UiSymbolIcon();
47
48 winrt::Microsoft::
UI::Xaml::Controls::IconElement getIcon();
49 };
50
51 struct UiImageIcon : UiIcon {
52 winrt::Windows::Foundation::Uri uri{ nullptr };
53
54 UiImageIcon(
const char* uristr);
55
56 ~UiImageIcon();
57
58 winrt::Microsoft::
UI::Xaml::Controls::IconElement getIcon();
59 };
60
61 struct UiBitmapIcon : UiIcon {
62 winrt::Microsoft::
UI::Xaml::Media::Imaging::BitmapSource bitmap{ nullptr };
63
64 UiBitmapIcon(winrt::Microsoft::
UI::Xaml::Media::Imaging::BitmapSource bitmap);
65
66 ~UiBitmapIcon();
67
68 winrt::Microsoft::
UI::Xaml::Controls::IconElement getIcon();
69 };
70
71
72 winrt::Microsoft::
UI::Xaml::Controls::IconElement ui_get_icon(
const char* name);
73
74 winrt::Microsoft::
UI::Xaml::Media::Imaging::WriteableBitmap ui_dllicon2bitmap(
const char* dll,
int iconindex, bool large);
75
76 UiIcon* ui_dllicon(
const char* dll,
int iconindex, bool large);
77