item-properties.cpp revision acd7e37b7d41c18cacb9d1fbac525924c889edcd
/** @file
* @brief Object properties dialog
*/
/* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
* Johan Engelen <goejendaagh@zonnet.nl>
* Abhishek Sharma
*
* Copyright (C) 1999-2006 Authors
* 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 "../desktop-handles.h"
#include "dialog-events.h"
#include "../document.h"
#include "../inkscape.h"
#include "../interface.h"
#include "../macros.h"
#include "../preferences.h"
#include "../selection.h"
#include "../sp-item.h"
#include "../verbs.h"
#include "../widgets/sp-attribute-widget.h"
#include "../widgets/sp-widget.h"
using Inkscape::DocumentUndo;
#define MIN_ONSCREEN_DISTANCE 50
// impossible original values to make sure they are read from prefs
static void sp_item_widget_modify_selection (SPWidget *spw, Inkscape::Selection *selection, guint flags, GtkWidget *itemw);
static void sp_item_widget_change_selection (SPWidget *spw, Inkscape::Selection *selection, GtkWidget *itemw);
static void
{
}
static gboolean
{
if (x<0) x=0;
if (y<0) y=0;
return FALSE; // which means, go ahead and destroy it
}
/**
* \brief Creates new instance of item properties widget
*
*/
sp_item_widget_new (void)
{
/* Create container widget */
spw );
spw );
/* Create the label for the object id */
l = gtk_label_new_with_mnemonic (_("_ID:"));
(GtkAttachOptions)0, 0, 0 );
/* Create the entry box for the object id */
tf = gtk_entry_new ();
gtk_widget_set_tooltip_text (tf, _("The id= attribute (only letters, digits, and the characters .-_: allowed)"));
(GtkAttachOptions)0, 0, 0 );
// pressing enter in the id field is the same as clicking Set:
// focus is in the id field initially:
/* Button for setting the object's id, label, title and description. */
(GtkAttachOptions)0, 0, 0 );
spw );
/* Create the label for the object label */
l = gtk_label_new_with_mnemonic (_("_Label:"));
(GtkAttachOptions)0, 0, 0 );
/* Create the entry box for the object label */
tf = gtk_entry_new ();
(GtkAttachOptions)0, 0, 0 );
// pressing enter in the label field is the same as clicking Set:
/* Create the label for the object title */
l = gtk_label_new_with_mnemonic (_("_Title:"));
(GtkAttachOptions)0, 0, 0 );
/* Create the entry box for the object title */
tf = gtk_entry_new ();
(GtkAttachOptions)0, 0, 0 );
/* Create the frame for the object description */
l = gtk_label_new_with_mnemonic (_("_Description"));
f = gtk_frame_new (NULL);
gtk_frame_set_label_widget (GTK_FRAME (f),l);
/* Create the text view box for the object description */
tf = gtk_text_view_new();
/* Check boxes */
/* Hide */
(GtkAttachOptions)0, 0, 0 );
/* Lock */
// TRANSLATORS: "Lock" is a verb here
gtk_widget_set_tooltip_text (cb, _("Check to make the object insensitive (not selectable by mouse)"));
(GtkAttachOptions)0, 0, 0 );
spw );
/* Create the frame for interactivity options */
} //end of sp_item_widget_new()
static void
guint /*flags*/,
GtkWidget */*itemw*/ )
{
}
static void
GtkWidget */*itemw*/ )
{
}
/**
* \param selection Selection to use; should not be NULL.
*/
static void
{
return;
if (!selection->singleItem()) {
return;
} else {
}
/* Sensitive */
/* Hidden */
/* ID */
/* Label */
} else {
/* ID */
gtk_widget_set_sensitive (w, TRUE);
/* Label */
gtk_widget_set_sensitive (w, TRUE);
/* Title */
if (title) {
}
/* Description */
if (desc) {
} else {
}
if (int_table){
}
const gchar* int_labels[10] = {"onclick", "onmouseover", "onmouseout", "onmousedown", "onmouseup", "onmousemove","onfocusin", "onfocusout", "onactivate", "onload"};
}
} // end of sp_item_widget_setup()
static void
{
return;
}
void
{
return;
}
static void
{
return;
/* Retrieve the label widget for the object's id */
} else {
SP_EXCEPTION_INIT (&ex);
_("Set object ID"));
}
/* Retrieve the label widget for the object's label */
/* Give feedback on success of setting the drawing object's label
* using the widget's label text
*/
_("Set object label"));
}
/* Retrieve the title */
_("Set object title"));
/* Retrieve the description */
_("Set object description"));
} // end of sp_item_widget_label_changed()
/**
* \brief Dialog
*
*/
void
sp_item_dialog (void)
{
if (x == -1000 || y == -1000) {
}
if (w ==0 || h == 0) {
}
// if (x<0) x=0;
// if (y<0) y=0;
if (w && h) {
}
if (x >= 0 && y >= 0 && (x < (gdk_screen_width()-MIN_ONSCREEN_DISTANCE)) && (y < (gdk_screen_height()-MIN_ONSCREEN_DISTANCE))) {
} else {
}
g_signal_connect ( G_OBJECT (INKSCAPE), "activate_desktop", G_CALLBACK (sp_transientize_callback), &wd);
// Dialog-specific stuff
}
}
/*
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:fileencoding=utf-8:textwidth=99 :