MCPcopy Create free account
hub / github.com/MyGUI/mygui / command_Clear

Method command_Clear

Tools/LayoutEditor/EditorState.cpp:193–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191 }
192
193 void EditorState::command_Clear(const MyGUI::UString& _commandName, bool& _result)
194 {
195 if (!checkCommand())
196 return;
197
198 if (UndoManager::getInstance().isUnsaved())
199 {
200 MyGUI::Message* message = MessageBoxManager::getInstance().create(
201 replaceTags("Warning"),
202 replaceTags("MessageUnsavedData"),
203 MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No |
204 MyGUI::MessageBoxStyle::Cancel);
205 message->eventMessageBoxResult += MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultClear);
206 }
207 else
208 {
209 clear();
210 }
211
212 _result = true;
213 }
214
215 void EditorState::command_Quit(const MyGUI::UString& _commandName, bool& _result)
216 {

Callers

nothing calls this directly

Calls 5

replaceTagsFunction · 0.85
newDelegateFunction · 0.85
clearFunction · 0.85
isUnsavedMethod · 0.80
createMethod · 0.45

Tested by

no test coverage detected