//================================================================================================= void FlowContainer::SetItems(vector<FlowItem*>& _items) { Clear(); items = std::move(_items); Reposition(); ResetScrollbar(); }
void CTabBarClass::OnShowButtonsChanged() { mp_Rebar->ShowToolsPane(gpSet->isMultiShowButtons); mp_Rebar->ShowSearchPane(gpSet->isMultiShowSearch); Reposition(); }
// closes (undocking it) an XMLToolBar from this frame XMLToolBarFrame &XMLToolBarFrame::Undock(XMLToolBarCtrl &tb) { // if already docked here, just do nothing int i = FindIndex(tb); if(i < 0) return *this; // store inside toolbar last docked position Size &sz = relativePositions[i]; toolBars[i]->toolBarPos= Point(sz.cx, sz.cy); // remove from toolbars and positions list toolBars.Remove(i); toolBarContainer.RemoveChild(&tb); relativePositions.Remove(i); // signals closed toolbar tb.toolBarState = TOOLBAR_CLOSED; tb.toolBarFrame = NULL; // reposition the frame Reposition(); Layout(); // frees toolbar from pointing here return *this; }
XMLToolBarFrame &XMLToolBarFrame::DockAt(XMLToolBarCtrl &tb, Point p) { // should not happen, but.... if(FindIndex(tb) >= 0) return *this; // get dock position int dockLine, col; bool insert; if(!GetDockTarget(tb, p, dockLine, insert, col)) return *this; // if needed, shift all positions to make place for this toolbar line if(insert) { for(int i = 0; i < relativePositions.GetCount(); i++) if(relativePositions[i].cy >= dockLine) relativePositions[i].cy++; } // docks the toolbar there relativePositions.Add(Size(col, dockLine)); toolBars.Add(&tb); toolBarContainer.AddChild(&tb); Reposition(); Layout(); tb.toolBarPos = Point(relativePositions.Top().cx, relativePositions.Top().cy); return *this; }
// pre-docking handling -- Point p in SCREEN COORDINATES XMLToolBarFrame &XMLToolBarFrame::PreDock(XMLToolBarCtrl &tb, Point p) { if(preDocking) return *this; // get dock position int dockLine, col; bool insert; if(!GetDockTarget(tb, p, dockLine, insert, col)) return *this; preDocking = true; // if needed, shift all positions to make place for this toolbar line if(insert) { for(int i = 0; i < relativePositions.GetCount(); i++) if(relativePositions[i].cy >= dockLine) relativePositions[i].cy++; } // docks the toolbar there relativePositions.Add(Size(col, dockLine)); toolBars.Add(&tb); Reposition(); Layout(); return *this; }
void BrowserBubble::SetBounds(int x, int y, int w, int h) { // If the UI layout is RTL, we don't need to mirror coordinates, since // View logic will do that for us. bounds_.SetRect(x, y, w, h); Reposition(); }
void CTSKTabManagerItem::SetCaption(LPCTSTR lpszCaption) { if (m_strCaption != lpszCaption) { m_strCaption = lpszCaption; Reposition(); } }
void CXTPTabManager::OnItemsChanged() { for (int i = 0; i < GetItemCount(); i++) { GetItem(i)->m_nIndex = i; } Reposition(); }
void FloatingStatusBar::ShowProgress() { ui->progressBar->show(); ui->progressBar->setValue(0); this->show(); // m_timer->start(); Reposition(); }
void CXTPTabManager::SetActive(BOOL bActive) { if (m_bActive != bActive) { m_bActive = bActive; Reposition(); } }
void CXTPTabManagerItem::SetEnabled(BOOL bEnabled) { if (m_bEnabled != bEnabled) { m_bEnabled = bEnabled; Reposition(); } }
void CXTPTabManagerItem::SetVisible(BOOL bVisible) { if (m_bVisible != bVisible) { m_bVisible = bVisible; Reposition(); } }
void Mixer::SetTimesAndSpeed(double t0, double t1, double speed) { wxASSERT(std::isfinite(speed)); mT0 = t0; mT1 = t1; mSpeed = fabs(speed); Reposition(t0); }
void CXTPTabManager::SetItemMetrics(CSize szNormal, CSize szMin /*= CSize(0, 0)*/, CSize szMax /*= CSize(0, 0)*/) { CXTPTabPaintManager* pPaintManager = GetPaintManager(); pPaintManager->m_nFixedTabWidth = szNormal.cx; pPaintManager->m_nMinTabWidth = szMin.cx; pPaintManager->m_nMaxTabWidth = szMax.cx; Reposition(); }
void CTSKTabManager::SetSelectedItem(CTSKTabManagerItem* pItem) { if (m_pSelected != pItem) { m_pSelected = pItem; Reposition(); //EnsureVisible(pItem); } }
void R3Plane:: Mirror(const R3Plane& plane) { // Mirror plane ??? R3Point p = Point(); p.Mirror(plane); v.Mirror(plane); Reposition(p); }
void R3Plane:: InverseTransform (const R3Transformation& transformation) { // Transform plane ??? R3Point p = Point(); p.InverseTransform(transformation); transformation.ApplyTranspose(v); v.Normalize(); Reposition(p); }
void CXTPTabManager::SetHeaderOffset(int nOffset) { if (nOffset > 0) nOffset = 0; if (nOffset != m_nHeaderOffset) { m_nHeaderOffset = nOffset; Reposition(); } }
void R2Line:: InverseTransform (const R2Transformation& transformation) { // Inverse Transform line vector.InverseTransform(transformation); vector.Normalize(); normal = R2Vector(vector.Y(), -vector.X()); R2Point p(Point()); p.InverseTransform(transformation); Reposition(p); }
XMLToolBarFrame &XMLToolBarFrame::UnPreDock(XMLToolBarCtrl &tb) { if(!preDocking) return *this; relativePositions.Trim(relativePositions.GetCount() - 1); toolBars.Trim(toolBars.GetCount() - 1); Reposition(); // parent->Refresh(preDockRect); Layout(); preDocking = false; return *this; }
void OSDPretty::set_font(QFont font) { font_ = font; // Update the UI ui_->summary->setFont(font); ui_->message->setFont(font); // Now adjust OSD size so everything fits ui_->verticalLayout->activate(); resize(sizeHint()); // Update the position after font change Reposition(); }
bool TLVReader::Read() { Reposition(); if(_stream.Position < _stream.Length) _reader >> Type; if(_stream.Position < _stream.Length) _reader >> Length; MarkOffset(Length); return _stream.Position < _stream.Length; }
//================================================================================================= void FlowContainer::UpdateSize(const Int2& _pos, const Int2& _size, bool _visible) { global_pos = pos = _pos; if(size.y != _size.y && _visible) { size = _size; Reposition(); } else size = _size; scroll.global_pos = scroll.pos = global_pos + Int2(size.x - 17, 0); scroll.size = Int2(16, size.y); scroll.part = size.y; }
//----------------------------------------------------------------------------- //! Reimplemented to set the transparency mask //----------------------------------------------------------------------------- void tModePopup::resizeEvent( QResizeEvent* pEvent ) { QWidget::resizeEvent( pEvent ); tNOSStyle* pNemStyle = qobject_cast< tNOSStyle* >( style() ); if( pNemStyle ) { QStyleOption option; option.initFrom( this ); QBitmap bitmap = pNemStyle->PopupMask( &option, this ); setMask( bitmap ); } Reposition(); }
void BrowserBubble::BrowserWindowMoved() { if(delegate_) { delegate_->BubbleBrowserWindowMoved(this); } else { Hide(); } if(popup_->IsVisible()) { Reposition(); } }
void OnCreatureCreate(Creature* creature) { switch (creature->GetEntry()) { case NPC_ARTHAS: _arthasGUID = creature->GetGUID(); if (_encounterState == COS_PROGRESS_FINISHED) creature->SetVisible(false); else Reposition(creature); break; case NPC_INFINITE: _infiniteGUID = creature->GetGUID(); break; } }
void OSDPretty::showEvent(QShowEvent* e) { setWindowOpacity(fading_enabled_ ? 0.0 : 1.0); QWidget::showEvent(e); Reposition(); if (fading_enabled_) { fader_->setDirection(QTimeLine::Forward); fader_->start(); // Timeout will be started in FaderFinished } else if (mode_ == Mode_Popup) { if (!disable_duration()) timeout_->start(); // Ensures it is above when showing the preview raise(); } }
void CXTPTabManagerItem::SetCaption(LPCTSTR lpszCaption) { CString strCaption(lpszCaption); if (m_strCaption != strCaption) { m_strCaption = strCaption; XTPMarkupReleaseElement(m_pMarkupUIElement); if (m_pTabManager && m_pTabManager->GetMarkupContext()) { m_pMarkupUIElement = XTPMarkupParseText(m_pTabManager->GetMarkupContext(), lpszCaption); } Reposition(); } }
void OSDPretty::SetMessage(const QString& summary, const QString& message, const QImage& image) { if (!image.isNull()) { QImage scaled_image = image.scaled(kMaxIconSize, kMaxIconSize, Qt::KeepAspectRatio, Qt::SmoothTransformation); ui_->icon->setPixmap(QPixmap::fromImage(scaled_image)); ui_->icon->show(); } else { ui_->icon->hide(); } ui_->summary->setText(summary); ui_->message->setText(message); if (isVisible()) Reposition(); }
// docks a toolbar into this frame // internal function -- called by XMLToolBar one XMLToolBarFrame &XMLToolBarFrame::Dock(XMLToolBarCtrl &tb, Point p) { // if already docked here, just do nothing if(FindIndex(tb) >= 0) return *this; // undocks/unfloats from previous position asking owning frame, if any, to do it if(tb.toolBarFrame) tb.toolBarFrame->Undock(tb); // dock here the frame toolBars.Add(&tb); toolBarContainer.AddChild(&tb); relativePositions.Add(p); Reposition(); Layout(); tb.toolBarPos = Point(relativePositions.Top().cx, relativePositions.Top().cy); return *this; }