当前位置: 首页>>代码示例>>C++>>正文


C++ VerticalLayout::setChildHorizontalAlignment方法代码示例

本文整理汇总了C++中VerticalLayout::setChildHorizontalAlignment方法的典型用法代码示例。如果您正苦于以下问题:C++ VerticalLayout::setChildHorizontalAlignment方法的具体用法?C++ VerticalLayout::setChildHorizontalAlignment怎么用?C++ VerticalLayout::setChildHorizontalAlignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在VerticalLayout的用法示例。


在下文中一共展示了VerticalLayout::setChildHorizontalAlignment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: createSpacer

/**
 * Creates an empty vertical layout.
 * @param width Layout width.
 * @param height Layout height.
 * @return A vertical layout widget.
 * 		   The ownership of the result is passed to the caller!
 */
VerticalLayout* ScreenWebView::createSpacer(const int width, const int height)
{
	VerticalLayout* layout = new VerticalLayout();
	layout->setSize(width, height);

	// This shows how you set a property for which there is no
	// predefined method.
	layout->setChildHorizontalAlignment(MAW_ALIGNMENT_RIGHT);
	layout->setChildVerticalAlignment(MAW_ALIGNMENT_CENTER);

	return layout;
}
开发者ID:AliSayed,项目名称:MoSync,代码行数:19,代码来源:ScreenWebView.cpp

示例2: createLayout

void PopupMessage::createLayout()
{
	dia_->setTitle(title_);

	VerticalLayout* vl = new VerticalLayout();
	vl->setScrollable(true);
	vl->setChildHorizontalAlignment(MAW_ALIGNMENT_CENTER);
	Styler::setLayoutPadding(vl);

	lbMessage_->setText(message_);
	Styler::setLabelStyle(lbMessage_, LSPopupMessage);

	vl->addChild(lbMessage_);

	dia_->addChild(vl);
}
开发者ID:fatinbrain,项目名称:reList455,代码行数:16,代码来源:PopupMessage.cpp

示例3: initializeScreen

void LoadingScreen::initializeScreen(MAUtil::String &os)
{
			MAExtent ex = maGetScrSize();
			int screenWidth = EXTENT_X(ex);
			int screenHeight = EXTENT_Y(ex);

			mSplashScreen = new Screen();
			mSplashScreen->setBackgroundColor(40,40,40);

			//Layout that holds the screen elements
			RelativeLayout* relativeLayout = new RelativeLayout();
			relativeLayout->setSize(screenWidth, screenHeight);

			//The huge Reload "Circle"
			Image* logo = new Image();
			logo->setImage(SPLASH_IMAGE);
			logo->setSize(screenWidth,screenWidth);
			logo->setScaleMode(IMAGE_SCALE_PRESERVE_ASPECT);

			//Indicator placed on top of the reload circle
			mIndicator = new ActivityIndicator();
			mIndicator->show();

			//Progress bar for the download
			mProgressBar = new ProgressBar();
			mProgressBar->setWidth((int)(screenWidth * 0.75));
			mProgressBar->setMaximumValue(100);

			//Padding between the progress bar and the cancel button
			HorizontalLayout *paddingLayout = new HorizontalLayout();
			paddingLayout->setHeight(screenHeight / 36);

			//the cancel button stops the download and returns the user
			//to the login screen
			if(os == "Android")
			{
				mCancelDownloadButton = new Button();
				((Button*)mCancelDownloadButton)->addButtonListener(this);
			}
			else
			{
				mCancelDownloadButton = new ImageButton();
				((ImageButton*)mCancelDownloadButton)->addButtonListener(this);
				((ImageButton*)mCancelDownloadButton)->setBackgroundImage(RELOAD_BG);
				mCancelDownloadButton->setFontColor(0x000000);
			}

			mCancelDownloadButton->setText("Cancel");
			mCancelDownloadButton->setTextHorizontalAlignment(MAW_ALIGNMENT_CENTER);
			mCancelDownloadButton->setTextVerticalAlignment(MAW_ALIGNMENT_CENTER);
			mCancelDownloadButton->setWidth((int)(screenWidth * 0.75));
			mCancelDownloadButton->setHeight((int)(screenHeight * 0.1));

			//Spacing between the cancel button and the bottom of the screen
			HorizontalLayout *paddingLayout2 = new HorizontalLayout();
			paddingLayout2->setHeight(screenHeight / 15);

			VerticalLayout* logolayout = new VerticalLayout();
			logolayout->setSize(screenWidth, screenHeight);
			logolayout->setChildHorizontalAlignment(MAW_ALIGNMENT_CENTER);
			logolayout->setChildVerticalAlignment(MAW_ALIGNMENT_CENTER);
			logolayout->addChild(logo);

			VerticalLayout* activitylayout = new VerticalLayout();
			activitylayout->setSize(screenWidth, screenHeight);
			activitylayout->setChildHorizontalAlignment(MAW_ALIGNMENT_CENTER);
			activitylayout->setChildVerticalAlignment(MAW_ALIGNMENT_CENTER);
			activitylayout->addChild(mIndicator);

			VerticalLayout* progresslayout = new VerticalLayout();
			progresslayout->setSize(screenWidth, screenHeight);
			progresslayout->setChildHorizontalAlignment(MAW_ALIGNMENT_CENTER);
			progresslayout->setChildVerticalAlignment(MAW_ALIGNMENT_BOTTOM);
			progresslayout->addChild(mProgressBar);
			progresslayout->addChild(paddingLayout);
			progresslayout->addChild(mCancelDownloadButton);
			progresslayout->addChild(paddingLayout2);

			relativeLayout->addChild(logolayout);
			relativeLayout->addChild(activitylayout);
			relativeLayout->addChild(progresslayout);
			mSplashScreen->setMainWidget(relativeLayout);
}
开发者ID:andersmalm,项目名称:Reload,代码行数:83,代码来源:LoadingScreen.cpp


注:本文中的VerticalLayout::setChildHorizontalAlignment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。