Lines Matching full:window

100 class Window;
104 typedef std::shared_ptr<Window> WindowSP;
316 virtual bool WindowDelegateDraw(Window &window, bool force) {
320 virtual HandleCharResult WindowDelegateHandleChar(Window &window, int key) {
335 bool WindowDelegateDraw(Window &window, bool force) override;
337 HandleCharResult WindowDelegateHandleChar(Window &window, int key) override;
351 // object, such as a Window or a Pad.
354 enum class Type { Window, Pad };
358 WINDOW *get() { return m_window; }
360 operator WINDOW *() { return m_window; }
559 WINDOW *m_window = nullptr;
571 class Window : public Surface {
573 Window(const char *name)
574 : Surface(Surface::Type::Window), m_name(name), m_panel(nullptr),
580 Window(const char *name, WINDOW *w, bool del = true)
581 : Surface(Surface::Type::Window), m_name(name), m_panel(nullptr),
590 Window(const char *name, const Rect &bounds)
591 : Surface(Surface::Type::Window), m_name(name), m_panel(nullptr),
600 virtual ~Window() {
605 void Reset(WINDOW *w = nullptr, bool del = true) {
625 // Get the rectangle in our parent window
688 WindowSP subwindow_sp = std::make_shared<Window>(name, get_window(), true);
701 bool RemoveSubWindow(Window *window) {
705 if ((*pos).get() == window) {
717 window->Erase();
753 // Window drawing utilities
832 Window *parent_window = GetParent();
846 // Always check the active window first
887 // Find first window that wants to be active if this window is active
912 Window *GetParent() const { return m_parent; }
918 return true; // Top level window is always active
922 // Move active focus to next window
944 // Move active focus to previous window
970 Window *m_parent;
981 Window(const Window &) = delete;
982 const Window &operator=(const Window &) = delete;
1025 // is selected in the form window, then is_selected will be true.
1028 // Handle the key that wasn't handled by the form window or a container field.
1041 // mechanism, the window shouldn't handle the navigation keys all the time,
2257 FormAction(const char *label, std::function<void(Window &)> action)
2276 void Execute(Window &window) { m_action(window); }
2282 std::function<void(Window &)> m_action;
2454 void AddAction(const char *label, std::function<void(Window &)> action) {
2482 // A form window is padded by one character from all sides. First, if an error
2630 // the derived window starting at the first visible line. This essentially
2663 bool WindowDelegateDraw(Window &window, bool force) override {
2666 window.Erase();
2668 window.DrawTitleBox(m_delegate_sp->GetName().c_str(),
2670 DrawSubmitHint(window, window.IsActive());
2672 Rect content_bounds = window.GetFrame();
2674 Surface content_surface = window.SubSurface(content_bounds);
2793 void ExecuteAction(Window &window, int index) {
2795 action.Execute(window);
2805 HandleCharResult WindowDelegateHandleChar(Window &window, int key) override {
2811 ExecuteAction(window, m_selection_index);
2816 ExecuteAction(window, 0);
2825 window.GetParent()->RemoveSubWindow(&window);
2877 AddAction("Detach", [this](Window &window) { Detach(window); });
2878 AddAction("Kill", [this](Window &window) { Kill(window); });
2883 void Kill(Window &window) {
2889 window.GetParent()->RemoveSubWindow(&window);
2892 void Detach(Window &window) {
2898 window.GetParent()->RemoveSubWindow(&window);
2924 AddAction("Attach", [this](Window &window) { Attach(window); });
3024 void Attach(Window &window) {
3057 window.GetParent()->RemoveSubWindow(&window);
3091 AddAction("Create", [this](Window &window) { CreateTarget(window); });
3208 void CreateTarget(Window &window) {
3237 window.GetParent()->RemoveSubWindow(&window);
3297 AddAction("Launch", [this](Window &window) { Launch(window); });
3584 void Launch(Window &window) {
3614 window.GetParent()->RemoveSubWindow(&window);
3676 // A completion window is padded by one character from all sides. A text field
3680 // ___<Searcher Window Name>____________________________
3747 bool WindowDelegateDraw(Window &window, bool force) override {
3748 window.Erase();
3750 window.DrawTitleBox(window.GetName(), "Press Esc to Cancel");
3752 Rect content_bounds = window.GetFrame();
3754 Surface content_surface = window.SubSurface(content_bounds);
3770 void ExecuteCallback(Window &window) {
3772 window.GetParent()->RemoveSubWindow(&window);
3780 HandleCharResult WindowDelegateHandleChar(Window &window, int key) override {
3785 ExecuteCallback(window);
3796 window.GetParent()->RemoveSubWindow(&window);
3896 int DrawAndRunMenu(Window &window);
3898 void DrawMenuTitle(Window &window, bool highlight);
3900 bool WindowDelegateDraw(Window &window, bool force) override;
3902 HandleCharResult WindowDelegateHandleChar(Window &window, int key) override;
4020 void Menu::DrawMenuTitle(Window &window, bool highlight) {
4022 window.MoveCursor(0, window.GetCursorY());
4023 window.PutChar(ACS_LTEE);
4024 int width = window.GetWidth();
4028 window.PutChar(ACS_HLINE);
4030 window.PutChar(ACS_RTEE);
4036 window.AttributeOn(highlight_attr);
4045 window.PutCString(name, pos);
4049 window.AttributeOn(shortcut_attr);
4050 window.PutChar(name[0]);
4051 window.AttributeOff(shortcut_attr);
4054 window.PutCString(name);
4059 window.PutCString(m_name.c_str());
4063 window.AttributeOff(highlight_attr);
4067 window.AttributeOn(COLOR_PAIR(MagentaOnWhite));
4068 window.Printf(" (%c)", m_key_value);
4069 window.AttributeOff(COLOR_PAIR(MagentaOnWhite));
4072 window.AttributeOn(COLOR_PAIR(MagentaOnWhite));
4073 window.Printf(" (%s)", m_key_name.c_str());
4074 window.AttributeOff(COLOR_PAIR(MagentaOnWhite));
4079 bool Menu::WindowDelegateDraw(Window &window, bool force) {
4086 window.SetBackground(BlackOnWhite);
4087 window.MoveCursor(0, 0);
4091 window.PutChar(' ');
4092 menu->SetStartingColumn(window.GetCursorX());
4093 window.PutCString("| ");
4094 menu->DrawMenuTitle(window, false);
4096 window.PutCString(" |");
4105 window.Erase();
4106 window.SetBackground(BlackOnWhite);
4107 window.Box();
4110 window.MoveCursor(x, y + i);
4116 submenus[i]->DrawMenuTitle(window, is_selected);
4118 window.MoveCursor(cursor_x, cursor_y);
4128 HandleCharResult Menu::WindowDelegateHandleChar(Window &window, int key) {
4195 window.GetParent()->RemoveSubWindow(m_menu_window_sp.get());
4197 m_menu_window_sp = window.GetParent()->CreateSubWindow(
4237 window.GetParent()->RemoveSubWindow(&window);
4244 window.GetParent()->RemoveSubWindow(&window);
4252 window.GetParent()->RemoveSubWindow(&window);
4300 // calling Window::GetChar()
4315 // All windows should be calling Window::DeferredRefresh() instead of
4316 // Window::Refresh() so we can do a single update and avoid any screen
4416 m_window_sp = std::make_shared<Window>("main", stdscr, false);
4537 void DrawTree(Window &window) {
4539 parent->DrawTreeForChild(window, this, 0);
4550 // window.PutCString (symbol);
4555 // window.PutChar (ACS_DARROW);
4557 // window.PutChar (ACS_RARROW);
4560 window.PutChar(ACS_DIAMOND);
4561 window.PutChar(ACS_HLINE);
4565 void DrawTreeForChild(Window &window, Row *child, uint32_t reverse_depth) {
4567 parent->DrawTreeForChild(window, this, reverse_depth + 1);
4572 window.PutChar(ACS_LLCORNER);
4573 window.PutChar(ACS_HLINE);
4575 window.PutChar(' ');
4576 window.PutChar(' ');
4580 window.PutChar(ACS_LTEE);
4581 window.PutChar(ACS_HLINE);
4583 window.PutChar(ACS_VLINE);
4584 window.PutChar(' ');
4601 virtual void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) = 0;
4720 bool Draw(Window &window, const int first_visible_row,
4726 window.MoveCursor(2, row_idx + 1);
4729 m_parent->DrawTreeForChild(window, this, 0);
4739 // window.PutCString (symbol);
4744 // window.PutChar (ACS_DARROW);
4746 // window.PutChar (ACS_RARROW);
4749 window.PutChar(ACS_DIAMOND);
4750 window.PutChar(ACS_HLINE);
4753 window.IsActive();
4756 window.AttributeOn(A_REVERSE);
4758 m_delegate->TreeDelegateDrawTreeItem(*this, window);
4761 window.AttributeOff(A_REVERSE);
4773 if (!item.Draw(window, first_visible_row, selected_row_idx, row_idx,
4781 void DrawTreeForChild(Window &window, TreeItem *child,
4784 m_parent->DrawTreeForChild(window, this, reverse_depth + 1);
4789 window.PutChar(ACS_LLCORNER);
4790 window.PutChar(ACS_HLINE);
4792 window.PutChar(' ');
4793 window.PutChar(' ');
4797 window.PutChar(ACS_LTEE);
4798 window.PutChar(ACS_HLINE);
4800 window.PutChar(ACS_VLINE);
4801 window.PutChar(' ');
4859 bool WindowDelegateDraw(Window &window, bool force) override {
4862 m_max_x = window.GetWidth() - 1;
4863 m_max_y = window.GetHeight() - 1;
4865 window.Erase();
4866 window.DrawTitleBox(window.GetName());
4893 m_root.Draw(window, m_first_visible_row, m_selected_row_idx, row_idx,
4902 return "Thread window keyboard shortcuts:";
4922 HandleCharResult WindowDelegateHandleChar(Window &window, int c) override {
5002 window.CreateHelpSubwindow();
5033 void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
5034 window.PutCStringTruncated(1, item.GetText().c_str());
5051 void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
5064 window.PutCStringTruncated(right_pad, strm.GetString().str().c_str());
5114 void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
5122 window.PutCStringTruncated(right_pad, strm.GetString().str().c_str());
5213 void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
5221 window.PutCStringTruncated(right_pad, strm.GetString().str().c_str());
5322 void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
5331 window.PutCStringTruncated(1, stream.GetString().str().c_str());
5458 void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
5464 window.PutCStringTruncated(1, stream.GetString().str().c_str());
5505 void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
5506 window.PutCString("Breakpoints");
5555 bool WindowDelegateDraw(Window &window, bool force) override {
5559 m_max_x = window.GetWidth() - 1;
5560 m_max_y = window.GetHeight() - 1;
5562 window.Erase();
5563 window.DrawTitleBox(window.GetName());
5580 DisplayRows(window, m_rows, g_options);
5587 window.MoveCursor(m_selected_row->x, m_selected_row->y);
5623 HandleCharResult WindowDelegateHandleChar(Window &window, int c) override {
5712 window.CreateHelpSubwindow();
5766 bool DisplayRowObject(Window &window, Row &row, DisplayOptions &options,
5779 window.MoveCursor(row.x, row.y);
5781 row.DrawTree(window);
5784 window.AttributeOn(A_REVERSE);
5787 window.PrintfTruncated(1, "(%s) ", type_name);
5790 window.PutCStringTruncated(1, name);
5797 window.PutCStringTruncated(1, " = ");
5799 window.AttributeOn(changd_attr);
5800 window.PutCStringTruncated(1, value);
5802 window.AttributeOff(changd_attr);
5806 window.PutCStringTruncated(1, " ");
5808 window.AttributeOn(changd_attr);
5809 window.PutCStringTruncated(1, summary);
5811 window.AttributeOff(changd_attr);
5815 window.AttributeOff(A_REVERSE);
5820 void DisplayRows(Window &window, std::vector<Row> &rows,
5825 bool window_is_active = window.IsActive();
5835 if (DisplayRowObject(window, row, options,
5853 DisplayRows(window, children, options);
5905 return "Frame variable window keyboard shortcuts:";
5908 bool WindowDelegateDraw(Window &window, bool force) override {
5956 return ValueObjectListDelegate::WindowDelegateDraw(window, force);
5972 return "Register window keyboard shortcuts:";
5975 bool WindowDelegateDraw(Window &window, bool force) override {
6004 return ValueObjectListDelegate::WindowDelegateDraw(window, force);
6232 bool HelpDialogDelegate::WindowDelegateDraw(Window &window, bool force) {
6233 window.Erase();
6234 const int window_height = window.GetHeight();
6246 window.DrawTitleBox(window.GetName(), bottom_message);
6248 window.MoveCursor(x, y);
6249 window.PutCStringTruncated(
6256 HandleCharResult HelpDialogDelegate::WindowDelegateHandleChar(Window &window,
6260 const size_t num_visible_lines = window.GetHeight() - 2;
6303 window.GetParent()->RemoveSubWindow(&window);
6348 bool WindowDelegateDraw(Window &window, bool force) override {
6349 return false; // Drawing not handled, let standard window drawing happen
6352 HandleCharResult WindowDelegateHandleChar(Window &window, int key) override {
6355 window.SelectNextWindowAsActive();
6359 window.SelectPreviousWindowAsActive();
6363 window.CreateHelpSubwindow();
6587 // We have a registers window, so give all the area back to the
6588 // registers window
6593 // We have no registers window showing so give the bottom area back
6602 // We have a registers window so split the area of the registers
6603 // window into two columns where the left hand side will be the
6611 // No registers window, grab the bottom part of the source window
6637 // We have a variables window, so give all the area back to the
6638 // variables window
6643 // We have no variables window showing so give the bottom area back
6653 // We have a variables window, split it into two columns where the
6662 // No variables window, grab the bottom part of the source window
6684 // If a breakpoints window already exists, remove it and give the area
6685 // it used to occupy to the threads window. If it doesn't exist, split
6686 // the threads window horizontally into two windows where the top window
6687 // is the threads window and the bottom window is a newly added
6688 // breakpoints window.
6734 bool WindowDelegateDraw(Window &window, bool force) override {
6740 window.Erase();
6741 window.SetBackground(BlackOnWhite);
6742 window.MoveCursor(0, 0);
6745 window.Printf("Process: %5" PRIu64 " %10s", process->GetID(),
6752 window.MoveCursor(40, 0);
6753 window.PutCStringTruncated(1, strm.GetString().str().c_str());
6756 window.MoveCursor(60, 0);
6758 window.Printf("Frame: %3u PC = 0x%16.16" PRIx64,
6766 window.Printf(" with status = %i (%s)", exit_status, exit_desc);
6768 window.Printf(" with status = %i", exit_status);
6792 return "Source/Disassembly window keyboard shortcuts:";
6821 bool WindowDelegateDraw(Window &window, bool force) override {
6838 m_max_x = window.GetMaxX() - 1;
6839 m_max_y = window.GetMaxY() - 1;
6972 const int window_width = window.GetWidth();
6973 window.Erase();
6974 window.DrawTitleBox("Sources");
6976 window.AttributeOn(A_REVERSE);
6977 window.MoveCursor(1, 1);
6978 window.PutChar(' ');
6979 window.PutCStringTruncated(1, m_title.GetString().str().c_str());
6980 int x = window.GetCursorX();
6982 window.Printf("%*s", window_width - x - 1, "");
6984 window.AttributeOff(A_REVERSE);
7016 window.MoveCursor(1, line_y);
7031 window.AttributeOn(bp_attr);
7033 window.Printf(" %*u ", m_line_width, curr_line + 1);
7036 window.AttributeOff(bp_attr);
7038 window.PutChar(ACS_VLINE);
7041 window.PutChar(ACS_DIAMOND);
7043 window.PutChar(' ');
7046 window.AttributeOn(highlight_attr);
7058 bool wasWritten = window.OutputColoredStringTruncated(
7064 window.PutCStringTruncated(
7078 if (desc_x - window.GetCursorX() > 0)
7079 window.Printf("%*s", desc_x - window.GetCursorX(), "");
7080 window.MoveCursor(window_width - stop_description_len - 16,
7083 window.AttributeOn(stop_reason_attr);
7084 window.PrintfTruncated(1, " <<< Thread %u: %s ",
7086 window.AttributeOff(stop_reason_attr);
7089 window.Printf("%*s", window_width - window.GetCursorX() - 1, "");
7093 window.AttributeOff(highlight_attr);
7160 window.MoveCursor(1, line_y);
7177 window.AttributeOn(bp_attr);
7179 window.Printf(" 0x%16.16llx ",
7184 window.AttributeOff(bp_attr);
7186 window.PutChar(ACS_VLINE);
7189 window.PutChar(ACS_DIAMOND);
7191 window.PutChar(' ');
7194 window.AttributeOn(highlight_attr);
7217 window.PutCStringTruncated(
7231 if (desc_x - window.GetCursorX() > 0)
7232 window.Printf("%*s", desc_x - window.GetCursorX(), "");
7233 window.MoveCursor(window_width - stop_description_len - 15,
7236 window.PrintfTruncated(1, "<<< Thread %u: %s ",
7241 window.Printf("%*s", window_width - window.GetCursorX() - 1, "");
7245 window.AttributeOff(highlight_attr);
7271 HandleCharResult WindowDelegateHandleChar(Window &window, int c) override {
7454 window.CreateHelpSubwindow();
7577 // This is both a window and a menu delegate
7679 // Let the menubar get keys if the active window doesn't handle the keys
7682 false); // Don't let the menubar become the active window
7694 false); // Don't let the status bar become the active window