1 /* 2 FXiTe - The Free eXtensIble Text Editor 3 Copyright (c) 2009-2011 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 UserMenu; 21 class ToolsTree; 22 23 class ToolsDialog: public FXDialogBox { 24 private: FXDECLARE(ToolsDialog)25 FXDECLARE(ToolsDialog) 26 ToolsDialog(){} 27 28 ToolsTree* tree; 29 FXVerticalFrame* left_box; 30 FXVerticalFrame* right_box; 31 FXVerticalFrame* name_panel; 32 FXGroupBox* accel_panel; 33 FXGroupBox* opts_panel; 34 FXVerticalFrame* new_panel; 35 FXHorizontalFrame* change_panel; 36 FXHorizontalFrame* move_panel; 37 38 FXTextField* index_field; 39 FXTextField* name_field; 40 FXTextField* extn_field; 41 FXListBox* menukey_list; 42 FXTextField* accel_field; 43 FXCheckButton* opt_chk; 44 FXRadioButton* opt_rad; 45 FXCheckButton* ctrl_chk; 46 FXCheckButton* alt_chk; 47 FXCheckButton* shift_chk; 48 FXLabel* props_lab; 49 FXLabel* intro_lab; 50 FXButton* reset_btn; 51 FXButton* apply_btn; 52 FXButton* delete_btn; 53 FXButton* edit_btn; 54 FXButton* new_menu_btn; 55 FXButton* new_tool_btn; 56 57 FXLabel* move_lab; 58 FXListBox* move_list; 59 FXButton* move_btn; 60 FXLabel* helptext; 61 FXSplitter*split; 62 63 void clear(); 64 65 void create_options(FXTreeItem*item, const FXString &flag); 66 bool modified; 67 void setModified(bool ismod); 68 bool BuildName(FXString &path,bool isdir); 69 bool SaveChanges(); 70 void SetMoveOptions(FXTreeItem *item); 71 FXuint GetPermsForItem(FXTreeItem *item=NULL); 72 bool RenameItem(const FXString &oldpath, const FXString &newpath); 73 public: 74 ToolsDialog(FXTopWindow*win, UserMenu**menus); 75 virtual void create(); 76 long onTreeListChanged(FXObject*o, FXSelector sel, void*p); 77 long onTreeListAfterChanged(FXObject*o, FXSelector sel, void*p); 78 long onAccelField(FXObject*o, FXSelector sel, void*p); 79 long onNameField(FXObject*o, FXSelector sel, void*p); 80 long onChooseOpt(FXObject*o, FXSelector sel, void*p); 81 long onModified(FXObject*o, FXSelector sel, void*p); 82 long onButtonClick(FXObject*o, FXSelector sel, void*p); 83 long onNewScanChore(FXObject*o, FXSelector sel, void*p); 84 long onClose(FXObject*o, FXSelector sel, void*p); 85 long onMoveListChoose(FXObject*o, FXSelector sel, void*p); 86 enum { 87 ID_TREELIST_CHANGED=FXDialogBox::ID_LAST, 88 ID_ACCELFIELD, 89 ID_NAMEFIELD, 90 ID_OPTCHOOSE, 91 ID_TREELIST_CHORE, 92 ID_NEW_SCAN_CHORE, 93 ID_MOVELIST_CHOOSE, 94 ID_MODIFIED, 95 ID_APPLY_CLICK, 96 ID_RESET_CLICK, 97 ID_MOVE_CLICK, 98 ID_DELETE_CLICK, 99 ID_EDIT_CLICK, 100 ID_NEW_MENU_CLICK, 101 ID_NEW_TOOL_CLICK, 102 ID_LAST 103 }; 104 }; 105 106