void SnowModel::UseSnowShader(bool use_shader) { if ( use_shader == true ) { // check if hardware is capable of using // shaders and other required stuff if ( glActiveTexture == NULL || ! ( m_snow_shader->IsSupportByHardware() ) ) throw Exceptions::NotSupportedException("Shaders are not supported on this hardware.\nHence they will not be activated."); } // asign new value m_use_snow_shader = use_shader; // flag property change OnPropertyChanged(); }
void wxsPropertyContainer::NotifyPropertyChange(bool CallPropertyChangeHandler) { if ( BlockChangeCallback ) return; BlockChangeCallback = true; if ( CurrentQP ) { CurrentQP->Update(); } if ( wxsPGRID() ) { wxsPGRID()->Update(this); } if ( CallPropertyChangeHandler ) { OnPropertyChanged(); } BlockChangeCallback = false; }
int VTiSIMScanner::DoStartStopScan(bool shouldScan) { float newActualRate = 0.0f; if (shouldScan) { DWORD err = vti_StartScan(VTiHub()->GetScanAndMotorHandle(), scanRate_, scanWidth_, scanOffset_); if (err != VTI_SUCCESS) return err; err = vti_GetActualScanRate(VTiHub()->GetScanAndMotorHandle(), &newActualRate); if (err != VTI_SUCCESS) return err; } else { DWORD err = vti_StopScan(VTiHub()->GetScanAndMotorHandle()); if (err != VTI_SUCCESS) return err; newActualRate = 0.0f; } if (newActualRate != actualRate_) { actualRate_ = newActualRate; char s[MM::MaxStrLength + 1]; snprintf(s, MM::MaxStrLength, "%f", static_cast<double>(actualRate_)); int mmerr = OnPropertyChanged(g_PropName_ActualRate, s); if (mmerr != DEVICE_OK) return mmerr; } return DEVICE_OK; }
int VTiSIMScanner::DoSetScanWidth(int width) { if (width < minWidth_) width = minWidth_; if (width > maxWidth_) width = maxWidth_; scanWidth_ = width; // Update offset range (and value, if necessary) int newMaxOffset = GetMaxOffset(); if (scanOffset_ > newMaxOffset) { scanOffset_ = newMaxOffset; } int err = SetPropertyLimits(g_PropName_ScanOffset, 0, newMaxOffset); char s[MM::MaxStrLength + 1]; snprintf(s, MM::MaxStrLength, "%d", scanOffset_); err = OnPropertyChanged(g_PropName_ScanOffset, s); if (err != DEVICE_OK) return err; bool scanning; err = DoGetScanning(scanning); if (err != DEVICE_OK) return err; if (scanning) { err = DoStartStopScan(true); if (err != DEVICE_OK) return err; } return DEVICE_OK; }
void SnowModel::SnowTriangulationShaded(bool shaded) { for (std::vector<EdgeGroup*>::iterator it = edge_groups.begin(); it != edge_groups.end(); ++it) { (*it)->TriangulationShaded(shaded); } OnPropertyChanged(); }
void SnowModel::EdgeGoupFacesVisible(bool visible) { for (std::vector<EdgeGroup*>::iterator it = edge_groups.begin(); it != edge_groups.end(); ++it) { (*it)->EdgeGroupFacesVisible(visible); } OnPropertyChanged(); }
void FSequencerObjectChangeListener::KeyProperty( const TArray<UObject*>& ObjectsToKey, const class IPropertyHandle& PropertyHandle ) const { const bool bRequireAutoKey = false; OnPropertyChanged( ObjectsToKey, PropertyHandle, bRequireAutoKey ); }
void CXTPMarkupInputElement::FireTriggers(CXTPMarkupDependencyProperty* pProperty, CXTPMarkupObject* pNewValue) { BOOL bChanged = FALSE; int i; CMap<CXTPMarkupDependencyProperty*, CXTPMarkupDependencyProperty*, CXTPMarkupObject*, CXTPMarkupObject*> mapOldValues; if (m_pActiveTriggers) { for (i = m_pActiveTriggers->GetCount() - 1; i >= 0; i--) { CXTPMarkupTrigger* pTrigger = m_pActiveTriggers->GetItem(i); if (pTrigger->GetTriggerProperty() == pProperty) { if (!pTrigger->GetTriggerValue()->IsEqual(pNewValue)) { CXTPMarkupSetterColection* pSetters = pTrigger->GetSetters(); for (int j = 0; j < pSetters->GetCount(); j++) { CXTPMarkupSetter* pSetter = pSetters->GetItem(j); CXTPMarkupDependencyProperty* pSetterProperty = pSetter->GetSetterProperty(); CXTPMarkupObject* pOldValue = m_pTriggerProperties->Lookup(pSetterProperty); CXTPMarkupObject* pTempValue; if (!mapOldValues.Lookup(pSetterProperty, pTempValue)) { MARKUP_ADDREF(pOldValue); mapOldValues.SetAt(pSetterProperty, pOldValue); } m_pTriggerProperties->Set(pSetterProperty, NULL); } m_pActiveTriggers->Remove(i); bChanged = TRUE; } } } } if (m_pStyleCache) { bChanged = AddStyleTriggers(m_pStyleCache, pProperty, pNewValue) || bChanged; } else if (GetType()->GetTypeStyle()) { bChanged = AddStyleTriggers(GetType()->GetTypeStyle(), pProperty, pNewValue) || bChanged; } if (bChanged) { if (!m_pTriggerProperties) m_pTriggerProperties = new CXTPMarkupProperties(NULL); for (i = 0; i < m_pActiveTriggers->GetCount(); i++) { CXTPMarkupTrigger* pTrigger = m_pActiveTriggers->GetItem(i); CXTPMarkupSetterColection* pSetters = pTrigger->GetSetters(); for (int j = 0; j < pSetters->GetCount(); j++) { CXTPMarkupSetter* pSetter = pSetters->GetItem(j); CXTPMarkupObject* pValue = pSetter->GetSetterValue(); CXTPMarkupDependencyProperty* pSetterProperty = pSetter->GetSetterProperty(); CXTPMarkupObject* pOldValue = m_pTriggerProperties->Lookup(pSetterProperty); if (!pValue->IsEqual(pOldValue)) { CXTPMarkupObject* pTempValue; if (!mapOldValues.Lookup(pSetterProperty, pTempValue)) { MARKUP_ADDREF(pOldValue); mapOldValues.SetAt(pSetterProperty, pOldValue); } pValue->AddRef(); m_pTriggerProperties->Set(pSetterProperty, pValue); } } } } POSITION pos = mapOldValues.GetStartPosition(); while (pos) { CXTPMarkupDependencyProperty* pProperty; CXTPMarkupObject* pOldValue; mapOldValues.GetNextAssoc(pos, pProperty, pOldValue); CXTPMarkupObject* pNewValue = m_pTriggerProperties->Lookup(pProperty); if (!::IsEqual(pNewValue, pOldValue)) { OnPropertyChanged(pProperty, pOldValue, pNewValue); if (pProperty->GetFlags() & CXTPMarkupPropertyMetadata::flagInherited) { RecursePropertyChanged(pProperty, pOldValue, pNewValue); } } MARKUP_RELEASE(pOldValue); } }
void CXTPTabPaintManager::DisableLunaColors(BOOL bDisableLunaColors) { m_bDisableLunaColors = bDisableLunaColors; RefreshMetrics(); OnPropertyChanged(); }
void CXTPTabPaintManager::SetLayout(XTPTabLayoutStyle tabLayout) { m_tabLayout = tabLayout; OnPropertyChanged(); }
void CXTPTabPaintManager::SetPosition(XTPTabPosition tabPosition) { m_tabPosition = tabPosition; OnPropertyChanged(); }