static void gimp_mandala_class_init (GimpMandalaClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GimpSymmetryClass *symmetry_class = GIMP_SYMMETRY_CLASS (klass); GParamSpec *pspec; object_class->constructed = gimp_mandala_constructed; object_class->finalize = gimp_mandala_finalize; object_class->set_property = gimp_mandala_set_property; object_class->get_property = gimp_mandala_get_property; symmetry_class->label = _("Mandala"); symmetry_class->update_strokes = gimp_mandala_update_strokes; symmetry_class->get_operation = gimp_mandala_get_operation; symmetry_class->active_changed = gimp_mandala_active_changed; GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_CENTER_X, "center-x", _("Center abscissa"), NULL, 0.0, G_MAXDOUBLE, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI); pspec = g_object_class_find_property (object_class, "center-x"); gegl_param_spec_set_property_key (pspec, "unit", "pixel-coordinate"); gegl_param_spec_set_property_key (pspec, "axis", "x"); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_CENTER_Y, "center-y", _("Center ordinate"), NULL, 0.0, G_MAXDOUBLE, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI); pspec = g_object_class_find_property (object_class, "center-y"); gegl_param_spec_set_property_key (pspec, "unit", "pixel-coordinate"); gegl_param_spec_set_property_key (pspec, "axis", "y"); GIMP_CONFIG_PROP_INT (object_class, PROP_SIZE, "size", _("Number of points"), NULL, 1, 100, 6.0, GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_DISABLE_TRANSFORMATION, "disable-transformation", _("Disable brush transform"), _("Disable brush rotation"), FALSE, GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI); }
static void gimp_tiling_class_init (GimpTilingClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GimpSymmetryClass *symmetry_class = GIMP_SYMMETRY_CLASS (klass); object_class->constructed = gimp_tiling_constructed; object_class->finalize = gimp_tiling_finalize; object_class->set_property = gimp_tiling_set_property; object_class->get_property = gimp_tiling_get_property; symmetry_class->label = _("Tiling"); symmetry_class->update_strokes = gimp_tiling_update_strokes; symmetry_class->get_operation = gimp_tiling_get_operation; GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_X_INTERVAL, "x-interval", _("Interval X"), _("Interval on the X axis (pixels)"), 0.0, 10000.0, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_Y_INTERVAL, "y-interval", _("Interval Y"), _("Interval on the Y axis (pixels)"), 0.0, 10000.0, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SHIFT, "shift", _("Shift"), _("X-shift between lines (pixels)"), 0.0, 10000.0, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI); GIMP_CONFIG_PROP_INT (object_class, PROP_X_MAX, "x-max", _("Max strokes X"), _("Maximum number of strokes on the X axis"), 0, 100, 0, GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI); GIMP_CONFIG_PROP_INT (object_class, PROP_Y_MAX, "y-max", _("Max strokes Y"), _("Maximum number of strokes on the Y axis"), 0, 100, 0, GIMP_PARAM_STATIC_STRINGS | GIMP_SYMMETRY_PARAM_GUI); }
static void gimp_levels_config_class_init (GimpLevelsConfigClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass); object_class->set_property = gimp_levels_config_set_property; object_class->get_property = gimp_levels_config_get_property; viewable_class->default_icon_name = "gimp-tool-levels"; GIMP_CONFIG_PROP_ENUM (object_class, PROP_CHANNEL, "channel", _("Channel"), _("The affected channel"), GIMP_TYPE_HISTOGRAM_CHANNEL, GIMP_HISTOGRAM_VALUE, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_GAMMA, "gamma", _("Gamma"), _("Gamma"), 0.1, 10.0, 1.0, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LOW_INPUT, "low-input", _("Low Input"), _("Low Input"), 0.0, 1.0, 0.0, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_HIGH_INPUT, "high-input", _("High Input"), _("High Input"), 0.0, 1.0, 1.0, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LOW_OUTPUT, "low-output", _("Low Output"), _("Low Output"), 0.0, 1.0, 0.0, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_HIGH_OUTPUT, "high-output", _("High Output"), _("High Output"), 0.0, 1.0, 1.0, 0); }
static void gimp_color_options_class_init (GimpColorOptionsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->set_property = gimp_color_options_set_property; object_class->get_property = gimp_color_options_get_property; GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SAMPLE_MERGED, "sample-merged", _("Sample merged"), NULL, FALSE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SAMPLE_AVERAGE, "sample-average", _("Sample average"), NULL, TRUE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_AVERAGE_RADIUS, "average-radius", _("Radius"), _("Color Picker Average Radius"), 1.0, 300.0, 3.0, GIMP_PARAM_STATIC_STRINGS); }
static void gimp_bucket_fill_options_class_init (GimpBucketFillOptionsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->set_property = gimp_bucket_fill_options_set_property; object_class->get_property = gimp_bucket_fill_options_get_property; GIMP_CONFIG_PROP_ENUM (object_class, PROP_FILL_MODE, "fill-mode", _("Fill type"), NULL, GIMP_TYPE_BUCKET_FILL_MODE, GIMP_BUCKET_FILL_FG, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_FILL_SELECTION, "fill-selection", _("Fill selection"), _("Which area will be filled"), FALSE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_FILL_TRANSPARENT, "fill-transparent", _("Fill transparent areas"), _("Allow completely transparent regions " "to be filled"), TRUE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SAMPLE_MERGED, "sample-merged", _("Sample merged"), _("Base filled area on all visible layers"), FALSE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_DIAGONAL_NEIGHBORS, "diagonal-neighbors", _("Diagonal neighbors"), _("Treat diagonally neighboring pixels as " "connected"), FALSE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_THRESHOLD, "threshold", _("Threshold"), _("Maximum color difference"), 0.0, 255.0, 15.0, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_FILL_CRITERION, "fill-criterion", _("Fill by"), _("Criterion used for determining color similarity"), GIMP_TYPE_SELECT_CRITERION, GIMP_SELECT_CRITERION_COMPOSITE, GIMP_PARAM_STATIC_STRINGS); }
static void gimp_colorize_config_class_init (GimpColorizeConfigClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass); GimpHSL hsl; GimpRGB rgb; object_class->set_property = gimp_colorize_config_set_property; object_class->get_property = gimp_colorize_config_get_property; viewable_class->default_icon_name = "gimp-tool-colorize"; GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_HUE, "hue", _("Hue"), _("Hue"), 0.0, 1.0, 0.5, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SATURATION, "saturation", _("Saturation"), _("Saturation"), 0.0, 1.0, 0.5, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LIGHTNESS, "lightness", _("Lightness"), _("Lightness"), -1.0, 1.0, 0.0, 0); gimp_hsl_set (&hsl, 0.5, 0.5, 0.5); gimp_hsl_set_alpha (&hsl, 1.0); gimp_hsl_to_rgb (&hsl, &rgb); g_object_class_install_property (object_class, PROP_COLOR, gimp_param_spec_rgb ("color", "Color", "The color", FALSE, &rgb, G_PARAM_READWRITE)); }
static void gimp_hue_saturation_config_class_init (GimpHueSaturationConfigClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass); object_class->set_property = gimp_hue_saturation_config_set_property; object_class->get_property = gimp_hue_saturation_config_get_property; viewable_class->default_icon_name = "gimp-tool-hue-saturation"; GIMP_CONFIG_PROP_ENUM (object_class, PROP_RANGE, "range", _("Range"), _("The affected range"), GIMP_TYPE_HUE_RANGE, GIMP_HUE_RANGE_ALL, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_HUE, "hue", _("Hue"), _("Hue"), -1.0, 1.0, 0.0, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SATURATION, "saturation", _("Saturation"), _("Saturation"), -1.0, 1.0, 0.0, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LIGHTNESS, "lightness", _("Lightness"), _("Lightness"), -1.0, 1.0, 0.0, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_OVERLAP, "overlap", _("Overlap"), _("Overlap"), 0.0, 1.0, 0.0, 0); }
static void gimp_region_select_options_class_init (GimpRegionSelectOptionsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->set_property = gimp_region_select_options_set_property; object_class->get_property = gimp_region_select_options_get_property; GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SELECT_TRANSPARENT, "select-transparent", _("Select transparent areas"), _("Allow completely transparent regions " "to be selected"), TRUE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SAMPLE_MERGED, "sample-merged", _("Sample merged"), _("Base selection on all visible layers"), FALSE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_DIAGONAL_NEIGHBORS, "diagonal-neighbors", _("Diagonal neighbors"), _("Treat diagonally neighboring pixels as " "connected"), FALSE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_THRESHOLD, "threshold", _("Threshold"), _("Maximum color difference"), 0.0, 255.0, 15.0, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_SELECT_CRITERION, "select-criterion", _("Select by"), _("Selection criterion"), GIMP_TYPE_SELECT_CRITERION, GIMP_SELECT_CRITERION_COMPOSITE, GIMP_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_DRAW_MASK, g_param_spec_boolean ("draw-mask", _("Draw mask"), _("Draw the selected region's mask"), FALSE, G_PARAM_READWRITE | GIMP_PARAM_STATIC_STRINGS)); }
static void gimp_brightness_contrast_config_class_init (GimpBrightnessContrastConfigClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass); object_class->set_property = gimp_brightness_contrast_config_set_property; object_class->get_property = gimp_brightness_contrast_config_get_property; viewable_class->default_icon_name = "gimp-tool-brightness-contrast"; GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_BRIGHTNESS, "brightness", _("Brightness"), _("Brightness"), -1.0, 1.0, 0.0, 0); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_CONTRAST, "contrast", _("Contrast"), _("Contrast"), -1.0, 1.0, 0.0, 0); }
static void gimp_smudge_options_class_init (GimpSmudgeOptionsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->set_property = gimp_smudge_options_set_property; object_class->get_property = gimp_smudge_options_get_property; GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_RATE, "rate", C_("smudge-tool", "Rate"), _("The strength of smudging"), 0.0, 100.0, SMUDGE_DEFAULT_RATE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_FLOW, "flow", C_("smudge-tool", "Flow"), _("The amount of brush color to blend"), 0.0, 100.0, SMUDGE_DEFAULT_FLOW, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_NO_ERASING, "no-erasing", C_("smudge-tool", "No erasing effect"), _("Never decrease alpha of existing pixels"), SMUDGE_DEFAULT_NO_ERASING, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SAMPLE_MERGED, "sample-merged", _("Sample merged"), NULL, FALSE, GIMP_PARAM_STATIC_STRINGS); }
static void cdisplay_gamma_class_init (CdisplayGammaClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GimpColorDisplayClass *display_class = GIMP_COLOR_DISPLAY_CLASS (klass); object_class->get_property = cdisplay_gamma_get_property; object_class->set_property = cdisplay_gamma_set_property; GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_GAMMA, "gamma", _("Gamma"), NULL, 0.01, 10.0, DEFAULT_GAMMA, 0); display_class->name = _("Gamma"); display_class->help_id = "gimp-colordisplay-gamma"; display_class->icon_name = GIMP_STOCK_DISPLAY_FILTER_GAMMA; display_class->convert_buffer = cdisplay_gamma_convert_buffer; display_class->configure = cdisplay_gamma_configure; }
static void gimp_paint_options_class_init (GimpPaintOptionsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = gimp_paint_options_dispose; object_class->finalize = gimp_paint_options_finalize; object_class->set_property = gimp_paint_options_set_property; object_class->get_property = gimp_paint_options_get_property; g_object_class_install_property (object_class, PROP_PAINT_INFO, g_param_spec_object ("paint-info", NULL, NULL, GIMP_TYPE_PAINT_INFO, GIMP_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_USE_APPLICATOR, g_param_spec_boolean ("use-applicator", "Use GimpApplicator", NULL, FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_BRUSH_SIZE, "brush-size", _("Size"), _("Brush Size"), 1.0, GIMP_BRUSH_MAX_SIZE, DEFAULT_BRUSH_SIZE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_BRUSH_ZOOM, "brush-zoom", _("Brush Zoom"), _("Link brush size with canvas zoom"), DEFAULT_BRUSH_ZOOM, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_BRUSH_ASPECT_RATIO, "brush-aspect-ratio", _("Aspect Ratio"), _("Brush Aspect Ratio"), -20.0, 20.0, DEFAULT_BRUSH_ASPECT_RATIO, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_BRUSH_ANGLE, "brush-angle", _("Angle"), _("Brush Angle"), -180.0, 180.0, DEFAULT_BRUSH_ANGLE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_BRUSH_SPACING, "brush-spacing", _("Spacing"), _("Brush Spacing"), 0.01, 50.0, DEFAULT_BRUSH_SPACING, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_BRUSH_HARDNESS, "brush-hardness", _("Hardness"), _("Brush Hardness"), 0.0, 1.0, DEFAULT_BRUSH_HARDNESS, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_BRUSH_FORCE, "brush-force", _("Force"), _("Brush Force"), 0.0, 1.0, DEFAULT_BRUSH_FORCE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_BRUSH_LINK_SIZE, "brush-link-size", _("Link Size"), _("Link brush size to brush native"), DEFAULT_BRUSH_LINK_SIZE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_BRUSH_LINK_ASPECT_RATIO, "brush-link-aspect-ratio", _("Link Aspect Ratio"), _("Link brush aspect ratio to brush native"), DEFAULT_BRUSH_LINK_ASPECT_RATIO, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_BRUSH_LINK_ANGLE, "brush-link-angle", _("Link Angle"), _("Link brush angle to brush native"), DEFAULT_BRUSH_LINK_ANGLE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_BRUSH_LINK_SPACING, "brush-link-spacing", _("Link Spacing"), _("Link brush spacing to brush native"), DEFAULT_BRUSH_LINK_SPACING, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_BRUSH_LINK_HARDNESS, "brush-link-hardness", _("Link Hardness"), _("Link brush hardness to brush native"), DEFAULT_BRUSH_LINK_HARDNESS, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_APPLICATION_MODE, "application-mode", _("Incremental"), _("Every stamp has its own opacity"), GIMP_TYPE_PAINT_APPLICATION_MODE, DEFAULT_APPLICATION_MODE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_HARD, "hard", _("Hard edge"), _("Ignore fuzziness of the current brush"), DEFAULT_HARD, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_USE_JITTER, "use-jitter", _("Apply Jitter"), _("Scatter brush as you paint"), DEFAULT_USE_JITTER, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_JITTER_AMOUNT, "jitter-amount", _("Amount"), _("Distance of scattering"), 0.0, 50.0, DEFAULT_JITTER_AMOUNT, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_DYNAMICS_EXPANDED, "dynamics-expanded", _("Dynamics Options"), NULL, DEFAULT_DYNAMICS_EXPANDED, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_FADE_LENGTH, "fade-length", _("Fade length"), _("Distance over which strokes fade out"), 0.0, 32767.0, DEFAULT_FADE_LENGTH, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_UNIT (object_class, PROP_FADE_UNIT, "fade-unit", NULL, NULL, TRUE, TRUE, DEFAULT_FADE_UNIT, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_FADE_REVERSE, "fade-reverse", _("Reverse"), _("Reverse direction of fading"), DEFAULT_FADE_REVERSE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_FADE_REPEAT, "fade-repeat", _("Repeat"), _("How fade is repeated as you paint"), GIMP_TYPE_REPEAT_MODE, DEFAULT_FADE_REPEAT, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_GRADIENT_REVERSE, "gradient-reverse", NULL, NULL, DEFAULT_GRADIENT_REVERSE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_BRUSH_VIEW_TYPE, "brush-view-type", NULL, NULL, GIMP_TYPE_VIEW_TYPE, GIMP_VIEW_TYPE_GRID, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_INT (object_class, PROP_BRUSH_VIEW_SIZE, "brush-view-size", NULL, NULL, GIMP_VIEW_SIZE_TINY, GIMP_VIEWABLE_MAX_BUTTON_SIZE, GIMP_VIEW_SIZE_SMALL, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_DYNAMICS_VIEW_TYPE, "dynamics-view-type", NULL, NULL, GIMP_TYPE_VIEW_TYPE, GIMP_VIEW_TYPE_LIST, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_INT (object_class, PROP_DYNAMICS_VIEW_SIZE, "dynamics-view-size", NULL, NULL, GIMP_VIEW_SIZE_TINY, GIMP_VIEWABLE_MAX_BUTTON_SIZE, GIMP_VIEW_SIZE_SMALL, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_PATTERN_VIEW_TYPE, "pattern-view-type", NULL, NULL, GIMP_TYPE_VIEW_TYPE, GIMP_VIEW_TYPE_GRID, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_INT (object_class, PROP_PATTERN_VIEW_SIZE, "pattern-view-size", NULL, NULL, GIMP_VIEW_SIZE_TINY, GIMP_VIEWABLE_MAX_BUTTON_SIZE, GIMP_VIEW_SIZE_SMALL, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_GRADIENT_VIEW_TYPE, "gradient-view-type", NULL, NULL, GIMP_TYPE_VIEW_TYPE, GIMP_VIEW_TYPE_LIST, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_INT (object_class, PROP_GRADIENT_VIEW_SIZE, "gradient-view-size", NULL, NULL, GIMP_VIEW_SIZE_TINY, GIMP_VIEWABLE_MAX_BUTTON_SIZE, GIMP_VIEW_SIZE_LARGE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_USE_SMOOTHING, "use-smoothing", _("Smooth stroke"), _("Paint smoother strokes"), FALSE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_INT (object_class, PROP_SMOOTHING_QUALITY, "smoothing-quality", _("Quality"), _("Depth of smoothing"), 1, 100, DEFAULT_SMOOTHING_QUALITY, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_SMOOTHING_FACTOR, "smoothing-factor", _("Weight"), _("Gravity of the pen"), /* Max velocity is set to 3; allowing for * smoothing factor to be less than velcoty * results in numeric instablility */ 3.0, 1000.0, DEFAULT_SMOOTHING_FACTOR, GIMP_PARAM_STATIC_STRINGS); }
static void gimp_text_class_init (GimpTextClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass); GimpRGB black; GimpMatrix2 identity; gchar *language; text_signals[CHANGED] = g_signal_new ("changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GimpTextClass, changed), NULL, NULL, gimp_marshal_VOID__VOID, G_TYPE_NONE, 0); object_class->finalize = gimp_text_finalize; object_class->get_property = gimp_text_get_property; object_class->set_property = gimp_text_set_property; object_class->dispatch_properties_changed = gimp_text_dispatch_properties_changed; gimp_object_class->get_memsize = gimp_text_get_memsize; gimp_rgba_set (&black, 0.0, 0.0, 0.0, GIMP_OPACITY_OPAQUE); gimp_matrix2_identity (&identity); GIMP_CONFIG_PROP_STRING (object_class, PROP_TEXT, "text", NULL, NULL, NULL, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_STRING (object_class, PROP_MARKUP, "markup", NULL, NULL, NULL, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_STRING (object_class, PROP_FONT, "font", NULL, NULL, "Sans-serif", GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_FONT_SIZE, "font-size", NULL, NULL, 0.0, 8192.0, 24.0, GIMP_PARAM_STATIC_STRINGS); /* We use the name "font-size-unit" for backward compatibility. * The unit is also used for other sizes in the text object. */ GIMP_CONFIG_PROP_UNIT (object_class, PROP_UNIT, "font-size-unit", NULL, NULL, TRUE, FALSE, GIMP_UNIT_PIXEL, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_ANTIALIAS, "antialias", NULL, NULL, TRUE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_HINT_STYLE, "hint-style", NULL, NULL, GIMP_TYPE_TEXT_HINT_STYLE, GIMP_TEXT_HINT_STYLE_MEDIUM, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_KERNING, "kerning", NULL, NULL, FALSE, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); language = gimp_get_default_language (NULL); GIMP_CONFIG_PROP_STRING (object_class, PROP_LANGUAGE, "language", NULL, NULL, language, GIMP_PARAM_STATIC_STRINGS); g_free (language); GIMP_CONFIG_PROP_ENUM (object_class, PROP_BASE_DIR, "base-direction", NULL, NULL, GIMP_TYPE_TEXT_DIRECTION, GIMP_TEXT_DIRECTION_LTR, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_RGB (object_class, PROP_COLOR, "color", NULL, NULL, FALSE, &black, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_OUTLINE, "outline", NULL, NULL, GIMP_TYPE_TEXT_OUTLINE, GIMP_TEXT_OUTLINE_NONE, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_JUSTIFICATION, "justify", NULL, NULL, GIMP_TYPE_TEXT_JUSTIFICATION, GIMP_TEXT_JUSTIFY_LEFT, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_INDENTATION, "indent", NULL, NULL, -8192.0, 8192.0, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LINE_SPACING, "line-spacing", NULL, NULL, -8192.0, 8192.0, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LETTER_SPACING, "letter-spacing", NULL, NULL, -8192.0, 8192.0, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_BOX_MODE, "box-mode", NULL, NULL, GIMP_TYPE_TEXT_BOX_MODE, GIMP_TEXT_BOX_DYNAMIC, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_BOX_WIDTH, "box-width", NULL, NULL, 0.0, GIMP_MAX_IMAGE_SIZE, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_BOX_HEIGHT, "box-height", NULL, NULL, 0.0, GIMP_MAX_IMAGE_SIZE, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_UNIT (object_class, PROP_BOX_UNIT, "box-unit", NULL, NULL, TRUE, FALSE, GIMP_UNIT_PIXEL, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_MATRIX2 (object_class, PROP_TRANSFORMATION, "transformation", NULL, NULL, &identity, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_OFFSET_X, "offset-x", NULL, NULL, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_OFFSET_Y, "offset-y", NULL, NULL, -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); /* border does only exist to implement the old text API */ g_object_class_install_property (object_class, PROP_BORDER, g_param_spec_int ("border", NULL, NULL, 0, GIMP_MAX_IMAGE_SIZE, 0, G_PARAM_CONSTRUCT | GIMP_PARAM_WRITABLE)); /* the old hinting options have been replaced by 'hint-style' */ GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_HINTING, "hinting", NULL, NULL, TRUE, GIMP_PARAM_STATIC_STRINGS); }
static void gimp_text_options_class_init (GimpTextOptionsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = gimp_text_options_finalize; object_class->set_property = gimp_text_options_set_property; object_class->get_property = gimp_text_options_get_property; GIMP_CONFIG_PROP_UNIT (object_class, PROP_UNIT, "font-size-unit", _("Unit"), _("Font size unit"), TRUE, FALSE, GIMP_UNIT_PIXEL, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_FONT_SIZE, "font-size", _("Font size"), _("Font size"), 0.0, 8192.0, 62.0, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_ANTIALIAS, "antialias", _("Antialiasing"), NULL, TRUE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_HINT_STYLE, "hint-style", _("Hinting"), _("Hinting alters the font outline to " "produce a crisp bitmap at small " "sizes"), GIMP_TYPE_TEXT_HINT_STYLE, GIMP_TEXT_HINT_STYLE_MEDIUM, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_STRING (object_class, PROP_LANGUAGE, "language", _("Language"), _("The text language may have an effect " "on the way the text is rendered."), (const gchar *) gtk_get_default_language (), GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_BASE_DIR, "base-direction", NULL, NULL, GIMP_TYPE_TEXT_DIRECTION, GIMP_TEXT_DIRECTION_LTR, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_JUSTIFICATION, "justify", _("Justify"), _("Text alignment"), GIMP_TYPE_TEXT_JUSTIFICATION, GIMP_TEXT_JUSTIFY_LEFT, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_INDENTATION, "indent", _("Indentation"), _("Indentation of the first line"), -8192.0, 8192.0, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LINE_SPACING, "line-spacing", _("Line spacing"), _("Adjust line spacing"), -8192.0, 8192.0, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_DOUBLE (object_class, PROP_LETTER_SPACING, "letter-spacing", _("Letter spacing"), _("Adjust letter spacing"), -8192.0, 8192.0, 0.0, GIMP_PARAM_STATIC_STRINGS | GIMP_CONFIG_PARAM_DEFAULTS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_BOX_MODE, "box-mode", _("Box"), _("Whether text flows into rectangular shape or " "moves into a new line when you press Enter"), GIMP_TYPE_TEXT_BOX_MODE, GIMP_TEXT_BOX_DYNAMIC, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_USE_EDITOR, "use-editor", _("Use editor"), _("Use an external editor window for text entry"), FALSE, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_ENUM (object_class, PROP_FONT_VIEW_TYPE, "font-view-type", NULL, NULL, GIMP_TYPE_VIEW_TYPE, GIMP_VIEW_TYPE_LIST, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_PROP_INT (object_class, PROP_FONT_VIEW_SIZE, "font-view-size", NULL, NULL, GIMP_VIEW_SIZE_TINY, GIMP_VIEWABLE_MAX_BUTTON_SIZE, GIMP_VIEW_SIZE_SMALL, GIMP_PARAM_STATIC_STRINGS); }