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

C++ GIMP_INT_COMBO_BOX函数代码示例

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

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



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

示例1: gimp_clone_options_gui

GtkWidget *
gimp_clone_options_gui (GimpToolOptions *tool_options)
{
  GObject   *config = G_OBJECT (tool_options);
  GtkWidget *vbox   = gimp_paint_options_gui (tool_options);
  GtkWidget *frame;
  GtkWidget *combo;
  GtkWidget *source_vbox;
  GtkWidget *button;
  GtkWidget *hbox;

  /*  the source frame  */
  frame = gimp_frame_new (NULL);
  gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
  gtk_widget_show (frame);

  /*  the source type menu  */
  combo = gimp_prop_enum_combo_box_new (config, "clone-type", 0, 0);
  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Source"));
  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
  gtk_frame_set_label_widget (GTK_FRAME (frame), combo);
  gtk_widget_show (combo);

  source_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
  gtk_container_add (GTK_CONTAINER (frame), source_vbox);
  gtk_widget_show (source_vbox);

  button = gimp_prop_check_button_new (config, "sample-merged", NULL);
  gtk_box_pack_start (GTK_BOX (source_vbox), button, FALSE, FALSE, 0);

  g_object_bind_property_full (config, "clone-type",
                               button, "visible",
                               G_BINDING_SYNC_CREATE,
                               gimp_clone_options_sync_source,
                               NULL,
                               GINT_TO_POINTER (GIMP_CLONE_IMAGE), NULL);

  hbox = gimp_prop_pattern_box_new (NULL, GIMP_CONTEXT (tool_options),
                                    NULL, 2,
                                    "pattern-view-type", "pattern-view-size");
  gtk_box_pack_start (GTK_BOX (source_vbox), hbox, FALSE, FALSE, 0);

  g_object_bind_property_full (config, "clone-type",
                               hbox,   "visible",
                               G_BINDING_SYNC_CREATE,
                               gimp_clone_options_sync_source,
                               NULL,
                               GINT_TO_POINTER (GIMP_CLONE_PATTERN), NULL);

  combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Alignment"));
  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
  gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
  gtk_widget_show (combo);

  return vbox;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:57,代码来源:gimpcloneoptions-gui.c


示例2: gimp_levels_tool_initialize

static gboolean
gimp_levels_tool_initialize (GimpTool     *tool,
                             GimpDisplay  *display,
                             GError      **error)
{
  GimpLevelsTool *l_tool   = GIMP_LEVELS_TOOL (tool);
  GimpDrawable   *drawable = gimp_image_get_active_drawable (display->image);

  if (! drawable)
    return FALSE;

  if (gimp_drawable_is_indexed (drawable))
    {
      g_set_error (error, 0, 0,
                   _("Levels does not operate on indexed layers."));
      return FALSE;
    }

  if (! l_tool->hist)
    l_tool->hist = gimp_histogram_new ();

  levels_init (l_tool->levels);

  l_tool->channel = GIMP_HISTOGRAM_VALUE;
  l_tool->color   = gimp_drawable_is_rgb (drawable);
  l_tool->alpha   = gimp_drawable_has_alpha (drawable);

  if (l_tool->active_picker)
    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (l_tool->active_picker),
                                  FALSE);

  GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error);

  gimp_int_combo_box_set_sensitivity (GIMP_INT_COMBO_BOX (l_tool->channel_menu),
                                      levels_menu_sensitivity, l_tool, NULL);

  gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (l_tool->channel_menu),
                                 l_tool->channel);

  /* FIXME: hack */
  if (! l_tool->color)
    l_tool->channel = (l_tool->channel == GIMP_HISTOGRAM_ALPHA) ? 1 : 0;

  levels_update (l_tool, ALL);

  gimp_drawable_calculate_histogram (drawable, l_tool->hist);
  gimp_histogram_view_set_histogram (GIMP_HISTOGRAM_VIEW (l_tool->hist_view),
                                     l_tool->hist);

  return TRUE;
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:51,代码来源:gimplevelstool.c


示例3: save_dialog_version_changed

static void
save_dialog_version_changed (GtkComboBox *widget, SaveInfo *info)
{
    gint version;
    gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &version);

    if (version >= 3) {
        g_object_set (G_OBJECT (info->ctl_lowres),
                      "sensitive", TRUE,
                      "active", info->lowres,
                      NULL);
        g_object_set (G_OBJECT (info->ctl_crc),
                      "sensitive", TRUE,
                      "active", info->crc,
                      NULL);
    } else {
        g_object_set (G_OBJECT (info->ctl_lowres),
                      "sensitive", FALSE,
                      "active", TRUE,
                      NULL);
        g_object_set (G_OBJECT (info->ctl_crc),
                      "sensitive", FALSE,
                      "active", FALSE,
                      NULL);
    }
}
开发者ID:lxndr,项目名称:vtf,代码行数:26,代码来源:gimp-plugin-vtf.cpp


示例4: create_int_combo_box

static WidgetInfo *
create_int_combo_box (void)
{
  GtkWidget *vbox;
  GtkWidget *combo;
  GtkWidget *align;

  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
  align = gtk_alignment_new (0.5, 0.5, 0.5, 0.0);
  combo = gimp_int_combo_box_new ("Sobel",        1,
                                  "Prewitt",      2,
                                  "Gradient",     3,
                                  "Roberts",      4,
                                  "Differential", 5,
                                  "Laplace",      6,
                                  NULL);
  gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo), 1);

  gtk_container_add (GTK_CONTAINER (align), combo);
  gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
  gtk_box_pack_start (GTK_BOX (vbox),
                      gtk_label_new ("Int Combo Box"), FALSE, FALSE, 0);

  return new_widget_info ("gimp-widget-int-combo-box", vbox, SMALL);
}
开发者ID:LebedevRI,项目名称:gimp,代码行数:25,代码来源:widgets.c


示例5: ico_dialog_bpp_changed

static void
ico_dialog_bpp_changed (GtkWidget *combo,
                        GObject   *hbox)
{
  GtkWidget   *dialog;
  gint32       layer;
  gint         layer_num;
  gint         bpp;
  IcoSaveInfo *info;

  dialog = gtk_widget_get_toplevel (combo);

  gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (combo), &bpp);

  info = g_object_get_data (G_OBJECT (dialog), "save_info");
  g_assert (info);

  layer     = GPOINTER_TO_INT (g_object_get_data (hbox, "icon_layer"));
  layer_num = GPOINTER_TO_INT (g_object_get_data (hbox, "icon_layer_num"));

  /* Update vector entry for later when we're actually saving,
     and update the preview right away ... */
  info->depths[layer_num] = bpp;
  ico_dialog_update_icon_preview (dialog, layer, bpp);
}
开发者ID:Amerekanets,项目名称:gimp-1,代码行数:25,代码来源:ico-dialog.c


示例6: combo_get_active

void
combo_get_active (GtkWidget * combo, PreviewData * p_data,
		  gint32 * layer_ID_add, gboolean status,
		  GdkPixbuf ** pixbuf_add, SizeInfo * size_info)
{
  gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (combo), layer_ID_add);
  if (status == TRUE)
    {
      if (*pixbuf_add)
        {
          g_object_unref (G_OBJECT (*pixbuf_add));
        }
      gimp_drawable_offsets (*layer_ID_add, &(size_info->x_off), &(size_info->y_off));

      size_info->x_off -= p_data->x_off;
      size_info->y_off -= p_data->y_off;

      size_info->width = gimp_drawable_width(*layer_ID_add);
      size_info->height = gimp_drawable_height(*layer_ID_add);

      size_info_scale(size_info, p_data->factor);

      *pixbuf_add = gimp_drawable_get_thumbnail(*layer_ID_add, size_info->width, size_info->height, GIMP_PIXBUF_KEEP_ALPHA);
    }
  preview_build_pixbuf (p_data);
  gtk_widget_queue_draw (p_data->area);
}
开发者ID:Felllini,项目名称:sprezzos-world,代码行数:27,代码来源:layers_combo.c


示例7: int

    operator int() const
    {
        gint value;
        gimp_int_combo_box_get_active(GIMP_INT_COMBO_BOX(this->gimpEnumComboBox), &value);

        return value;
    }
开发者ID:Furaguiriw,项目名称:gimp-opencv-plugin,代码行数:7,代码来源:enum_widget.hpp


示例8: gimp_levels_tool_initialize

static gboolean
gimp_levels_tool_initialize (GimpTool     *tool,
                             GimpDisplay  *display,
                             GError      **error)
{
  GimpLevelsTool   *l_tool   = GIMP_LEVELS_TOOL (tool);
  GimpImage        *image    = gimp_display_get_image (display);
  GimpDrawable     *drawable = gimp_image_get_active_drawable (image);
  gdouble           scale_factor;
  gdouble           step_increment;
  gdouble           page_increment;
  gint              digits;

  if (! GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error))
    {
      return FALSE;
    }

  gimp_int_combo_box_set_sensitivity (GIMP_INT_COMBO_BOX (l_tool->channel_menu),
                                      levels_menu_sensitivity, drawable, NULL);

  gimp_drawable_calculate_histogram (drawable, l_tool->histogram);
  gimp_histogram_view_set_histogram (GIMP_HISTOGRAM_VIEW (l_tool->histogram_view),
                                     l_tool->histogram);

  if (gimp_drawable_get_component_type (drawable) == GIMP_COMPONENT_TYPE_U8)
    {
      scale_factor   = 255.0;
      step_increment = 1.0;
      page_increment = 8.0;
      digits         = 0;
    }
  else
    {
      scale_factor   = 100;
      step_increment = 0.01;
      page_increment = 1.0;
      digits         = 2;
    }

  gimp_prop_widget_set_factor (l_tool->low_input_spinbutton,
                               scale_factor, step_increment, page_increment,
                               digits);
  gimp_prop_widget_set_factor (l_tool->high_input_spinbutton,
                               scale_factor, step_increment, page_increment,
                               digits);
  gimp_prop_widget_set_factor (l_tool->low_output_spinbutton,
                               scale_factor, step_increment, page_increment,
                               digits);
  gimp_prop_widget_set_factor (l_tool->high_output_spinbutton,
                               scale_factor, step_increment, page_increment,
                               digits);

  gtk_adjustment_configure (l_tool->gamma_linear,
                            scale_factor / 2.0,
                            0, scale_factor, 0.1, 1.0, 0);

  return TRUE;
}
开发者ID:ITfrank,项目名称:gimp,代码行数:59,代码来源:gimplevelstool.c


示例9: callback_res_order_changed

static void
callback_res_order_changed (GtkWidget * res_order, gpointer data)
{
    gint order;
    PreviewData *p_data = PREVIEW_DATA (data);
    gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (res_order), &order);
    p_data->vals->res_order = order;
    callback_set_disc_warning (NULL, data);
}
开发者ID:gwhitehawk,项目名称:gimp-plugin-registry,代码行数:9,代码来源:interface_I.c


示例10: load_gui_defaults

static void
load_gui_defaults (JpegSaveGui *pg)
{
  GtkAdjustment *restart_markers;

  load_defaults ();

#define SET_ACTIVE_BTTN(field) \
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pg->field), jsvals.field)

  SET_ACTIVE_BTTN (optimize);
  SET_ACTIVE_BTTN (progressive);
  SET_ACTIVE_BTTN (use_orig_quality);
  SET_ACTIVE_BTTN (preview);
  SET_ACTIVE_BTTN (save_exif);
  SET_ACTIVE_BTTN (save_thumbnail);
  SET_ACTIVE_BTTN (save_xmp);
  SET_ACTIVE_BTTN (save_iptc);

#undef SET_ACTIVE_BTTN

/*spin button stuff*/
  g_signal_handler_block (pg->use_restart_markers, pg->handler_id_restart);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pg->use_restart_markers),
                                jsvals.restart);
  restart_markers = GTK_ADJUSTMENT (pg->scale_data);
  gtk_adjustment_set_value (restart_markers, jsvals.restart);
  g_signal_handler_unblock (pg->use_restart_markers, pg->handler_id_restart);


  gtk_adjustment_set_value (GTK_ADJUSTMENT (pg->quality),
                            jsvals.quality);
  gtk_adjustment_set_value (GTK_ADJUSTMENT (pg->smoothing),
                            jsvals.smoothing);

  if (gimp_drawable_is_rgb (drawable_ID_global))
    {
      gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (pg->subsmp),
                                     jsvals.subsmp);
    }

  gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (pg->dct),
                                 jsvals.dct);
}
开发者ID:frne,项目名称:gimp,代码行数:44,代码来源:jpeg-save.c


示例11: use_orig_qual_changed2

static void
use_orig_qual_changed2 (GtkWidget *toggle,
                        GtkWidget *combo)
{
  /* the test is (orig_quality > 0), not (orig_subsmp > 0) - this is normal */
  if (jsvals.use_orig_quality && orig_quality > 0)
    {
      gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (combo), orig_subsmp);
    }
}
开发者ID:frne,项目名称:gimp,代码行数:10,代码来源:jpeg-save.c


示例12: gimp_color_frame_set_mode

/**
 * gimp_color_frame_set_mode:
 * @frame: The #GimpColorFrame.
 * @mode:  The new @mode.
 *
 * Sets the #GimpColorFrame's color @mode. Calling this function does
 * the same as selecting the @mode from the frame's #GtkOptionMenu.
 **/
void
gimp_color_frame_set_mode (GimpColorFrame     *frame,
                           GimpColorFrameMode  mode)
{
  g_return_if_fail (GIMP_IS_COLOR_FRAME (frame));

  gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (frame->menu), mode);

  g_object_notify (G_OBJECT (frame), "mode");
}
开发者ID:LebedevRI,项目名称:gimp,代码行数:18,代码来源:gimpcolorframe.c


示例13: gimp_color_frame_menu_callback

static void
gimp_color_frame_menu_callback (GtkWidget      *widget,
                                GimpColorFrame *frame)
{
  gint value;

  if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &value))
    {
      frame->frame_mode = value;
      gimp_color_frame_update (frame);
    }
}
开发者ID:LebedevRI,项目名称:gimp,代码行数:12,代码来源:gimpcolorframe.c


示例14: dialog_marked_cb

static void dialog_marked_cb(GtkWidget *widget, gpointer data)
{
	GimpDrawable **drawable = data;
	gint32 marked_id;

	gimp_int_combo_box_get_active(GIMP_INT_COMBO_BOX(widget), &marked_id);

	if (marked_id != colorizevals.marked_id) {
		gimp_drawable_detach(*drawable);
		colorizevals.marked_id = marked_id;
		*drawable = gimp_drawable_get(marked_id);
	}
}
开发者ID:dugurca,项目名称:colorize-gimp,代码行数:13,代码来源:colorize-plugin.c


示例15: gimp_brush_select_mode_update

static void
gimp_brush_select_mode_update (GtkWidget       *widget,
                               GimpBrushSelect *select)
{
  gint paint_mode;

  if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget),
                                     &paint_mode))
    {
      gimp_context_set_paint_mode (GIMP_PDB_DIALOG (select)->context,
                                   (GimpLayerModeEffects) paint_mode);
    }
}
开发者ID:Amerekanets,项目名称:gimp,代码行数:13,代码来源:gimpbrushselect.c


示例16: cm_combo_callback

static void
cm_combo_callback (GtkWidget    *widget,
                   CmParamsType *mix)
{
  gint value;

  if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &value))
    {
      mix->output_channel = value;

      cm_set_adjusters (mix);
    }
}
开发者ID:WilfR,项目名称:Gimp-Matting,代码行数:13,代码来源:channel-mixer.c


示例17: webx_indexed_target_changed

static void
webx_indexed_target_changed (WebxIndexedTarget *indexed)
{
  gtk_widget_set_sensitive (GTK_WIDGET (indexed->remove_unused_w), TRUE);

  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (indexed->reuse_pal_w)))
    {
      if (!gimp_drawable_is_indexed (global_drawable_ID))
        { /* no user palette */
          gtk_widget_set_sensitive (indexed->reuse_pal_w, FALSE);
          gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (indexed->make_pal_w),
                                        TRUE);
        }
      else
        {
          gtk_widget_set_sensitive (indexed->reuse_pal_w, TRUE);
          gtk_widget_set_sensitive (indexed->remove_unused_w, FALSE);
          indexed->palette_type = GIMP_REUSE_PALETTE;
        }
    }

  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (indexed->make_pal_w)))
    {
      indexed->palette_type = GIMP_MAKE_PALETTE;
      gtk_widget_set_sensitive (indexed->num_colors_w, TRUE);
      gtk_widget_set_sensitive (indexed->remove_unused_w, FALSE);
    }
  else
    {
      gtk_widget_set_sensitive (indexed->num_colors_w, FALSE);
    }

  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (indexed->web_pal_w)))
    {
      indexed->palette_type = GIMP_WEB_PALETTE;
    }

  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (indexed->bw_pal_w)))
    {
      indexed->palette_type = GIMP_MONO_PALETTE;
    }

  gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (indexed->dither_type_w),
                                 &indexed->dither_type);
  indexed->num_colors = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (indexed->num_colors_w));

  indexed->remove_unused = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (indexed->remove_unused_w));
  indexed->alpha_dither = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (indexed->alpha_dither_w));

  webx_target_changed (WEBX_TARGET (indexed));
}
开发者ID:Felllini,项目名称:sprezzos-world,代码行数:51,代码来源:webx_indexed_target.c


示例18: cm_update_ui

static void
cm_update_ui (CmParamsType *mix)
{
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mix->monochrome_toggle),
                                mix->monochrome);

  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mix->preserve_luminosity_toggle),
                                mix->preserve_luminosity);

  gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (mix->combo),
                                 mix->output_channel);

  cm_set_adjusters (mix);

  gimp_preview_invalidate (GIMP_PREVIEW (preview));
}
开发者ID:WilfR,项目名称:Gimp-Matting,代码行数:16,代码来源:channel-mixer.c


示例19: print_size_info_center_changed

static void
print_size_info_center_changed (GtkWidget *combo)
{
  gint value;

  if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (combo), &value))
    {
      info.data->center = value;

      print_size_info_update_offsets ();

      if (info.preview)
        print_preview_set_image_offsets (PRINT_PREVIEW (info.preview),
                                         info.data->offset_x,
                                         info.data->offset_y);
    }
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:17,代码来源:print-page-layout.c


示例20: subsampling_changed

static void
subsampling_changed (GtkWidget *combo,
                     GtkObject *entry)
{
  gint value;

  gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (combo), &value);

  jsvals.subsmp = value;

  /*  smoothing is not supported with nonstandard sampling ratios  */
  gimp_scale_entry_set_sensitive (entry,
                                  jsvals.subsmp != JPEG_SUBSAMPLING_2x1_1x1_1x1 &&
                                  jsvals.subsmp != JPEG_SUBSAMPLING_1x2_1x1_1x1);

  make_preview ();
}
开发者ID:frne,项目名称:gimp,代码行数:17,代码来源:jpeg-save.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GIMP_IS_CHANNEL函数代码示例发布时间:2022-05-30
下一篇:
C++ GIMP_IMAGE_MAP_TOOL函数代码示例发布时间: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