| 93 | } |
| 94 | |
| 95 | int DockableWindow::Show(bool show) { |
| 96 | if (m_displayed == show) |
| 97 | return 0; |
| 98 | |
| 99 | if (show && !m_registered) { |
| 100 | int ret = RegisterDockableDialog(); |
| 101 | if (ret == -1) |
| 102 | return -1; |
| 103 | } |
| 104 | |
| 105 | if (show) { |
| 106 | SendMessage(m_hNpp, NPPM_DMMSHOW, 0, (LPARAM)m_hwnd); //Show my window as requested |
| 107 | if (m_menuCmd != -1) |
| 108 | SendMessage(m_hNpp, NPPM_SETMENUITEMCHECK, (WPARAM)m_menuCmd, (LPARAM)TRUE); //Check the menu item |
| 109 | |
| 110 | //Redraw window for clean sheet |
| 111 | InvalidateRect(m_hwnd, NULL, TRUE); |
| 112 | } else { |
| 113 | SendMessage(m_hNpp, NPPM_DMMHIDE, 0, (LPARAM)m_hwnd); //Hide my window as requested |
| 114 | if (m_menuCmd != -1) |
| 115 | SendMessage(m_hNpp, NPPM_SETMENUITEMCHECK, (WPARAM)m_menuCmd, (LPARAM)FALSE); //Uncheck the menu item |
| 116 | } |
| 117 | |
| 118 | m_displayed = show; |
| 119 | |
| 120 | return 0; |
| 121 | } |
| 122 | |
| 123 | bool DockableWindow::IsVisible() { |
| 124 | return m_displayed; |
nothing calls this directly
no outgoing calls
no test coverage detected