Exemplo n.º 1
0
//=================================================================================================
void FlowContainer::SetItems(vector<FlowItem*>& _items)
{
	Clear();
	items = std::move(_items);
	Reposition();
	ResetScrollbar();
}
Exemplo n.º 2
0
void CTabBarClass::OnShowButtonsChanged()
{
	mp_Rebar->ShowToolsPane(gpSet->isMultiShowButtons);
	mp_Rebar->ShowSearchPane(gpSet->isMultiShowSearch);

	Reposition();
}
Exemplo n.º 3
0
// 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;
}
Exemplo n.º 4
0
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;
}
Exemplo n.º 5
0
// 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;
}
Exemplo n.º 6
0
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();
}
Exemplo n.º 7
0
void CTSKTabManagerItem::SetCaption(LPCTSTR lpszCaption)
{
	if (m_strCaption != lpszCaption)
	{
		m_strCaption = lpszCaption;
		Reposition();
	}
}
Exemplo n.º 8
0
void CXTPTabManager::OnItemsChanged()
{
	for (int i = 0; i < GetItemCount(); i++)
	{
		GetItem(i)->m_nIndex = i;
	}
	Reposition();
}
Exemplo n.º 9
0
void FloatingStatusBar::ShowProgress()
{
  ui->progressBar->show();
  ui->progressBar->setValue(0);
  this->show();
//  m_timer->start();
  Reposition();
}
Exemplo n.º 10
0
void CXTPTabManager::SetActive(BOOL bActive)
{
	if (m_bActive != bActive)
	{
		m_bActive = bActive;
		Reposition();
	}
}
Exemplo n.º 11
0
void CXTPTabManagerItem::SetEnabled(BOOL bEnabled)
{
	if (m_bEnabled != bEnabled)
	{
		m_bEnabled = bEnabled;
		Reposition();
	}
}
Exemplo n.º 12
0
void CXTPTabManagerItem::SetVisible(BOOL bVisible)
{
	if (m_bVisible != bVisible)
	{
		m_bVisible = bVisible;
		Reposition();
	}
}
Exemplo n.º 13
0
void Mixer::SetTimesAndSpeed(double t0, double t1, double speed)
{
   wxASSERT(std::isfinite(speed));
   mT0 = t0;
   mT1 = t1;
   mSpeed = fabs(speed);
   Reposition(t0);
}
Exemplo n.º 14
0
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();
}
Exemplo n.º 15
0
void CTSKTabManager::SetSelectedItem(CTSKTabManagerItem* pItem)
{
	if (m_pSelected != pItem)
	{
		m_pSelected = pItem;
		Reposition();
		//EnsureVisible(pItem);
	}
}
Exemplo n.º 16
0
void R3Plane::
Mirror(const R3Plane& plane)
{
    // Mirror plane ???
    R3Point p = Point();
    p.Mirror(plane);
    v.Mirror(plane);
    Reposition(p);
}
Exemplo n.º 17
0
void R3Plane::
InverseTransform (const R3Transformation& transformation)
{
    // Transform plane ???
    R3Point p = Point();
    p.InverseTransform(transformation);
    transformation.ApplyTranspose(v);
    v.Normalize();
    Reposition(p);
}
Exemplo n.º 18
0
void CXTPTabManager::SetHeaderOffset(int nOffset)
{
	if (nOffset > 0) nOffset = 0;

	if (nOffset != m_nHeaderOffset)
	{
		m_nHeaderOffset = nOffset;
		Reposition();
	}
}
Exemplo n.º 19
0
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);
}
Exemplo n.º 20
0
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;
}
Exemplo n.º 21
0
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();
}
Exemplo n.º 22
0
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;
}
Exemplo n.º 23
0
//=================================================================================================
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;
}
Exemplo n.º 24
0
//-----------------------------------------------------------------------------
//! 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();
}
Exemplo n.º 25
0
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;
            }
        }
Exemplo n.º 27
0
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();
  }
}
Exemplo n.º 28
0
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();
	}
}
Exemplo n.º 29
0
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();
}
Exemplo n.º 30
0
// 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;
}