Ejemplo n.º 1
0
void VideoDisplay::SetZoom(double value) {
	zoomValue = std::max(value, .125);
	size_t selIndex = zoomValue / .125 - 1;
	if (selIndex < zoomBox->GetCount())
		zoomBox->SetSelection(selIndex);
	zoomBox->ChangeValue(wxString::Format("%g%%", zoomValue * 100.));
	UpdateSize();
}
Ejemplo n.º 2
0
	void MultilineLabel::AddLine(const char *szLine, CStdFont *pFont, DWORD dwClr, bool fDoUpdate, bool fMakeReadableOnBlack, CStdFont *pCaptionFont)
	{
		// make color readable
		if (fMakeReadableOnBlack) MakeColorReadableOnBlack(dwClr);
		// forward to line buffer
		if (szLine) Lines.AppendLines(szLine, pFont, dwClr, pCaptionFont);
		// adjust height
		if (fDoUpdate) UpdateSize();
	}
Ejemplo n.º 3
0
	void I2NPMessage::FillI2NPMessageHeader (I2NPMessageType msgType, uint32_t replyMsgID)
	{
		SetTypeID (msgType);
		if (!replyMsgID) RAND_bytes ((uint8_t *)&replyMsgID, 4);
		SetMsgID (replyMsgID); 
		SetExpiration (i2p::util::GetMillisecondsSinceEpoch () + I2NP_MESSAGE_EXPIRATION_TIMEOUT); 
		UpdateSize ();
		UpdateChks ();
	}		
ResizeImageDialog::ResizeImageDialog(const QSize &original_size, QWidget *parent)
    : QDialog(parent),
      ui(new Ui::Resize_Image_Dialog) {
  ui->setupUi(this);
  ui->width_spinBox->setValue(original_size.width());
  ui->height_spinBox->setValue(original_size.height());

  QObject::connect(this, SIGNAL(accepted()), this, SLOT(UpdateSize()));
}
Ejemplo n.º 5
0
CAStarData::CAStarData(uint32 nWidth, uint32 nHeight, uint32 nAllNodeNum)
	:m_pNodeArray(NULL)
	,m_nSearchId(0)
	,m_nWidth(0)
	,m_nHeight(0)
	,m_nAllNodeNum(0)
{
	UpdateSize(nWidth, nHeight, nAllNodeNum);
}
Ejemplo n.º 6
0
void VideoDisplay::SetZoom(double value) {
	if (value == 0) return;
	zoomValue = std::max(value, .125);
	size_t selIndex = zoomValue / .125 - 1;
	if (selIndex < zoomBox->GetCount())
		zoomBox->SetSelection(selIndex);
	zoomBox->ChangeValue(fmt_wx("%g%%", zoomValue * 100.));
	con->ass->Properties.video_zoom = zoomValue;
	UpdateSize();
}
Ejemplo n.º 7
0
void CJabberInfoFrame::CreateInfoItem(char *pszName, bool bCompact, LPARAM pUserData)
{
    if (m_pItems.find((CJabberInfoFrameItem*)&pszName))
        return;

    CJabberInfoFrameItem *newItem = new CJabberInfoFrameItem(pszName, bCompact, pUserData);
    newItem->m_tooltipId = m_nextTooltipId++;
    m_pItems.insert(newItem);
    UpdateSize();
}
Ejemplo n.º 8
0
bool wxListbook::DeleteAllPages()
{
    GetListView()->DeleteAllItems();
    if (!wxBookCtrlBase::DeleteAllPages())
        return false;

    UpdateSize();

    return true;
}
Ejemplo n.º 9
0
void CUIFrameLine::Render()
{
	// If size changed - update size
	if (!(uFlags & flValidSize)) UpdateSize();
	// Now render all statics
	for (int i = 0; i < flMax; ++i)
	{
		elements[i].Render();
	}
}
Ejemplo n.º 10
0
void MAS::HyperText::MsgInitSkin() {
    for (int i=0; i<4; i++) {
        if (GetFontColor(i) == Color::transparent) SetFontColor(skin->fcol[Skin::INFO_HYPER][i], skin->scol[Skin::INFO_HYPER][i], i);
        if (GetFontIndex(i) == -1) SetFont(skin->fnt[Skin::INFO_HYPER][i], i);
    }
    if (GetTextMode() == Color::transparent) SetTextMode(skin->c_face);
    SetFlag(D_AUTOSIZE);
    UpdateSize();
    ClearFlag(D_TOGGLE | D_SPINNER);
    Button::MsgInitSkin();
}
Ejemplo n.º 11
0
void VideoDisplay::SetTool(VisualToolBase *new_tool) {
	toolBar->ClearTools();
	toolBar->Realize();
	toolBar->Show(false);

	tool.reset(new_tool);
	tool->SetToolbar(toolBar);

	// Update size as the new typesetting tool may have changed the subtoolbar size
	UpdateSize();
}
Ejemplo n.º 12
0
wxWindow * wxPaneBase::SetClient( wxWindow * pClient, bool WXUNUSED(removeBorder) ) {
    // set the pane's client window
    wxWindow * pOldClient = m_pClient;
    m_pClient = pClient;
    if( m_pClient ) {
        // force reparent
        m_pClient->Reparent( this );
        UpdateSize();
    }
    return pOldClient;
}
Ejemplo n.º 13
0
void MAS::Image::SetBitmap(const char *filename) {
   if (!filename) {
      bmp.Destroy();
   }
   else {
      if (bmp.Load(filename) != Error::NONE) {
         bmp.Destroy();
      }
      UpdateSize();
   }
}
Ejemplo n.º 14
0
void MAS::Progress::MsgInitSkin() {
   Widget::MsgInitSkin();

   if (orientation == 1) {
      if (GetBitmapIndex() == -1) SetBitmap(Skin::PROGRESSH);
   }
   else {
      if (GetBitmapIndex() == -1) SetBitmap(Skin::PROGRESSV);
   }
   
   UpdateSize();
}
Ejemplo n.º 15
0
	void Label::SetX0(int32_t iToX0)
	{
		x0 = iToX0;
		// update x-startpos
		switch (iAlign)
		{
		case ALeft: rcBounds.x = x0; break;
		case ACenter: rcBounds.x = x0 - rcBounds.Wdt/2; break;
		case ARight: rcBounds.x = x0 - rcBounds.Wdt; break;
		}
		// size might have changed
		UpdateSize();
	}
void FramebufferManagerGLES::Resized() {
	FramebufferManagerCommon::Resized();

	render_->Resize(PSP_CoreParameter().pixelWidth, PSP_CoreParameter().pixelHeight);
	if (UpdateSize()) {
		DestroyAllFBOs();
	}

	// Might have a new post shader - let's compile it.
	CompilePostShader();

	// render_->SetLineWidth(renderWidth_ / 480.0f);
}
Ejemplo n.º 17
0
//---------------------------------------------------------------------------//
// OnResize
//
//---------------------------------------------------------------------------//
void CMGControl::OnResize()
{
  UpdateSize();
  UpdateRect();
  // Resize sons
  CListaIter<CMGControl *> Iter(m_Sons);
  while (!Iter.EsFinal())
  {
    CMGControl *pItem = Iter;
    pItem->OnResize();
    Iter++;
  }
}
Ejemplo n.º 18
0
FramebufferManagerCommon::FramebufferManagerCommon() :
	displayFramebufPtr_(0),
	displayStride_(0),
	displayFormat_(GE_FORMAT_565),
	displayFramebuf_(0),
	prevDisplayFramebuf_(0),
	prevPrevDisplayFramebuf_(0),
	frameLastFramebufUsed_(0),
	currentRenderVfb_(0),
	framebufRangeEnd_(0),
	hackForce04154000Download_(false) {
	UpdateSize();
}
Ejemplo n.º 19
0
FilterGenre::FilterGenre(int columns, NUX_FILE_LINE_DECL)
: FilterExpanderLabel(_("Categories"), NUX_FILE_LINE_PARAM)
, all_button_(nullptr)
{
  InitTheme();

  genre_layout_ = new nux::GridHLayout(NUX_TRACKER_LOCATION);
  genre_layout_->ForceChildrenSize(true);
  genre_layout_->MatchContentSize(true);
  genre_layout_->EnablePartialVisibility(false);

  UpdateSize(columns);
  SetContents(genre_layout_);

  scale.changed.connect([this, columns] (double scale) {
    if (all_button_) all_button_->scale = scale;

    for (auto* button : buttons_)
      button->scale = scale;

    UpdateSize(columns);
  });
}
Ejemplo n.º 20
0
void CJabberInfoFrame::ShowInfoItem(char *pszName, bool bShow)
{
    bool bUpdate = false;
    size_t length = mir_strlen(pszName);
    for (int i=0; i < m_pItems.getCount(); i++)
        if ((m_pItems[i].m_bShow != bShow) && !strncmp(m_pItems[i].m_pszName, pszName, length)) {
            m_pItems[i].m_bShow = bShow;
            m_hiddenItemCount += bShow ? -1 : 1;
            bUpdate = true;
        }

    if (bUpdate)
        UpdateSize();
}
Ejemplo n.º 21
0
void CFlashParametersDlg::OnChangePageSize()
{
	UINT	nValue = GetDlgItemInt(IDC_EDIT_PAGE_SIZE, FALSE);
	if (nValue < 65536)
	{
		m_pFlash->m_nPageSize = (WORD)nValue;
	}
	else
	{
		m_pFlash->m_nPageSize = 65535;
		SetDlgItemInt(IDC_EDIT_PAGE_SIZE, m_pFlash->m_nPageSize, FALSE);
	}
	UpdateSize();
}
Ejemplo n.º 22
0
void CFlashParametersDlg::OnChangePageBlock()
{
	UINT	nValue = GetDlgItemInt(IDC_EDIT_PAGE_BLOCK, FALSE);
	if (nValue < 65536)
	{
		m_pFlash->m_nPagePerBlock = (WORD)nValue;
	}
	else
	{
		m_pFlash->m_nPagePerBlock = 65535;
		SetDlgItemInt(IDC_EDIT_PAGE_BLOCK, m_pFlash->m_nPagePerBlock, FALSE);
	}
	UpdateSize();
}
Ejemplo n.º 23
0
//----------------------------
bool CLine::Update()
{
	// Game pausing can cause dumb time things to happen, so kill the effect in this instance
	if ( mTimeStart > theFxHelper.mTime )
	{
		return false;
	}
		
	if ( mFlags & FX_RELATIVE )
	{
		if ( mClientID < 0 || mClientID >= ENTITYNUM_WORLD )
		{
			// we are somehow not bolted even though the flag is on?
			return false;
		}

		vec3_t	dir, end;
		trace_t	trace;

		// Get our current position and direction
		GetOrigin( mClientID, mOrigin1 );
		GetDir( mClientID, dir );

		if ( mFlags & FX_APPLY_PHYSICS )
		{
			VectorMA( mOrigin1, 2048, dir, end );

			theFxHelper.Trace( &trace, mOrigin1, NULL, NULL, end, mClientID, MASK_SHOT );

			VectorCopy( trace.endpos, mOrigin2 );

			if ( mImpactFxID > 0 )
			{
				theFxScheduler.PlayEffect( mImpactFxID, trace.endpos, trace.plane.normal );
			}
		}
		else
		{
			VectorMA( mOrigin1, mOrgOffset[0], dir, mOrigin2 );
		}
	}

	UpdateSize();
	UpdateRGB();
	UpdateAlpha();

	Draw();

	return true;
}
Ejemplo n.º 24
0
void CToolBarEx::HideGroup(int iGrp)
{
	int cButtons = m_bar->GetButtonCount ();
	while (cButtons--)
	{
		TBBUTTON tb;
		m_bar->GetButton (cButtons, &tb);

		if (tb.dwData == (DWORD) iGrp)
			m_bar->DeleteButton (cButtons);
	}

	UpdateSize ();
}
Ejemplo n.º 25
0
void CFlashParametersDlg::OnChangeBlockLU()
{
	UINT	nValue = GetDlgItemInt(IDC_EDIT_BLOCK_LU, FALSE);
	if (nValue < 65536)
	{
		m_pFlash->m_nBlockPerLU = (WORD)nValue;
	}
	else
	{
		m_pFlash->m_nBlockPerLU = 65535;
		SetDlgItemInt(IDC_EDIT_BLOCK_LU, m_pFlash->m_nBlockPerLU, FALSE);
	}
	UpdateSize();
}
Ejemplo n.º 26
0
void CFlashParametersDlg::OnChangeCountLU()
{
	UINT	nValue = GetDlgItemInt(IDC_EDIT_LU_CS, FALSE);
	if (nValue < 255)
	{
		m_pFlash->m_nCountLU = (BYTE)nValue;
	}
	else
	{
		m_pFlash->m_nCountLU = 255;
		SetDlgItemInt(IDC_EDIT_LU_CS, m_pFlash->m_nCountLU, FALSE);
	}
	UpdateSize();
}
Ejemplo n.º 27
0
STDMETHODIMP CDynBufSeqOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize)
{
  if (processedSize)
    *processedSize = 0;
  if (size == 0)
    return S_OK;
  Byte *buf = GetBufPtrForWriting(size);
  if (!buf)
    return E_OUTOFMEMORY;
  memcpy(buf, data, size);
  UpdateSize(size);
  if (processedSize)
    *processedSize = size;
  return S_OK;
}
Ejemplo n.º 28
0
  void cOpenGLControl::Create(cWindow& parent, int idControl)
  {
    // Register our window class
    RegisterClass();

    // Create the OpenGL control
    control = ::CreateWindowEx(0, TEXT(LIBWIN32MM_OPENGL_CONTROLCLASS), TEXT(""), WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_VISIBLE | WS_TABSTOP, 0, 0, 0, 0, parent.GetWindowHandle(), (HMENU)idControl, GetHInstance(), (LPVOID)0);

    parent.SetControlDefaultFont(control);

    UpdateSize();

    // Set our user data for this window
    ::SetProp(control, TEXT("cOpenGLControlThis"), (HANDLE)this);
  }
Ejemplo n.º 29
0
//--------------------------
//
// Derived Light Class
//
//--------------------------
//----------------------------
// Update
//----------------------------
bool CLight::Update()
{
	// Game pausing can cause dumb time things to happen, so kill the effect in this instance
	if ( mTimeStart > theFxHelper.mTime )
	{
		return false;
	}
		
	UpdateSize();
	UpdateRGB();

	Draw();

	return true;
}
Ejemplo n.º 30
0
void CJabberInfoFrame::RemoveInfoItem(char *pszName)
{
    bool bUpdate = false;
    size_t length = mir_strlen(pszName);
    for (int i=0; i < m_pItems.getCount(); i++)
        if (!strncmp(m_pItems[i].m_pszName, pszName, length)) {
            if (!m_pItems[i].m_bShow) --m_hiddenItemCount;
            RemoveTooltip(m_pItems[i].m_tooltipId);
            m_pItems.remove(i);
            bUpdate = true;
            --i;
        }

    if (bUpdate)
        UpdateSize();
}