From edc7a980d238f4d855cee99b91c698396f474553 Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Tue, 17 Nov 2020 11:30:08 -0700 Subject: vulkaninfo: add option to always open details for HTML Doesn't alter current behavior. Change-Id: I76cb0c4395741848667b2687d722b9b2245fb296 --- vulkaninfo/outputprinter.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/vulkaninfo/outputprinter.h b/vulkaninfo/outputprinter.h index 862e965d..730b1b69 100644 --- a/vulkaninfo/outputprinter.h +++ b/vulkaninfo/outputprinter.h @@ -257,6 +257,11 @@ class Printer { return *this; } + Printer &SetAlwaysOpenDetails(bool value = true) { + should_always_open = value; + return *this; + } + Printer &SetTitleAsType() { set_object_name_as_type = true; return *this; @@ -298,7 +303,7 @@ class Printer { } case (OutputType::html): out << std::string(static_cast(indents), '\t'); - if (set_details_open) { + if (set_details_open || should_always_open) { out << "
"; set_details_open = false; } else { @@ -398,7 +403,7 @@ class Printer { } case (OutputType::html): out << std::string(static_cast(indents), '\t'); - if (set_details_open) { + if (set_details_open || should_always_open) { out << "
"; set_details_open = false; } else { @@ -663,6 +668,9 @@ class Printer { // open
bool set_details_open = false; + // always open
+ bool should_always_open = false; + // make object titles the color of types bool set_object_name_as_type = false; -- cgit v1.2.3