diff --git a/src/document.h b/src/document.h
index 06174c265f593b402151200b2fcb2e6a221f6c26..4f5f045c5566fb5819fcb59a5898740637b844a3 100644 (file)
--- a/src/document.h
+++ b/src/document.h
class SP3DBox;
class Persp3D;
+class Persp3DImpl;
namespace Proj {
class TransfMat3x4;
SPDocumentPrivate *priv;
/// Last action key
- const gchar *actionkey;
+ Glib::ustring actionkey;
+
/// Handler ID
guint modified_id;
// Instance of the connector router
Avoid::Router *router;
- GSList *perspectives;
-
- Persp3D *current_persp3d; // "currently active" perspective (e.g., newly created boxes are attached to this one)
-
GSList *_collection_queue;
bool oldSignalsConnected;
- void add_persp3d(Persp3D * const persp);
- void remove_persp3d(Persp3D * const persp);
- void initialize_current_persp3d();
+ void setCurrentPersp3D(Persp3D * const persp);
+ inline void setCurrentPersp3DImpl(Persp3DImpl * const persp_impl) { current_persp3d_impl = persp_impl; }
+ /*
+ * getCurrentPersp3D returns current_persp3d (if non-NULL) or the first
+ * perspective in the defs. If no perspective exists, returns NULL.
+ */
+ Persp3D * getCurrentPersp3D();
+ Persp3DImpl * getCurrentPersp3DImpl();
+ void getPerspectivesInDefs(std::vector<Persp3D*> &list);
+ unsigned int numPerspectivesInDefs() {
+ std::vector<Persp3D*> list;
+ getPerspectivesInDefs(list);
+ return list.size();
+ }
+
+ //void initialize_current_persp3d();
sigc::connection connectModified(ModifiedSignal::slot_type slot);
sigc::connection connectURISet(URISetSignal::slot_type slot);
SPDocument(SPDocument const &); // no copy
void operator=(SPDocument const &); // no assign
+ Persp3D *current_persp3d; /**< Currently 'active' perspective (to which, e.g., newly created boxes are attached) */
+ Persp3DImpl *current_persp3d_impl;
+
public:
sigc::connection connectReconstructionStart(ReconstructionStart::slot_type slot);
sigc::connection connectReconstructionFinish(ReconstructionFinish::slot_type slot);
sigc::connection _selection_changed_connection;
sigc::connection _desktop_activated_connection;
- void fitToRect(Geom::Rect const &rect);
+ void fitToRect(Geom::Rect const &rect, bool with_margins = false);
};
SPDocument *sp_document_new(const gchar *uri, unsigned int keepalive, bool make_new = false);
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :