* [review] Move max_height method to tui_gen_win_info
@ 2019-10-27 21:44 Tom Tromey (Code Review)
2019-11-06 14:27 ` [review v2] " Tom Tromey (Code Review)
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Tom Tromey (Code Review) @ 2019-10-27 21:44 UTC (permalink / raw)
To: gdb-patches
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/364
......................................................................
Move max_height method to tui_gen_win_info
This moves the max_height method to tui_gen_win_info and implements it
in the subclasses. This is used by a subsequent patch, which will
normalize window layout across all window types.
gdb/ChangeLog
2019-10-27 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <max_height>: New
method.
* tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
method.
* tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
method.
(struct tui_win_info) <max_height>: Now override.
Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
---
M gdb/ChangeLog
M gdb/tui/tui-data.h
M gdb/tui/tui-regs.h
M gdb/tui/tui-stack.h
4 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fe85d31..c1f106c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2019-10-27 Tom Tromey <tom@tromey.com>
+ * tui/tui-stack.h (struct tui_locator_window) <max_height>: New
+ method.
+ * tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
+ method.
+ * tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
+ method.
+ (struct tui_win_info) <max_height>: Now override.
+
+2019-10-27 Tom Tromey <tom@tromey.com>
+
* tui/tui-layout.c (show_layout): Set current_layout.
(show_source_disasm_command, show_data)
(show_source_or_disasm_and_command): Don't set current_layout.
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 8af1573..0131aa4 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -82,6 +82,9 @@
return "";
}
+ /* Compute the maximum height of this window. */
+ virtual int max_height () const = 0;
+
/* Resize this window. The parameters are used to set the window's
size and position. */
virtual void resize (int height, int width,
@@ -173,8 +176,7 @@
{
}
- /* Compute the maximum height of this window. */
- virtual int max_height () const;
+ int max_height () const override;
/* Called after the tab width has been changed. */
virtual void update_tab_width ()
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index e45a68f..d476bcf 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -41,6 +41,11 @@
void refresh_window () override;
+ int max_height () const override
+ {
+ return 1;
+ }
+
const char *name = nullptr;
/* The register number, or data display number. */
int item_no = -1;
diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h
index 93a79fb..dd9851b 100644
--- a/gdb/tui/tui-stack.h
+++ b/gdb/tui/tui-stack.h
@@ -37,6 +37,11 @@
proc_name[0] = 0;
}
+ int max_height () const override
+ {
+ return 1;
+ }
+
void rerender () override;
/* Update the locator, with the provided arguments.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
Gerrit-Change-Number: 364
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange
^ permalink raw reply [flat|nested] 8+ messages in thread
* [review v2] Move max_height method to tui_gen_win_info
2019-10-27 21:44 [review] Move max_height method to tui_gen_win_info Tom Tromey (Code Review)
@ 2019-11-06 14:27 ` Tom Tromey (Code Review)
2019-11-13 10:07 ` Andrew Burgess (Code Review)
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Tom Tromey (Code Review) @ 2019-11-06 14:27 UTC (permalink / raw)
To: gdb-patches
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/364
......................................................................
Move max_height method to tui_gen_win_info
This moves the max_height method to tui_gen_win_info and implements it
in the subclasses. This is used by a subsequent patch, which will
normalize window layout across all window types.
gdb/ChangeLog
2019-11-06 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <max_height>: New
method.
* tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
method.
* tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
method.
(struct tui_win_info) <max_height>: Now override.
Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
---
M gdb/ChangeLog
M gdb/tui/tui-data.h
M gdb/tui/tui-regs.h
M gdb/tui/tui-stack.h
4 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3939d43..1daaf14 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2019-11-06 Tom Tromey <tom@tromey.com>
+ * tui/tui-stack.h (struct tui_locator_window) <max_height>: New
+ method.
+ * tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
+ method.
+ * tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
+ method.
+ (struct tui_win_info) <max_height>: Now override.
+
+2019-11-06 Tom Tromey <tom@tromey.com>
+
* tui/tui-layout.c (show_layout): Set current_layout.
(show_source_disasm_command, show_data)
(show_source_or_disasm_and_command): Don't set current_layout.
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 8af1573..0131aa4 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -82,6 +82,9 @@
return "";
}
+ /* Compute the maximum height of this window. */
+ virtual int max_height () const = 0;
+
/* Resize this window. The parameters are used to set the window's
size and position. */
virtual void resize (int height, int width,
@@ -173,8 +176,7 @@
{
}
- /* Compute the maximum height of this window. */
- virtual int max_height () const;
+ int max_height () const override;
/* Called after the tab width has been changed. */
virtual void update_tab_width ()
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index e45a68f..d476bcf 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -41,6 +41,11 @@
void refresh_window () override;
+ int max_height () const override
+ {
+ return 1;
+ }
+
const char *name = nullptr;
/* The register number, or data display number. */
int item_no = -1;
diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h
index 93a79fb..dd9851b 100644
--- a/gdb/tui/tui-stack.h
+++ b/gdb/tui/tui-stack.h
@@ -37,6 +37,11 @@
proc_name[0] = 0;
}
+ int max_height () const override
+ {
+ return 1;
+ }
+
void rerender () override;
/* Update the locator, with the provided arguments.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
Gerrit-Change-Number: 364
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 8+ messages in thread
* [review v2] Move max_height method to tui_gen_win_info
2019-10-27 21:44 [review] Move max_height method to tui_gen_win_info Tom Tromey (Code Review)
2019-11-06 14:27 ` [review v2] " Tom Tromey (Code Review)
@ 2019-11-13 10:07 ` Andrew Burgess (Code Review)
2019-11-14 22:51 ` [review v3] " Tom Tromey (Code Review)
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Andrew Burgess (Code Review) @ 2019-11-13 10:07 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
Andrew Burgess has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/364
......................................................................
Patch Set 2: Code-Review+2
LGTM
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
Gerrit-Change-Number: 364
Gerrit-PatchSet: 2
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Comment-Date: Wed, 13 Nov 2019 10:07:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
^ permalink raw reply [flat|nested] 8+ messages in thread
* [review v3] Move max_height method to tui_gen_win_info
2019-10-27 21:44 [review] Move max_height method to tui_gen_win_info Tom Tromey (Code Review)
2019-11-06 14:27 ` [review v2] " Tom Tromey (Code Review)
2019-11-13 10:07 ` Andrew Burgess (Code Review)
@ 2019-11-14 22:51 ` Tom Tromey (Code Review)
2019-11-19 20:41 ` [review v4] " Tom Tromey (Code Review)
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Tom Tromey (Code Review) @ 2019-11-14 22:51 UTC (permalink / raw)
To: Andrew Burgess, gdb-patches
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/364
......................................................................
Move max_height method to tui_gen_win_info
This moves the max_height method to tui_gen_win_info and implements it
in the subclasses. This is used by a subsequent patch, which will
normalize window layout across all window types.
gdb/ChangeLog
2019-11-12 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <max_height>: New
method.
* tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
method.
* tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
method.
(struct tui_win_info) <max_height>: Now override.
Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
---
M gdb/ChangeLog
M gdb/tui/tui-data.h
M gdb/tui/tui-regs.h
M gdb/tui/tui-stack.h
4 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1a84242..55ee2a8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2019-11-12 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-stack.h (struct tui_locator_window) <max_height>: New
+ method.
+ * tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
+ method.
+ * tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
+ method.
+ (struct tui_win_info) <max_height>: Now override.
+
2019-11-14 Tom Tromey <tromey@adacore.com>
* eval.c (evaluate_subexp_standard) <BINOP_ASSIGN>: Do not pass an
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 0e45da5..7464b95 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -82,6 +82,9 @@
return "";
}
+ /* Compute the maximum height of this window. */
+ virtual int max_height () const = 0;
+
/* Resize this window. The parameters are used to set the window's
size and position. */
virtual void resize (int height, int width,
@@ -173,8 +176,7 @@
{
}
- /* Compute the maximum height of this window. */
- virtual int max_height () const;
+ int max_height () const override;
/* Called after the tab width has been changed. */
virtual void update_tab_width ()
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index e45a68f..d476bcf 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -41,6 +41,11 @@
void refresh_window () override;
+ int max_height () const override
+ {
+ return 1;
+ }
+
const char *name = nullptr;
/* The register number, or data display number. */
int item_no = -1;
diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h
index 93a79fb..dd9851b 100644
--- a/gdb/tui/tui-stack.h
+++ b/gdb/tui/tui-stack.h
@@ -37,6 +37,11 @@
proc_name[0] = 0;
}
+ int max_height () const override
+ {
+ return 1;
+ }
+
void rerender () override;
/* Update the locator, with the provided arguments.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
Gerrit-Change-Number: 364
Gerrit-PatchSet: 3
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 8+ messages in thread
* [review v4] Move max_height method to tui_gen_win_info
2019-10-27 21:44 [review] Move max_height method to tui_gen_win_info Tom Tromey (Code Review)
` (2 preceding siblings ...)
2019-11-14 22:51 ` [review v3] " Tom Tromey (Code Review)
@ 2019-11-19 20:41 ` Tom Tromey (Code Review)
2019-11-22 23:49 ` Andrew Burgess (Code Review)
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Tom Tromey (Code Review) @ 2019-11-19 20:41 UTC (permalink / raw)
To: Andrew Burgess, gdb-patches
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/364
......................................................................
Move max_height method to tui_gen_win_info
This moves the max_height method to tui_gen_win_info and implements it
in the subclasses. This is used by a subsequent patch, which will
normalize window layout across all window types.
2019-11-12 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <max_height>: New
method.
* tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
method.
* tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
method.
(struct tui_win_info) <max_height>: Now override.
Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
---
M gdb/ChangeLog
M gdb/tui/tui-data.h
M gdb/tui/tui-regs.h
M gdb/tui/tui-stack.h
4 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cf65de2..51ac6b2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2019-11-12 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-stack.h (struct tui_locator_window) <max_height>: New
+ method.
+ * tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
+ method.
+ * tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
+ method.
+ (struct tui_win_info) <max_height>: Now override.
+
2019-11-19 Tom Tromey <tom@tromey.com>
* tui/tui-win.c (tui_partial_win_by_name): Move from tui-data.c.
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 282b49e..d3b84b1 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -82,6 +82,9 @@
return "";
}
+ /* Compute the maximum height of this window. */
+ virtual int max_height () const = 0;
+
/* Resize this window. The parameters are used to set the window's
size and position. */
virtual void resize (int height, int width,
@@ -173,8 +176,7 @@
{
}
- /* Compute the maximum height of this window. */
- virtual int max_height () const;
+ int max_height () const override;
/* Called after the tab width has been changed. */
virtual void update_tab_width ()
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index e45a68f..d476bcf 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -41,6 +41,11 @@
void refresh_window () override;
+ int max_height () const override
+ {
+ return 1;
+ }
+
const char *name = nullptr;
/* The register number, or data display number. */
int item_no = -1;
diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h
index 93a79fb..dd9851b 100644
--- a/gdb/tui/tui-stack.h
+++ b/gdb/tui/tui-stack.h
@@ -37,6 +37,11 @@
proc_name[0] = 0;
}
+ int max_height () const override
+ {
+ return 1;
+ }
+
void rerender () override;
/* Update the locator, with the provided arguments.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
Gerrit-Change-Number: 364
Gerrit-PatchSet: 4
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 8+ messages in thread
* [review v4] Move max_height method to tui_gen_win_info
2019-10-27 21:44 [review] Move max_height method to tui_gen_win_info Tom Tromey (Code Review)
` (3 preceding siblings ...)
2019-11-19 20:41 ` [review v4] " Tom Tromey (Code Review)
@ 2019-11-22 23:49 ` Andrew Burgess (Code Review)
2019-12-11 23:21 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-11 23:21 ` Sourceware to Gerrit sync (Code Review)
6 siblings, 0 replies; 8+ messages in thread
From: Andrew Burgess (Code Review) @ 2019-11-22 23:49 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
Andrew Burgess has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/364
......................................................................
Patch Set 4: Code-Review+2
Still LGTM :)
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
Gerrit-Change-Number: 364
Gerrit-PatchSet: 4
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-Comment-Date: Fri, 22 Nov 2019 23:49:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
^ permalink raw reply [flat|nested] 8+ messages in thread
* [pushed] Move max_height method to tui_gen_win_info
2019-10-27 21:44 [review] Move max_height method to tui_gen_win_info Tom Tromey (Code Review)
` (5 preceding siblings ...)
2019-12-11 23:21 ` [pushed] " Sourceware to Gerrit sync (Code Review)
@ 2019-12-11 23:21 ` Sourceware to Gerrit sync (Code Review)
6 siblings, 0 replies; 8+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2019-12-11 23:21 UTC (permalink / raw)
To: Tom Tromey, Andrew Burgess, gdb-patches
The original change was created by Tom Tromey.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/364
......................................................................
Move max_height method to tui_gen_win_info
This moves the max_height method to tui_gen_win_info and implements it
in the subclasses. This is used by a subsequent patch, which will
normalize window layout across all window types.
gdb/ChangeLog
2019-12-11 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <max_height>: New
method.
* tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
method.
* tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
method.
(struct tui_win_info) <max_height>: Now override.
Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
---
M gdb/ChangeLog
M gdb/tui/tui-data.h
M gdb/tui/tui-regs.h
M gdb/tui/tui-stack.h
4 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ca47b8c..20d3321 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2019-12-11 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-stack.h (struct tui_locator_window) <max_height>: New
+ method.
+ * tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
+ method.
+ * tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
+ method.
+ (struct tui_win_info) <max_height>: Now override.
+
2019-12-11 Joel Brobecker <brobecker@adacore.com>
* NEWS: Create a new section for the next release branch.
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 282b49e..d3b84b1 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -82,6 +82,9 @@
return "";
}
+ /* Compute the maximum height of this window. */
+ virtual int max_height () const = 0;
+
/* Resize this window. The parameters are used to set the window's
size and position. */
virtual void resize (int height, int width,
@@ -173,8 +176,7 @@
{
}
- /* Compute the maximum height of this window. */
- virtual int max_height () const;
+ int max_height () const override;
/* Called after the tab width has been changed. */
virtual void update_tab_width ()
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index e45a68f..d476bcf 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -41,6 +41,11 @@
void refresh_window () override;
+ int max_height () const override
+ {
+ return 1;
+ }
+
const char *name = nullptr;
/* The register number, or data display number. */
int item_no = -1;
diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h
index 93a79fb..dd9851b 100644
--- a/gdb/tui/tui-stack.h
+++ b/gdb/tui/tui-stack.h
@@ -37,6 +37,11 @@
proc_name[0] = 0;
}
+ int max_height () const override
+ {
+ return 1;
+ }
+
void rerender () override;
/* Update the locator, with the provided arguments.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
Gerrit-Change-Number: 364
Gerrit-PatchSet: 5
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 8+ messages in thread
* [pushed] Move max_height method to tui_gen_win_info
2019-10-27 21:44 [review] Move max_height method to tui_gen_win_info Tom Tromey (Code Review)
` (4 preceding siblings ...)
2019-11-22 23:49 ` Andrew Burgess (Code Review)
@ 2019-12-11 23:21 ` Sourceware to Gerrit sync (Code Review)
2019-12-11 23:21 ` Sourceware to Gerrit sync (Code Review)
6 siblings, 0 replies; 8+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2019-12-11 23:21 UTC (permalink / raw)
To: Tom Tromey, gdb-patches; +Cc: Andrew Burgess
Sourceware to Gerrit sync has submitted this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/364
......................................................................
Move max_height method to tui_gen_win_info
This moves the max_height method to tui_gen_win_info and implements it
in the subclasses. This is used by a subsequent patch, which will
normalize window layout across all window types.
gdb/ChangeLog
2019-12-11 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <max_height>: New
method.
* tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
method.
* tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
method.
(struct tui_win_info) <max_height>: Now override.
Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
---
M gdb/ChangeLog
M gdb/tui/tui-data.h
M gdb/tui/tui-regs.h
M gdb/tui/tui-stack.h
4 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ca47b8c..20d3321 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2019-12-11 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-stack.h (struct tui_locator_window) <max_height>: New
+ method.
+ * tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
+ method.
+ * tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
+ method.
+ (struct tui_win_info) <max_height>: Now override.
+
2019-12-11 Joel Brobecker <brobecker@adacore.com>
* NEWS: Create a new section for the next release branch.
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 282b49e..d3b84b1 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -82,6 +82,9 @@
return "";
}
+ /* Compute the maximum height of this window. */
+ virtual int max_height () const = 0;
+
/* Resize this window. The parameters are used to set the window's
size and position. */
virtual void resize (int height, int width,
@@ -173,8 +176,7 @@
{
}
- /* Compute the maximum height of this window. */
- virtual int max_height () const;
+ int max_height () const override;
/* Called after the tab width has been changed. */
virtual void update_tab_width ()
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index e45a68f..d476bcf 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -41,6 +41,11 @@
void refresh_window () override;
+ int max_height () const override
+ {
+ return 1;
+ }
+
const char *name = nullptr;
/* The register number, or data display number. */
int item_no = -1;
diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h
index 93a79fb..dd9851b 100644
--- a/gdb/tui/tui-stack.h
+++ b/gdb/tui/tui-stack.h
@@ -37,6 +37,11 @@
proc_name[0] = 0;
}
+ int max_height () const override
+ {
+ return 1;
+ }
+
void rerender () override;
/* Update the locator, with the provided arguments.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
Gerrit-Change-Number: 364
Gerrit-PatchSet: 5
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Andrew Burgess <andrew.burgess@embecosm.com>
Gerrit-MessageType: merged
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-12-11 23:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-27 21:44 [review] Move max_height method to tui_gen_win_info Tom Tromey (Code Review)
2019-11-06 14:27 ` [review v2] " Tom Tromey (Code Review)
2019-11-13 10:07 ` Andrew Burgess (Code Review)
2019-11-14 22:51 ` [review v3] " Tom Tromey (Code Review)
2019-11-19 20:41 ` [review v4] " Tom Tromey (Code Review)
2019-11-22 23:49 ` Andrew Burgess (Code Review)
2019-12-11 23:21 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-11 23:21 ` Sourceware to Gerrit sync (Code Review)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).