void CEditView_Paint::Call_OnPaint( int nPaintFlag, //!< 描画する領域を選択する bool bUseMemoryDC //!< メモリDCを使用する ) { CEditView* pView = GetEditView(); //各要素 CMyRect rcLineNumber(0,pView->GetTextArea().GetAreaTop(),pView->GetTextArea().GetAreaLeft(),pView->GetTextArea().GetAreaBottom()); CMyRect rcRuler(pView->GetTextArea().GetAreaLeft(),0,pView->GetTextArea().GetAreaRight(),pView->GetTextArea().GetAreaTop()); CMyRect rcBody(pView->GetTextArea().GetAreaLeft(),pView->GetTextArea().GetAreaTop(),pView->GetTextArea().GetAreaRight(),pView->GetTextArea().GetAreaBottom()); //領域を作成 -> rc std::vector<CMyRect> rcs; if(nPaintFlag & PAINT_LINENUMBER)rcs.push_back(rcLineNumber); if(nPaintFlag & PAINT_RULER)rcs.push_back(rcRuler); if(nPaintFlag & PAINT_BODY)rcs.push_back(rcBody); if(rcs.size()==0)return; CMyRect rc=rcs[0]; int nSize = (int)rcs.size(); for(int i=1;i<nSize;i++) rc=MergeRect(rc,rcs[i]); //描画 PAINTSTRUCT ps; ps.rcPaint = rc; HDC hdc = pView->GetDC(); pView->OnPaint( hdc, &ps, bUseMemoryDC ); pView->ReleaseDC( hdc ); }
void CSTEditorDoc::RecreateToolTip() { CSTEditorView* pView = GetEditView(); ASSERT(pView); if(pView) { pView->RecreateToolTip(); } }
/** * get selected text. * * @param - * @return selected text * @exception - * @see */ CString CSTEditorDoc::GetSelectedText() { CString strText; CSTEditorView* pView = GetEditView(); if(pView) { strText = pView->GetSelection(); } return strText; }
void CSTEditorDoc::OnSerializeDocument (CArchive &ar) { CSTEditorView *pView; pView = GetEditView (); ASSERT (pView != NULL); if (pView == NULL) { return; }; pView->SerializeText (ar); m_Edit.SetModified (FALSE); if (!ar.IsStoring ()) { m_Edit.FreeUndoBuffers (); }; }