+2019-07-17 Tom Tromey <tom@tromey.com>
+
+ * tui/tui.c: Update.
+ * tui/tui-win.c (tui_cmd_window::do_make_visible_with_new_height)
+ (tui_cmd_window::max_height): Move to tui-command.c.
+ * tui/tui-layout.c: Update.
+ * tui/tui-data.h (struct tui_cmd_window): Move to tui-command.h.
+ * tui/tui-data.c (tui_cmd_window::clear_detail): Move to
+ tui-command.c.
+ * tui/tui-command.h (struct tui_cmd_window): Move from
+ tui-data.h.
+ * tui/tui-command.c: Remove "structuring" comments.
+ (tui_cmd_window::clear_detail)
+ (tui_cmd_window::do_make_visible_with_new_height)
+ (tui_cmd_window::max_height): Move from elsewhere.
+
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-io.c (tui_dispatch_ctrl_char): Move from tui-command.c.
#include "tui/tui-command.h"
#include "gdb_curses.h"
-/*****************************************
-** STATIC LOCAL FUNCTIONS FORWARD DECLS **
-******************************************/
+/* See tui-command.h. */
+
+void
+tui_cmd_window::clear_detail ()
+{
+ wmove (handle, 0, 0);
+}
+
+/* See tui-command.h. */
+void
+tui_cmd_window::do_make_visible_with_new_height ()
+{
+#ifdef HAVE_WRESIZE
+ wresize (handle, height, width);
+#endif
+ mvwin (handle, origin.y, origin.x);
+ wmove (handle, 0, 0);
+}
-/*****************************************
-** PUBLIC FUNCTIONS **
-******************************************/
+/* See tui-command.h. */
+
+int
+tui_cmd_window::max_height () const
+{
+ return tui_term_height () - 4;
+}
/* See tui-command.h. */
#ifndef TUI_TUI_COMMAND_H
#define TUI_TUI_COMMAND_H
+#include "tui/tui-data.h"
+
+/* The TUI command window. */
+struct tui_cmd_window : public tui_win_info
+{
+ tui_cmd_window ()
+ : tui_win_info (CMD_WIN)
+ {
+ can_highlight = false;
+ }
+
+ DISABLE_COPY_AND_ASSIGN (tui_cmd_window);
+
+ void clear_detail () override;
+
+ void make_visible (bool visible) override
+ {
+ }
+
+ int max_height () const override;
+
+ void refresh_window () override
+ {
+ }
+
+ const char *name () const override
+ {
+ return CMD_NAME;
+ }
+
+ bool can_scroll () const override
+ {
+ return false;
+ }
+
+ int start_line = 0;
+
+protected:
+
+ void do_scroll_vertical (int num_to_scroll) override
+ {
+ }
+
+ void do_scroll_horizontal (int num_to_scroll) override
+ {
+ }
+
+ void do_make_visible_with_new_height () override;
+};
+
/* Refresh the command window. */
extern void tui_refresh_cmd_win (void);
horizontal_offset = 0;
}
-/* See tui-data.h. */
-
-void
-tui_cmd_window::clear_detail ()
-{
- wmove (handle, 0, 0);
-}
-
/* Accessor for the locator win info. Answers a pointer to the static
locator win info struct. */
struct tui_locator_window *
#include "gdb_curses.h" /* For WINDOW. */
#include "observable.h"
+struct tui_cmd_window;
+
/* This is a point definition. */
struct tui_point
{
void do_scroll_vertical (int num_to_scroll) override;
};
-struct tui_cmd_window : public tui_win_info
-{
- tui_cmd_window ()
- : tui_win_info (CMD_WIN)
- {
- can_highlight = false;
- }
-
- DISABLE_COPY_AND_ASSIGN (tui_cmd_window);
-
- void clear_detail () override;
-
- void make_visible (bool visible) override
- {
- }
-
- int max_height () const override;
-
- void refresh_window () override
- {
- }
-
- const char *name () const override
- {
- return CMD_NAME;
- }
-
- bool can_scroll () const override
- {
- return false;
- }
-
- int start_line = 0;
-
-protected:
-
- void do_scroll_vertical (int num_to_scroll) override
- {
- }
-
- void do_scroll_horizontal (int num_to_scroll) override
- {
- }
-
- void do_make_visible_with_new_height () override;
-};
-
extern int tui_win_is_auxiliary (enum tui_win_type win_type);
#include <ctype.h>
#include "tui/tui.h"
+#include "tui/tui-command.h"
#include "tui/tui-data.h"
#include "tui/tui-wingeneral.h"
#include "tui/tui-stack.h"
#include "tui/tui.h"
#include "tui/tui-io.h"
+#include "tui/tui-command.h"
#include "tui/tui-data.h"
#include "tui/tui-wingeneral.h"
#include "tui/tui-stack.h"
/* See tui-data.h. */
-void
-tui_cmd_window::do_make_visible_with_new_height ()
-{
-#ifdef HAVE_WRESIZE
- wresize (handle, height, width);
-#endif
- mvwin (handle, origin.y, origin.x);
- wmove (handle, 0, 0);
-}
-
-/* See tui-data.h. */
-
int
tui_win_info::max_height () const
{
return tui_term_height () - 2;
}
-/* See tui-data.h. */
-
-int
-tui_cmd_window::max_height () const
-{
- return tui_term_height () - 4;
-}
-
static int
new_height_ok (struct tui_win_info *primary_win_info,
int new_height)
#include "gdbcmd.h"
#include "tui/tui.h"
#include "tui/tui-hooks.h"
+#include "tui/tui-command.h"
#include "tui/tui-data.h"
#include "tui/tui-layout.h"
#include "tui/tui-io.h"