void __fastcall TVersionInfo::DoChanged(void) { TCMVersionInfoComponent NotificationMessage = { }; NotificationMessage.Msg = CM_VERSIONINFOCHANGE; NotificationMessage.Component = this; //Changed Roy: for (int i = 0; i < FUiElements->Count; ++i) { TObject* AnUiElement; // Trick: Since in our UI elements the message map as implemented // through the overridden Dispatch method is not public, // we down-cast to a descendant (TObject) where Dispatch is // public and then call Dispatch. // This technique works because Dispatch is virtual. AnUiElement = static_cast<TObject*>(FUiElements->Items[i]); assert(AnUiElement != NULL); AnUiElement->Dispatch(&NotificationMessage); } if (FOnChange != NULL) { FOnChange(this); } }
//--------------------------------------------------------------------------- void __fastcall TQueueController::DoChange() { if (FOnChange != NULL) { FOnChange(NULL); } }
//--------------------------------------------------------------------------- void __fastcall TRightsFrame::DoChange() { if (FOnChange) { FOnChange(this); } }
void TStringList::Changed() { if (GetUpdateCount() == 0 && FOnChange) { FOnChange(this); } }
//--------------------------------------------------------------------------- void __fastcall TCDirectoryOutline::Change() { if (FOnChange) FOnChange(this); }