当前位置: 首页>>代码示例>>C++>>正文


C++ GIMP_INT_COMBO_BOX函数代码示例

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


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


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