本文整理汇总了C++中Filter::getname方法的典型用法代码示例。如果您正苦于以下问题:C++ Filter::getname方法的具体用法?C++ Filter::getname怎么用?C++ Filter::getname使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Filter
的用法示例。
在下文中一共展示了Filter::getname方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: on_add_effect
void on_add_effect(char *name) {
gtk_menu_set_active(menu_effect,0);
Layer *laysel = (Layer*) env->layers.selected();
Filter *filt;
if(!laysel) {
error("no layer selected for effect %s",name); return; }
/* TODO plugin selection by name inside plugger
i don't do this now, will develop LiViDO and come back later */
for(int c=0; (filt = (Filter*)env->plugger.plugs[c]) ; c++) {
if(filt->list) continue;
if(strcasecmp(filt->getname(),name)==0) {
if(!filt->init(&laysel->geo)) {
error("Filter %s can't initialize",filt->getname());
continue;
}
laysel->filters.append(filt);
/* filter is automatically selected */
laysel->filters.sel(0);
filt->sel(true);
}
}
}
示例2: update_effect_list
void update_effect_list() {
gtk_tree_store_clear(effect_store);
Layer *laysel = (Layer*) env->layers.selected();
if(!laysel) return;
laysel->filters.lock();
Filter *filt = (Filter*)laysel->filters.begin();
while(filt) {
gtk_tree_store_append(effect_store,&iter,NULL);
gtk_tree_store_set(effect_store,&iter,
EFFECT_ACTIVE,filt->active,
EFFECT_NAME,filt->getname(),
EFFECT_OBJ,filt,
-1);
filt = (Filter*)filt->next;
}
laysel->filters.unlock();
}
示例3: on_effect_select
/* =================== EFFECT LIST */
void on_effect_select(GtkTreeSelection *sel, gpointer data) {
func("%s(%p,%p)",__FUNCTION__,sel,data);
GtkTreeModel *model;
Filter *effsel;
if(gtk_tree_selection_get_selected(sel,&model,&effect_iter)) {
// gtk_tree_selection_select_iter(sel,&layer_iter);
gtk_tree_model_get(model,&effect_iter,EFFECT_OBJ,&effsel,-1);
if(effsel) {
Layer *laysel = (Layer*) env->layers.selected();
if(!laysel) return;
func("selected effect %s on layer %s",
effsel->getname(), laysel->get_name());
laysel->filters.sel(0); /* deselect all */
effsel->sel(true); /* select the one */
}
}
}