void emStopwatchPanel::LayoutChildren()
{
	double h;

	h=GetHeight();

	TimeField->Layout(
		0.05,
		h*0.18,
		0.9,
		h*0.44,
		GetCanvasColor()
	);
	StartStopButton->Layout(
		0.05,
		h*0.62,
		0.6,
		h*0.28,
		GetCanvasColor()
	);
	ClearButton->Layout(
		0.65,
		h*0.62,
		0.3,
		h*0.28,
		GetCanvasColor()
	);
}
void emAlarmClockPanel::LayoutChildren()
{
	double h;

	h=GetHeight();

	TimeField->Layout(
		0.05,
		h*0.18,
		0.9,
		h*0.24,
		GetCanvasColor()
	);
	OnButton->Layout(
		0.05,
		h*0.42,
		0.3,
		h*0.24,
		GetCanvasColor()
	);
	OffButton->Layout(
		0.35,
		h*0.42,
		0.3,
		h*0.24,
		GetCanvasColor()
	);
	TestButton->Layout(
		0.65,
		h*0.42,
		0.3,
		h*0.24,
		GetCanvasColor()
	);
	ConfirmButton->Layout(
		0.05,
		h*0.66,
		0.9,
		h*0.24,
		GetCanvasColor()
	);
}
int CBitmap::RenderScaled (int x, int y, int w, int h, int scale, int orient, tCanvasColor* colorP, int bSmoothe)
{
	CBitmap*		bmoP;
	tRgbaColorf	color;

if ((bmoP = HasOverride ()))
	return bmoP->RenderScaled (x, y, w, h, scale, orient, colorP, bSmoothe);
DelFlags (BM_FLAG_SUPER_TRANSPARENT);
if (!OglBeginRender (true, bSmoothe ? 0 : -1, 3))
	return 1; // fail
OglVertices (x, y, w, h, scale, orient);
OglTexCoord ();
color = GetCanvasColor (colorP);
OglRender (&color, 1, orient);
OglEndRender ();
return 0;
}
void emPsDocumentPanel::LayoutChildren()
{
	emColor cc;
	int i,n;

	if (!PagePanels) return;
	if (!BGColor.IsTotallyTransparent()) cc=BGColor;
	else cc=GetCanvasColor();
	n=Document.GetPageCount();
	for (i=0; i<n; i++) {
		if (PagePanels[i]) {
			PagePanels[i]->Layout(
				CellX0+CellW*(i/Rows)+PgX,
				CellY0+CellH*(i%Rows)+PgY,
				Document.GetPageWidth(i)*PerPoint,
				Document.GetPageHeight(i)*PerPoint,
				cc
			);
		}
	}
}