1 /* 2 * _edit.h 3 * AYM 1998-09-06 4 */ 5 6 7 /* 8 This file is part of Yadex. 9 10 Yadex incorporates code from DEU 5.21 that was put in the public domain in 11 1994 by Rapha�l Quinet and Brendon Wyber. 12 13 The rest of Yadex is Copyright � 1997-2003 Andr� Majorel and others. 14 15 This program is free software; you can redistribute it and/or modify it under 16 the terms of the GNU General Public License as published by the Free Software 17 Foundation; either version 2 of the License, or (at your option) any later 18 version. 19 20 This program is distributed in the hope that it will be useful, but WITHOUT 21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 22 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 23 24 You should have received a copy of the GNU General Public License along with 25 this program; if not, write to the Free Software Foundation, Inc., 59 Temple 26 Place, Suite 330, Boston, MA 02111-1307, USA. 27 */ 28 29 30 #ifndef YH__EDIT /* DO NOT INSERT ANYTHING BEFORE THIS LINE */ 31 #define YH__EDIT 32 33 34 #include "objid.h" 35 36 37 class edisplay_c; 38 class Menu; 39 class menubar_c; 40 class modpopup_c; 41 class selbox_c; 42 class spot_c; 43 44 45 // The numbers of the items on the menu bar 46 enum 47 { 48 MBI_FILE, 49 MBI_EDIT, 50 MBI_VIEW, 51 MBI_SEARCH, 52 MBI_MISC, 53 MBI_OBJECTS, 54 MBI_CHECK, 55 MBI_HELP, 56 MBI_COUNT 57 }; 58 59 60 // The numbers of the actual menus (Menu objects) 61 enum 62 { 63 MBM_FILE, 64 MBM_EDIT, 65 MBM_VIEW, 66 MBM_SEARCH, 67 MBM_MISC_L, // The "Misc. operations" menus changes with the mode 68 MBM_MISC_S, 69 MBM_MISC_T, 70 MBM_MISC_V, 71 MBM_OBJECTS, 72 MBM_CHECK, 73 MBM_HELP, 74 MBM_COUNT 75 }; 76 77 78 typedef enum 79 { 80 TOOL_NORMAL, 81 TOOL_SNAP_VERTEX 82 } tool_t; 83 84 85 /* This structure holds all the data necessary to an edit window. */ 86 // FIXME: make a class of it. 87 typedef struct 88 { 89 public : 90 int mb_ino[MBI_COUNT]; // The numbers of the items on the menu bar 91 Menu *mb_menu[MBM_COUNT]; // The actual menu objects 92 93 int move_speed; // Movement speed. 94 int extra_zoom; // Act like the zoom was 4 times what it is 95 int obj_type; // The mode (OBJ_LINEDEF, OBJ_SECTOR...) 96 bool global; // Global mode (experimental) 97 tool_t tool; // The current tool 98 int grid_step; // The grid step 99 int grid_step_min; // The floor of the grid step 100 int grid_step_max; // The ceiling of the grid step 101 int grid_step_locked; // Whether the grid step is locked 102 int grid_shown; // Whether the grid is shown 103 int grid_snap; // Whether objects forced to be on the grid 104 bool infobar_shown; // Whether the info bar is shown 105 bool objinfo_shown; // Whether the object info boxes are shown 106 bool show_object_numbers; // Whether the object numbers are shown 107 bool show_things_squares; // Whether the things squares are shown 108 bool show_things_sprites; // Whether the things sprites are shown 109 int rulers_shown; // Whether the rulers are shown (unused ?) 110 int pointer_x; // Map coordinates of pointer 111 int pointer_y; 112 int pointer_in_window; // If false, pointer_[xy] are not meaningful. 113 Objid clicked; // The object that was under the pointer when 114 // when the left click occurred. If clicked on 115 // empty space, == CANVAS. 116 int click_ctrl; // Was Ctrl pressed at the moment of the click? 117 unsigned long click_time; // Date of last left click in ms 118 Objid highlighted; // The highlighted object 119 SelPtr Selected; // Linked list of selected objects (or NULL) 120 121 selbox_c *selbox; // The selection box 122 edisplay_c *edisplay; // The display manager 123 menubar_c *menubar; // The menu bar 124 spot_c *spot; // The insertion spot 125 126 modpopup_c *modpopup; // The modal popup menu (only one at a time!) 127 char modal; 128 } edit_t; 129 130 131 #endif /* DO NOT ADD ANYTHING AFTER THIS LINE */ 132