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


C++ WContainerWidget::show方法代码示例

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


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

示例1: WApplication

MainPage::MainPage( const WEnvironment& env)    
    : WApplication(env)
{

    setTitle("Main page");

    this->useStyleSheet(AppPaths::cssFile);

    // Remove this 2 lines???
    userList = new WContainerWidget(root());
    userList->setStyleClass("list");


    // Remove it?
    WContainerWidget *t = new WContainerWidget();
    t->setInline(false);
    t->show();
    t->setStyleClass("big");    

    // Remove it?
    WStackedWidget *main = new WStackedWidget(root());
    main->setStyleClass("");    

    root()->removeWidget(main);




    Wt::WHBoxLayout *loginLayout = new Wt::WHBoxLayout(root());
    LoginWidget *login = new LoginWidget();
    loginLayout->addWidget(login);
    login->loggedIn().connect(this,&MainPage::setMainPage);
}
开发者ID:jlesquembre,项目名称:remote-admin,代码行数:33,代码来源:MainPage.cpp

示例2: expandContents

void WNavigationBar::expandContents()
{
  WContainerWidget *contents = resolve<WContainerWidget *>("contents");
  WInteractWidget *collapseButton
    = resolve<WInteractWidget *>("collapse-button");
  WInteractWidget *expandButton
    = resolve<WInteractWidget *>("expand-button");

  collapseButton->show();
  expandButton->hide();

  if (!animatedResponsive())
    contents->show();
  else {
    if (canOptimizeUpdates())
      contents->show();
    else
      contents->animateShow(WAnimation(WAnimation::SlideInFromTop,
				       WAnimation::Ease));
  }
}
开发者ID:GuLinux,项目名称:wt,代码行数:21,代码来源:WNavigationBar.C

示例3: undoExpandContents

void WNavigationBar::undoExpandContents()
{
  WContainerWidget *contents = resolve<WContainerWidget *>("contents");
  WInteractWidget *collapseButton
    = resolve<WInteractWidget *>("collapse-button");
  WInteractWidget *expandButton
    = resolve<WInteractWidget *>("expand-button");

  collapseButton->hide();
  expandButton->show();

  if (!animatedResponsive())
    contents->hide();
  else
    contents->show();  /* We are collapsed only in appearance */
}
开发者ID:GuLinux,项目名称:wt,代码行数:16,代码来源:WNavigationBar.C

示例4: setHidden

void WDialog::setHidden(bool hidden, const WAnimation& animation)
{
  if (isHidden() != hidden) {
    if (modal_) {
      WApplication *app = WApplication::instance();
      WContainerWidget *cover = app->dialogCover();

      if (!cover)
	return; // when application is being destroyed

      if (!hidden) {
	saveCoverState(app, cover);

	if (cover->isHidden()) {
	  if (!animation.empty()) {
	    cover->animateShow(WAnimation(WAnimation::Fade, WAnimation::Linear,
					  animation.duration() * 4));
	  } else
	    cover->show();
	}

	cover->setZIndex(impl_->zIndex() - 1);
	app->pushExposedConstraint(this);

	// FIXME: this should only blur if the active element is outside
	// of the dialog
	doJavaScript
	  ("try {"
           """var ae=document.activeElement;"
           // On IE when a dialog is shown on startup, activeElement is the
           // body. Bluring the body sends the window to the background if
           // it is the only tab.
           // http://redmine.emweb.be/boards/2/topics/6415
	   """if (ae && ae.blur && ae.nodeName != 'BODY') {"
	   ""  "document.activeElement.blur();"
           "}"
	   "} catch (e) { }");
      } else
	restoreCoverState(app, cover);
    }
  }

  WPopupWidget::setHidden(hidden, animation);
}
开发者ID:pluggulp,项目名称:wt,代码行数:44,代码来源:WDialog.C

示例5: setHidden

void WDialog::setHidden(bool hidden, const WAnimation& animation)
{
  if (isHidden() != hidden) {
    if (modal_) {
      WApplication *app = WApplication::instance();
      WContainerWidget *cover = app->dialogCover();

      if (!cover)
	return; // when application is being destroyed

      if (!hidden) {
	saveCoverState(app, cover);

	if (cover->isHidden()) {
	  if (!animation.empty()) {
	    cover->animateShow(WAnimation(WAnimation::Fade, WAnimation::Linear,
					  animation.duration() * 4));
	  } else
	    cover->show();
	}

	cover->setZIndex(impl_->zIndex() - 1);
	app->pushExposedConstraint(this);

	// FIXME: this should only blur if the active element is outside
	// of the dialog
	doJavaScript
	  ("try {"
	   """if (document.activeElement && document.activeElement.blur)"
	   ""  "document.activeElement.blur();"
	   "} catch (e) { }");
      } else
	restoreCoverState(app, cover);
    }
  }

  WCompositeWidget::setHidden(hidden, animation);
}
开发者ID:NeilNienaber,项目名称:wt,代码行数:38,代码来源:WDialog.C


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