object-properties.cpp revision 761a541468cc0b8a7fcfb8c65784c0896f0f80f4
#define __OBJECT_PROPERTIES_C__
/**
* \brief Fill, stroke, and stroke style dialog
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* Frank Felfe <innerspace@iname.com>
* bulia byak <buliabyak@users.sf.net>
*
* Copyright (C) 1999-2005 authors
* Copyright (C) 2001-2002 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "widgets/sp-widget.h"
#include "macros.h"
#include "inkscape.h"
#include "fill-style.h"
#include "stroke-style.h"
#include "dialog-events.h"
#include "verbs.h"
#include "interface.h"
#include "style.h"
#include "inkscape-stock.h"
#include "prefs-utils.h"
#include "svg/css-ostringstream.h"
#include "desktop-handles.h"
#include "desktop-style.h"
#include "document.h"
#include "document-private.h"
#include <selection.h>
// impossible original values to make sure they are read from prefs
static void sp_fillstroke_selection_modified ( Inkscape::Application *inkscape, Inkscape::Selection *selection, guint flags, GtkObject *base );
static void sp_fillstroke_selection_changed ( Inkscape::Application *inkscape, Inkscape::Selection *selection, GtkObject *base );
static void
{
}
static gboolean
{
if (x<0) x=0;
if (y<0) y=0;
return FALSE; // which means, go ahead and destroy it
}
void
char *label,
char *dlg_name,
char *label_image )
{
l = gtk_label_new_with_mnemonic (label);
gtk_widget_show (l);
}
void
sp_object_properties_dialog (void)
{
if (!dlg) {
if (x == -1000 || y == -1000) {
}
if (w ==0 || h == 0) {
}
if (x<0) x=0;
if (y<0) y=0;
if (x != 0 || y != 0)
else
g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop", G_CALLBACK (sp_transientize_callback), &wd );
gtk_signal_connect ( GTK_OBJECT (dlg), "destroy", G_CALLBACK (sp_object_properties_dialog_destroy), dlg );
gtk_signal_connect ( GTK_OBJECT (dlg), "delete_event", G_CALLBACK (sp_object_properties_dialog_delete), dlg );
g_signal_connect ( G_OBJECT (INKSCAPE), "shut_down", G_CALLBACK (sp_object_properties_dialog_delete), dlg );
/* Fill page */
{
}
/* Stroke paint page */
{
}
/* Stroke style page */
{
}
/* Opacity */
gtk_label_set_mnemonic_widget (GTK_LABEL(l), s);
gtk_signal_connect ( a, "value_changed",
dlg );
// these callbacks are only for the master opacity update; the tabs above take care of themselves
g_signal_connect ( G_OBJECT (INKSCAPE), "change_selection", G_CALLBACK (sp_fillstroke_selection_changed), dlg );
g_signal_connect ( G_OBJECT (INKSCAPE), "modify_selection", G_CALLBACK (sp_fillstroke_selection_modified), dlg );
g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop", G_CALLBACK (sp_fillstroke_selection_changed), dlg );
/* Blur */
/* uncomment to display blur slider*/
/* GtkWidget *b_vb = gtk_vbox_new (FALSE, 0);
gtk_box_pack_start (GTK_BOX (vb), b_vb, FALSE, FALSE, 2);
gtk_object_set_data (GTK_OBJECT (dlg), "blur", b_vb);
GtkWidget *blur_l_hb = gtk_hbox_new (FALSE, 4);
GtkWidget *blur_l = gtk_label_new_with_mnemonic (_("_Blur"));
gtk_misc_set_alignment (GTK_MISC (blur_l), 0.0, 1.0);
gtk_box_pack_start (GTK_BOX (blur_l_hb), blur_l, FALSE, FALSE, 4);
gtk_box_pack_start (GTK_BOX (b_vb), blur_l_hb, FALSE, FALSE, 0);
GtkWidget *blur_hb = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (b_vb), blur_hb, FALSE, FALSE, 0);
GtkObject *blur_a = gtk_adjustment_new (0.0, 0.0, 1.0, 0.01, 0.1, 0.0);
gtk_object_set_data(GTK_OBJECT(dlg), "blur_adjustment", blur_a);
GtkWidget *blur_s = gtk_hscale_new (GTK_ADJUSTMENT (blur_a));
gtk_scale_set_draw_value (GTK_SCALE (blur_s), FALSE);
gtk_box_pack_start (GTK_BOX (blur_hb), blur_s, TRUE, TRUE, 4);
gtk_label_set_mnemonic_widget (GTK_LABEL(blur_l), blur_s);
GtkWidget *blur_sb = gtk_spin_button_new (GTK_ADJUSTMENT (blur_a), 0.01, 3);
gtk_box_pack_start (GTK_BOX (blur_hb), blur_sb, FALSE, FALSE, 0);
gtk_signal_connect ( blur_a, "value_changed",
GTK_SIGNAL_FUNC (sp_fillstroke_blur_changed),
dlg );
gtk_widget_show_all (b_vb);
*/
} else {
}
} // end of sp_object_properties_dialog()
void sp_object_properties_fill (void)
{
}
void sp_object_properties_stroke (void)
{
}
void sp_object_properties_stroke_style (void)
{
}
static void
{
}
static void
{
return;
GtkAdjustment *a = GTK_ADJUSTMENT(gtk_object_get_data(GTK_OBJECT(dlg), "master_opacity_adjustment"));
// create temporary style
// query style from desktop into it. This returns a result flag and fills query with the style of subselection, if any, or selection
switch (result) {
case QUERY_STYLE_NOTHING:
break;
case QUERY_STYLE_SINGLE:
case QUERY_STYLE_MULTIPLE_AVERAGED: // TODO: treat this slightly differently
break;
}
}
static void
{
return;
sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:opacity", SP_VERB_NONE,
/* TODO: annotate */ "object-properties.cpp:311");
}
/**
* Creates new private filter for the given vector
*/
static SPFilter *
{
// create a new private filter of the requested type
// privates are garbage-collectable
// privates are garbage-collectable
/* Append the new private filter to defs */
// get corresponding object
g_assert(SP_IS_FILTER(f));
return f;
}
/*
* TODO: check if selection has a filter applied and change its parameters instead of creating a new one
*/
static void
{
//if dialog is locked, return
return;
//lock dialog
//get desktop
if (!desktop) {
return;
}
{
//if there is a filter attached, remove it
} else { //blur non-zero
//get current selection
//get list of selected items
//get current document
//create new filter with feGaussianBlur primitive
//apply created filter to every selected item
}
}
sp_document_maybe_done (sp_desktop_document (SP_ACTIVE_DESKTOP), "fillstroke:blur", SP_VERB_NONE, "object-properties.cpp:467");
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :