Symbian源代码还原之二——void CCoeControl::DrawNow(void) const

    以下是s60 3rd的void CCoeControl::DrawNow(void) const逆向还原,如有错误之处,敬请批评指正:)

void CCoeControl::DrawNow(void) const {
 TRect rect = Rect();
 DrawNow(rect); } void CCoeControl::DrawNow(class TRect const & aRect) const { if (EFalse == IsReadyToDraw()) { return; }
 TBool isBackup = IsBackedUp(); if (EFalse == isBackup) {
  Window()->Invalidate(aRect);
  Window()->BeginRedraw(aRect); } const CCoeControl* parentCtrl = SearchParent(this); if (parentCtrl) { if (EFalse == parentCtrl->OwnsWindow()) {
   User::Invariant(); }
  parentCtrl->ActivateGc();
  MCoeControlBackground ctrlBackgroud = parentCtrl->FindBackground(); if (ctrlBackgroud) {
   CWindowGc& gc = SystemGc();
   ctrlBackgroud->Draw(gc, parentCtrl, aRect); }
  parentCtrl->Draw(aRect);
  parentCtrl->DrawComponents(aRect); 
  parentCtrl->DeactivateGc(); if (EFalse == isBackup) {
   Window()->EndRedraw(); }
  parentCtrl->DrawWindowOwningComponentsNow(aRect); } else {
  ActivateGc();
  Draw(aRect);
  DrawComponents(aRect);
  DeactivateGc(); if (EFalse == isBackup) {
   Window()->EndRedraw(); }
  DrawWindowOwningComponentsNow(aRect); } }



本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/sapair/archive/2009/08/24/4477034.aspx

你可能感兴趣的:(Symbian源代码还原之二——void CCoeControl::DrawNow(void) const)