本文整理汇总了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);
}
示例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));
}
}
示例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 */
}
示例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);
}
示例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);
}