gradient-selector.cpp revision d0b1841dd74661cc395ee08660a0848a86cd625d
#define __SP_GRADIENT_SELECTOR_C__
/*
* Gradient vector widget
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
*
* Copyright (C) 2001-2002 Lauris Kaplinski
* Copyright (C) 2001 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <gtk/gtklabel.h>
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtkmenuitem.h>
#include <gtk/gtktooltips.h>
#include "document.h"
#include "../document-private.h"
#include "../gradient-chemistry.h"
#include "gradient-vector.h"
#include "gradient-selector.h"
enum {
};
/* Signal handlers */
static void sp_gradient_selector_vector_set (SPGradientVectorSelector *gvs, SPGradient *gr, SPGradientSelector *sel);
static GtkVBoxClass *parent_class;
{
if (!type) {
GtkTypeInfo info = {
"SPGradientSelector",
sizeof (SPGradientSelector),
sizeof (SPGradientSelectorClass),
};
}
return type;
}
static void
{
GTK_TYPE_NONE, 0);
GTK_TYPE_NONE, 0);
GTK_TYPE_NONE, 0);
GTK_TYPE_NONE, 0);
}
static void
{
/* Vectors */
g_signal_connect (G_OBJECT (sel->vectors), "vector_set", G_CALLBACK (sp_gradient_selector_vector_set), sel);
/* Create box for buttons */
g_signal_connect (G_OBJECT (sel->add), "clicked", G_CALLBACK (sp_gradient_selector_add_vector_clicked), sel);
g_signal_connect (G_OBJECT (sel->edit), "clicked", G_CALLBACK (sp_gradient_selector_edit_vector_clicked), sel);
/* Spread selector */
// TRANSLATORS: for info, see http://www.w3.org/TR/2000/CR-SVG-20000802/pservers.html#LinearGradientSpreadMethodAttribute
_("Whether to fill with flat color beyond the ends of the gradient vector "
"(spreadMethod=\"pad\"), or repeat the gradient in the same direction "
"(spreadMethod=\"repeat\"), or repeat the gradient in alternating opposite "
"directions (spreadMethod=\"reflect\")"), NULL);
m = gtk_menu_new ();
g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (sp_gradient_selector_spread_activate), sel);
g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (sp_gradient_selector_spread_activate), sel);
g_signal_connect (G_OBJECT (mi), "activate", G_CALLBACK (sp_gradient_selector_spread_activate), sel);
gtk_widget_show_all (m);
l = gtk_label_new (_("Repeat:"));
gtk_widget_show (l);
}
static void
{
}
sp_gradient_selector_new (void)
{
}
void
{
}
void
{
}
void
{
}
{
}
{
}
void
{
return;
if (vector) {
} else {
}
}
{
return NULL;
/* fixme: */
}
static void
sp_gradient_selector_vector_set (SPGradientVectorSelector *gvs, SPGradient *gr, SPGradientSelector *sel)
{
if (!blocked) {
}
}
static void
{
/* fixme: */
}
static void
{
if (!doc)
return;
if (gr)
else {
}
}
static void
{
sel->gradientSpread = (SPGradientSpread)GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (widget), "gradientSpread"));
}