- /* Can this window ever be highlighted? */
- bool can_highlight = true;
-
- /* Is this window highlighted? */
- bool is_highlighted = false;
-};
-
-/* The base class for all source-like windows, namely the source and
- disassembly windows. */
-
-struct tui_source_window_base : public tui_win_info
-{
-protected:
- explicit tui_source_window_base (enum tui_win_type type);
- ~tui_source_window_base () override;
- DISABLE_COPY_AND_ASSIGN (tui_source_window_base);
-
- void do_scroll_horizontal (int num_to_scroll) override;
- void do_make_visible_with_new_height () override;
-
-public:
-
- void clear_detail () override;
-
- /* Return true if this window has the locator. */
- bool has_locator () const override
- {
- return m_has_locator;
- }
-
- void make_visible (bool visible) override;
- void refresh () override;
- void refresh_all () override;
-
- /* Refill the source window's source cache and update it. If this
- is a disassembly window, then just update it. */
- void refill ();
-
- /* Set the location of the execution point. */
- void set_is_exec_point_at (struct tui_line_or_address l);
-
- void set_new_height (int height) override;
-
- void update_tab_width () override;
-
- /* Does the locator belong to this window? */
- bool m_has_locator = false;
- /* Execution information window. */
- struct tui_exec_info_window *execution_info = nullptr;
- /* Used for horizontal scroll. */
- int horizontal_offset = 0;
- struct tui_line_or_address start_line_or_addr;
-
- /* It is the resolved form as returned by symtab_to_fullname. */
- char *fullname = nullptr;
-
- /* Architecture associated with code at this location. */
- struct gdbarch *gdbarch = nullptr;
-
- std::vector<tui_source_element> content;
-};
-
-/* A TUI source window. */
-
-struct tui_source_window : public tui_source_window_base
-{
- tui_source_window ();
- ~tui_source_window ();
-
- DISABLE_COPY_AND_ASSIGN (tui_source_window);
-
- const char *name () const override
- {
- return SRC_NAME;
- }
-
-protected:
-
- void do_scroll_vertical (int num_to_scroll) override;
-
-private:
-
- void style_changed ();
-
- /* A token used to register and unregister an observer. */
- gdb::observers::token m_observable;
-};
-
-/* A TUI disassembly window. */
-
-struct tui_disasm_window : public tui_source_window_base
-{
- tui_disasm_window ()
- : tui_source_window_base (DISASSEM_WIN)
- {
- }
-
- DISABLE_COPY_AND_ASSIGN (tui_disasm_window);
-
- const char *name () const override
- {
- return DISASSEM_NAME;
- }
-
-protected:
-
- void do_scroll_vertical (int num_to_scroll) override;
-};
-
-struct tui_data_window : public tui_win_info
-{
- tui_data_window ()
- : tui_win_info (DATA_WIN)
- {
- }
-
- DISABLE_COPY_AND_ASSIGN (tui_data_window);
-
- void clear_detail () override;
- void refresh_all () override;
-
- void set_new_height (int height) override;
-
- void refresh_window () override;
-
- const char *name () const override