haccel create sub routine
| 1156 | |
| 1157 | // haccel create sub routine |
| 1158 | VOID HL_Msg_create() |
| 1159 | { |
| 1160 | // Tabs |
| 1161 | SendMessage ( hwndEdit, SCI_SETUSETABS, !bTabsAsSpaces, 0 ); |
| 1162 | SendMessage ( hwndEdit, SCI_SETTABINDENTS, bTabIndents, 0 ); |
| 1163 | SendMessage ( hwndEdit, SCI_SETBACKSPACEUNINDENTS, bBackspaceUnindents, 0 ); |
| 1164 | SendMessage ( hwndEdit, SCI_SETTABWIDTH, iTabWidth, 0 ); |
| 1165 | SendMessage ( hwndEdit, SCI_SETINDENT, iIndentWidth, 0 ); |
| 1166 | // Indent Guides |
| 1167 | Style_SetIndentGuides ( hwndEdit, bShowIndentGuides ); |
| 1168 | // Word wrap |
| 1169 | if ( !fWordWrap ) { |
| 1170 | SendMessage ( hwndEdit, SCI_SETWRAPMODE, SC_WRAP_NONE, 0 ); |
| 1171 | } else { |
| 1172 | SendMessage ( hwndEdit, SCI_SETWRAPMODE, ( iWordWrapMode == 0 ) ? SC_WRAP_WORD : SC_WRAP_CHAR, 0 ); |
| 1173 | } |
| 1174 | if ( iWordWrapIndent == 5 ) { |
| 1175 | SendMessage ( hwndEdit, SCI_SETWRAPINDENTMODE, SC_WRAPINDENT_SAME, 0 ); |
| 1176 | } else if ( iWordWrapIndent == 6 ) { |
| 1177 | SendMessage ( hwndEdit, SCI_SETWRAPINDENTMODE, SC_WRAPINDENT_INDENT, 0 ); |
| 1178 | } else { |
| 1179 | int i = 0; |
| 1180 | switch ( iWordWrapIndent ) { |
| 1181 | case 1: |
| 1182 | i = 1; |
| 1183 | break; |
| 1184 | case 2: |
| 1185 | i = 2; |
| 1186 | break; |
| 1187 | case 3: |
| 1188 | i = ( iIndentWidth ) ? 1 * iIndentWidth : 1 * iTabWidth; |
| 1189 | break; |
| 1190 | case 4: |
| 1191 | i = ( iIndentWidth ) ? 2 * iIndentWidth : 2 * iTabWidth; |
| 1192 | break; |
| 1193 | } |
| 1194 | SendMessage ( hwndEdit, SCI_SETWRAPSTARTINDENT, i, 0 ); |
| 1195 | SendMessage ( hwndEdit, SCI_SETWRAPINDENTMODE, SC_WRAPINDENT_FIXED, 0 ); |
| 1196 | } |
| 1197 | if ( bShowWordWrapSymbols ) { |
| 1198 | int wrapVisualFlags = 0; |
| 1199 | int wrapVisualFlagsLocation = 0; |
| 1200 | if ( iWordWrapSymbols == 0 ) { |
| 1201 | iWordWrapSymbols = 22; |
| 1202 | } |
| 1203 | switch ( iWordWrapSymbols % 10 ) { |
| 1204 | case 1: |
| 1205 | wrapVisualFlags |= SC_WRAPVISUALFLAG_END; |
| 1206 | wrapVisualFlagsLocation |= SC_WRAPVISUALFLAGLOC_END_BY_TEXT; |
| 1207 | break; |
| 1208 | case 2: |
| 1209 | wrapVisualFlags |= SC_WRAPVISUALFLAG_END; |
| 1210 | break; |
| 1211 | } |
| 1212 | switch ( ( ( iWordWrapSymbols % 100 ) - ( iWordWrapSymbols % 10 ) ) / 10 ) { |
| 1213 | case 1: |
| 1214 | wrapVisualFlags |= SC_WRAPVISUALFLAG_START; |
| 1215 | wrapVisualFlagsLocation |= SC_WRAPVISUALFLAGLOC_START_BY_TEXT; |
no test coverage detected