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 #ifndef RUNCMD_H 20 #define RUNCMD_H 21 22 class TopWindowBase; 23 24 class CommandUtils: public FXObject { 25 private: 26 FXAccelTable* saved_accels; 27 FXAccelTable* temp_accels; 28 bool command_busy; 29 FXHotKey killkey; 30 TopWindow*tw; 31 FXApp*app; 32 #ifdef WIN32 33 FXuint winkey; 34 #endif 35 void SetKillKey(FXHotKey k); 36 void InitKillKey(); 37 public: 38 static void Freeze(FXWindow*win, bool frozen); 39 static const char* DontFreezeMe(); KillKey()40 FXHotKey KillKey() { return killkey; } 41 void SetKillCommandAccelKey(FXHotKey acckey); 42 void DisableUI(bool disabled); CommandBusy(bool bsy)43 void CommandBusy(bool bsy) { command_busy=bsy; } CommandBusy()44 bool CommandBusy() { return command_busy; } 45 bool IsCommandReady(); 46 bool IsMacroCancelled(bool &command_timeout); 47 static void SetShellEnv(const char*file, long line); 48 static const FXString FixUpCmdLineEnv(const FXString&command); 49 CommandUtils(TopWindowBase*w); 50 ~CommandUtils(); 51 }; 52 53 #endif 54 55