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


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

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


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

示例1: createUI

/**
 * Create the UI for the color list screen.
 */
void SettingsScreen::createUI()
{
	setTitle("Settings");

	// Create the screen's main layout widget.
	VerticalLayout* mMainLayout = new VerticalLayout();
	// Make the layout fill the entire screen.
	mMainLayout->fillSpaceHorizontally();
	mMainLayout->fillSpaceVertically();
	// Add the layout as the root of the screen's widget tree.
	Screen::setMainWidget(mMainLayout);

	Label* mTitle = new Label();
	// Make the label fill the width of the parent layout and
	// adjust its height to "shrink wrap" the size of the text.
	mTitle->fillSpaceHorizontally();
	mTitle->wrapContentVertically();
	// Set the label text.
	mTitle->setText("application settings");
	mTitle->setTextHorizontalAlignment("center");
	// Add the label to the main layout.
	mMainLayout->addChild(mTitle);

	mAppCodeBox = new EditBox();
	mAppCodeBox->fillSpaceHorizontally();
	mAppCodeBox->wrapContentVertically();
	mAppCodeBox->setPlaceholder("application code");
	//mAppCodeBox->setInputFlag(EDIT_BOX_INPUT_FLAG_PASSWORD);
	mMainLayout->addChild(mAppCodeBox);

	mAppUniqBox = new EditBox();
	mAppUniqBox->fillSpaceHorizontally();
	mAppUniqBox->wrapContentVertically();
	mAppUniqBox->setPlaceholder("application unique");
	mMainLayout->addChild(mAppUniqBox);

	mAppPwdBox = new EditBox();
	mAppPwdBox->fillSpaceHorizontally();
	mAppPwdBox->wrapContentVertically();
	mAppPwdBox->setInputFlag(EDIT_BOX_INPUT_FLAG_PASSWORD);
	mAppPwdBox->setPlaceholder("application password");
	mMainLayout->addChild(mAppPwdBox);

	mSubmitButton = new Button();
	mSubmitButton->fillSpaceHorizontally();
	mSubmitButton->wrapContentVertically();
	mSubmitButton->setTextHorizontalAlignment(MAW_ALIGNMENT_CENTER);
	mSubmitButton->setTextVerticalAlignment(MAW_ALIGNMENT_CENTER);
	mSubmitButton->setText("Save");
	mMainLayout->addChild(mSubmitButton);

	mSubmitButton->addButtonListener(this);
}
开发者ID:cloudbase-io,项目名称:CBHelper-MoSync,代码行数:56,代码来源:SettingsScreen.cpp

示例2: createUI

/**
 * Create the UI for the color list screen.
 */
void LogScreen::createUI()
{
	setTitle("Log");

	// Create the screen's main layout widget.
	VerticalLayout* mMainLayout = new VerticalLayout();
	// Make the layout fill the entire screen.
	mMainLayout->fillSpaceHorizontally();
	mMainLayout->fillSpaceVertically();
	// Add the layout as the root of the screen's widget tree.
	Screen::setMainWidget(mMainLayout);

	Label* mTitle = new Label();
	// Make the label fill the width of the parent layout and
	// adjust its height to "shrink wrap" the size of the text.
	mTitle->fillSpaceHorizontally();
	mTitle->wrapContentVertically();
	// Set the label text.
	mTitle->setText("log APIs");
	mTitle->setTextHorizontalAlignment("center");
	// Add the label to the main layout.
	mMainLayout->addChild(mTitle);

	mLogLineBox = new EditBox();
	mLogLineBox->fillSpaceHorizontally();
	mLogLineBox->wrapContentVertically();
	mLogLineBox->setPlaceholder("Log line");
	mMainLayout->addChild(mLogLineBox);

	mLogCategoryBox = new EditBox();
	mLogCategoryBox->fillSpaceHorizontally();
	mLogCategoryBox->wrapContentVertically();
	mLogCategoryBox->setPlaceholder("Category");
	mLogCategoryBox->setText("DEFAULT");
	mMainLayout->addChild(mLogCategoryBox);

	mSubmitButton = new Button();
	mSubmitButton->fillSpaceHorizontally();
	mSubmitButton->wrapContentVertically();
	mSubmitButton->setTextHorizontalAlignment(MAW_ALIGNMENT_CENTER);
	mSubmitButton->setTextVerticalAlignment(MAW_ALIGNMENT_CENTER);
	mSubmitButton->setText("Log");
	mMainLayout->addChild(mSubmitButton);

	mSubmitButton->addButtonListener(this);
}
开发者ID:cloudbase-io,项目名称:CBHelper-MoSync,代码行数:49,代码来源:LogScreen.cpp


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