1 /************************************************************************/ 2 /* */ 3 /* Operation names. */ 4 /* */ 5 /************************************************************************/ 6 7 # ifndef DOC_EDIT_COMMAND_H 8 # define DOC_EDIT_COMMAND_H 9 10 typedef enum EditCommand 11 { 12 /** 13 * Convert the selection to a field. This is a special 14 * case: Only Hyperlinks and Bookmarks have content that 15 * comes from the document itself. Other kinds of field 16 * calculate their content. They are inserted through a 17 * REPLACE. 18 * 19 * If there is an attribute change, we must remember that 20 * and the old contents to restore the attributes as well. 21 */ 22 EDITcmdSET_HYPERLINK= 0, 23 EDITcmdSET_BOOKMARK, 24 25 /** 26 * Delete a field. 27 * 28 * If there is an attribute change, we must remember that 29 * and the old contents to restore the attributes as well. 30 * 31 * Uses the FieldKind for repeats. 32 */ 33 EDITcmdDEL_FIELD, 34 35 /** 36 * Change the properties of a field. NOT the type. 37 * There will be no attribute change. 38 * 39 * Uses the FieldKind for repeats. 40 */ 41 EDITcmdUPD_FIELD, 42 43 /** 44 * Change some properties of the first list that can be 45 * found in the current selection. 46 */ 47 EDITcmdUPD_LIST, 48 /** 49 * Make a new list and include the paragraphs in the current 50 * selection in it. 51 */ 52 EDITcmdSET_NEW_LIST, 53 /** 54 * Add a note. 55 */ 56 EDITcmdINS_NOTE, 57 /** 58 * Change some properties of a note. 59 */ 60 EDITcmdUPD_NOTE, 61 /** 62 * Change some properties of a selection. 63 * From text attributes to document properties. 64 */ 65 EDITcmdUPD_SPAN_PROPS, 66 EDITcmdUPD_PARA_PROPS, 67 EDITcmdUPD_TABLE_PROPS, 68 EDITcmdUPD_SECT_PROPS, 69 EDITcmdUPD_SECTDOC_PROPS, 70 EDITcmdUPD_DOC_PROPS, 71 /** 72 * Replace a selection. 73 */ 74 EDITcmdREPLACE, 75 /** 76 * Replace a selection in a notes separator. (Not expected 77 * in other locations) 78 */ 79 EDITcmdREPLACE_FTNSEP, 80 /** 81 * Replace a selection in the body (Not expected 82 * in other locations) 83 */ 84 EDITcmdREPLACE_BODY_LEVEL, 85 /** 86 * Delete a selection. 87 * Including two variants that tell where to place the 88 * cursor after an Undo. 89 */ 90 EDITcmdDELETE_SELECTION, 91 EDITcmdDELETE_SELECTION_DEL, 92 EDITcmdDELETE_SELECTION_BS, 93 /** 94 * Extend a previous replacement. EG by typing the next 95 * character. 96 */ 97 EDITcmdEXTEND_REPLACE, 98 /** 99 * Merge selected paragraphs 100 */ 101 EDITcmdMERGE_PARAS, 102 103 /** 104 * Delete a paragraph. 105 */ 106 EDITcmdDELETE_PARA, 107 /** 108 * Delete a section. 109 */ 110 EDITcmdDELETE_SECT, 111 /** 112 * Delete a table. 113 */ 114 EDITcmdDELETE_TABLE, 115 /** 116 * Delete a table row. 117 */ 118 EDITcmdDELETE_ROW, 119 /** 120 * Delete a table column. 121 */ 122 EDITcmdDELETE_COLUMN, 123 /** 124 * Insert a paragraph. 125 */ 126 EDITcmdINSERT_PARA, 127 EDITcmdAPPEND_PARA, 128 /** 129 * Insert a table. 130 */ 131 EDITcmdINSERT_TABLE, 132 /** 133 * Insert a section. 134 */ 135 EDITcmdINSERT_SECT, 136 EDITcmdAPPEND_SECT, 137 /** 138 * Insert a section break. 139 */ 140 EDITcmdSPLIT_SECT, 141 /** 142 * Insert/Append a table row. 143 */ 144 EDITcmdINSERT_ROW, 145 EDITcmdAPPEND_ROW, 146 /** 147 * Insert/Append a table column. 148 */ 149 EDITcmdINSERT_COLUMN, 150 EDITcmdAPPEND_COLUMN, 151 152 /** 153 * Add a page header or footer to a section. 154 */ 155 EDITcmdINSERT_HEADER, 156 EDITcmdINSERT_FOOTER, 157 /** 158 * Delete a page header or footer from a section. 159 */ 160 EDITcmdDELETE_HEADER, 161 EDITcmdDELETE_FOOTER, 162 163 /** 164 * Change the properties of an object (image) 165 */ 166 EDITcmdUPD_OBJECT, 167 /** 168 * Roll the rows in a strip of a table. 169 */ 170 EDITcmdSHIFT_ROWS_DOWN, 171 EDITcmdSHIFT_ROWS_UP, 172 /** 173 * Shift the indentation of the selection. 174 */ 175 EDITcmdSHIFT_RIGHT, 176 EDITcmdSHIFT_LEFT, 177 178 /** 179 * Not really a command: Number of real edit commands. 180 */ 181 EDITcmd_EDIT_COUNT, 182 183 /** 184 * Not really a command: Start editing a file. 185 */ 186 EDITcmd_OPEN, 187 /** 188 * Not really a command: Saved the file. 189 */ 190 EDITcmd_SAVE, 191 /** 192 * Not really a command: Created the file. 193 */ 194 EDITcmd_NEW, 195 196 EDITcmd_COUNT 197 } EditCommand; 198 199 # endif /* DOC_EDIT_COMMAND_H */ 200