Change tui_set_layout to return void
[deliverable/binutils-gdb.git] / gdb / tui / tui-layout.c
1 /* TUI layout window management.
2
3 Copyright (C) 1998-2019 Free Software Foundation, Inc.
4
5 Contributed by Hewlett-Packard Company.
6
7 This file is part of GDB.
8
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21
22 #include "defs.h"
23 #include "arch-utils.h"
24 #include "command.h"
25 #include "symtab.h"
26 #include "frame.h"
27 #include "source.h"
28 #include <ctype.h>
29
30 #include "tui/tui.h"
31 #include "tui/tui-data.h"
32 #include "tui/tui-windata.h"
33 #include "tui/tui-wingeneral.h"
34 #include "tui/tui-stack.h"
35 #include "tui/tui-regs.h"
36 #include "tui/tui-win.h"
37 #include "tui/tui-winsource.h"
38 #include "tui/tui-disasm.h"
39 #include "tui/tui-layout.h"
40 #include "gdb_curses.h"
41
42 /*******************************
43 ** Static Local Decls
44 ********************************/
45 static void show_layout (enum tui_layout_type);
46 static void show_source_or_disasm_and_command (enum tui_layout_type);
47 static struct tui_win_info *make_command_window (int, int);
48 static struct tui_win_info *make_source_window (int, int);
49 static struct tui_win_info *make_disasm_window (int, int);
50 static void show_source_command (void);
51 static void show_disasm_command (void);
52 static void show_source_disasm_command (void);
53 static void show_data (enum tui_layout_type);
54 static enum tui_layout_type next_layout (void);
55 static enum tui_layout_type prev_layout (void);
56 static void tui_layout_command (const char *, int);
57 static void extract_display_start_addr (struct gdbarch **, CORE_ADDR *);
58
59
60 /***************************************
61 ** DEFINITIONS
62 ***************************************/
63
64 #define LAYOUT_USAGE "Usage: layout prev | next | <layout_name> \n"
65
66 /* Show the screen layout defined. */
67 static void
68 show_layout (enum tui_layout_type layout)
69 {
70 enum tui_layout_type cur_layout = tui_current_layout ();
71
72 if (layout != cur_layout)
73 {
74 /* Since the new layout may cause changes in window size, we
75 should free the content and reallocate on next display of
76 source/asm. */
77 tui_clear_source_windows ();
78 if (layout == SRC_DATA_COMMAND
79 || layout == DISASSEM_DATA_COMMAND)
80 {
81 show_data (layout);
82 tui_refresh_all ();
83 }
84 else
85 {
86 /* First make the current layout be invisible. */
87 tui_make_all_invisible ();
88 tui_make_invisible (tui_locator_win_info_ptr ());
89
90 switch (layout)
91 {
92 /* Now show the new layout. */
93 case SRC_COMMAND:
94 show_source_command ();
95 tui_add_to_source_windows (TUI_SRC_WIN);
96 break;
97 case DISASSEM_COMMAND:
98 show_disasm_command ();
99 tui_add_to_source_windows (TUI_DISASM_WIN);
100 break;
101 case SRC_DISASSEM_COMMAND:
102 show_source_disasm_command ();
103 tui_add_to_source_windows (TUI_SRC_WIN);
104 tui_add_to_source_windows (TUI_DISASM_WIN);
105 break;
106 default:
107 break;
108 }
109 }
110 }
111 }
112
113
114 /* Function to set the layout to SRC_COMMAND, DISASSEM_COMMAND,
115 SRC_DISASSEM_COMMAND, SRC_DATA_COMMAND, or DISASSEM_DATA_COMMAND. */
116 void
117 tui_set_layout (enum tui_layout_type layout_type)
118 {
119 gdb_assert (layout_type != UNDEFINED_LAYOUT);
120
121 enum tui_layout_type cur_layout = tui_current_layout ();
122 struct gdbarch *gdbarch;
123 CORE_ADDR addr;
124 struct tui_win_info *win_with_focus = tui_win_with_focus ();
125 struct tui_layout_def *layout_def = tui_layout_def ();
126
127 extract_display_start_addr (&gdbarch, &addr);
128
129 enum tui_layout_type new_layout = layout_type;
130
131 if (new_layout != cur_layout)
132 {
133 show_layout (new_layout);
134
135 /* Now determine where focus should be. */
136 if (win_with_focus != TUI_CMD_WIN)
137 {
138 switch (new_layout)
139 {
140 case SRC_COMMAND:
141 tui_set_win_focus_to (TUI_SRC_WIN);
142 layout_def->display_mode = SRC_WIN;
143 break;
144 case DISASSEM_COMMAND:
145 /* The previous layout was not showing code.
146 This can happen if there is no source
147 available:
148
149 1. if the source file is in another dir OR
150 2. if target was compiled without -g
151 We still want to show the assembly though! */
152
153 tui_get_begin_asm_address (&gdbarch, &addr);
154 tui_set_win_focus_to (TUI_DISASM_WIN);
155 layout_def->display_mode = DISASSEM_WIN;
156 break;
157 case SRC_DISASSEM_COMMAND:
158 /* The previous layout was not showing code.
159 This can happen if there is no source
160 available:
161
162 1. if the source file is in another dir OR
163 2. if target was compiled without -g
164 We still want to show the assembly though! */
165
166 tui_get_begin_asm_address (&gdbarch, &addr);
167 if (win_with_focus == TUI_SRC_WIN)
168 tui_set_win_focus_to (TUI_SRC_WIN);
169 else
170 tui_set_win_focus_to (TUI_DISASM_WIN);
171 break;
172 case SRC_DATA_COMMAND:
173 if (win_with_focus != TUI_DATA_WIN)
174 tui_set_win_focus_to (TUI_SRC_WIN);
175 else
176 tui_set_win_focus_to (TUI_DATA_WIN);
177 layout_def->display_mode = SRC_WIN;
178 break;
179 case DISASSEM_DATA_COMMAND:
180 /* The previous layout was not showing code.
181 This can happen if there is no source
182 available:
183
184 1. if the source file is in another dir OR
185 2. if target was compiled without -g
186 We still want to show the assembly though! */
187
188 tui_get_begin_asm_address (&gdbarch, &addr);
189 if (win_with_focus != TUI_DATA_WIN)
190 tui_set_win_focus_to (TUI_DISASM_WIN);
191 else
192 tui_set_win_focus_to (TUI_DATA_WIN);
193 layout_def->display_mode = DISASSEM_WIN;
194 break;
195 default:
196 break;
197 }
198 }
199 /*
200 * Now update the window content.
201 */
202 tui_update_source_windows_with_addr (gdbarch, addr);
203 if (new_layout == SRC_DATA_COMMAND
204 || new_layout == DISASSEM_DATA_COMMAND)
205 tui_show_registers (TUI_DATA_WIN->current_group);
206 }
207 }
208
209 /* Add the specified window to the layout in a logical way. This
210 means setting up the most logical layout given the window to be
211 added. */
212 void
213 tui_add_win_to_layout (enum tui_win_type type)
214 {
215 enum tui_layout_type cur_layout = tui_current_layout ();
216
217 switch (type)
218 {
219 case SRC_WIN:
220 if (cur_layout != SRC_COMMAND
221 && cur_layout != SRC_DISASSEM_COMMAND
222 && cur_layout != SRC_DATA_COMMAND)
223 {
224 tui_clear_source_windows_detail ();
225 if (cur_layout == DISASSEM_DATA_COMMAND)
226 show_layout (SRC_DATA_COMMAND);
227 else
228 show_layout (SRC_COMMAND);
229 }
230 break;
231 case DISASSEM_WIN:
232 if (cur_layout != DISASSEM_COMMAND
233 && cur_layout != SRC_DISASSEM_COMMAND
234 && cur_layout != DISASSEM_DATA_COMMAND)
235 {
236 tui_clear_source_windows_detail ();
237 if (cur_layout == SRC_DATA_COMMAND)
238 show_layout (DISASSEM_DATA_COMMAND);
239 else
240 show_layout (DISASSEM_COMMAND);
241 }
242 break;
243 case DATA_WIN:
244 if (cur_layout != SRC_DATA_COMMAND
245 && cur_layout != DISASSEM_DATA_COMMAND)
246 {
247 if (cur_layout == DISASSEM_COMMAND)
248 show_layout (DISASSEM_DATA_COMMAND);
249 else
250 show_layout (SRC_DATA_COMMAND);
251 }
252 break;
253 default:
254 break;
255 }
256 }
257
258
259 /* Answer the height of a window. If it hasn't been created yet,
260 answer what the height of a window would be based upon its type and
261 the layout. */
262 int
263 tui_default_win_height (enum tui_win_type type,
264 enum tui_layout_type layout)
265 {
266 int h;
267
268 if (tui_win_list[type] != NULL)
269 h = tui_win_list[type]->height;
270 else
271 {
272 switch (layout)
273 {
274 case SRC_COMMAND:
275 case DISASSEM_COMMAND:
276 if (TUI_CMD_WIN == NULL)
277 h = tui_term_height () / 2;
278 else
279 h = tui_term_height () - TUI_CMD_WIN->height;
280 break;
281 case SRC_DISASSEM_COMMAND:
282 case SRC_DATA_COMMAND:
283 case DISASSEM_DATA_COMMAND:
284 if (TUI_CMD_WIN == NULL)
285 h = tui_term_height () / 3;
286 else
287 h = (tui_term_height () - TUI_CMD_WIN->height) / 2;
288 break;
289 default:
290 h = 0;
291 break;
292 }
293 }
294
295 return h;
296 }
297
298
299 /* Answer the height of a window. If it hasn't been created yet,
300 answer what the height of a window would be based upon its type and
301 the layout. */
302 int
303 tui_default_win_viewport_height (enum tui_win_type type,
304 enum tui_layout_type layout)
305 {
306 int h;
307
308 h = tui_default_win_height (type, layout);
309
310 if (tui_win_list[type] == TUI_CMD_WIN)
311 h -= 1;
312 else
313 h -= 2;
314
315 return h;
316 }
317
318 /* Complete possible layout names. TEXT is the complete text entered so
319 far, WORD is the word currently being completed. */
320
321 static void
322 layout_completer (struct cmd_list_element *ignore,
323 completion_tracker &tracker,
324 const char *text, const char *word)
325 {
326 static const char *layout_names [] =
327 { "src", "asm", "split", "regs", "next", "prev", NULL };
328
329 complete_on_enum (tracker, layout_names, text, word);
330 }
331
332 /* Function to initialize gdb commands, for tui window layout
333 manipulation. */
334
335 void
336 _initialize_tui_layout (void)
337 {
338 struct cmd_list_element *cmd;
339
340 cmd = add_com ("layout", class_tui, tui_layout_command, _("\
341 Change the layout of windows.\n\
342 Usage: layout prev | next | LAYOUT-NAME\n\
343 Layout names are:\n\
344 src : Displays source and command windows.\n\
345 asm : Displays disassembly and command windows.\n\
346 split : Displays source, disassembly and command windows.\n\
347 regs : Displays register window. If existing layout\n\
348 is source/command or assembly/command, the \n\
349 register window is displayed. If the\n\
350 source/assembly/command (split) is displayed, \n\
351 the register window is displayed with \n\
352 the window that has current logical focus."));
353 set_cmd_completer (cmd, layout_completer);
354 }
355
356
357 /*************************
358 ** STATIC LOCAL FUNCTIONS
359 **************************/
360
361
362 /* Function to set the layout to SRC, ASM, SPLIT, NEXT, PREV, DATA, or
363 REGS. */
364 enum tui_status
365 tui_set_layout_by_name (const char *layout_name)
366 {
367 enum tui_status status = TUI_SUCCESS;
368
369 if (layout_name != NULL)
370 {
371 int i;
372 enum tui_layout_type new_layout = UNDEFINED_LAYOUT;
373 enum tui_layout_type cur_layout = tui_current_layout ();
374
375 std::string copy = layout_name;
376 for (i = 0; i < copy.size (); i++)
377 copy[i] = toupper (copy[i]);
378 const char *buf_ptr = copy.c_str ();
379
380 /* First check for ambiguous input. */
381 if (strlen (buf_ptr) <= 1 && *buf_ptr == 'S')
382 {
383 warning (_("Ambiguous command input."));
384 status = TUI_FAILURE;
385 }
386 else
387 {
388 if (subset_compare (buf_ptr, "SRC"))
389 new_layout = SRC_COMMAND;
390 else if (subset_compare (buf_ptr, "ASM"))
391 new_layout = DISASSEM_COMMAND;
392 else if (subset_compare (buf_ptr, "SPLIT"))
393 new_layout = SRC_DISASSEM_COMMAND;
394 else if (subset_compare (buf_ptr, "REGS"))
395 {
396 if (cur_layout == SRC_COMMAND
397 || cur_layout == SRC_DATA_COMMAND)
398 new_layout = SRC_DATA_COMMAND;
399 else
400 new_layout = DISASSEM_DATA_COMMAND;
401 }
402 else if (subset_compare (buf_ptr, "NEXT"))
403 new_layout = next_layout ();
404 else if (subset_compare (buf_ptr, "PREV"))
405 new_layout = prev_layout ();
406 else
407 status = TUI_FAILURE;
408
409 if (status == TUI_SUCCESS)
410 {
411 /* Make sure the curses mode is enabled. */
412 tui_enable ();
413 tui_set_layout (new_layout);
414 }
415 }
416 }
417 else
418 status = TUI_FAILURE;
419
420 return status;
421 }
422
423
424 static void
425 extract_display_start_addr (struct gdbarch **gdbarch_p, CORE_ADDR *addr_p)
426 {
427 enum tui_layout_type cur_layout = tui_current_layout ();
428 struct gdbarch *gdbarch = get_current_arch ();
429 CORE_ADDR addr;
430 CORE_ADDR pc;
431 struct symtab_and_line cursal = get_current_source_symtab_and_line ();
432
433 switch (cur_layout)
434 {
435 case SRC_COMMAND:
436 case SRC_DATA_COMMAND:
437 gdbarch = TUI_SRC_WIN->gdbarch;
438 find_line_pc (cursal.symtab,
439 TUI_SRC_WIN->start_line_or_addr.u.line_no,
440 &pc);
441 addr = pc;
442 break;
443 case DISASSEM_COMMAND:
444 case SRC_DISASSEM_COMMAND:
445 case DISASSEM_DATA_COMMAND:
446 gdbarch = TUI_DISASM_WIN->gdbarch;
447 addr = TUI_DISASM_WIN->start_line_or_addr.u.addr;
448 break;
449 default:
450 addr = 0;
451 break;
452 }
453
454 *gdbarch_p = gdbarch;
455 *addr_p = addr;
456 }
457
458
459 static void
460 tui_layout_command (const char *arg, int from_tty)
461 {
462 /* Switch to the selected layout. */
463 if (tui_set_layout_by_name (arg) != TUI_SUCCESS)
464 warning (_("Invalid layout specified.\n%s"), LAYOUT_USAGE);
465 }
466
467 /* Answer the previous layout to cycle to. */
468 static enum tui_layout_type
469 next_layout (void)
470 {
471 int new_layout;
472
473 new_layout = tui_current_layout ();
474 if (new_layout == UNDEFINED_LAYOUT)
475 new_layout = SRC_COMMAND;
476 else
477 {
478 new_layout++;
479 if (new_layout == UNDEFINED_LAYOUT)
480 new_layout = SRC_COMMAND;
481 }
482
483 return (enum tui_layout_type) new_layout;
484 }
485
486
487 /* Answer the next layout to cycle to. */
488 static enum tui_layout_type
489 prev_layout (void)
490 {
491 int new_layout;
492
493 new_layout = tui_current_layout ();
494 if (new_layout == SRC_COMMAND)
495 new_layout = DISASSEM_DATA_COMMAND;
496 else
497 {
498 new_layout--;
499 if (new_layout == UNDEFINED_LAYOUT)
500 new_layout = DISASSEM_DATA_COMMAND;
501 }
502
503 return (enum tui_layout_type) new_layout;
504 }
505
506
507
508 static struct tui_win_info *
509 make_command_window (int height, int origin_y)
510 {
511 struct tui_win_info *result = new tui_cmd_window ();
512 result->reset (height, tui_term_width (), 0, origin_y);
513 tui_make_window (result, DONT_BOX_WINDOW);
514 return result;
515 }
516
517
518 /* make_source_window().
519 */
520 static struct tui_win_info *
521 make_source_window (int height, int origin_y)
522 {
523 tui_win_info *result = new tui_source_window ();
524 result->reset (height, tui_term_width (), 0, origin_y);
525 result->make_visible (true);
526 return result;
527 }
528
529
530 /* make_disasm_window().
531 */
532 static struct tui_win_info *
533 make_disasm_window (int height, int origin_y)
534 {
535 tui_win_info *result = new tui_disasm_window ();
536 result->reset (height, tui_term_width (), 0, origin_y);
537 result->make_visible (true);
538 return result;
539 }
540
541
542 static tui_win_info *
543 make_data_window (int height, int origin_y)
544 {
545 tui_win_info *result = new tui_data_window ();
546 result->reset (height, tui_term_width (), 0, origin_y);
547 result->make_visible (true);
548 return result;
549 }
550
551
552
553 /* Show the Source/Command layout. */
554 static void
555 show_source_command (void)
556 {
557 show_source_or_disasm_and_command (SRC_COMMAND);
558 }
559
560
561 /* Show the Dissassem/Command layout. */
562 static void
563 show_disasm_command (void)
564 {
565 show_source_or_disasm_and_command (DISASSEM_COMMAND);
566 }
567
568
569 /* Show the Source/Disassem/Command layout. */
570 static void
571 show_source_disasm_command (void)
572 {
573 if (tui_current_layout () != SRC_DISASSEM_COMMAND)
574 {
575 int cmd_height, src_height, asm_height;
576
577 if (TUI_CMD_WIN != NULL)
578 cmd_height = TUI_CMD_WIN->height;
579 else
580 cmd_height = tui_term_height () / 3;
581
582 src_height = (tui_term_height () - cmd_height) / 2;
583 asm_height = tui_term_height () - (src_height + cmd_height);
584
585 if (TUI_SRC_WIN == NULL)
586 tui_win_list[SRC_WIN] = make_source_window (src_height, 0);
587 else
588 {
589 TUI_SRC_WIN->reset (src_height,
590 tui_term_width (),
591 0,
592 0);
593 tui_make_visible (TUI_SRC_WIN);
594 TUI_SRC_WIN->m_has_locator = false;
595 }
596
597 struct tui_locator_window *locator = tui_locator_win_info_ptr ();
598 gdb_assert (locator != nullptr);
599
600 tui_show_source_content (TUI_SRC_WIN);
601 if (TUI_DISASM_WIN == NULL)
602 {
603 tui_win_list[DISASSEM_WIN]
604 = make_disasm_window (asm_height, src_height - 1);
605 locator->reset (2 /* 1 */ ,
606 tui_term_width (),
607 0,
608 (src_height + asm_height) - 1);
609 }
610 else
611 {
612 locator->reset (2 /* 1 */ ,
613 tui_term_width (),
614 0,
615 (src_height + asm_height) - 1);
616 TUI_DISASM_WIN->m_has_locator = true;
617 TUI_DISASM_WIN->reset (asm_height,
618 tui_term_width (),
619 0,
620 src_height - 1);
621 tui_make_visible (TUI_DISASM_WIN);
622 }
623 TUI_SRC_WIN->m_has_locator = false;
624 TUI_DISASM_WIN->m_has_locator = true;
625 tui_make_visible (locator);
626 tui_show_locator_content ();
627 tui_show_source_content (TUI_DISASM_WIN);
628
629 if (TUI_CMD_WIN == NULL)
630 tui_win_list[CMD_WIN]
631 = make_command_window (cmd_height, tui_term_height () - cmd_height);
632 else
633 {
634 TUI_CMD_WIN->reset (TUI_CMD_WIN->height,
635 TUI_CMD_WIN->width,
636 0,
637 TUI_CMD_WIN->origin.y);
638 tui_make_visible (TUI_CMD_WIN);
639 }
640 tui_set_current_layout_to (SRC_DISASSEM_COMMAND);
641 }
642 }
643
644
645 /* Show the Source/Data/Command or the Dissassembly/Data/Command
646 layout. */
647 static void
648 show_data (enum tui_layout_type new_layout)
649 {
650 int total_height = (tui_term_height () - TUI_CMD_WIN->height);
651 int src_height, data_height;
652 enum tui_win_type win_type;
653
654 struct tui_locator_window *locator = tui_locator_win_info_ptr ();
655 gdb_assert (locator != nullptr);
656
657 data_height = total_height / 2;
658 src_height = total_height - data_height;
659 tui_make_all_invisible ();
660 tui_make_invisible (locator);
661 if (tui_win_list[DATA_WIN] == nullptr)
662 tui_win_list[DATA_WIN] = make_data_window (data_height, 0);
663 else
664 tui_win_list[DATA_WIN]->reset (data_height, tui_term_width (), 0, 0);
665 tui_win_list[DATA_WIN]->make_visible (true);
666
667 if (new_layout == SRC_DATA_COMMAND)
668 win_type = SRC_WIN;
669 else
670 win_type = DISASSEM_WIN;
671
672 tui_source_window_base *base;
673 if (tui_win_list[win_type] == NULL)
674 {
675 if (win_type == SRC_WIN)
676 tui_win_list[win_type]
677 = make_source_window (src_height, data_height - 1);
678 else
679 tui_win_list[win_type]
680 = make_disasm_window (src_height, data_height - 1);
681 locator->reset (2 /* 1 */ ,
682 tui_term_width (),
683 0,
684 total_height - 1);
685 base = (tui_source_window_base *) tui_win_list[win_type];
686 }
687 else
688 {
689 base = (tui_source_window_base *) tui_win_list[win_type];
690 tui_win_list[win_type]->reset (src_height,
691 tui_term_width (),
692 0,
693 data_height - 1);
694 tui_make_visible (tui_win_list[win_type]);
695 locator->reset (2 /* 1 */ ,
696 tui_term_width (),
697 0,
698 total_height - 1);
699 }
700 base->m_has_locator = true;
701 tui_make_visible (locator);
702 tui_show_locator_content ();
703 tui_add_to_source_windows
704 ((tui_source_window_base *) tui_win_list[win_type]);
705 tui_set_current_layout_to (new_layout);
706 }
707
708 void
709 tui_gen_win_info::reset (int height_, int width_,
710 int origin_x_, int origin_y_)
711 {
712 int h = height_;
713
714 width = width_;
715 height = h;
716 if (h > 1)
717 {
718 viewport_height = h - 1;
719 if (type != CMD_WIN)
720 viewport_height--;
721 }
722 else
723 viewport_height = 1;
724 origin.x = origin_x_;
725 origin.y = origin_y_;
726 }
727
728 /* Show the Source/Command or the Disassem layout. */
729 static void
730 show_source_or_disasm_and_command (enum tui_layout_type layout_type)
731 {
732 if (tui_current_layout () != layout_type)
733 {
734 struct tui_win_info **win_info_ptr;
735 int src_height, cmd_height;
736 struct tui_locator_window *locator = tui_locator_win_info_ptr ();
737 gdb_assert (locator != nullptr);
738
739 if (TUI_CMD_WIN != NULL)
740 cmd_height = TUI_CMD_WIN->height;
741 else
742 cmd_height = tui_term_height () / 3;
743 src_height = tui_term_height () - cmd_height;
744
745 if (layout_type == SRC_COMMAND)
746 win_info_ptr = &tui_win_list[SRC_WIN];
747 else
748 win_info_ptr = &tui_win_list[DISASSEM_WIN];
749
750 tui_source_window_base *base;
751 if ((*win_info_ptr) == NULL)
752 {
753 if (layout_type == SRC_COMMAND)
754 *win_info_ptr = make_source_window (src_height - 1, 0);
755 else
756 *win_info_ptr = make_disasm_window (src_height - 1, 0);
757 locator->reset (2 /* 1 */ ,
758 tui_term_width (),
759 0,
760 src_height - 1);
761 base = (tui_source_window_base *) *win_info_ptr;
762 }
763 else
764 {
765 base = (tui_source_window_base *) *win_info_ptr;
766 locator->reset (2 /* 1 */ ,
767 tui_term_width (),
768 0,
769 src_height - 1);
770 base->m_has_locator = true;
771 (*win_info_ptr)->reset (src_height - 1,
772 tui_term_width (),
773 0,
774 0);
775 tui_make_visible (*win_info_ptr);
776 }
777
778 base->m_has_locator = true;
779 tui_make_visible (locator);
780 tui_show_locator_content ();
781 tui_show_source_content (base);
782
783 if (TUI_CMD_WIN == NULL)
784 {
785 tui_win_list[CMD_WIN] = make_command_window (cmd_height,
786 src_height);
787 }
788 else
789 {
790 TUI_CMD_WIN->reset (TUI_CMD_WIN->height,
791 TUI_CMD_WIN->width,
792 TUI_CMD_WIN->origin.x,
793 TUI_CMD_WIN->origin.y);
794 tui_make_visible (TUI_CMD_WIN);
795 }
796 tui_set_current_layout_to (layout_type);
797 }
798 }
This page took 0.053945 seconds and 5 git commands to generate.