From 32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 17 Oct 2025 12:06:14 +0800 Subject: Remove String stage 1. --- include/cru/platform/gui/SaveOpenDialogOptions.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'include/cru/platform/gui/SaveOpenDialogOptions.h') 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 +#include + namespace cru::platform::gui { struct CRU_PLATFORM_GUI_API SaveDialogOptions { - String title; - String prompt; - String message; - std::vector allowed_file_types; + std::string title; + std::string prompt; + std::string message; + std::vector allowed_file_types; bool allow_all_file_types = false; }; @@ -20,29 +23,29 @@ template 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 allowed_file_types) { + std::vector 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; } -- cgit v1.2.3