1 /*
2   FXiTe - The Free eXtensIble Text Editor
3   Copyright (c) 2009-2013 Jeffrey Pohlmeyer <yetanothergeek@gmail.com>
4 
5   This program is free software; you can redistribute it and/or modify it
6   under the terms of the GNU General Public License version 3 as
7   published by the Free Software Foundation.
8 
9   This software is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13 
14   You should have received a copy of the GNU General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17 */
18 
19 
20 class TopWindow;
21 class Server;
22 class InterProc;
23 
24 class AppClass: public FXApp {
25   FXDECLARE(AppClass);
26 private:
27   bool quitting;
AppClass()28   AppClass() {}
29   FXString sock_name;
30   FXString server_name;
31   void ParseCommandLine();
32   void CreatePathOrDie(const FXString &dirname);
33   void CreateConfigDir();
34   InterProc *ipc;
35 #ifdef WIN32
36   virtual FXival dispatchEvent(FXID hwnd, FXuint iMsg, FXuval wParam, FXival lParam);
37 #endif
38   FXString commands;
39   FXString configdir;
40   FXString sessionfile;
41   FXString settingsfile;
42 public:
43   enum{
44     ID_CLOSEALL=FXApp::ID_LAST,
45     ID_IPC_EXEC,
46     ID_LAST
47   };
48   long onCmdCloseAll(FXObject*o,FXSelector sel,void*p);
49   long onIpcExec(FXObject*o,FXSelector sel,void*p);
50   AppClass(const FXString& name, const FXString& title);
51   void exit(FXint code);
52   virtual void init(int& argc,char** argv,bool connect=true);
Commands()53   FXString &Commands() { return commands; }
ConfigDir()54   const FXString &ConfigDir() { return configdir; }
SessionFile()55   const FXString &SessionFile() { return sessionfile; }
SettingsFile()56   const FXString &SettingsFile() { return settingsfile; }
ServerName()57   const FXString &ServerName() { return server_name; }
Connector()58   const FXString &Connector() { return sock_name; }
59 #ifndef FOX_1_6
60   FXString migration_errors;
61 #endif
62 };
63 
64