FX_BOOL CXFA_FFDocView::RunLayout() { LockUpdate(); m_bInLayoutStatus = TRUE; if (!m_pXFADocLayout->IncrementLayout() && m_pXFADocLayout->StartLayout() < 100) { m_pXFADocLayout->DoLayout(); UnlockUpdate(); m_bInLayoutStatus = FALSE; return TRUE; } m_bInLayoutStatus = FALSE; UnlockUpdate(); return FALSE; }
void CXFA_FFDocView::UpdateDocView() { if (IsUpdateLocked()) { return; } LockUpdate(); int32_t iNewAdds = m_NewAddedNodes.GetSize(); for (int32_t i = 0; i < iNewAdds; i++) { CXFA_Node* pNode = reinterpret_cast<CXFA_Node*>(m_NewAddedNodes[i]); InitCalculate(pNode); InitValidate(pNode); ExecEventActivityByDeepFirst(pNode, XFA_EVENT_Ready, TRUE); } m_NewAddedNodes.RemoveAll(); this->RunSubformIndexChange(); this->RunCalculateWidgets(); this->RunValidate(); ShowNullTestMsg(); if (RunLayout() && m_bLayoutEvent) { RunEventLayoutReady(); } m_bLayoutEvent = FALSE; m_CalculateAccs.RemoveAll(); this->RunInvalidate(); UnlockUpdate(); }
FX_BOOL CXFA_FFDocView::RunLayout() { LockUpdate(); m_bInLayoutStatus = TRUE; if (!m_pXFADocLayout->IncrementLayout() && m_pXFADocLayout->StartLayout() < 100) { m_pXFADocLayout->DoLayout(); UnlockUpdate(); m_bInLayoutStatus = FALSE; m_pDoc->GetDocEnvironment()->PageViewEvent(nullptr, XFA_PAGEVIEWEVENT_StopLayout); return TRUE; } m_bInLayoutStatus = FALSE; m_pDoc->GetDocEnvironment()->PageViewEvent(nullptr, XFA_PAGEVIEWEVENT_StopLayout); UnlockUpdate(); return FALSE; }
void SSplitWnd::OnMouseMove( UINT nFlags,CPoint pt ) { if(-1==m_iDragBeam) return; LockUpdate(); CRect rcPane1,rcPane2; int nNextPanel = GetNextVisiblePanel(m_iDragBeam); if (nNextPanel == -1) return; m_arrPane[m_iDragBeam]->GetWindowRect(&rcPane1); m_arrPane[nNextPanel]->GetWindowRect(&rcPane2); CPoint ptMove=pt-m_ptClick; if(m_bColMode) { rcPane1.right+=ptMove.x; rcPane2.left+=ptMove.x; if(ptMove.x<0) { //decrease left pane int iTest=rcPane1.Width()-m_arrPane[m_iDragBeam]->m_nSizeMin; if(iTest<0) { rcPane1.right-=iTest; rcPane2.left-=iTest; } } else { //decrease right pane int iTest=rcPane2.Width()-m_arrPane[m_iDragBeam+1]->m_nSizeMin; if(iTest<0) { rcPane1.right+=iTest; rcPane2.left+=iTest; } } } else { rcPane1.bottom+=ptMove.y; rcPane2.top+=ptMove.y; if(ptMove.y<0) { //decrease top pane int iTest=rcPane1.Height()-m_arrPane[m_iDragBeam]->m_nSizeMin; if(iTest<0) { rcPane1.bottom-=iTest; rcPane2.top-=iTest; } } else { //decrease bottom pane int iTest=rcPane2.Height()-m_arrPane[m_iDragBeam+1]->m_nSizeMin; if(iTest<0) { rcPane1.bottom+=iTest; rcPane2.top+=iTest; } } } m_arrPane[m_iDragBeam]->Move(rcPane1); m_arrPane[m_iDragBeam+1]->Move(rcPane2); if(m_arrPane[m_iDragBeam]->m_nPriority<=m_arrPane[m_iDragBeam+1]->m_nPriority) { m_arrPane[m_iDragBeam]->m_nSizeIdeal=m_bColMode?rcPane1.Width():rcPane1.Height(); } else { m_arrPane[m_iDragBeam+1]->m_nSizeIdeal=m_bColMode?rcPane2.Width():rcPane2.Height(); } UnlockUpdate(); Invalidate(); m_ptClick=pt; }