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


C++ VerticalLayout类代码示例

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


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

示例1: lua_VerticalLayout_setSpacing

static int lua_VerticalLayout_setSpacing(lua_State* state)
{
    // Get the number of parameters.
    int paramCount = lua_gettop(state);

    // Attempt to match the parameters to a valid binding.
    switch (paramCount)
    {
        case 2:
        {
            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
                lua_type(state, 2) == LUA_TNUMBER)
            {
                // Get parameter 1 off the stack.
                int param1 = (int)luaL_checkint(state, 2);

                VerticalLayout* instance = getInstance(state);
                instance->setSpacing(param1);
                
                return 0;
            }

            lua_pushstring(state, "lua_VerticalLayout_setSpacing - Failed to match the given parameters to a valid function signature.");
            lua_error(state);
            break;
        }
        default:
        {
            lua_pushstring(state, "Invalid number of parameters (expected 2).");
            lua_error(state);
            break;
        }
    }
    return 0;
}
开发者ID:03050903,项目名称:GamePlay,代码行数:35,代码来源:lua_VerticalLayout.cpp

示例2: lua_VerticalLayout_setBottomToTop

static int lua_VerticalLayout_setBottomToTop(lua_State* state)
{
    // Get the number of parameters.
    int paramCount = lua_gettop(state);

    // Attempt to match the parameters to a valid binding.
    switch (paramCount)
    {
        case 2:
        {
            if ((lua_type(state, 1) == LUA_TUSERDATA) &&
                lua_type(state, 2) == LUA_TBOOLEAN)
            {
                // Get parameter 1 off the stack.
                bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2);

                VerticalLayout* instance = getInstance(state);
                instance->setBottomToTop(param1);
                
                return 0;
            }

            lua_pushstring(state, "lua_VerticalLayout_setBottomToTop - Failed to match the given parameters to a valid function signature.");
            lua_error(state);
            break;
        }
        default:
        {
            lua_pushstring(state, "Invalid number of parameters (expected 2).");
            lua_error(state);
            break;
        }
    }
    return 0;
}
开发者ID:03050903,项目名称:GamePlay,代码行数:35,代码来源:lua_VerticalLayout.cpp

示例3: lua_VerticalLayout_getBottomToTop

static int lua_VerticalLayout_getBottomToTop(lua_State* state)
{
    // Get the number of parameters.
    int paramCount = lua_gettop(state);

    // Attempt to match the parameters to a valid binding.
    switch (paramCount)
    {
        case 1:
        {
            if ((lua_type(state, 1) == LUA_TUSERDATA))
            {
                VerticalLayout* instance = getInstance(state);
                bool result = instance->getBottomToTop();

                // Push the return value onto the stack.
                lua_pushboolean(state, result);

                return 1;
            }

            lua_pushstring(state, "lua_VerticalLayout_getBottomToTop - Failed to match the given parameters to a valid function signature.");
            lua_error(state);
            break;
        }
        default:
        {
            lua_pushstring(state, "Invalid number of parameters (expected 1).");
            lua_error(state);
            break;
        }
    }
    return 0;
}
开发者ID:03050903,项目名称:GamePlay,代码行数:34,代码来源:lua_VerticalLayout.cpp

示例4: lua_VerticalLayout_addRef

static int lua_VerticalLayout_addRef(lua_State* state)
{
    // Get the number of parameters.
    int paramCount = lua_gettop(state);

    // Attempt to match the parameters to a valid binding.
    switch (paramCount)
    {
        case 1:
        {
            if ((lua_type(state, 1) == LUA_TUSERDATA))
            {
                VerticalLayout* instance = getInstance(state);
                instance->addRef();
                
                return 0;
            }

            lua_pushstring(state, "lua_VerticalLayout_addRef - Failed to match the given parameters to a valid function signature.");
            lua_error(state);
            break;
        }
        default:
        {
            lua_pushstring(state, "Invalid number of parameters (expected 1).");
            lua_error(state);
            break;
        }
    }
    return 0;
}
开发者ID:03050903,项目名称:GamePlay,代码行数:31,代码来源:lua_VerticalLayout.cpp

示例5: VerticalLayout

/**
 * 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: VerticalLayout

/**
 * 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: VerticalLayout

/**
 * 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

示例8: VerticalLayout

/**
 * 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

示例9: Screen

/**
 * 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 ScreenColorList::openColorScreen(int listItemIndex)
{
	// Create a screen that will show the color.
	Screen* screen = new Screen();

	// The title of this screen is displayed on the
	// navigation bar on iPhone/iPad.
	screen->setTitle(sColors[listItemIndex].name);
	VerticalLayout* widget = new VerticalLayout();
	widget->setBackgroundColor(sColors[listItemIndex].color);
	screen->setMainWidget(widget);
	this->push(screen);
}
开发者ID:AliSayed,项目名称:MoSync,代码行数:17,代码来源:ScreenColorList.cpp

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

示例11: VerticalLayout

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

示例12: VerticalLayoutFromDef

static VerticalLayout* VerticalLayoutFromDef(ParsedMui& parsed, TxtNode* structDef) {
    CrashIf(!structDef->IsStructWithName("VerticalLayout"));
    VerticalLayoutDef* def = DeserializeVerticalLayoutDef(structDef);
    VerticalLayout* l = new VerticalLayout();
    l->SetName(def->name);
    Vec<DirectionalLayoutDataDef*>* children = def->children;

    DirectionalLayoutData ld;
    for (size_t i = 0; children && i < children->size(); i++) {
        SetDirectionalLayouData(ld, parsed, children->at(i));
        l->Add(ld);
    }

    FreeVerticalLayoutDef(def);
    return l;
}
开发者ID:sambhare,项目名称:sumatrapdf,代码行数:16,代码来源:MuiFromText.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: GameState

LoadMenu::LoadMenu(std::shared_ptr<StateContext> sc) : GameState(StateType::LOAD_MENU, sc) {
	using namespace MenuSettings;
	using std::placeholders::_1;
	getCallbacks()->setKey(SDLK_ESCAPE, CommonCallback::popStateK);
	getCallbacks()->setDefaultKey(DefaultCallback::key);
	getCallbacks()->setMouse(DefaultCallback::mouse);
	getCallbacks()->setEvent(DefaultCallback::event);
	// setup widgets
	VerticalLayout* layout = new VerticalLayout;
	layout->setMargins(0, 0, 0, 0);
	layout->setWidgetAlignment(WidgetAlignmentHoriz::CENTER, WidgetAlignmentVert::TOP);
	TextListView* view = new TextListView;
	view->setSelectedCallback(std::bind(&self_type::selectedCallback, this, _1));
	setup(*view);
	layout->add(view);
	wArea.setPosition(IntPair{viewPadding, viewPadding});
	wArea.setSize(IntPair{Constants::windowWidth - (viewPadding * 2), Constants::windowHeight - (viewPadding * 2)});
	wArea.setLayout(layout);
}
开发者ID:wesulee,项目名称:mr,代码行数:19,代码来源:gs_load_menu.cpp

示例15: setTitle

/**
 * 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


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