ui/winui/icons.cpp

Tue, 29 Oct 2024 11:29:18 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 29 Oct 2024 11:29:18 +0100
branch
newapi
changeset 369
f16a1cde664e
parent 218
d06e7e8e53e1
permissions
-rw-r--r--

disable gtk3 single click list activation

213
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 /*
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 *
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
4 * Copyright 2017 Olaf Wintermann. All rights reserved.
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 *
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6 * Redistribution and use in source and binary forms, with or without
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7 * modification, are permitted provided that the following conditions are met:
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8 *
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9 * 1. Redistributions of source code must retain the above copyright
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
10 * notice, this list of conditions and the following disclaimer.
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
11 *
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
12 * 2. Redistributions in binary form must reproduce the above copyright
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
13 * notice, this list of conditions and the following disclaimer in the
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
14 * documentation and/or other materials provided with the distribution.
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15 *
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
26 * POSSIBILITY OF SUCH DAMAGE.
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27 */
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
28
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
29 #include "pch.h"
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
30
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
31 #include "icons.h"
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
32
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
33 #include <stdlib.h>
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
34 #include <string.h>
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
35
215
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
36 #include "util.h"
213
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
37
216
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
38 #include <Windows.h>
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
39 #include <Shellapi.h>
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
40
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
41
213
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
42 using namespace winrt;
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
43 using namespace Microsoft::UI::Xaml;
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
44 using namespace Microsoft::UI::Xaml::Controls;
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
45 using namespace Windows::UI::Xaml::Interop;
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
46 using namespace winrt::Windows::Foundation;
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
47 using namespace winrt::Microsoft::UI::Xaml::Controls::Primitives;
216
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
48 using namespace winrt::Microsoft::UI::Xaml::Media::Imaging;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
49 //using namespace Windows::Storage::Streams;
213
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
50
216
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
51 static UiIcon* sys_folder_icon16;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
52 static UiIcon* sys_file_icon16;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
53
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
54 static UiIcon* sys_folder_icon32;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
55 static UiIcon* sys_file_icon32;
213
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
56
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
57 std::unordered_map<std::string, Symbol> ui_symbol_icons = {
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
58 {"Accept", Symbol::Accept },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
59 {"Account", Symbol::Account },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
60 {"Add", Symbol::Add },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
61 {"AddFriend", Symbol::AddFriend },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
62 {"Admin", Symbol::Admin },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
63 {"AlignCenter", Symbol::AlignCenter },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
64 {"AlignLeft", Symbol::AlignLeft },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
65 {"AlignRight", Symbol::AlignRight },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
66 {"AllApps", Symbol::AllApps },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67 {"Attach", Symbol::Attach },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
68 {"AttachCamera", Symbol::AttachCamera },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
69 {"Audio", Symbol::Audio },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
70 {"Back", Symbol::Back },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
71 {"BackToWindow", Symbol::BackToWindow },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
72 {"BlockContact", Symbol::BlockContact },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
73 {"Bold", Symbol::Bold },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
74 {"Bookmarks", Symbol::Bookmarks },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
75 {"BrowsePhotos", Symbol::BrowsePhotos },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
76 {"Bullets", Symbol::Bullets },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
77 {"Calculator", Symbol::Calculator },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
78 {"Calendar", Symbol::Calendar },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
79 {"CalendarDay", Symbol::CalendarDay },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
80 {"CalendarReply", Symbol::CalendarReply },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
81 {"CalendarWeek", Symbol::CalendarWeek },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
82 {"Camera", Symbol::Camera },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
83 {"Cancel", Symbol::Cancel },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
84 {"Caption", Symbol::Caption },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
85 {"CellPhone", Symbol::CellPhone },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
86 {"Character", Symbol::Character },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
87 {"Clear", Symbol::Clear },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
88 {"ClearSelection", Symbol::ClearSelection },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
89 {"Clock", Symbol::Clock },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
90 {"ClosedCaption", Symbol::ClosedCaption },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
91 {"ClosePane", Symbol::ClosePane },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
92 {"Comment", Symbol::Comment },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
93 {"Contact", Symbol::Contact },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
94 {"Contact2", Symbol::Contact2 },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
95 {"ContactInfo", Symbol::ContactInfo },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
96 {"ContactPresence", Symbol::ContactPresence },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
97 {"Copy", Symbol::Copy },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
98 {"Crop", Symbol::Crop },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
99 {"Cut", Symbol::Cut },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
100 {"Delete", Symbol::Delete },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
101 {"Directions", Symbol::Directions },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
102 {"DisableUpdates", Symbol::DisableUpdates },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
103 {"DisconnectDrive", Symbol::DisconnectDrive },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
104 {"Dislike", Symbol::Dislike },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
105 {"DockBottom", Symbol::DockBottom },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
106 {"DockLeft", Symbol::DockLeft },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
107 {"DockRight", Symbol::DockRight },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
108 {"Document", Symbol::Document },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
109 {"Download", Symbol::Download },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
110 {"Edit", Symbol::Edit },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
111 {"Emoji", Symbol::Emoji },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
112 {"Emoji2", Symbol::Emoji2 },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
113 {"Favorite", Symbol::Favorite },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
114 {"Filter", Symbol::Filter },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
115 {"Find", Symbol::Find },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
116 {"Flag", Symbol::Flag },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
117 {"Folder", Symbol::Folder },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
118 {"Font", Symbol::Font },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
119 {"FontColor", Symbol::FontColor },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
120 {"FontDecrease", Symbol::FontDecrease },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
121 {"FontIncrease", Symbol::FontIncrease },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
122 {"FontSize", Symbol::FontSize },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
123 {"Forward", Symbol::Forward },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
124 {"FourBars", Symbol::FourBars },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
125 {"FullScreen", Symbol::FullScreen },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
126 {"GlobalNavigationButton", Symbol::GlobalNavigationButton },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
127 {"Globe", Symbol::Globe },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
128 {"Go", Symbol::Go },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
129 {"GoToStart", Symbol::GoToStart },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
130 {"GoToToday", Symbol::GoToToday },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
131 {"HangUp", Symbol::HangUp },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
132 {"Help", Symbol::Help },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
133 {"HideBcc", Symbol::HideBcc },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
134 {"Highlight", Symbol::Highlight },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
135 {"Home", Symbol::Home },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
136 {"Import", Symbol::Import },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
137 {"ImportAll", Symbol::ImportAll },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
138 {"Important", Symbol::Important },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
139 {"Italic", Symbol::Italic },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
140 {"Keyboard", Symbol::Keyboard },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
141 {"LeaveChat", Symbol::LeaveChat },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
142 {"Library", Symbol::Library },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
143 {"Like", Symbol::Like },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
144 {"LikeDislike", Symbol::LikeDislike },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
145 {"Link", Symbol::Link },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
146 {"List", Symbol::List },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
147 {"Mail", Symbol::Mail },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
148 {"MailFilled", Symbol::MailFilled },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
149 {"MailForward", Symbol::MailForward },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
150 {"MailReply", Symbol::MailReply },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
151 {"MailReplyAll", Symbol::MailReplyAll },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
152 {"Manage", Symbol::Manage },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
153 {"Map", Symbol::Map },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
154 {"MapDrive", Symbol::MapDrive },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
155 {"MapPin", Symbol::MapPin },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
156 {"Memo", Symbol::Memo },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
157 {"Message", Symbol::Message },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
158 {"Microphone", Symbol::Microphone },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
159 {"More", Symbol::More },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
160 {"MoveToFolder", Symbol::MoveToFolder },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
161 {"MusicInfo", Symbol::MusicInfo },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
162 {"Mute", Symbol::Mute },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
163 {"NewFolder", Symbol::NewFolder },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
164 {"NewWindow", Symbol::NewWindow },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
165 {"Next", Symbol::Next },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
166 {"OneBar", Symbol::OneBar },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
167 {"OpenFile", Symbol::OpenFile },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
168 {"OpenLocal", Symbol::OpenLocal },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
169 {"OpenPane", Symbol::OpenPane },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
170 {"OpenWith", Symbol::OpenWith },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
171 {"Orientation", Symbol::Orientation },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
172 {"OtherUser", Symbol::OtherUser },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
173 {"OutlineStar", Symbol::OutlineStar },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
174 {"Page", Symbol::Page },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
175 {"Page2", Symbol::Page2 },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
176 {"Paste", Symbol::Paste },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
177 {"Pause", Symbol::Pause },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
178 {"People", Symbol::People },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
179 {"Permissions", Symbol::Permissions },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
180 {"Phone", Symbol::Phone },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
181 {"PhoneBook", Symbol::PhoneBook },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
182 {"Pictures", Symbol::Pictures },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
183 {"Pin", Symbol::Pin },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
184 {"Placeholder", Symbol::Placeholder },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
185 {"Play", Symbol::Play },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
186 {"PostUpdate", Symbol::PostUpdate },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
187 {"Preview", Symbol::Preview },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
188 {"PreviewLink", Symbol::PreviewLink },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
189 {"Previous", Symbol::Previous },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
190 {"Print", Symbol::Print },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
191 {"Priority", Symbol::Priority },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
192 {"ProtectedDocument", Symbol::ProtectedDocument },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
193 {"Read", Symbol::Read },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
194 {"Redo", Symbol::Redo },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
195 {"Refresh", Symbol::Refresh },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
196 {"Remote", Symbol::Remote },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
197 {"Remove", Symbol::Remove },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
198 {"Rename", Symbol::Rename },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
199 {"Repair", Symbol::Repair },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
200 {"RepeatAll", Symbol::RepeatAll },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
201 {"RepeatOne", Symbol::RepeatOne },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
202 {"ReportHacked", Symbol::ReportHacked },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
203 {"ReShare", Symbol::ReShare },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
204 {"Rotate", Symbol::Rotate },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
205 {"RotateCamera", Symbol::RotateCamera },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
206 {"Save", Symbol::Save },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
207 {"SaveLocal", Symbol::SaveLocal },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
208 {"Scan", Symbol::Scan },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
209 {"SelectAll", Symbol::SelectAll },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
210 {"Send", Symbol::Send },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
211 {"SetLockScreen", Symbol::SetLockScreen },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
212 {"SetTile", Symbol::SetTile },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
213 {"Setting", Symbol::Setting },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
214 {"Share", Symbol::Share },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
215 {"Shop", Symbol::Shop },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
216 {"ShowBcc", Symbol::ShowBcc },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
217 {"ShowResults", Symbol::ShowResults },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
218 {"Shuffle", Symbol::Shuffle },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
219 {"SlideShow", Symbol::SlideShow },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
220 {"SolidStar", Symbol::SolidStar },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
221 {"Sort", Symbol::Sort },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
222 {"Stop", Symbol::Stop },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
223 {"StopSlideShow", Symbol::StopSlideShow },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
224 {"Street", Symbol::Street },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
225 {"Switch", Symbol::Switch },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
226 {"SwitchApps", Symbol::SwitchApps },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
227 {"Sync", Symbol::Sync },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
228 {"SyncFolder", Symbol::SyncFolder },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
229 {"Tag", Symbol::Tag },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
230 {"Target", Symbol::Target },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
231 {"ThreeBars", Symbol::ThreeBars },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
232 {"TouchPointer", Symbol::TouchPointer },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
233 {"Trim", Symbol::Trim },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
234 {"TwoBars", Symbol::TwoBars },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
235 {"TwoPage", Symbol::TwoPage },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
236 {"Underline", Symbol::Underline },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
237 {"Undo", Symbol::Undo },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
238 {"UnFavorite", Symbol::UnFavorite },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
239 {"UnPin", Symbol::UnPin },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
240 {"UnSyncFolder", Symbol::UnSyncFolder },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
241 {"Up", Symbol::Up },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
242 {"Upload", Symbol::Upload },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
243 {"Video", Symbol::Video },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
244 {"VideoChat", Symbol::VideoChat },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
245 {"View", Symbol::View },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
246 {"ViewAll", Symbol::ViewAll },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
247 {"Volume", Symbol::Volume },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
248 {"WebCam", Symbol::WebCam },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
249 {"World", Symbol::World },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
250 {"XboxOneConsole", Symbol::XboxOneConsole },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
251 {"ZeroBars", Symbol::ZeroBars },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
252 {"Zoom", Symbol::Zoom },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
253 {"ZoomIn", Symbol::ZoomIn },
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
254 {"ZoomOut", Symbol::ZoomOut }
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
255 };
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
256
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
257 winrt::Microsoft::UI::Xaml::Controls::IconElement ui_get_icon(const char* name) {
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
258 if (ui_symbol_icons.find(name) == ui_symbol_icons.end()) {
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
259 SymbolIcon no_icon = { nullptr };
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
260 return no_icon;
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
261 }
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
262
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
263 Symbol symbol = ui_symbol_icons[name];
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
264 SymbolIcon icon = SymbolIcon(symbol);
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
265 return icon;
7e39db525fd9 add icons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
266 }
215
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
267
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
268
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
269 // symbol icon implementation
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
270 UiSymbolIcon::UiSymbolIcon(winrt::Microsoft::UI::Xaml::Controls::Symbol sym) {
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
271 symbol = sym;
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
272 }
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
273
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
274 UiSymbolIcon::~UiSymbolIcon() {
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
275
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
276 }
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
277
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
278 winrt::Microsoft::UI::Xaml::Controls::IconElement UiSymbolIcon::getIcon() {
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
279 return SymbolIcon(symbol);
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
280 }
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
281
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
282 // image icon implementation
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
283 UiImageIcon::UiImageIcon(const char* uristr) {
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
284 wchar_t* wuri = str2wstr(uristr, nullptr);
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
285 Windows::Foundation::Uri uri{ wuri };
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
286 this->uri = uri;
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
287 free(wuri);
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
288 }
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
289
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
290 UiImageIcon::~UiImageIcon() {
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
291
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
292 }
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
293
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
294 winrt::Microsoft::UI::Xaml::Controls::IconElement UiImageIcon::getIcon() {
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
295 BitmapIcon icon = BitmapIcon();
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
296 icon.UriSource(uri);
216
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
297 ImageIcon img = ImageIcon();
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
298 img.Source();
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
299 return icon;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
300 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
301
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
302 // bitmap icon implementation
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
303 UiBitmapIcon::UiBitmapIcon(winrt::Microsoft::UI::Xaml::Media::Imaging::BitmapSource bitmap) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
304 this->bitmap = bitmap;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
305 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
306
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
307 UiBitmapIcon::~UiBitmapIcon() {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
308
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
309 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
310
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
311 winrt::Microsoft::UI::Xaml::Controls::IconElement UiBitmapIcon::getIcon() {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
312 ImageIcon icon = ImageIcon();
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
313 icon.Source(bitmap);
215
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
314 return icon;
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
315 }
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
316
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
317 UIEXPORT UiIcon* ui_icon(const char* name, size_t size) {
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
318 Symbol symbol = ui_symbol_icons[name];
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
319 UiSymbolIcon* icon = new UiSymbolIcon(symbol);
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
320 return icon;
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
321 }
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
322
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
323
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
324 UIEXPORT UiIcon* ui_imageicon(const char* file) {
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
325 return new UiImageIcon(file);
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
326 }
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
327
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
328 UIEXPORT void ui_icon_free(UiIcon* icon) {
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
329 delete icon;
1bd5534c395d add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 213
diff changeset
330 }
216
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
331
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
332
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
333 struct __declspec(uuid("905a0fef-bc53-11df-8c49-001e4fc686da")) IBufferByteAccess : ::IUnknown
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
334 {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
335 virtual HRESULT __stdcall Buffer(uint8_t** value) = 0;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
336 };
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
337
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
338
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
339
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
340 winrt::Microsoft::UI::Xaml::Media::Imaging::WriteableBitmap ui_dllicon2bitmap(const char* dll, int iconindex, bool large) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
341 WriteableBitmap wbitmap = { nullptr };
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
342
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
343 // get the icon from the dll
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
344 HICON hicon_small;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
345 HICON hicon_large;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
346 if (ExtractIconExA(dll, iconindex, &hicon_large, &hicon_small, 1) > 0) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
347 HICON hicon = large ? hicon_large : hicon_small;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
348
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
349 // convert icon to (gdi) bitmap
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
350 ICONINFO info;
218
d06e7e8e53e1 implement table activate/selection events (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 217
diff changeset
351 info.hbmColor = nullptr;
d06e7e8e53e1 implement table activate/selection events (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 217
diff changeset
352 info.hbmMask = nullptr;
216
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
353 if (GetIconInfo(hicon, &info)) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
354 BITMAP bitmap;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
355 if (GetObjectW(info.hbmColor, sizeof(BITMAP), &bitmap) != 0) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
356 size_t bitmap_size = bitmap.bmWidthBytes * bitmap.bmHeight;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
357 char *bitmap_data = (char*)malloc(bitmap_size);
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
358
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
359 // get the pixel data
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
360 if (GetBitmapBits(info.hbmColor, bitmap_size, bitmap_data) != 0) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
361 WriteableBitmap wb = WriteableBitmap(bitmap.bmWidth, bitmap.bmHeight);
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
362 void *wb_data = wb.PixelBuffer().data();
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
363 memcpy(wb_data, bitmap_data, bitmap_size);
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
364 wbitmap = wb;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
365 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
366 free(bitmap_data);
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
367 }
218
d06e7e8e53e1 implement table activate/selection events (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 217
diff changeset
368 if (info.hbmMask) {
d06e7e8e53e1 implement table activate/selection events (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 217
diff changeset
369 DeleteObject(info.hbmMask);
d06e7e8e53e1 implement table activate/selection events (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 217
diff changeset
370 }
d06e7e8e53e1 implement table activate/selection events (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 217
diff changeset
371 if (info.hbmColor) {
d06e7e8e53e1 implement table activate/selection events (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 217
diff changeset
372 DeleteObject(info.hbmColor);
d06e7e8e53e1 implement table activate/selection events (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 217
diff changeset
373 }
216
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
374 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
375
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
376 DestroyIcon(hicon_small);
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
377 DestroyIcon(hicon_large);
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
378 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
379
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
380 return wbitmap;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
381 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
382
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
383 UiIcon* ui_dllicon(const char* dll, int iconindex, bool large) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
384 WriteableBitmap wbitmap = ui_dllicon2bitmap(dll, iconindex, large);
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
385 return new UiBitmapIcon(wbitmap);
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
386 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
387
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
388 UIEXPORT UiIcon* ui_foldericon(size_t size) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
389 bool large = true;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
390 UiIcon** sys_folder_icon = &sys_folder_icon32;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
391 if (size <= 24) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
392 large = false;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
393 sys_folder_icon = &sys_folder_icon16;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
394 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
395
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
396 if (*sys_folder_icon) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
397 return *sys_folder_icon;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
398 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
399
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
400 UiIcon* icon = ui_dllicon("shell32.dll", 3, large);
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
401 *sys_folder_icon = icon;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
402 return icon;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
403 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
404
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
405 UIEXPORT UiIcon* ui_fileicon(size_t size) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
406 bool large = true;
217
b9798109c7d2 fix ui_fileicon (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 216
diff changeset
407 UiIcon** sys_folder_icon = &sys_file_icon32;
216
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
408 if (size <= 24) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
409 large = false;
217
b9798109c7d2 fix ui_fileicon (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 216
diff changeset
410 sys_folder_icon = &sys_file_icon16;
216
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
411 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
412
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
413 if (*sys_folder_icon) {
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
414 return *sys_folder_icon;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
415 }
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
416
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
417 UiIcon* icon = ui_dllicon("shell32.dll", 0, large);
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
418 *sys_folder_icon = icon;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
419 return icon;
391c2c723029 add dll icon loader
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 215
diff changeset
420 }

mercurial