UINT CIVAnimatorView::GetViewerViewMode(void) { UINT r_stat = 0; if (IsDocLoaded()) { r_stat = (IvfIsViewing())? ID_VIEW_VIEWINGMODE : ID_VIEW_SELECTIONMODE; } return(r_stat); }
void CIVAnimatorView::OnUpdateViewPicedit (CCmdUI* pCmdUI) { if (IsDocLoaded()) { pCmdUI->Enable(TRUE); pCmdUI->SetCheck(GetViewerViewMode() == ID_VIEW_VIEWINGMODE); } else { pCmdUI->Enable(FALSE); pCmdUI->SetCheck(FALSE); } }
// Notify both display model and double-buffer (if they exist) // about a potential change of available canvas size void WindowInfo::UpdateCanvasSize() { RectI rc = ClientRect(hwndCanvas); if (canvasRc == rc) return; canvasRc = rc; // create a new output buffer and notify the model // about the change of the canvas size delete buffer; buffer = new DoubleBuffer(hwndCanvas, canvasRc); if (IsDocLoaded()) { // the display model needs to know the full size (including scroll bars) ctrl->SetViewPortSize(GetViewPortSize()); } // keep the notifications visible (only needed for right-to-left layouts) if (IsUIRightToLeft()) notifications->Relayout(); }