MCPcopy Create free account
hub / github.com/cmauri/eviacam / SelectAppropriateWindow

Method SelectAppropriateWindow

src/clickwindowcontroller.cpp:236–263  ·  view source on GitHub ↗

Select appropriate window taking into account design and location

Source from the content-addressed store, hash-verified

234
235// Select appropriate window taking into account design and location
236void 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
265void CClickWindowController::SetDesign(CClickWindowController::EDesign design)
266{

Callers

nothing calls this directly

Calls 3

GetDockingModeMethod · 0.80
GetMainWindowMethod · 0.80
SetDockingModeMethod · 0.80

Tested by

no test coverage detected