aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-data.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-17 12:56:39 -0600
committerTom Tromey <tom@tromey.com>2019-06-25 07:48:41 -0600
commitc3bd716ffc20cada32e8a18a209638b578d47f5e (patch)
treea3b5f316344b173b61903b7b9d19998716e22914 /gdb/tui/tui-data.h
parent21c32dca764039afd3517954f6dd0a23d0c9e16c (diff)
downloadgdb-c3bd716ffc20cada32e8a18a209638b578d47f5e.zip
gdb-c3bd716ffc20cada32e8a18a209638b578d47f5e.tar.gz
gdb-c3bd716ffc20cada32e8a18a209638b578d47f5e.tar.bz2
Remove tui_scroll_direction enum
The tui_scroll_direction enum is not really needed, because it's simple to adapt the various scrolling methods to use the sign of their argument as the direction in which to scroll. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-winsource.c (tui_source_window_base::do_scroll_horizontal): Remove direction parameter. * tui/tui-windata.c (tui_data_window::do_scroll_vertical): Remove direction parameter. * tui/tui-win.c (tui_win_info::forward_scroll) (tui_win_info::backward_scroll, tui_win_info::left_scroll) (tui_win_info::right_scroll): Update. * tui/tui-source.c (tui_source_window::do_scroll_vertical): Remove direction parameter. * tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Remove direction parameter. * tui/tui-data.h (enum tui_scroll_direction): Remove. (struct tui_win_info) <do_scroll_vertical, do_scroll_horizontal>: Remove direction parameter. (struct tui_source_window_base, struct tui_source_window) (struct tui_disasm_window, struct tui_data_window) (struct tui_cmd_window): Update.
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r--gdb/tui/tui-data.h37
1 files changed, 9 insertions, 28 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index d977c57..59d1900 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -122,16 +122,6 @@ struct tui_gen_win_info
#define MAX_TARGET_WIDTH 10
#define MAX_PID_WIDTH 19
-/* Scroll direction enum. */
-enum tui_scroll_direction
-{
- FORWARD_SCROLL,
- BACKWARD_SCROLL,
- LEFT_SCROLL,
- RIGHT_SCROLL
-};
-
-
/* The kinds of layouts available. */
enum tui_layout_type
{
@@ -264,13 +254,11 @@ protected:
/* Scroll the contents vertically. This is only called via
forward_scroll and backward_scroll. */
- virtual void do_scroll_vertical (enum tui_scroll_direction,
- int num_to_scroll) = 0;
+ virtual void do_scroll_vertical (int num_to_scroll) = 0;
/* Scroll the contents horizontally. This is only called via
left_scroll and right_scroll. */
- virtual void do_scroll_horizontal (enum tui_scroll_direction,
- int num_to_scroll) = 0;
+ virtual void do_scroll_horizontal (int num_to_scroll) = 0;
public:
@@ -337,8 +325,7 @@ protected:
~tui_source_window_base () override;
DISABLE_COPY_AND_ASSIGN (tui_source_window_base);
- void do_scroll_horizontal (enum tui_scroll_direction,
- int num_to_scroll) override;
+ void do_scroll_horizontal (int num_to_scroll) override;
public:
@@ -396,8 +383,7 @@ struct tui_source_window : public tui_source_window_base
protected:
- void do_scroll_vertical (enum tui_scroll_direction,
- int num_to_scroll) override;
+ void do_scroll_vertical (int num_to_scroll) override;
};
/* A TUI disassembly window. */
@@ -418,8 +404,7 @@ struct tui_disasm_window : public tui_source_window_base
protected:
- void do_scroll_vertical (enum tui_scroll_direction,
- int num_to_scroll) override;
+ void do_scroll_vertical (int num_to_scroll) override;
};
struct tui_data_window : public tui_win_info
@@ -457,10 +442,8 @@ struct tui_data_window : public tui_win_info
protected:
- void do_scroll_vertical (enum tui_scroll_direction,
- int num_to_scroll) override;
- void do_scroll_horizontal (enum tui_scroll_direction,
- int num_to_scroll) override
+ void do_scroll_vertical (int num_to_scroll) override;
+ void do_scroll_horizontal (int num_to_scroll) override
{
}
};
@@ -495,13 +478,11 @@ struct tui_cmd_window : public tui_win_info
protected:
- void do_scroll_vertical (enum tui_scroll_direction,
- int num_to_scroll) override
+ void do_scroll_vertical (int num_to_scroll) override
{
}
- void do_scroll_horizontal (enum tui_scroll_direction,
- int num_to_scroll) override
+ void do_scroll_horizontal (int num_to_scroll) override
{
}
};