gdb, testsuite: Fix return value in gdb.base/foll-fork.exp
[binutils-gdb.git] / gdb / tui / tui-command.h
blob2dc579bce30c96f1756f39d4e04edb69fe747b25
1 /* Specific command window processing.
3 Copyright (C) 1998-2024 Free Software Foundation, Inc.
5 Contributed by Hewlett-Packard Company.
7 This file is part of GDB.
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.
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.
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/>. */
22 #ifndef TUI_TUI_COMMAND_H
23 #define TUI_TUI_COMMAND_H
25 #include "tui/tui-data.h"
27 /* The TUI command window. */
28 struct tui_cmd_window
29 : public tui_noscroll_window, tui_nobox_window, tui_norefresh_window,
30 tui_always_visible_window
32 tui_cmd_window () = default;
34 DISABLE_COPY_AND_ASSIGN (tui_cmd_window);
36 const char *name () const override
38 return CMD_NAME;
41 void resize (int height, int width, int origin_x, int origin_y) override;
43 /* Compute the minimum height of this window. */
44 virtual int min_height () const override
46 int preferred_min = tui_win_info::min_height ();
47 int max = max_height ();
48 /* If there is enough space to accommodate the preferred minimum height,
49 use it. Otherwise, use as much as possible. */
50 return (preferred_min <= max
51 ? preferred_min
52 : max);
55 int start_line = 0;
58 /* Refresh the command window. */
59 extern void tui_refresh_cmd_win (void);
61 #endif /* TUI_TUI_COMMAND_H */