• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ dt_bauhaus_combobox_get函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中dt_bauhaus_combobox_get函数的典型用法代码示例。如果您正苦于以下问题:C++ dt_bauhaus_combobox_get函数的具体用法?C++ dt_bauhaus_combobox_get怎么用?C++ dt_bauhaus_combobox_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: _blendop_mode_callback

static void
_blendop_mode_callback (GtkWidget *combo, dt_iop_gui_blend_data_t *data)
{
  data->module->blend_params->mode = data->modes[dt_bauhaus_combobox_get(data->blend_modes_combo)].mode;
  if(data->module->blend_params->mode != DEVELOP_BLEND_DISABLED)
  {
    gtk_widget_show(data->opacity_slider);
    if(data->blendif_support)
    {
      gtk_widget_show(data->blendif_enable);
      if(dt_bauhaus_combobox_get(data->blendif_enable))
        gtk_widget_show(GTK_WIDGET(data->blendif_box));
    }
  }
  else
  {
    gtk_widget_hide(data->opacity_slider);
    if(data->blendif_support)
    {
      gtk_widget_hide(GTK_WIDGET(data->blendif_enable));
      gtk_widget_hide(GTK_WIDGET(data->blendif_box));
    }
  }
  dt_dev_add_history_item(darktable.develop, data->module, TRUE);
}
开发者ID:bgK,项目名称:darktable,代码行数:25,代码来源:blend_gui.c


示例2: button_pressed

int button_pressed(struct dt_lib_module_t *self, double x, double y, double pressure, int which, int type,
                   uint32_t state)
{
  dt_lib_live_view_t *lib = (dt_lib_live_view_t *)self->data;
  int result = 0;

  int imgid = 0;
  switch(dt_bauhaus_combobox_get(lib->overlay))
  {
    case OVERLAY_SELECTED:
      imgid = dt_view_tethering_get_selected_imgid(darktable.view_manager);
      break;
    case OVERLAY_ID:
      imgid = lib->imgid;
      break;
  }

  if(imgid > 0 && dt_bauhaus_combobox_get(lib->overlay_splitline))
  {
    const double width = lib->overlay_x1 - lib->overlay_x0;
    const double height = lib->overlay_y1 - lib->overlay_y0;

    // splitline position to absolute coords:
    double sl_x = lib->overlay_x0 + lib->splitline_x * width;
    double sl_y = lib->overlay_y0 + lib->splitline_y * height;

    gboolean mouse_over_control = (lib->splitline_rotation % 2 == 0) ? (fabs(sl_x - x) < 5)
                                                                     : (fabs(sl_y - y) < 5);

    /* do the split rotating */
    if(which == 1 && fabs(sl_x - x) < 7 && fabs(sl_y - y) < 7)
    {
      /* let's rotate */
      lib->splitline_rotation = (lib->splitline_rotation + 1) % 4;

      dt_control_queue_redraw_center();
      result = 1;
    }
    /* do the dragging !? */
    else if(which == 1 && mouse_over_control)
    {
      lib->splitline_dragging = TRUE;
      dt_control_queue_redraw_center();
      result = 1;
    }
  }
  return result;
}
开发者ID:AlicVB,项目名称:darktable,代码行数:48,代码来源:live_view.c


示例3: mode_callback

static void mode_callback(GtkWidget *w, dt_iop_module_t *self)
{
  dt_iop_bilat_params_t *p = (dt_iop_bilat_params_t *)self->params;
  p->mode = dt_bauhaus_combobox_get(w);
  dt_iop_bilat_gui_data_t *g = (dt_iop_bilat_gui_data_t *)self->gui_data;
  if(p->mode == s_mode_local_laplacian)
  {
    gtk_widget_set_visible(g->highlights, TRUE);
    gtk_widget_set_visible(g->shadows, TRUE);
    gtk_widget_set_visible(g->midtone, TRUE);
    gtk_widget_set_visible(g->range, FALSE);
    gtk_widget_set_visible(g->spatial, FALSE);
    dt_bauhaus_slider_set(g->highlights, 100.0f);
    dt_bauhaus_slider_set(g->shadows, 100.0f);
  }
  else
  {
    gtk_widget_set_visible(g->highlights, FALSE);
    gtk_widget_set_visible(g->shadows, FALSE);
    gtk_widget_set_visible(g->midtone, FALSE);
    gtk_widget_set_visible(g->range, TRUE);
    gtk_widget_set_visible(g->spatial, TRUE);
    dt_bauhaus_slider_set(g->range, 20.0f);
    dt_bauhaus_slider_set(g->spatial, 50.0f);
  }
  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
开发者ID:CChiappa,项目名称:darktable,代码行数:27,代码来源:bilat.c


示例4: _blendop_blendif_callback

static void
_blendop_blendif_callback(GtkWidget *b, dt_iop_gui_blend_data_t *data)
{
  if(dt_bauhaus_combobox_get(b))
  {
    data->module->blend_params->blendif |= (1<<DEVELOP_BLENDIF_active);
    gtk_widget_show(GTK_WIDGET(data->blendif_box));
  }
  else
  {
    /* switch off color picker if it was requested by blendif */
    if(data->module->request_color_pick < 0)
    {
      data->module->request_color_pick = 0;
      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data->colorpicker), 0);
    }

    data->module->request_mask_display = 0;
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data->showmask), 0);
    data->module->suppress_mask = 0;
    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data->suppress), 0);

    gtk_widget_hide(GTK_WIDGET(data->blendif_box));
    data->module->blend_params->blendif &= ~(1<<DEVELOP_BLENDIF_active);
  }
  dt_dev_add_history_item(darktable.develop, data->module, TRUE);
}
开发者ID:minusdreidb,项目名称:darktable,代码行数:27,代码来源:blend_gui.c


示例5: aspect_changed

static void
aspect_changed (GtkWidget *combo, dt_iop_module_t *self)
{
  dt_iop_borders_gui_data_t *g = (dt_iop_borders_gui_data_t *)self->gui_data;
  dt_iop_borders_params_t *p = (dt_iop_borders_params_t *)self->params;
  int which = dt_bauhaus_combobox_get(combo);
  const char* text = dt_bauhaus_combobox_get_text(combo);
  if (which < 0)
  {
    p->aspect = DT_IOP_BORDERS_ASPECT_CONSTANT_VALUE;
    if(text)
    {
      const char *c = text;
      while(*c != ':' && *c != '/' && c < text + strlen(text)) c++;
      if(c < text + strlen(text) - 1)
      {
        // *c = '\0'; // not needed, atof will stop there.
        c++;
        p->aspect = atof(text) / atof(c);
        g_strlcpy(p->aspect_text, text, sizeof(p->aspect_text));
      }
    }
  }
  else if (which < DT_IOP_BORDERS_ASPECT_COUNT)
  {
    g_strlcpy(p->aspect_text, text, sizeof(p->aspect_text));
    p->aspect = g->aspect_ratios[which];
  }
  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
开发者ID:bartokk,项目名称:darktable,代码行数:30,代码来源:borders.c


示例6: mode_changed

static void mode_changed(GtkWidget *combo, dt_iop_module_t *self)
{
  dt_iop_highlights_params_t *p = (dt_iop_highlights_params_t *)self->params;
  p->mode = dt_bauhaus_combobox_get(combo);
  if(p->mode > DT_IOP_HIGHLIGHTS_INPAINT) p->mode = DT_IOP_HIGHLIGHTS_INPAINT;
  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
开发者ID:VolkerChristian,项目名称:darktable,代码行数:7,代码来源:highlights.c


示例7: dt_iop_levels_mode_callback

static void dt_iop_levels_mode_callback(GtkWidget *combo, gpointer user_data)
{
  dt_iop_module_t *self = (dt_iop_module_t *)user_data;

  if(darktable.gui->reset) return;

  dt_iop_levels_gui_data_t *g = (dt_iop_levels_gui_data_t *)self->gui_data;
  dt_iop_levels_params_t *p = (dt_iop_levels_params_t *)self->params;

  const dt_iop_levels_mode_t new_mode
      = GPOINTER_TO_UINT(g_list_nth_data(g->modes, dt_bauhaus_combobox_get(combo)));

  switch(new_mode)
  {
    case LEVELS_MODE_AUTOMATIC:
      p->mode = LEVELS_MODE_AUTOMATIC;
      gtk_stack_set_visible_child_name(GTK_STACK(g->mode_stack), "automatic");
      break;
    case LEVELS_MODE_MANUAL:
    default:
      p->mode = LEVELS_MODE_MANUAL;
      gtk_stack_set_visible_child_name(GTK_STACK(g->mode_stack), "manual");
      break;
  }

  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
开发者ID:AdamMajer,项目名称:darktable,代码行数:27,代码来源:levels.c


示例8: deflicker_histogram_source_callback

static void deflicker_histogram_source_callback(GtkWidget *combo, gpointer user_data)
{
  dt_iop_module_t *self = (dt_iop_module_t *)user_data;

  if(self->dt->gui->reset) return;

  if(!dt_image_is_raw(&self->dev->image_storage)) return;

  dt_iop_exposure_gui_data_t *g = (dt_iop_exposure_gui_data_t *)self->gui_data;
  dt_iop_exposure_params_t *p = (dt_iop_exposure_params_t *)self->params;

  const dt_iop_exposure_deflicker_histogram_source_t new_mode
      = GPOINTER_TO_UINT(g_list_nth_data(g->deflicker_histogram_sources, dt_bauhaus_combobox_get(combo)));

  switch(new_mode)
  {
    case DEFLICKER_HISTOGRAM_SOURCE_SOURCEFILE:
      p->deflicker_histogram_source = DEFLICKER_HISTOGRAM_SOURCE_SOURCEFILE;
      deflicker_prepare_histogram(self, &g->deflicker_histogram, &g->deflicker_histogram_stats);
      break;
    case DEFLICKER_HISTOGRAM_SOURCE_THUMBNAIL:
    default:
      p->deflicker_histogram_source = DEFLICKER_HISTOGRAM_SOURCE_THUMBNAIL;
      free(g->deflicker_histogram);
      g->deflicker_histogram = NULL;
      break;
  }

  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
开发者ID:Acidburn0zzz,项目名称:darktable,代码行数:30,代码来源:exposure.c


示例9: aspect_orient_changed

static void aspect_orient_changed(GtkWidget *widget, dt_iop_module_t *self)
{
  if(darktable.gui->reset) return;
  dt_iop_borders_params_t *p = (dt_iop_borders_params_t *)self->params;
  p->aspect_orient = dt_bauhaus_combobox_get(widget);
  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
开发者ID:CarVac,项目名称:darktable,代码行数:7,代码来源:borders.c


示例10: key_gamutcheck_callback

static gboolean key_gamutcheck_callback(GtkAccelGroup *accel_group,
                                        GObject *acceleratable,
                                        guint keyval, GdkModifierType modifier,
                                        gpointer data)
{
  dt_iop_module_t* self = (dt_iop_module_t*)data;
  dt_iop_colorout_gui_data_t *g = (dt_iop_colorout_gui_data_t *)self->gui_data;
  dt_iop_colorout_params_t *p = (dt_iop_colorout_params_t *)self->params;


  if(p->softproof_enabled == DT_SOFTPROOF_GAMUTCHECK)
    p->softproof_enabled = DT_SOFTPROOF_DISABLED;
  else
    p->softproof_enabled = DT_SOFTPROOF_GAMUTCHECK;

  g->softproof_enabled = p->softproof_enabled;

  if(p->softproof_enabled)
  {
    int pos = dt_bauhaus_combobox_get(g->cbox5);
    gchar *filename = _get_profile_from_pos(g->profiles, pos);
    if (filename)
      g_strlcpy(p->softproofprofile, filename, sizeof(p->softproofprofile));
  }

  dt_dev_add_history_item(darktable.develop, self, TRUE);
  dt_control_queue_redraw_center();
  return TRUE;
}
开发者ID:jimmy1977,项目名称:darktable,代码行数:29,代码来源:colorout.c


示例11: autoscale_ab_callback

static void autoscale_ab_callback(GtkWidget *widget, dt_iop_module_t *self)
{
  if(darktable.gui->reset) return;
  dt_iop_tonecurve_gui_data_t *g = (dt_iop_tonecurve_gui_data_t *)self->gui_data;
  dt_iop_tonecurve_params_t *p = (dt_iop_tonecurve_params_t *)self->params;
  p->tonecurve_autoscale_ab = 1 - dt_bauhaus_combobox_get(g->autoscale_ab);
  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
开发者ID:Acidburn0zzz,项目名称:darktable,代码行数:8,代码来源:tonecurve.c


示例12: intent_changed

static void intent_changed(GtkWidget *widget, gpointer user_data)
{
  dt_iop_module_t *self = (dt_iop_module_t *)user_data;
  if(self->dt->gui->reset) return;
  dt_iop_colorout_params_t *p = (dt_iop_colorout_params_t *)self->params;
  p->intent = (dt_iop_color_intent_t)dt_bauhaus_combobox_get(widget);
  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
开发者ID:dirkbr,项目名称:darktable,代码行数:8,代码来源:colorout.c


示例13: presets_changed

static void
presets_changed (GtkWidget *widget, gpointer user_data)
{
    dt_iop_module_t *self = (dt_iop_module_t *)user_data;
    apply_preset(self);
    const int pos = dt_bauhaus_combobox_get(widget);
    dt_iop_temperature_gui_data_t *g = (dt_iop_temperature_gui_data_t *)self->gui_data;
    gtk_widget_set_sensitive(g->finetune, pos > 2);
}
开发者ID:rharrison10,项目名称:darktable,代码行数:9,代码来源:temperature.c


示例14: patch_callback

static void patch_callback(GtkWidget *combo, gpointer user_data)
{
  dt_iop_module_t *self = (dt_iop_module_t *)user_data;
  dt_iop_colorchecker_gui_data_t *g = (dt_iop_colorchecker_gui_data_t *)self->gui_data;
  g->patch = dt_bauhaus_combobox_get(combo);
  // switch off colour picker, it'll interfere with other changes of the patch:
  self->request_color_pick = DT_REQUEST_COLORPICK_OFF;
  self->gui_update(self);
}
开发者ID:PkmX,项目名称:darktable,代码行数:9,代码来源:colorchecker.c


示例15: sizeto_callback

static void sizeto_callback(GtkWidget *tb, gpointer user_data)
{
  dt_iop_module_t *self = (dt_iop_module_t *)user_data;

  if(darktable.gui->reset) return;
  dt_iop_watermark_params_t *p = (dt_iop_watermark_params_t *)self->params;
  p->sizeto = dt_bauhaus_combobox_get(tb);
  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
开发者ID:edgomez,项目名称:darktable,代码行数:9,代码来源:watermark.c


示例16: scale_callback

static void scale_callback(GtkWidget *widget, gpointer user_data)
{
  dt_iop_module_t *self = (dt_iop_module_t *)user_data;
  dt_iop_basecurve_gui_data_t *g = (dt_iop_basecurve_gui_data_t *)self->gui_data;
  if(dt_bauhaus_combobox_get(widget))
    g->loglogscale = 64;
  else
    g->loglogscale = 0;
  gtk_widget_queue_draw(GTK_WIDGET(g->area));
}
开发者ID:thatguystone,项目名称:darktable,代码行数:10,代码来源:basecurve.c


示例17: _golden_mean_changed

static void _golden_mean_changed(GtkWidget *combo, _golden_mean_t *user_data)
{
  int which = dt_bauhaus_combobox_get(combo);

  // remember setting
  dt_conf_set_int("plugins/darkroom/clipping/golden_extras", which);

  _golden_mean_set_data(user_data, which);

  dt_control_queue_redraw_center();
}
开发者ID:CarVac,项目名称:darktable,代码行数:11,代码来源:guides.c


示例18: bilat_callback

static void
bilat_callback (GtkWidget *widget, gpointer user_data)
{
  dt_iop_module_t *self = (dt_iop_module_t *)user_data;
  dt_iop_lowpass_params_t *p = (dt_iop_lowpass_params_t *)self->params;
  if(dt_bauhaus_combobox_get(widget))
    p->radius = -fabsf(p->radius);
  else
    p->radius = fabsf(p->radius);
  dt_dev_add_history_item(darktable.develop, self, TRUE);
}
开发者ID:jmarca,项目名称:darktable,代码行数:11,代码来源:lowpass.c


示例19: bpp_combobox_changed

static void bpp_combobox_changed(GtkWidget *widget, gpointer user_data)
{
  const int bpp = dt_bauhaus_combobox_get(widget);

  if(bpp == 1)
    dt_conf_set_int("plugins/imageio/format/tiff/bpp", 16);
  else if(bpp == 2)
    dt_conf_set_int("plugins/imageio/format/tiff/bpp", 32);
  else // (bpp == 0)
    dt_conf_set_int("plugins/imageio/format/tiff/bpp", 8);
}
开发者ID:MarcelloPerathoner,项目名称:darktable,代码行数:11,代码来源:tiff.c


示例20: dt_iop_gui_update_blending

void dt_iop_gui_update_blending(dt_iop_module_t *module)
{
  dt_iop_gui_blend_data_t *bd = (dt_iop_gui_blend_data_t*)module->blend_data;

  if (!(module->flags() & IOP_FLAGS_SUPPORTS_BLENDING) || !bd || !bd->blend_inited) return;

  int reset = darktable.gui->reset;
  darktable.gui->reset = 1;

  dt_bauhaus_combobox_set(bd->blend_modes_combo, dt_iop_gui_blending_mode_seq(bd, module->blend_params->mode));
  dt_bauhaus_slider_set(bd->opacity_slider, module->blend_params->opacity);

  dt_iop_gui_update_blendif(module);


  /* now show hide controls as required */
  if(bd->modes[dt_bauhaus_combobox_get(bd->blend_modes_combo)].mode == DEVELOP_BLEND_DISABLED)
  {
    gtk_widget_hide(GTK_WIDGET(bd->opacity_slider));
    if(bd->blendif_support && bd->blendif_inited)
    {
      gtk_widget_hide(GTK_WIDGET(bd->blendif_box));
      gtk_widget_hide(GTK_WIDGET(bd->blendif_enable));
    }
  }
  else
  {
    gtk_widget_show(GTK_WIDGET(bd->opacity_slider));
    if(bd->blendif_support && bd->blendif_inited)
    {
      gtk_widget_show(GTK_WIDGET(bd->blendif_enable));
      if(dt_bauhaus_combobox_get(bd->blendif_enable) != 0)
        gtk_widget_show(GTK_WIDGET(bd->blendif_box));
      else
        gtk_widget_hide(GTK_WIDGET(bd->blendif_box));
    }
  }
  darktable.gui->reset = reset;
}
开发者ID:minusdreidb,项目名称:darktable,代码行数:39,代码来源:blend_gui.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ dt_bauhaus_combobox_set函数代码示例发布时间:2022-05-30
下一篇:
C++ dt_bauhaus_combobox_add函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap