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


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

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


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

示例1: createListViewSectionPropertiesLayout

/**
 * Create ListView section properties layout
 */
void SettingsScreen::createListViewSectionPropertiesLayout()
{
	VerticalLayout* listViewSectionPropertiesVerticalLayout = new VerticalLayout();
	listViewSectionPropertiesVerticalLayout->wrapContentVertically();
	mListViewSectionLabel = new Label();
	mListViewSectionLabel->setText("No section in focus");
	mListViewSectionLabel->setFontSize(TITLE_FONT_SIZE);
	mListViewSectionLabel->setFontColor(0xFF0000);
	listViewSectionPropertiesVerticalLayout->addChild(mListViewSectionLabel);

	// create the current section title layout
	HorizontalLayout* currentSectionTitleLayout = new HorizontalLayout();
	currentSectionTitleLayout->wrapContentVertically();
	mSetListViewSectionTitleButton = new Button();
	mSetListViewSectionTitleButton->setText("Set title");
	mSetListViewSectionTitleButton->fillSpaceHorizontally();
	currentSectionTitleLayout->addChild(mSetListViewSectionTitleButton);
	mCurrentListViewSectionTitleEditBox = new EditBox();
	mCurrentListViewSectionTitleEditBox->fillSpaceHorizontally();
	currentSectionTitleLayout->addChild(mCurrentListViewSectionTitleEditBox);
	listViewSectionPropertiesVerticalLayout->addChild(currentSectionTitleLayout);

	// create the current section header text layout
	HorizontalLayout* currentSectionHeaderTextLayout = new HorizontalLayout();
	currentSectionHeaderTextLayout->wrapContentVertically();
	mSetListViewSectionHeaderButton = new Button();
	mSetListViewSectionHeaderButton->setText("Set header");
	mSetListViewSectionHeaderButton->fillSpaceHorizontally();
	currentSectionHeaderTextLayout->addChild(mSetListViewSectionHeaderButton);
	mCurrentListViewSectionHeaderEditBox = new EditBox();
	mCurrentListViewSectionHeaderEditBox->fillSpaceHorizontally();
	currentSectionHeaderTextLayout->addChild(mCurrentListViewSectionHeaderEditBox);
	listViewSectionPropertiesVerticalLayout->addChild(currentSectionHeaderTextLayout);

	// create the current section footer text layout
	HorizontalLayout* currentSectionFooterTextLayout = new HorizontalLayout();
	currentSectionFooterTextLayout->wrapContentVertically();
	mSetListViewSectionFooterButton = new Button();
	mSetListViewSectionFooterButton->setText("Set footer");
	mSetListViewSectionFooterButton->fillSpaceHorizontally();
	currentSectionFooterTextLayout->addChild(mSetListViewSectionFooterButton);
	mCurrentListViewSectionFooterEditBox = new EditBox();
	mCurrentListViewSectionFooterEditBox->fillSpaceHorizontally();
	currentSectionFooterTextLayout->addChild(mCurrentListViewSectionFooterEditBox);
	listViewSectionPropertiesVerticalLayout->addChild(currentSectionFooterTextLayout);

	if (isWindowsPhone() || isAndroid())
	{
		listViewSectionPropertiesVerticalLayout->wrapContentVertically();
		createListViewSectionHeaderPropertiesLayout(listViewSectionPropertiesVerticalLayout);
		createListViewSectionFooterPropertiesLayout(listViewSectionPropertiesVerticalLayout);
	}

	ListViewItem* mListSectionPropertiesItem = new ListViewItem();
	mListSectionPropertiesItem->setSelectionStyle(LIST_VIEW_ITEM_SELECTION_STYLE_NONE);
	mListSectionPropertiesItem->addChild(listViewSectionPropertiesVerticalLayout);

	mPropertiesListView->addChild(mListSectionPropertiesItem);
}
开发者ID:GregorGullwi,项目名称:MoSync,代码行数:62,代码来源:SettingsScreen.cpp

示例2: createListViewPropertiesLayout

/**
 * Create ListView properties layout
 */
void SettingsScreen::createListViewPropertiesLayout()
{
	VerticalLayout* listViewPropertiesVerticalLayout = new VerticalLayout();
	listViewPropertiesVerticalLayout->wrapContentVertically();
	Label* mListViewPropertiesLabel = new Label();
	mListViewPropertiesLabel->setText("ListView properties");
	mListViewPropertiesLabel->setFontSize(TITLE_FONT_SIZE);
	mListViewPropertiesLabel->setFontColor(0xFF0000);
	listViewPropertiesVerticalLayout->addChild(mListViewPropertiesLabel);

	// create the allow selection layout
	HorizontalLayout* allowSelectionLayout = new HorizontalLayout();
	allowSelectionLayout->wrapContentVertically();
	mListViewAllowSelectionCheckbox = new CheckBox();
	mListViewAllowSelectionCheckbox->setState(true);
	Label* allowSelectionLabel = new Label();
	allowSelectionLabel->setText("Allow selection");
	allowSelectionLayout->addChild(mListViewAllowSelectionCheckbox);
	allowSelectionLayout->addChild(allowSelectionLabel);
	listViewPropertiesVerticalLayout->addChild(allowSelectionLayout);

	if (isIOS())
	{
		listViewPropertiesVerticalLayout->wrapContentVertically();

		// create the mode selection layout
		HorizontalLayout* modeSelectionLayout = new HorizontalLayout();
		modeSelectionLayout->wrapContentVertically();
		Label* setModeLabel = new Label();
		setModeLabel->setText("Set mode: ");
		modeSelectionLayout->addChild(setModeLabel);
		mDisplayCheckBox = new CheckBox();
		mDisplayCheckBox->setState(true);
		listViewPropertiesVerticalLayout->addChild(modeSelectionLayout);

		modeSelectionLayout = new HorizontalLayout();
		Label* setDisplayLabel = new Label();
		setDisplayLabel->setText("Display");
		modeSelectionLayout->addChild(mDisplayCheckBox);
		modeSelectionLayout->addChild(setDisplayLabel);
		mEditCheckBox = new CheckBox();
		mEditCheckBox->setState(false);
		Label* setEditLabel = new Label();
		setEditLabel->setText("Edit");
		modeSelectionLayout->addChild(mEditCheckBox);
		modeSelectionLayout->addChild(setEditLabel);
		listViewPropertiesVerticalLayout->addChild(modeSelectionLayout);

		createListViewItemSelectionStyleLayout(listViewPropertiesVerticalLayout);
	}

	ListViewItem* mListPropertiesItem = new ListViewItem();
	mListPropertiesItem->setSelectionStyle(LIST_VIEW_ITEM_SELECTION_STYLE_NONE);
	mListPropertiesItem->addChild(listViewPropertiesVerticalLayout);

	mPropertiesListView->addChild(mListPropertiesItem);
}
开发者ID:GregorGullwi,项目名称:MoSync,代码行数:60,代码来源:SettingsScreen.cpp

示例3: 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

示例4: ElementGroup

tinia::model::gui::Element*
RenderConfig::guiFactory() const
{
    VerticalLayout* root = new VerticalLayout;

    // -------------------------------------------------------------------------
    ElementGroup* render_options_group = new ElementGroup( render_options_label_key, true );
    root->addChild( render_options_group );
    VerticalLayout* render_options_layout = new VerticalLayout;
    render_options_group->setChild( render_options_layout );
    //render_options_layout->addChild( new tinia::model::gui::CheckBox( light_theme_key ) );
    render_options_layout->addChild( new tinia::model::gui::CheckBox( render_clipplane_key ) );
    render_options_layout->addChild( new tinia::model::gui::CheckBox( render_grid_key ) );
    //render_options_layout->addChild( new tinia::model::gui::CheckBox( render_wells_key ) );
    render_options_layout->addChild( new tinia::model::gui::CheckBox( create_nonindexed_surfaces_key ) );

    //// -------------------------------------------------------------------------
    //ElementGroup* rendering_quality_group = new ElementGroup( render_quality_key, true );
    //root->addChild( rendering_quality_group );
    //Grid* alpha_quality_layout = new Grid(3,2);
    //rendering_quality_group->setChild( alpha_quality_layout );
    //alpha_quality_layout->setChild( 0, 0, new Label( render_quality_string_key, true ) );
    //alpha_quality_layout->setChild( 0, 1, new HorizontalSlider( render_quality_key, true ) );

    //alpha_quality_layout->setChild( 1, 0, new Label( shading_model_key ) );
    //alpha_quality_layout->setChild( 1, 1, new ComboBox( shading_model_key ) );

    // -------------------------------------------------------------------------
    ElementGroup* line_thickness_group = new ElementGroup( line_thickness_key, true );
    root->addChild( line_thickness_group );
    line_thickness_group->setChild( new HorizontalSlider( line_thickness_key, true ) );

    ElementGroup* proxy_group = new ElementGroup( proxy_label_key );
    root->addChild( proxy_group );
    Grid* proxy_grid = new Grid( 1, 2 );
    proxy_group->setChild( proxy_grid );
    proxy_grid->setChild( 0, 0, new Label( proxy_resolution_key ) );
    HorizontalLayout* res_wrap = new HorizontalLayout;
    proxy_grid->setChild( 0, 1, res_wrap );
    res_wrap->setPadContents( false );
    res_wrap->addChild( new HorizontalSpace );
    res_wrap->addChild( new SpinBox( proxy_resolution_key ) );
    res_wrap->addChild( new HorizontalExpandingSpace );

    root->addChild( new VerticalExpandingSpace );

    return root;
}
开发者ID:sintefmath,项目名称:FRView,代码行数:48,代码来源:RenderConfig.cpp

示例5: createListViewItemPropertiesLayout

/**
 * Create ListView item properties layout
 */
void SettingsScreen::createListViewItemPropertiesLayout()
{
	VerticalLayout* listViewItemPropertiesVerticalLayout = new VerticalLayout();
	listViewItemPropertiesVerticalLayout->wrapContentVertically();
	mCurrentListViewItemLabel = new Label();
	mCurrentListViewItemLabel->setText("No item selected");
	mCurrentListViewItemLabel->setFontSize(TITLE_FONT_SIZE);
	mCurrentListViewItemLabel->setFontColor(0xFF0000);
	listViewItemPropertiesVerticalLayout->addChild(mCurrentListViewItemLabel);

	createListViewItemTextLayout(listViewItemPropertiesVerticalLayout);
	createListViewItemFontColorLayout(listViewItemPropertiesVerticalLayout);
	createListViewItemFontSizeLayout(listViewItemPropertiesVerticalLayout);

	if (isIOS())
	{
		listViewItemPropertiesVerticalLayout->wrapContentVertically();
		createListViewItemEditModeLayout(listViewItemPropertiesVerticalLayout);
		createListViewItemDeleteButtonTextLayout(listViewItemPropertiesVerticalLayout);
		createListViewItemSelectedAnimationLayout(listViewItemPropertiesVerticalLayout);
		createListViewItemUnselectedAnimationLayout(listViewItemPropertiesVerticalLayout);
		createListViewItemHighlightedAnimationLayout(listViewItemPropertiesVerticalLayout);
		createListViewItemUnhighlightedAnimationLayout(listViewItemPropertiesVerticalLayout);
		createListViewItemAccessoryTypeIntLayout(listViewItemPropertiesVerticalLayout);
		createListViewItemAccessoryTypeEditModeLayout(listViewItemPropertiesVerticalLayout);
		createListViewItemEditStyleLayout(listViewItemPropertiesVerticalLayout);
	}

	ListViewItem* mListItemProperties = new ListViewItem();
	mListItemProperties->setSelectionStyle(LIST_VIEW_ITEM_SELECTION_STYLE_NONE);
	mListItemProperties->addChild(listViewItemPropertiesVerticalLayout);

	mPropertiesListView->addChild(mListItemProperties);
}
开发者ID:GregorGullwi,项目名称:MoSync,代码行数:37,代码来源:SettingsScreen.cpp

示例6: createMainLayout

/**
 * Creates and adds main layout to the screen.
 */
void SettingsScreen::createMainLayout()
{

    VerticalLayout* mainLayout = new VerticalLayout();
    Screen::setMainWidget(mainLayout);

    ListView* listView = new ListView();
    listView->fillSpaceHorizontally();
    listView->fillSpaceVertically();
    mainLayout->addChild(listView);

    ListViewItem* listItem;

    // Add IP label and edit box
    mIPEditBox = new EditBox();
    mIPEditBox->setInputMode(EDIT_BOX_INPUT_MODE_NUMERIC);
    listView->addChild(this->createListViewItem(IP_LABEL_TEXT, mIPEditBox));

    // Add port label and edit box
    mPortEditBox = new EditBox();
    mPortEditBox->setInputMode(EDIT_BOX_INPUT_MODE_NUMERIC);
    listView->addChild(this->createListViewItem(PORT_LABEL_TEXT, mPortEditBox));

    if ( isAndroid() )
    {
        mShowOnlyIfInBackground = new CheckBox();
        mShowOnlyIfInBackground->setState(true);
        listView->addChild(createListViewItem(SHOW_ONLY_IF_NOT_RUNNING, mShowOnlyIfInBackground));

        mTickerText = new EditBox();
        mTickerText->setText(TICKER_DEFAULT);
        listView->addChild(createListViewItem(TICKER_LABEL, mTickerText));

        mContentTitle = new EditBox();
        mContentTitle->setText(TITLE_DEFAULT);
        listView->addChild(createListViewItem(TITLE_LABEL, mContentTitle));
    }

    // Android: If the registrationID was already saved from previous launches,
    // do not connect again.
    MAHandle myStore = maOpenStore("MyStore", 0);
    if ( isAndroid() && myStore == STERR_NONEXISTENT
            ||
            !isAndroid() )
    {
        // Add connection status label.
        listItem = new ListViewItem;
        listView->addChild(listItem);
        mConnectionStatusLabel = new Label();
        mConnectionStatusLabel->setText(CONNECTION_NOT_ESTABLISHED);
        listItem->addChild(mConnectionStatusLabel);

        listItem = new ListViewItem;
        listView->addChild(listItem);
        mConnectButton = new Button();
        mConnectButton->setText(CONNECT_BUTTON_TEXT);
        listItem->addChild(mConnectButton);
    }
}
开发者ID:JennYung,项目名称:MoSync,代码行数:62,代码来源:SettingsScreen.cpp

示例7: 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

示例8: createMainLayout

/**
 * Creates and adds main layout to the screen.
 */
void SettingsScreen::createMainLayout() {
	// Create and add the main layout to the screen.
	VerticalLayout* mainLayout = new VerticalLayout();
	Screen::setMainWidget(mainLayout);

	ListView* listView = new ListView();
	mainLayout->addChild(listView);

	// Add set duration option row.
	this->addSetDurationRow(listView);

	// Add get duration option row.
	this->addGetDurationRow(listView);

	// Add options for setting and getting the video quality value.
	this->addVideoQualityRows(listView);

	if ( isIOS())
	{
		// Add options for setting and getting the flash mode value.
		this->addFlashModeRows(listView);

		// Add option for setting the camera roll flag.
		this->addCameraRollFlagRow(listView);

		// Add option for setting the camera controls flag.
		this->addCameraControlsFlagRow(listView);
	}

	// Add take picture button.
	mTakePictureBtn = new Button();
	mTakePictureBtn->setText(TAKE_PICTURE_BTN_TEXT);
	this->addButtonToListView(mTakePictureBtn, listView);

	if (isAndroid())
	{
		mTakenPicturePath = new Label();
		ListViewItem* listItem = new ListViewItem();
		listItem->addChild(mTakenPicturePath);
		listView->addChild(listItem);
	}

	// Add record video button.
	mRecordVideoBtn = new Button();
	mRecordVideoBtn->setText(RECORD_VIDEO_BTN_TEXT);
	this->addButtonToListView(mRecordVideoBtn, listView);

	// Add show image button.
	mShowImageScreen = new Button();
	mShowImageScreen->setText(SHOW_IMAGE_SCREEN_TEXT);
	this->addButtonToListView(mShowImageScreen, listView);

	// Add show video screen button.
	mShowVideoScreen = new Button();
	mShowVideoScreen->setText(SHOW_VIDEO_SCREEN_TEXT);
	this->addButtonToListView(mShowVideoScreen, listView);
}
开发者ID:AliSayed,项目名称:MoSync,代码行数:60,代码来源:SettingsScreen.cpp

示例9: openNextScreen

/**
 * This method is called when an item is clicked in the list widget.
 * @param listItemIndex The index of the list item that was clicked.
 */
void ThirdScreen::openNextScreen(int listItemIndex)
{
//	Screen* screen = new Screen();
	if ( listItemIndex == 0)
	{
		scr1 = new Screen();
		VerticalLayout* widget = new VerticalLayout();
		widget->setBackgroundColor(0x104E8B);
		Label* info = new Label();
		info->setText("First screen in stack.Menu items have icons(delete and save).");
		widget->addChild(info);
		mListView1 = new ListView();
		mListView1->fillSpaceHorizontally();
		mListView1->fillSpaceVertically();
		widget->addChild(mListView1);
		scr1->setMainWidget(widget);
		this->push(scr1);
		scr1->addScreenListener(this);
		scr1->addOptionsMenuItem("Menu item 0", MAW_OPTIONS_MENU_ICON_CONSTANT_DELETE,false);
		scr1->addOptionsMenuItem("Menu item 1", MAW_OPTIONS_MENU_ICON_CONSTANT_SAVE,false);

	}
	else
	{
		scr2 = new Screen();
		VerticalLayout* widget = new VerticalLayout();
		widget->setBackgroundColor(0x104E8B);
		Label* info = new Label();
		info->setText("Second screen in stack.Menu items have icons(edit and add)");
		widget->addChild(info);
		mListView2 = new ListView();
		mListView2->fillSpaceHorizontally();
		mListView2->fillSpaceVertically();
		widget->addChild(mListView2);
		scr2->setMainWidget(widget);
		this->push(scr2);
		scr2->addScreenListener(this);
		scr2->addOptionsMenuItem("Menu item 0", MAW_OPTIONS_MENU_ICON_CONSTANT_EDIT,false);
		scr2->addOptionsMenuItem("Menu item 1", MAW_OPTIONS_MENU_ICON_CONSTANT_ADD,false);
	}
}
开发者ID:GregorGullwi,项目名称:MoSync,代码行数:45,代码来源:ThirdScreen.cpp

示例10: addCheckboxWidget

    void addCheckboxWidget(Layout* aTargetLayout)
    {
        VerticalLayout* betaWrapper = new VerticalLayout();
        betaWrapper->fillSpaceHorizontally();
        betaWrapper->wrapContentVertically();
        betaWrapper->setPaddingTop(int(mFontSize * 0.5));

        VerticalLayout* betaContainer = new VerticalLayout();
        betaContainer->fillSpaceHorizontally();
        betaContainer->wrapContentVertically();
        betaContainer->setBackgroundColor(AUX_COLOR);
        setRoundPadding(aTargetLayout);

        HorizontalLayout* subSettingsContainer = new HorizontalLayout();
        subSettingsContainer->fillSpaceHorizontally();
        subSettingsContainer->wrapContentVertically();
        subSettingsContainer->setChildVerticalAlignment(MAW_ALIGNMENT_CENTER);
        subSettingsContainer->setChildHorizontalAlignment(MAW_ALIGNMENT_RIGHT);

        Label* betaText = new Label();
        betaText->setText("This is a checkBox");
        betaText->setFontColor(LABEL_FONT_COLOR);
        betaText->setFontSize(mFontSize);
        betaText->fillSpaceHorizontally();
        betaText->wrapContentVertically();
        betaText->setTextHorizontalAlignment(MAW_ALIGNMENT_LEFT);

        CheckBox* betaCB = new CheckBox();
        betaCB->wrapContentHorizontally();
        betaCB->wrapContentVertically();
        betaCB->setState(true);

        subSettingsContainer->addChild(betaText);
        subSettingsContainer->addChild(betaCB);

        betaContainer->addChild(subSettingsContainer);

        betaWrapper->addChild(betaContainer);
        aTargetLayout->addChild(betaWrapper);
    }
开发者ID:radityaprawira,项目名称:MoSync,代码行数:40,代码来源:main.cpp

示例11: createRemoveItemDialog

void FirstScreen::createRemoveItemDialog()
{
	mRemoveItemDialog = new Dialog();
	VerticalLayout* removeDialogLayout = new VerticalLayout();
	mRemoveItemDialog->addChild(removeDialogLayout);

	mItemsPicker = new CustomPicker();
	for (int i=0; i<mMenuItems.size(); i++)
	{
		HorizontalLayout* itemLayout = new HorizontalLayout();
		Label* info = new Label("Item on position" +MAUtil::integerToString(i));
		itemLayout->addChild(info);
		mItemsPicker->addChild(itemLayout);
	}

	mRemoveItemDone = new Button();
	mRemoveItemDone->setText("Remove selected item");
	mRemoveAllItemsDone = new Button();
	mRemoveAllItemsDone->setText("Remove ALL items");

	removeDialogLayout->addChild(mItemsPicker);
	removeDialogLayout->addChild(mRemoveItemDone);
	removeDialogLayout->addChild(mRemoveAllItemsDone);
}
开发者ID:Felard,项目名称:MoSync,代码行数:24,代码来源:FirstScreen.cpp

示例12: 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

示例13: setMainScreen

    void setMainScreen()
    {
        // Because of issue http://jira.mosync.com/browse/MOSYNC-2732 the hole layout must be created.
        VerticalLayout* subContent = new VerticalLayout();
        setRoundPadding(subContent);

        Layout* warningContainer = NULL;
        (VERTICAL_LAYOUT == mContainerLayoutTypeCounter)? warningContainer = new VerticalLayout() :
        warningContainer = new HorizontalLayout();

        setupMainContainer(warningContainer, mContainerSizePolicyCounter);
        addChildrenToMainContainer(warningContainer, mLabelSizePolicyCounter, mLabelPropertyCounter);

        addDescriptionWidget(subContent);
        subContent->addChild(warningContainer);
        //addCheckboxWidget(mMainLayout);

        mScreen->setMainWidget(subContent);
    }
开发者ID:radityaprawira,项目名称:MoSync,代码行数:19,代码来源:main.cpp

示例14: init

bool TestJob::init()
{


   m_model->addStateListener(this);
   tinia::model::Viewer viewer;
   viewer.height = 500;
   viewer.width = 500;
   m_model->addElement("viewer", viewer);
   m_model->addElement<std::string>( "boundingbox", "-1.1 -1.1 -1.1 1.1 1.1 1.1" );
   m_model->addElement<int>( "renderlist", 0 );

   m_model->addElement<bool>("myTab", false);
   m_model->addAnnotation("myTab", "My tab");
      m_model->addElement<bool>("myBool", false);
   m_model->addElement<std::string>("myVal", "THIS WORKS!");

   const char* restrictions[] = {"select1", "select2", "select3", "select4"};
   m_model->addElementWithRestriction<std::string>("myVal2", "select3",
                                                       &restrictions[0], &restrictions[4]);

   m_model->addAnnotation("myVal2", "My special value");

   m_model->addConstrainedElement<int>("myIntBA", 5,0, 900);
   m_model->addConstrainedElement<double>("myDouble", 10., 0., 11.);
   m_model->addElement<bool>("myButton", false);

   m_model->addElement<bool>( "details", true, "Popup" );

   m_model->addAnnotation("myButton", "My pushButton");

   tinia::model::File file;
   m_model->addElement("SpecialFile", file);
   m_model->addAnnotation("SpecialFile", "Open file");
   m_model->addElement("SpecialFileName", file.name());

   using namespace tinia::model::gui;
   TabLayout* root = new TabLayout();
   HorizontalLayout *superLayout = new HorizontalLayout();

   Grid *mainGrid = new Grid(16, 1);
   //superLayout->addChild(mainGrid);
   Tab *mainTab = new Tab("myTab");
   mainTab->setChild(superLayout);
   root->addChild(mainTab);


   TabLayout *subTablayout = new TabLayout();
   Tab* subTab = new Tab("myBool");

   subTablayout->addChild(subTab);

   subTab->setChild(mainGrid);

   superLayout->addChild(subTablayout);

   // Simple Label-input-layout
   Grid *input1Grid = new Grid(4,3);
   mainGrid->setChild(0,0, input1Grid);
   input1Grid->setChild(0, 0, new Label("myVal"));
   input1Grid->setChild(0, 1, (new TextInput("myVal"))->setEnabledKey( "myTab", true ) );

   input1Grid->setChild(1,0, new Label("myVal2"));
   input1Grid->setChild(1,1, new ComboBox("myVal2"));

   input1Grid->setChild(2,0, new Label("myVal2"));
   input1Grid->setChild(2,1, new RadioButtons("myVal2"));

   PopupButton* popup = new PopupButton("details", false);
   input1Grid->setChild(2, 2, popup );
   popup->setEnabledKey( "myTab" );

   PopupButton* popup2 = new PopupButton( "myVal", true );
   input1Grid->setChild(3, 2, popup2 );

   popup2->setChild( new TextInput("myVal" ) );


   ElementGroup* popup_group = new ElementGroup( "myTab", true );
   popup->setChild( popup_group );
   popup_group->setChild( new RadioButtons( "myVal2" ) );


   mainGrid->setChild(1, 0, new SpinBox("myIntBA"));
   mainGrid->setChild(2, 0, new TextInput("myIntBA"));
   mainGrid->setChild(3, 0, new CheckBox("myTab"));
   mainGrid->setChild(4, 0, new CheckBox("myTab"));
   mainGrid->setChild(5, 0, new Button("myButton"));
   mainGrid->setChild(6, 0, new HorizontalSlider("myIntBA"));
   mainGrid->setChild(8,0, new DoubleSpinBox("myDouble"));
   mainGrid->setChild(9, 0, new CheckBox("myBool"));
   mainGrid->setChild(10, 0, new VerticalExpandingSpace());
   mainGrid->setChild(11, 0, new Label("myDouble", true ) );
   mainGrid->setChild(12, 0, new FileDialogButton("SpecialFile"));
   mainGrid->setChild(13, 0, new Label("SpecialFileName", true));

   ElementGroup* elemGroup = new ElementGroup("myTab", false);
   elemGroup->setVisibilityKey( "myTab" );

   elemGroup->setChild( new TextInput("myVal") );
//.........这里部分代码省略.........
开发者ID:asyr625,项目名称:tinia,代码行数:101,代码来源:TestJob.cpp

示例15: addDescriptionWidget

    void addDescriptionWidget(Layout* aTargetLayout)
    {
        VerticalLayout* paddingLayout = new VerticalLayout();
        paddingLayout->fillSpaceHorizontally();
        paddingLayout->wrapContentVertically();
        paddingLayout->setPaddingBottom(int(mFontSize * 0.5));

        VerticalLayout* descLayout = new VerticalLayout();
        descLayout->fillSpaceHorizontally();
        descLayout->wrapContentVertically();
        descLayout->setBackgroundColor(AUX_COLOR);
        setRoundPadding(descLayout);

        Label* layoutCounterLbl = new Label();
        char buf[64];
        sprintf(buf, "Layout nr: %d", mLayoutsCounter);
        layoutCounterLbl->setText(buf);

        Label* containerTypeLbl = new Label();
        containerTypeLbl->setBackgroundColor(CONTAINER_BGK_COLOR);
        sprintf(buf, "Container layout type: %s", mNamesMap[mContainerLayoutTypeCounter]);
        containerTypeLbl->setText(buf);

        Label* containerPolicyLbl = new Label();
        containerPolicyLbl->setBackgroundColor(CONTAINER_BGK_COLOR);
        sprintf(buf, "Container size policy: %s", mNamesMap[mContainerSizePolicyCounter]);
        containerPolicyLbl->setText(buf);

        Label* labelPolicyLbl = new Label();
        labelPolicyLbl->setBackgroundColor(LABEL_BGK_COLOR);
        sprintf(buf, "Label size policy: %s", mNamesMap[mLabelSizePolicyCounter]);
        labelPolicyLbl->setText(buf);

        Label* labelTypeLbl = new Label();
        labelTypeLbl->setBackgroundColor(LABEL_BGK_COLOR);
        sprintf(buf, "Label type: %s", mNamesMap[mLabelPropertyCounter]);
        labelTypeLbl->setText(buf);

        Label* helpLbl = new Label();
        sprintf(buf, "Tap to play/pause layouts. Update: %d ms", UPDATE_INTERVAL);
        helpLbl->setText(buf);

        helpLbl->setFontSize(DESCRIPTION_FONT);
        layoutCounterLbl->setFontSize(DESCRIPTION_FONT);
        containerTypeLbl->setFontSize(DESCRIPTION_FONT);
        containerPolicyLbl->setFontSize(DESCRIPTION_FONT);
        labelPolicyLbl->setFontSize(DESCRIPTION_FONT);
        labelTypeLbl->setFontSize(DESCRIPTION_FONT);

        descLayout->addChild(helpLbl);
        TestUtils::addVerticalSpacerToLayout(descLayout);

        descLayout->addChild(layoutCounterLbl);
        TestUtils::addVerticalSpacerToLayout(descLayout);

        descLayout->addChild(containerTypeLbl);
        descLayout->addChild(containerPolicyLbl);
        TestUtils::addVerticalSpacerToLayout(descLayout);

        descLayout->addChild(labelPolicyLbl);
        descLayout->addChild(labelTypeLbl);
        paddingLayout->addChild(descLayout);
        aTargetLayout->addChild(paddingLayout);
    }
开发者ID:radityaprawira,项目名称:MoSync,代码行数:64,代码来源:main.cpp


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