| 241 | } |
| 242 | |
| 243 | void |
| 244 | create_text_window(struct xwindow *wp) |
| 245 | { |
| 246 | struct text_info_t *text_info; |
| 247 | Arg args[8]; |
| 248 | Cardinal num_args; |
| 249 | Position top_margin, bottom_margin, left_margin, right_margin; |
| 250 | Widget form; |
| 251 | |
| 252 | wp->type = NHW_TEXT; |
| 253 | |
| 254 | wp->text_information = text_info = |
| 255 | (struct text_info_t *) alloc(sizeof(struct text_info_t)); |
| 256 | |
| 257 | init_text_buffer(&text_info->text); |
| 258 | text_info->max_width = 0; |
| 259 | text_info->extra_width = 0; |
| 260 | text_info->extra_height = 0; |
| 261 | text_info->blocked = FALSE; |
| 262 | text_info->destroy_on_ack = TRUE; /* Ok to destroy before display */ |
| 263 | #ifdef GRAPHIC_TOMBSTONE |
| 264 | text_info->is_rip = FALSE; |
| 265 | #endif |
| 266 | |
| 267 | num_args = 0; |
| 268 | XtSetArg(args[num_args], XtNallowShellResize, True), num_args++; |
| 269 | XtSetArg(args[num_args], XtNtranslations, |
| 270 | XtParseTranslationTable(text_translations)), num_args++; |
| 271 | |
| 272 | #ifdef TRANSIENT_TEXT |
| 273 | wp->popup = XtCreatePopupShell("text", transientShellWidgetClass, |
| 274 | toplevel, args, num_args); |
| 275 | #else |
| 276 | wp->popup = XtCreatePopupShell("text", topLevelShellWidgetClass, toplevel, |
| 277 | args, num_args); |
| 278 | #endif |
| 279 | XtOverrideTranslations( |
| 280 | wp->popup, |
| 281 | XtParseTranslationTable("<Message>WM_PROTOCOLS: delete_text()")); |
| 282 | |
| 283 | num_args = 0; |
| 284 | XtSetArg(args[num_args], XtNallowShellResize, True), num_args++; |
| 285 | XtSetArg(args[num_args], XtNtranslations, |
| 286 | XtParseTranslationTable(text_translations)), num_args++; |
| 287 | form = XtCreateManagedWidget("form", formWidgetClass, wp->popup, args, |
| 288 | num_args); |
| 289 | |
| 290 | num_args = 0; |
| 291 | XtSetArg(args[num_args], nhStr(XtNdisplayCaret), False); |
| 292 | num_args++; |
| 293 | XtSetArg(args[num_args], XtNresize, XawtextResizeBoth); |
| 294 | num_args++; |
| 295 | XtSetArg(args[num_args], XtNtranslations, |
| 296 | XtParseTranslationTable(text_translations)); |
| 297 | num_args++; |
| 298 | |
| 299 | wp->w = XtCreateManagedWidget(svk.killer.name[0] && WIN_MAP == WIN_ERR |
| 300 | ? "tombstone" |
no test coverage detected