1919 * You should have received a copy of the GNU General Public License
2020 * along with this program. If not, see <https://www.gnu.org/licenses/>.
2121 */
22- # ifndef MUSE_GLOBAL_IINTERACTIVE_H
23- #define MUSE_GLOBAL_IINTERACTIVE_H
22+
23+ #pragma once
2424
2525#include " modularity/imoduleinterface.h"
2626#include " io/path.h"
@@ -166,45 +166,45 @@ class IInteractive : MODULE_EXPORT_INTERFACE
166166 // question
167167 virtual async::Promise<Result> question (const std::string& contentTitle, const Text& text, const ButtonDatas& buttons,
168168 int defBtn = int (Button::NoButton), const Options& options = {},
169- const std::string& dialogTitle = " " ) = 0 ;
169+ const std::string& dialogTitle = {} ) = 0 ;
170170
171171 async::Promise<Result> question (const std::string& contentTitle, const std::string& text, const Buttons& buttons,
172- Button defBtn = Button::NoButton, const Options& options = {}, const std::string& dialogTitle = " " )
172+ Button defBtn = Button::NoButton, const Options& options = {}, const std::string& dialogTitle = {} )
173173 {
174174 return question (contentTitle, Text (text), buttonDataList (buttons), (int )defBtn, options, dialogTitle);
175175 }
176176
177177 // info
178178 virtual async::Promise<Result> info (const std::string& contentTitle, const Text& text, const ButtonDatas& buttons = {},
179179 int defBtn = int (Button::NoButton), const Options& options = {},
180- const std::string& dialogTitle = " " ) = 0 ;
180+ const std::string& dialogTitle = {} ) = 0 ;
181181
182182 async::Promise<Result> info (const std::string& contentTitle, const std::string& text, const Buttons& buttons,
183- Button defBtn, const Options& options = {}, const std::string& dialogTitle = " " )
183+ Button defBtn, const Options& options = {}, const std::string& dialogTitle = {} )
184184 {
185185 return info (contentTitle, Text (text), buttonDataList (buttons), (int )defBtn, options, dialogTitle);
186186 }
187187
188188 // warning
189189 virtual async::Promise<Result> warning (const std::string& contentTitle, const Text& text, const ButtonDatas& buttons = {},
190190 int defBtn = int (Button::NoButton), const Options& options = { WithIcon },
191- const std::string& dialogTitle = " " ) = 0 ;
191+ const std::string& dialogTitle = {} ) = 0 ;
192192
193193 async::Promise<Result> warning (const std::string& contentTitle, const std::string& text, const Buttons& buttons,
194194 Button defBtn = Button::NoButton, const Options& options = { WithIcon },
195- const std::string& dialogTitle = " " )
195+ const std::string& dialogTitle = {} )
196196 {
197197 return warning (contentTitle, Text (text), buttonDataList (buttons), (int )defBtn, options, dialogTitle);
198198 }
199199
200200 // error
201201 virtual async::Promise<Result> error (const std::string& contentTitle, const Text& text, const ButtonDatas& buttons = {},
202202 int defBtn = int (Button::NoButton), const Options& options = { WithIcon },
203- const std::string& dialogTitle = " " ) = 0 ;
203+ const std::string& dialogTitle = {} ) = 0 ;
204204
205205 async::Promise<Result> error (const std::string& contentTitle, const std::string& text, const Buttons& buttons,
206206 Button defBtn = Button::NoButton, const Options& options = { WithIcon },
207- const std::string& dialogTitle = " " )
207+ const std::string& dialogTitle = {} )
208208 {
209209 return error (contentTitle, Text (text), buttonDataList (buttons), (int )defBtn, options, dialogTitle);
210210 }
@@ -226,7 +226,8 @@ class IInteractive : MODULE_EXPORT_INTERFACE
226226 const io::paths_t & selectedDirectories) = 0;
227227
228228 // color
229- virtual async::Promise<Color> selectColor (const Color& color = Color::WHITE, const std::string& title = " " ) = 0;
229+ virtual async::Promise<Color> selectColor (const Color& color = Color::WHITE, const std::string& title = {},
230+ bool allowAlpha = false ) = 0;
230231 virtual bool isSelectColorOpened () const = 0;
231232
232233 // custom
@@ -262,39 +263,39 @@ class IInteractive : MODULE_EXPORT_INTERFACE
262263 // ! NOTE Please don't use this
263264 // ! =================================
264265 virtual Result questionSync (const std::string& contentTitle, const Text& text, const ButtonDatas& buttons,
265- int defBtn = int (Button::NoButton), const Options& options = {}, const std::string& dialogTitle = " " ) = 0 ;
266+ int defBtn = int (Button::NoButton), const Options& options = {}, const std::string& dialogTitle = {} ) = 0 ;
266267
267268 Result questionSync (const std::string& contentTitle, const std::string& text, const Buttons& buttons,
268- const Button& defBtn = Button::NoButton, const Options& options = {}, const std::string& dialogTitle = " " )
269+ const Button& defBtn = Button::NoButton, const Options& options = {}, const std::string& dialogTitle = {} )
269270 {
270271 return questionSync (contentTitle, Text (text), buttonDataList (buttons), (int )defBtn, options, dialogTitle);
271272 }
272273
273274 virtual Result infoSync (const std::string& contentTitle, const Text& text, const ButtonDatas& buttons = {},
274- int defBtn = int (Button::NoButton), const Options& options = {}, const std::string& dialogTitle = " " ) = 0 ;
275+ int defBtn = int (Button::NoButton), const Options& options = {}, const std::string& dialogTitle = {} ) = 0 ;
275276
276277 Result infoSync (const std::string& contentTitle, const std::string& text, const Buttons& buttons,
277- const Button& defBtn = Button::NoButton, const Options& options = {}, const std::string& dialogTitle = " " )
278+ const Button& defBtn = Button::NoButton, const Options& options = {}, const std::string& dialogTitle = {} )
278279 {
279280 return infoSync (contentTitle, Text (text), buttonDataList (buttons), (int )defBtn, options, dialogTitle);
280281 }
281282
282283 virtual Result warningSync (const std::string& contentTitle, const Text& text, const ButtonDatas& buttons = {},
283284 int defBtn = int (Button::NoButton), const Options& options = { WithIcon },
284- const std::string& dialogTitle = " " ) = 0 ;
285+ const std::string& dialogTitle = {} ) = 0 ;
285286
286287 Result warningSync (const std::string& contentTitle, const std::string& text, const Buttons& buttons,
287- const Button& defBtn = Button::NoButton, const Options& options = { WithIcon }, const std::string& dialogTitle = " " )
288+ const Button& defBtn = Button::NoButton, const Options& options = { WithIcon }, const std::string& dialogTitle = {} )
288289 {
289290 return warningSync (contentTitle, Text (text), buttonDataList (buttons), (int )defBtn, options, dialogTitle);
290291 }
291292
292293 virtual Result errorSync (const std::string& contentTitle, const Text& text, const ButtonDatas& buttons = {},
293294 int defBtn = int (Button::NoButton), const Options& options = { WithIcon },
294- const std::string& dialogTitle = " " ) = 0 ;
295+ const std::string& dialogTitle = {} ) = 0 ;
295296
296297 Result errorSync (const std::string& contentTitle, const std::string& text, const Buttons& buttons,
297- const Button& defBtn = Button::NoButton, const Options& options = { WithIcon }, const std::string& dialogTitle = " " )
298+ const Button& defBtn = Button::NoButton, const Options& options = { WithIcon }, const std::string& dialogTitle = {} )
298299 {
299300 return errorSync (contentTitle, Text (text), buttonDataList (buttons), (int )defBtn, options, dialogTitle);
300301 }
@@ -306,5 +307,3 @@ class IInteractive : MODULE_EXPORT_INTERFACE
306307};
307308DECLARE_OPERATORS_FOR_FLAGS (IInteractive::Options)
308309}
309-
310- #endif // MUSE_GLOBAL_IINTERACTIVE_H
0 commit comments