1 /* 2 FXiTe - The Free eXtensIble Text Editor 3 Copyright (c) 2009-2012 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 #ifndef APPWIN_PUB_H 20 #define APPWIN_PUB_H 21 22 23 class SciDoc; 24 class UserMenu; 25 class DocTabs; 26 class FileDialogs; 27 class TopWindow; 28 29 30 /* 31 The main window class has grown to be a huge and unwieldy beast, and trying to 32 refactor it is painful because so many other source files depend on its header. 33 This class wraps some of the methods provided by the TopWindow class in order 34 to reduce dependencies and speed up compilation whenever the "appwin" header 35 is modified. 36 */ 37 38 class TopWinPub: public FXObject { 39 public: 40 static bool OpenFile(const char*caption, const char*rowcol, bool readonly, bool hooked); 41 static bool CloseFile(bool close_last, bool hooked); 42 static int IsFileOpen(const FXString &filename, bool activate); 43 static FXString* NamedFiles(); 44 static SciDoc* ControlDoc(); 45 static SciDoc* FocusedDoc(); 46 static void ActiveWidget(FXID aw); 47 static void ShowOutputPane(bool showit); 48 static FXSelector KillCmdID(); 49 static FXSelector LastID(); 50 static void SetKillCommandAccelKey(FXHotKey acckey); 51 static UserMenu**UserMenus(); 52 static void SaveClipboard(); 53 static const FXString &Connector(); 54 static const FXString &ConfigDir(); 55 static void ParseCommands(FXString &commands); 56 static FXMainWindow* instantiate(FXApp*a); 57 static void create(); 58 static FXbool close(FXbool notify=false); 59 static FXMainWindow* instance(); 60 static void DumpLexers(); 61 static void FindText(const char*searchfor, FXuint searchmode, bool forward); 62 static void FindAndReplace(const char*searchfor, const char*replacewith, FXuint mode, bool forward); 63 static void ReplaceAllInSelection(const char*searchfor, const char*replacewith, FXuint mode); 64 static void ReplaceAllInDocument(const char*searchfor, const char*replacewith, FXuint mode); 65 static void Paste(); 66 static void AdjustIndent(SciDoc*sci,char ch); 67 static DocTabs* Tabs(); 68 static FileDialogs* FileDlgs(); 69 static void update(); 70 static bool IsMacroCancelled(); 71 static bool Destroying(); 72 static bool Closing(); 73 static void CloseWait(); 74 static bool SetReadOnly(SciDoc*sci, bool rdonly); 75 static void SetWordWrap(SciDoc*sci, bool wrapped); 76 static FXMenuCaption* TagFiles(); 77 static void AddOutput(const FXString&line); 78 }; 79 80 #endif 81 82