diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-10-17 12:06:14 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-10-17 12:06:14 +0800 |
commit | 32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 (patch) | |
tree | 892b71060a88b58d9293d78033000b05818783df /include/cru/platform/gui/SaveOpenDialogOptions.h | |
parent | faf77949e19dc0d01f75bf8abb783eda70328048 (diff) | |
download | cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.gz cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.bz2 cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.zip |
Remove String stage 1.
Diffstat (limited to 'include/cru/platform/gui/SaveOpenDialogOptions.h')
-rw-r--r-- | include/cru/platform/gui/SaveOpenDialogOptions.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/include/cru/platform/gui/SaveOpenDialogOptions.h b/include/cru/platform/gui/SaveOpenDialogOptions.h index cff4a44f..484a1552 100644 --- a/include/cru/platform/gui/SaveOpenDialogOptions.h +++ b/include/cru/platform/gui/SaveOpenDialogOptions.h @@ -1,12 +1,15 @@ #pragma once #include "Base.h" +#include <string> +#include <vector> + namespace cru::platform::gui { struct CRU_PLATFORM_GUI_API SaveDialogOptions { - String title; - String prompt; - String message; - std::vector<String> allowed_file_types; + std::string title; + std::string prompt; + std::string message; + std::vector<std::string> allowed_file_types; bool allow_all_file_types = false; }; @@ -20,29 +23,29 @@ template <typename T> struct CRU_PLATFORM_GUI_API SaveDialogOptionsBuilderTemplate { T options; - SaveDialogOptionsBuilderTemplate& SetTitle(String title) { + SaveDialogOptionsBuilderTemplate& SetTitle(std::string title) { options.title = std::move(title); return *this; } - SaveDialogOptionsBuilderTemplate& SetPrompt(String prompt) { + SaveDialogOptionsBuilderTemplate& SetPrompt(std::string prompt) { options.prompt = std::move(prompt); return *this; } - SaveDialogOptionsBuilderTemplate& SetMessage(String message) { + SaveDialogOptionsBuilderTemplate& SetMessage(std::string message) { options.message = std::move(message); return *this; } SaveDialogOptionsBuilderTemplate& SetAllowedFileTypes( - std::vector<String> allowed_file_types) { + std::vector<std::string> allowed_file_types) { options.allowed_file_types = std::move(allowed_file_types); return *this; } SaveDialogOptionsBuilderTemplate& AddAllowedFileType( - String allowed_file_type) { + std::string allowed_file_type) { options.allowed_file_types.push_back(allowed_file_type); return *this; } |