gnu-nat: Move local functions inside gnu_nat_target class
[deliverable/binutils-gdb.git] / gdb / ui-style.h
index 04a1d448ba997c494edbc2ba400d81d9d50a8f66..48ab52d5ea90c1452f773c795c7b91aa71c444c6 100644 (file)
@@ -1,5 +1,5 @@
 /* Styling for ui_file
-   Copyright (C) 2018-2019 Free Software Foundation, Inc.
+   Copyright (C) 2018-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -180,18 +180,36 @@ struct ui_file_style
     return m_reverse;
   }
 
+  /* Set/clear the reverse display flag.  */
+  void set_reverse (bool reverse)
+  {
+    m_reverse = reverse;
+  }
+
   /* Return the foreground color of this style.  */
   const color &get_foreground () const
   {
     return m_foreground;
   }
 
+  /* Set the foreground color of this style.  */
+  void set_fg (color c)
+  {
+    m_foreground = c;
+  }
+
   /* Return the background color of this style.  */
   const color &get_background () const
   {
     return m_background;
   }
 
+  /* Set the background color of this style.  */
+  void set_bg (color c)
+  {
+    m_background = c;
+  }
+
   /* Return the intensity of this style.  */
   intensity get_intensity () const
   {
@@ -205,6 +223,12 @@ struct ui_file_style
      BUF.  */
   bool parse (const char *buf, size_t *n_read);
 
+  /* We need this because we can't pass a reference via va_args.  */
+  const ui_file_style *ptr () const
+  {
+    return this;
+  }
+
 private:
 
   color m_foreground = NONE;
@@ -215,8 +239,8 @@ private:
 
 /* Skip an ANSI escape sequence in BUF.  BUF must begin with an ESC
    character.  Return true if an escape sequence was successfully
-   skipped; false otherwise.  In either case, N_READ is updated to
-   reflect the number of chars read from BUF.  */
+   skipped; false otherwise.  If an escape sequence was skipped,
+   N_READ is updated to reflect the number of chars read from BUF.  */
 
 extern bool skip_ansi_escape (const char *buf, int *n_read);
 
This page took 0.025929 seconds and 4 git commands to generate.