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


C++ HorizontalLayout::append方法代码示例

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


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

示例1: create

  void create() {
    setTitle("Test Application");
    setGeometry(Geometry(128, 128, 640, 480 ));

    layout.append(bProcess);
    layout.append(lvOutput);
    layout.append(baseN);
    layout.append(baseR);

    unsigned bn = integer(baseN.text()), br = integer(baseR.text());
    if (br>=0 && br<=bn) {
       lstring hdr;
       for (unsigned i = 0; i < br; ++i) {
     	  hdr.append((string){i>0?",":"","B",i+1});
       }
       lvOutput.setHeaderText(hdr);
    }

    bProcess.setText("Draw!");
    bProcess.onActivate = [&]() {
       lvOutput.reset();

    };

    //Hook it all up
    append(layout);

    onClose = [&layout] {
    //	layout.setSkipGeomUpdates(true); //Example of skipping pointless update calculations.
    	OS::quit();
    };

    setVisible();
  }
开发者ID:sorlok,项目名称:Dubious-Dabblings,代码行数:34,代码来源:CurrentDebug.hpp

示例2: reflowStatic

	void reflowStatic() {
		tabMain.append("OPN");
			tabMain.setLayout(0, ltOPN);
			frTogglesOPN.setLayout(lTogglesOPN);
			ltOPN.append(frTogglesOPN, {~0,~0}, 5);
			ltOPN.append(lOPN2, {~0,~0});
		tabMain.append("OPM");
			tabMain.setLayout(1, ltOPM);
			frTogglesOPM.setLayout(lTogglesOPM);
			ltOPM.append(frTogglesOPM, {~0,~0}, 5);
			ltOPM.append(lOPM2, {~0,~0});
	}
开发者ID:djtuBIG-MaliceX,项目名称:vgm2pre,代码行数:12,代码来源:win.opt.hpp

示例3: Application

  Application() {
    setGeometry({256, 256, 640, 400});

    layout.setMargin(5);
    button.setText("Toggle");
    itemA[0].setText("Item A0");
    itemA[1].setText("Item A1");
    itemA[2].setText("Item A2");
    RadioBox::group(itemA[0], itemA[1], itemA[2]);
    itemB[0].setText("Item B0");
    itemB[1].setText("Item B1");
    itemB[2].setText("Item B2");
    RadioBox::group(itemB[0], itemB[1], itemB[2]);
    itemC[0].setText("Item C0");
    itemC[1].setText("Item C1");
    itemC[2].setText("Item C2");
    RadioBox::group(itemC[0], itemC[1], itemC[2]);

    append(layout);
    layout.append(button, {~0, 0}, 5);
    layout.append(groupA, {~0, 0}, 5);
      groupA.append(itemA[0], {~0, 0}, 5);
      groupA.append(itemA[1], {~0, 0}, 5);
      groupA.append(itemA[2], {~0, 0});
    layout.append(groupB, {~0, 0}, 5);
      groupB.append(itemB[0], {~0, 0}, 5);
      groupB.append(itemB[1], {~0, 0}, 5);
      groupB.append(itemB[2], {~0, 0});
    layout.append(groupC, {~0, 0}, 5);
      groupC.append(itemC[0], {~0, 0}, 5);
      groupC.append(itemC[1], {~0, 0}, 5);
      groupC.append(itemC[2], {~0, 0});

    onClose = &OS::quit;

    itemC[0].onActivate = [] { print("C0\n"); };
    itemC[1].onActivate = [] { print("C1\n"); };
    itemC[2].onActivate = [] { print("C2\n"); };

    button.onActivate = [&] {
//print("Before: ", itemC[0].checked(), ",", itemC[1].checked(), ",", itemC[2].checked(), "\n");
      static bool visible = true;
      if(visible) {
        layout.remove(groupC);
      } else {
        layout.append(groupC, {~0, 0}, 5);
      }
      visible = !visible;
//print("After!: ", itemC[0].checked(), ",", itemC[1].checked(), ",", itemC[2].checked(), "\n");
    };

    setVisible();
  }
开发者ID:TazeTSchnitzel,项目名称:panui,代码行数:53,代码来源:test-radiobox.cpp

示例4: create

  void create() {
    layout.setMargin(5);
    list.append("Video");
    list.append("Audio");
    list.append("Input");
    list.setSelection(0);

    append(layout);
    append(videoPanel);
    append(audioPanel);
    append(inputPanel);
    layout.append(list, 120, ~0, 5);
    select();

    setStatusText("???");
    setStatusVisible();

    setTitle("Layout List");
    setFrameGeometry({ 64, 64, 640, 360 });
    setVisible();

    onClose = &OS::quit;
    list.onChange = { &Application::select, this };
  }
开发者ID:TazeTSchnitzel,项目名称:panui,代码行数:24,代码来源:test-panels.cpp

示例5: Application

    Application() {
        setGeometry({ 256, 256, 640, 400 });

        listA.append("Item");
        listA.append("Item");
        listA.append("Item");
        listA.append("Item");
        listA.append("Item");

        listB.append("Item");
        listB.append("Item");
        listB.append("Item");
        listB.append("Item");
        listB.append("Item");

        append(layout);
        layout.setMargin(5);
        layout.append(listA, ~0, ~0, 5);
        layout.append(listB, ~0, ~0, 0);

        onClose = &OS::quit;

        setVisible();
    }
开发者ID:vgmtool,项目名称:vgmtool,代码行数:24,代码来源:test-temp.cpp


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