示例#1
0
//
// 函数:layout(bool resizable)
//
// 目的:进行元件自身及子元件的布局
//
void YCUITr::layout(bool resizable)
{
	// 检查 background
	buildBackground();
		
	int leftTopX = myMarginLeft + myPaddingLeft;
	int leftTopY = myMarginTop + myPaddingTop;

	//
	// 在布局过程中布局方式从左到右进行
	//
	std::list<YCIUITag*> line;
	for (Item_List_T* item = mySubTags->begin();
		 item != mySubTags->end();
		 item = mySubTags->next(item))
	{
		YCIUITag* tag = (YCIUITag*)mySubTags->payload(item);
		if (tag->isVisible())
		{
			tag->setPosition(leftTopX, leftTopY);
			leftTopX += tag->getWidthWithMargin();
			tag->layout(resizable);

			YCUITd* td = (YCUITd*)tag;
			if (mySubTags->next(item) != NULL)
			{
				td->setDelimiterEnable(true);
			}
			else
			{
				td->setDelimiterEnable(false);
			}
		}
	}
}
示例#2
0
//===================================================================================================>
//
bool TiledBackground::init ( IDXDEVICE device, const tstring& configFilename )
{
   myDevice = device;
   device->AddRef();

   DxAssetManager& assetManager = DxAssetManager::getInstance();

   bool b = buildBackground( configFilename );


   //TODO:    FIX FOR WIN 8 and 10
      // The RENDER_TARGET mechanism is not working.
      // The test below proves it, it uses NO render target, and draws perfectly.
      // however, if changed to .create( dev, fn, rect, RENDER_TARGET ) version, it creates a render target
      //    AND DOES NOT WORK IN WIN8
 



   //RECT junk = { 0,0, 800,576 };
   //HRESULT result = myTestTexture.create( myDevice, 
   //                                        DxAssetManager::getInstance().getConfigAssetPath(_T("SCOTTS_TEST.png")), 
   //                                        D3DCOLOR_XRGB( 243,242,241), NULL );



   return b;
}
示例#3
0
//
// 函数:layout(bool resizable)
//
// 目的:进行元件自身及子元件的布局
//
void YCUITable::layout(bool resizable)
{
	// 检查 background
	buildBackground();
		
	int leftTopX = myMarginLeft + myPaddingLeft;
	int leftTopY = myMarginTop + myPaddingTop;

	//
	// 在布局过程中
	// 按照一行一行的布局方式从上到下进行
	//
	std::list<YCIUITag*> line;
	for (Item_List_T* item = mySubTags->begin();
		 item != mySubTags->end();
		 item = mySubTags->next(item))
	{
		YCIUITag* tag = (YCIUITag*)mySubTags->payload(item);
		if (tag->isVisible())
		{
			tag->setPosition(leftTopX, leftTopY);
			leftTopY += tag->getHeightWithMargin();

			tag->layout(resizable);
		}
	}
}
示例#4
0
void SignalPlot::resizeEvent(QResizeEvent *)
{
    buildBackground();
    mItemsPerPixel = floor(mPlotArea.width()/mChannelData[0].size());
    update();
}
OscGeneral::OscGeneral() : OSCCMD("/mtcf"),
    textsize(ofxGlobalConfig::getRef("PROGRAM:TEXTSIZE", 1.0f)) {
    buildBackground();
}