3 // Copyright 1997-2007 by Christopher J. Madsen
4 // (C) 2019 James Hammons
6 // GUEmap is licensed under either version 2 of the GPL, or (at your option)
7 // any later version. See LICENSE file for details.
9 // GUEmap.h: main header file for the GUEmap application
12 #ifndef __GUEMAPAPP_H__
13 #define __GUEMAPAPP_H__
17 // Forward declarations
21 class GUEMapApp: public QApplication
24 GUEMapApp(int & argc, char * argv[]);
27 // CharWindow * charWnd;
32 //#ifndef __AFXWIN_H__
33 // #error include 'stdafx.h' before including this file for PCH
36 //#include "resource.h" // main symbols
38 /////////////////////////////////////////////////////////////////////////////
39 // Miscellaneous functions:
41 void copyToOneLine(String & dest, const String & source);
42 void fillParagraphs(String & s);
43 void trimLeft(String & s);
44 void trimRight(String & s);
46 /////////////////////////////////////////////////////////////////////////////
48 // See GUEmap.cpp for the implementation of this class
58 extern bool GUEmapEatClicks;
59 extern const char * const iniMainWin;
60 extern HCURSOR handCursor;
61 extern String mapWinClass;
63 class CMapApp: public CWinApp
67 bool preferUnexplored;
73 RoomScrap * clipboard;
74 CCommentDlg * commentDlg;
81 void adjustCommentPos(LPCRECT r);
82 void closingView(const CMapView * view);
85 const RoomScrap * getClipboard() const { return clipboard; };
86 void loadWindowPos(CRect & pos, LPCTSTR section);
87 bool navigationCopy() const { return naviCopy; };
88 bool navigationCRLF() const { return naviCRLF; };
89 bool editAfterAdd() const { return autoEdit; };
90 bool stub1Unexplored()const { return preferUnexplored; };
91 void saveWindowPos(LPCRECT pos, LPCTSTR section);
92 void setClipboard(RoomScrap * newScrap);
93 void setComment(CMapView * fromView, const MapRoom * room,
94 bool takeFocus=true) const;
96 void setupAbout(CAboutDlg & dlg) const;
99 // ClassWizard generated virtual function overrides
100 //{{AFX_VIRTUAL(CMapApp)
102 virtual BOOL InitInstance();
103 virtual int ExitInstance();
111 void OnUpdateViewComments(CCmdUI* pCmdUI);
112 void OnViewComments();
113 void OnViewSettings();
116 DECLARE_MESSAGE_MAP();
119 inline CMapApp * gueApp() { return static_cast<CMapApp *>(AfxGetApp()); }
122 #endif // __GUEMAP_H__