NS_IMETHODIMP nsChromeTreeOwner::InitWindow(nativeWindow aParentNativeWindow,
   nsIWidget* parentWidget, PRInt32 x, PRInt32 y, PRInt32 cx, PRInt32 cy)   
{
   // Ignore widget parents for now.  Don't think those are a vaild thing to call.
   NS_ENSURE_SUCCESS(SetPositionAndSize(x, y, cx, cy, PR_FALSE), NS_ERROR_FAILURE);

   return NS_OK;
}
Ejemplo n.º 2
0
/** Initializes the controls of this view */
XRESULT D2DContentDownloadDialog::InitControls()
{
	D2DSubView::InitControls();
	
	// Position in top left corner
	SetPositionAndSize(D2D1::Point2F(10, 10), D2D1::SizeF(400, 55));

	// Create message label
	/*Message = new SV_Label(MainView, MainPanel);
	Message->SetSize(GetSize());
	Message->AlignUnder(Header, 5.0f);
	Message->SetPosition(D2D1::Point2F(5, Message->GetPosition().y));

	Message->SetCaption("Text");*/

	ProgressBar = new SV_ProgressBar(MainView, MainPanel);
	ProgressBar->SetPositionAndSize(D2D1::Point2F(5,25 + 5), D2D1::SizeF(GetSize().width - 10, 20));
	ProgressBar->SetProgress(0.0f);

	return XR_SUCCESS;
}
			void Scrollbar::Update()
			{
				Widget::Update();
				SetPositionAndSize();
				slider.Update();
			}
Ejemplo n.º 4
0
/** Sets this dialog into the center of the screen, with the given size */
void D2DDialog::SetPositionCentered(const D2D1_POINT_2F& position, const D2D1_SIZE_F& size)
{
	D2D1_POINT_2F p = D2D1::Point2F(position.x - size.width / 2, position.y - size.height / 2);

	SetPositionAndSize(p, size);
}