diff --git a/src/desktop.cpp b/src/desktop.cpp
index f58864955d01641cbc2c4bbf52c27592349caa09..4b4d1fe5bcf8358b803cd97e41a2b8b670b26e16 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
window_state(0),
interaction_disabled_counter( 0 ),
waiting_cursor( false ),
- perspectives (NULL),
guides_active( false ),
gr_item( 0 ),
gr_point_type( 0 ),
layer_manager = new Inkscape::LayerManager( this );
grids_visible = true;
-
- /* Create initial perspective, append it to the list of existing perspectives
- and make it the current perspective */
- Box3D::Perspective3D *initial_persp = new Box3D::Perspective3D (
- // VP in x-direction
- Box3D::VanishingPoint( NR::Point(-50.0, 600.0),
- NR::Point( -1.0, 0.0), Box3D::VP_FINITE),
- // VP in y-direction
- Box3D::VanishingPoint( NR::Point(500.0,1000.0),
- NR::Point( 0.0, 1.0), Box3D::VP_INFINITE),
- // VP in z-direction
- Box3D::VanishingPoint( NR::Point(700.0, 600.0),
- NR::Point(sqrt(3.0),1.0), Box3D::VP_FINITE));
- this->add_perspective (initial_persp);
- Box3D::Perspective3D::current_perspective = (Box3D::Perspective3D *) perspectives->data;
}
g_list_free (zooms_past);
g_list_free (zooms_future);
-
- for (GSList *p = this->perspectives; p != NULL; p = p->next) {
- delete ((Box3D::Perspective3D *) p->data);
- }
- g_slist_free (perspectives);
}
SPDesktop::~SPDesktop() {}
set_display_area(a.min()[NR::X], a.min()[NR::Y], a.max()[NR::X], a.max()[NR::Y], b, log);
}
-/**
- * Add a perspective to the desktop if it doesn't exist yet
- */
-void
-SPDesktop::add_perspective (Box3D::Perspective3D * const persp)
-{
- // check that the perspective is not yet linked to another desktop
- if (persp->desktop != NULL) {
- g_assert (persp->desktop == this);
- }
-
- // FIXME: Should we handle the case that the perspectives have equal VPs but are not identical?
- // If so, we need to take care of relinking the boxes, etc.
- if (persp == NULL || g_slist_find (this->perspectives, persp)) return;
- this->perspectives = g_slist_prepend (this->perspectives, persp);
- persp->desktop = this;
-}
-
-void SPDesktop::remove_perspective (Box3D::Perspective3D * const persp)
-{
- if (persp == NULL) return;
- if (!g_slist_find (this->perspectives, persp)) {
- g_warning ("Could not find perspective in current desktop. Not removed.\n");
- return;
- }
- this->perspectives = g_slist_remove (this->perspectives, persp);
-}
-
-// find an existing perspective whose VPs are equal to those of persp
-Box3D::Perspective3D * SPDesktop::find_perspective (Box3D::Perspective3D * const persp)
-{
- for (GSList *p = this->perspectives; p != NULL; p = p->next) {
- if (*((Box3D::Perspective3D *) p->data) == *persp) {
- return ((Box3D::Perspective3D *) p->data);
- }
- }
- return NULL; // perspective was not found
-}
-
/**
* Return viewbox dimensions.
*/
_widget->setToolboxAdjustmentValue (id, val);
}
+void
+SPDesktop::setToolboxSelectOneValue (gchar const* id, gint val)
+{
+ _widget->setToolboxSelectOneValue (id, val);
+}
+
bool
SPDesktop::isToolboxButtonActive (gchar const *id)
{