//----------------------------------------------------------------------------- // Purpose: // Input : *pWnd - //----------------------------------------------------------------------------- void CMySplitterWnd::ToggleMax(CWnd *pWnd) { int ir, ic; if(!pMaxPrev) { int dummy; // save current info GetRowInfo(0, sizePrev[1][0], dummy); GetRowInfo(1, sizePrev[1][1], dummy); GetColumnInfo(0, sizePrev[0][0], dummy); GetColumnInfo(1, sizePrev[0][1], dummy); } if(pWnd != pMaxPrev) { // maximize this one int iRow, iCol; CRect r; GetClientRect(r); VERIFY(IsChildPane(pWnd, &iRow, &iCol)); for(ir = 0; ir < 2; ir++) { for(ic = 0; ic < 2; ic++) { SetRowInfo(ir, 0, 0); SetColumnInfo(ic, 0, 0); } } SetRowInfo(iRow, r.Height(), 5); SetColumnInfo(iCol, r.Width(), 5); pMaxPrev = pWnd; } else { // restore saved info SetRowInfo(0, sizePrev[1][0], 0); SetRowInfo(1, sizePrev[1][1], 0); SetColumnInfo(0, sizePrev[0][0], 0); SetColumnInfo(1, sizePrev[0][1], 0); pMaxPrev = NULL; } RecalcLayout(); }
void CTabSplitterWnd::Apply() { if (m_nRows > 1) { SetRowInfo(0,m_cyCur,m_cyMin); RecalcLayout(); } else if (m_nCols > 1) { SetColumnInfo(0,m_cxCur,m_cxMin); RecalcLayout(); } else TRACE0("Applying splitter bar before creating it!\n"); }
void CInvertSplit::OnSize(UINT nType, int cx, int cy) { CSplitterWnd::OnSize(nType, cx, cy); if ( ! m_bInited ) return; int ideal, Up, Down; GetRowInfo(0, Up, ideal); GetRowInfo(1, Down, ideal); Up = m_nUpSize*(Up+Down)/(m_nDownSize+m_nUpSize); SetRowInfo(0, Up, 10); RecalcLayout(); }