Select appropriate window taking into account design and location
| 234 | |
| 235 | // Select appropriate window taking into account design and location |
| 236 | void CClickWindowController::SelectAppropriateWindow (EDesign design, ELocation location) |
| 237 | { |
| 238 | bool isAutohide= m_autohide; |
| 239 | bool isHorizontal= |
| 240 | (location == FLOATING_HORIZONTAL || location == TOP_DOCKED || location == BOTTOM_DOCKED); |
| 241 | |
| 242 | WXAppBar::EDocking oldDocking= m_pWindow->GetDockingMode(); |
| 243 | |
| 244 | if (design == CClickWindowController::NORMAL) { |
| 245 | if (isHorizontal) |
| 246 | m_pWindow= m_pWindowBitmap; |
| 247 | else |
| 248 | m_pWindow= m_pWindowBitmapVertical; |
| 249 | } |
| 250 | else { |
| 251 | if (isHorizontal) |
| 252 | m_pWindow= m_pWindowText; |
| 253 | else |
| 254 | m_pWindow= m_pWindowTextVertical; |
| 255 | } |
| 256 | |
| 257 | // FIXME: implement this using the observer pattern |
| 258 | m_pViacamController->GetMainWindow()->Connect |
| 259 | (ID_WVIACAM, wxEVT_SHOW, wxShowEventHandler(CClickWindow::OnMainWindowShow), NULL, m_pWindow); |
| 260 | |
| 261 | m_pWindow->SetDockingMode(oldDocking); |
| 262 | SetAutohide(isAutohide); |
| 263 | } |
| 264 | |
| 265 | void CClickWindowController::SetDesign(CClickWindowController::EDesign design) |
| 266 | { |
nothing calls this directly
no test coverage detected