MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnFileNew

Method OnFileNew

legacy/hogedit/HogEditView.cpp:215–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213// CHogEditView message handlers
214
215void CHogEditView::OnFileNew() {
216 // TODO: Add your command handler code here
217 CHogEditDoc *doc = GetDocument();
218 CListCtrl &list = GetListCtrl();
219
220 // Set full row selection
221 SetFullRowSel(m_bFullRowSel);
222
223 // If current file has been modified, check with user first...
224 if (ModifiedPrompt(this) == IDNO)
225 return;
226
227 // Display Wait Cursor
228 CWaitCursor wc;
229
230 // Clear out the document's information
231 doc->OnNewDocument();
232
233 // Wipeout the CtrlList items
234 list.DeleteAllItems();
235
236 // Put new doc name on title bar
237 UpdateTitle(doc->m_DocumentName, DocModified);
238 UpdateTotalFiles(list.GetItemCount());
239}
240
241// Returns a type string for the given filename extension
242void CHogEditView::GetFileType(char *type, char *filename) {

Callers

nothing calls this directly

Calls 3

ModifiedPromptFunction · 0.85
UpdateTotalFilesFunction · 0.85
OnNewDocumentMethod · 0.45

Tested by

no test coverage detected