MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / onMsg

Method onMsg

src/Gui/TextDocumentEditorView.cpp:180–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180bool TextDocumentEditorView::onMsg(const char* msg)
181{
182 // don't allow any actions if the editor is being closed
183 if (aboutToClose) {
184 return false;
185 }
186
187 if (strcmp(msg, "Save") == 0) {
188 saveToObject();
189 getGuiDocument()->save();
190 return true;
191 }
192 if (strcmp(msg, "Cut") == 0) {
193 getEditor()->cut();
194 return true;
195 }
196 if (strcmp(msg, "Copy") == 0) {
197 getEditor()->copy();
198 return true;
199 }
200 if (strcmp(msg, "Paste") == 0) {
201 getEditor()->paste();
202 return true;
203 }
204 if (strcmp(msg, "Undo") == 0) {
205 getEditor()->undo();
206 return true;
207 }
208 if (strcmp(msg, "Redo") == 0) {
209 getEditor()->redo();
210 return true;
211 }
212 return false;
213}
214
215#include "moc_TextDocumentEditorView.cpp"

Callers

nothing calls this directly

Calls 8

getGuiDocumentFunction · 0.85
getEditorFunction · 0.85
pasteMethod · 0.80
saveMethod · 0.45
cutMethod · 0.45
copyMethod · 0.45
undoMethod · 0.45
redoMethod · 0.45

Tested by

no test coverage detected