JBoolean JDirInfo::Update ( const JBoolean force ) { ACE_stat info; if (force || ACE_OS::lstat(*itsCWD, &info) != 0 || ACE_OS::stat(*itsCWD, &info) != 0 || itsModTime != (time_t) info.st_mtime) { ForceUpdate(); return kJTrue; } else if (itsStatusTime != (time_t) info.st_ctime && JDirectoryReadable(*itsCWD)) { itsStatusTime = info.st_ctime; itsIsWritableFlag = JDirectoryWritable(*itsCWD); Broadcast(PermissionsChanged()); return kJTrue; } else if (itsStatusTime != (time_t) info.st_ctime) { ForceUpdate(); return kJTrue; } else { return kJFalse; } }
bool BL_ShapeDeformer::ExecuteShapeDrivers(void) { if (!m_shapeDrivers.empty() && PoseUpdated()) { vector<IpoCurve*>::iterator it; // void *poin; // int type; // the shape drivers use the bone matrix as input. Must // update the matrix now m_armobj->ApplyPose(); for (it=m_shapeDrivers.begin(); it!=m_shapeDrivers.end(); it++) { // no need to set a specific time: this curve has a driver // XXX IpoCurve *icu = *it; //calc_icu(icu, 1.0f); //poin = get_ipo_poin((ID*)m_bmesh->key, icu, &type); //if (poin) // write_ipo_poin(poin, type, icu->curval); } ForceUpdate(); m_armobj->RestorePose(); m_bDynamic = true; return true; } return false; }
void CUIListBox::MoveSelectedUp() { CUIWindow* w = GetSelected(); if(!w) return; //. R_ASSERT(!m_flags.test(CUIScrollView::eMultiSelect)); WINDOW_LIST::reverse_iterator it = m_pad->GetChildWndList().rbegin(); WINDOW_LIST::reverse_iterator it_e = m_pad->GetChildWndList().rend(); WINDOW_LIST::reverse_iterator it_prev = it; for(; it!=it_e; ++it) { if(*it==w) { it_prev = it; ++it_prev; if(it_prev==it_e) break; std::swap (*it, *it_prev); ForceUpdate (); break; } } }
void MY_UI::Controls::Tab_Control::Update(){ if(!Internal_Widget.Needs_Update) return; auto parent = Internal_Widget.Parent; if(Internal_Widget.Alignment == FILL){ if(parent != 0 ){ Utilities::Rect r = parent->GetClientBounds(); SetSize(r.width, r.height); } } ForceUpdate();// force all the children to update themselves }
void JDirInfo::ResetCSFFilters() { JBoolean apply = kJFalse, rebuild = kJFalse; if (!itsShowFilesFlag) { itsShowFilesFlag = kJTrue; apply = kJTrue; } if (!itsShowDirsFlag) { itsShowDirsFlag = kJTrue; apply = kJTrue; } // if (itsShowHiddenFlag) // { // itsShowHiddenFlag = kJFalse; // apply = kJTrue; // } if (!itsShowVCSDirsFlag) { itsShowVCSDirsFlag = kJTrue; apply = kJTrue; } if (itsShowOthersFlag) { itsShowOthersFlag = kJFalse; apply = kJTrue; } if (itsPermFilter != NULL) { itsPermFilter = NULL; apply = kJTrue; } if (itsContentRegex != NULL) { delete itsContentRegex; itsContentRegex = NULL; rebuild = kJTrue; } if (rebuild) { ForceUpdate(); Broadcast(SettingsChanged()); } else if (apply) { ApplyFilters(kJTrue); Broadcast(SettingsChanged()); } }
void B9SupportStructure::Rotate(QVector3D deltaRot) { RotateVector(topPoint, deltaRot.z(), QVector3D(0,0,1)); RotateVector(bottomPoint, deltaRot.z(), QVector3D(0,0,1)); RotateVector(topNormal, deltaRot.z(), QVector3D(0,0,1)); RotateVector(bottomNormal, deltaRot.z(), QVector3D(0,0,1)); ForceUpdate(); }
void JDirInfo::ClearContentFilter() { if (itsContentRegex != NULL) { delete itsContentRegex; itsContentRegex = NULL; ForceUpdate(); Broadcast(SettingsChanged()); } }
CUIStatic* CUIGameLog::AddLogMessage(LPCSTR msg) { CUIStatic* pItem = NULL; ADD_TEXT_TO_VIEW3 (msg, pItem, this); pItem->SetTextComplexMode (true); pItem->SetFont (GetFont()); pItem->SetTextColor (txt_color); pItem->SetClrAnimDelay (5000.0f); pItem->SetClrLightAnim (CHAT_LOG_ITEMS_ANIMATION, false, true, true, true); ForceUpdate (); return pItem; }
void CSyncGameInfoView::OnForceupdate() { if(MessageBox("确定要强制修复所选中的游戏吗?","提示:", MB_OKCANCEL) == IDCANCEL) return ; POSITION pos = GetListCtrl().GetFirstSelectedItemPosition(); while (pos) { int nItem = GetListCtrl().GetNextSelectedItem(pos); CString strgid = GetListCtrl().GetItemText(nItem,0); ForceUpdate(atol(strgid)); } }
void B9SupportStructure::SetTopNormal(QVector3D normalVector) { normalVector.normalize(); topNormal = normalVector; //Quick filter for perfectly vertical serfaces //we need the angle factor to have some usefullness if(fabs(topNormal.z()) < 0.05) { topNormal.setZ(0.05); topNormal.normalize(); } ForceUpdate(); }
bool BL_ShapeDeformer::ExecuteShapeDrivers(void) { if (m_useShapeDrivers && PoseUpdated()) { // the shape drivers use the bone matrix as input. Must // update the matrix now m_armobj->ApplyPose(); // We don't need an actual time, just use 0 BKE_animsys_evaluate_animdata(NULL, &GetKey()->id, GetKey()->adt, 0.f, ADT_RECALC_DRIVERS); ForceUpdate(); m_armobj->RestorePose(); m_bDynamic = true; return true; } return false; }
JError JDirInfo::SetContentFilter ( const JCharacter* regexStr ) { if (itsContentRegex != NULL && regexStr == itsContentRegex->GetPattern()) { return JNoError(); } JBoolean hadFilter = kJTrue; JString prevPattern; if (itsContentRegex == NULL) { hadFilter = kJFalse; itsContentRegex = new JRegex; assert( itsContentRegex != NULL ); itsContentRegex->SetSingleLine(); } else { prevPattern = itsContentRegex->GetPattern(); } JError err = itsContentRegex->SetPattern(regexStr); if (err.OK()) { ForceUpdate(); Broadcast(SettingsChanged()); } else if (hadFilter) { err = itsContentRegex->SetPattern(prevPattern); assert_ok( err ); } else { delete itsContentRegex; itsContentRegex = NULL; } return err; }
void CUIListBox::MoveSelectedDown() { CUIWindow* w = GetSelected(); if(!w) return; //. R_ASSERT(!m_flags.test(CUIScrollView::eMultiSelect)); WINDOW_LIST_it it = m_pad->GetChildWndList().begin(); WINDOW_LIST_it it_e = m_pad->GetChildWndList().end(); WINDOW_LIST_it it_next; for(; it!=it_e; ++it) { if(*it==w){ it_next = it; ++it_next; if(it_next==it_e) break; std::swap (*it, *it_next); ForceUpdate (); break; } } }
//Public //////////////////////////////////////////////////////// B9SupportStructure::B9SupportStructure(B9ModelInstance *parent) { instanceParent = parent; isSelected = false; isGrounded = false; isVisible = true; isErrorGlowing = false; topAttachShape = NULL; midAttachShape = NULL; bottomAttachShape = NULL; //these are "very loose defaults" topRadius = 0.5; midRadius = 0.5; bottomRadius = 2.0; bottomPoint = QVector3D(0,0,0); topPoint = QVector3D(0,0,1); topLength = 1.0; bottomLength = 0.5; topPenetration = 0.4; bottomPenetration = 0.4; topNormal = QVector3D(0,0,1.0); bottomNormal = QVector3D(0,0,-1.0); topAngleFactor = 0.20; bottomAngleFactor = 0.20; SetTopAttachShape("Cone 25%"); SetMidAttachShape("Cylinder"); SetBottomAttachShape("Cylinder"); ForceUpdate(); }
void JDirInfo::CopySettings ( const JDirInfo& source ) { const JBoolean rebuild = JNegate( itsContentRegex != NULL && source.itsContentRegex != NULL && itsContentRegex->GetPattern() == (source.itsContentRegex)->GetPattern()); PrivateCopySettings(source); if (rebuild) { ForceUpdate(); } else { itsDirEntries->Sort(); ApplyFilters(kJTrue); } Broadcast(SettingsChanged()); }
void B9SupportStructure::SetTopPenetration(double pen) { topPenetration = pen; ForceUpdate(); }
void B9SupportStructure::SetTopRadius(double rad) { topRadius = rad; ForceUpdate(); }
void ForceUpdate(Fields nf, Fields of, SqlId key, const Value& keyval, Sql& cursor) { ForceUpdate(SqlId(), nf, of, key, keyval, cursor); }
void B9SupportStructure::SetTopLength(double len) { topLength = len; ForceUpdate(); }
void B9SupportStructure::SetBottomRadius(double rad) { bottomRadius = rad; ForceUpdate(); }
void B9SupportStructure::SetMidRadius(double rad) { midRadius = rad; ForceUpdate(); }
void B9SupportStructure::SetIsGrounded(bool grnd){ isGrounded = grnd; ForceUpdate(); }
void B9SupportStructure::SetBottomPoint(QVector3D cord) { bottomPoint = cord; ForceUpdate(); }
void B9SupportStructure::SetBottomLength(double len) { bottomLength = len; ForceUpdate(); }
void B9SupportStructure::SetTopPoint(QVector3D cord) { topPoint = cord; ForceUpdate(); }
void B9SupportStructure::SetBottomNormal(QVector3D normalVector) { normalVector.normalize(); bottomNormal = normalVector; ForceUpdate(); }
//--------------------------------------------------------------------------- void __fastcall TRightsFrame::RightsActionsExecute(TBasicAction * Action, bool & Handled) { // prevent shortcuts to be avaluated when frame does not have a focus if (HasFocus()) { bool Changed = true; TRights R = Rights; R.Number = TRights::rfNo; Handled = true; if (Action == NoRightsAction) { R = TRights::rfNo; } else if (Action == DefaultRightsAction) { R = TRights::rfDefault; } else if (Action == AllRightsAction) { R = TRights::rfAll; } else if (Action == LeaveRightsAsIsAction) { R.AllUndef(); } else if (Action == CopyTextAction) { TInstantOperationVisualizer Visualizer; CopyToClipboard(Text); Changed = false; } else if (Action == CopyOctalAction) { TRights R = Rights; assert(!R.IsUndef); if (!R.IsUndef) { TInstantOperationVisualizer Visualizer; CopyToClipboard(R.Octal); } Changed = false; } else if (Action == PasteAction) { UnicodeString S; if (TextFromClipboard(S, true)) { Text = S; } // trigger on change event, even if no change actually occurred to // allow parent form to visualize feedback of an action DoChange(); Changed = false; } else { Handled = false; } if (Changed) { Rights = R; ForceUpdate(); DoChange(); } } }
void B9SupportStructure::SetTopAngleFactor(double factor) { topAngleFactor = factor; ForceUpdate(); }
void B9SupportStructure::SetBottomAngleFactor(double factor) { bottomAngleFactor = factor; ForceUpdate(); }
void B9SupportStructure::SetBottomPenetration(double pen) { bottomPenetration = pen; ForceUpdate(); }