本文整理汇总了C++中Style::add_trigger_any方法的典型用法代码示例。如果您正苦于以下问题:C++ Style::add_trigger_any方法的具体用法?C++ Style::add_trigger_any怎么用?C++ Style::add_trigger_any使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Style
的用法示例。
在下文中一共展示了Style::add_trigger_any方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void FileChooserImpl::init(
FileChooser* chooser, Style* s, FileChooserAction* a
) {
fchooser_ = chooser;
fbrowser_ = nil;
editor_ = nil;
filter_ = nil;
directory_filter_ = nil;
filter_map_ = nil;
dir_ = Directory::open(*name_);
if (dir_ == nil) {
dir_ = Directory::current();
/* and what if we can't read the current directory? */
}
Resource::ref(a);
action_ = a;
style_ = new Style(s);
Resource::ref(style_);
style_->alias("FileChooser");
style_->alias("Dialog");
update_ = new ActionCallback(FileChooserImpl)(
this, &FileChooserImpl::build
);
style_->add_trigger_any(update_);
build();
}
示例2: init
void SymChooserImpl::init(
SymChooser* chooser, Style* s, SymChooserAction* a
) {
fchooser_ = chooser;
filter_map_ = nil;
Resource::ref(a);
action_ = a;
style_ = new Style(s);
Resource::ref(style_);
style_->alias("FileChooser");
style_->alias("Dialog");
update_ = new ActionCallback(SymChooserImpl)(
this, &SymChooserImpl::build
);
style_->add_trigger_any(update_);
build();
}