summaryrefslogtreecommitdiffstats
path: root/src/application
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-11-25 20:51:17 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-11-25 20:51:17 +0000
commit0bd9f7e209d522dbcebe0449a91397fdd9e38977 (patch)
tree834c7d02456658b57625ab68cc28f7854a5a85dc /src/application
parentFix handling of x and y attributes of patterns (diff)
parentFix ruler redraw issue on GTK 2.22 (diff)
downloadinkscape-0bd9f7e209d522dbcebe0449a91397fdd9e38977.tar.gz
inkscape-0bd9f7e209d522dbcebe0449a91397fdd9e38977.zip
Merge from trunk
(bzr r9508.1.70)
Diffstat (limited to 'src/application')
-rw-r--r--src/application/CMakeLists.txt8
-rw-r--r--src/application/Makefile_insert9
-rw-r--r--src/application/app-prototype.cpp43
-rw-r--r--src/application/app-prototype.h53
-rw-r--r--src/application/application.cpp160
-rw-r--r--src/application/application.h65
-rw-r--r--src/application/editor.cpp420
-rw-r--r--src/application/editor.h140
-rw-r--r--src/application/makefile.in17
9 files changed, 0 insertions, 915 deletions
diff --git a/src/application/CMakeLists.txt b/src/application/CMakeLists.txt
deleted file mode 100644
index c09279395..000000000
--- a/src/application/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-SET(application_SRC
-editor.cpp
-application.cpp
-app-prototype.cpp
-)
-ADD_LIBRARY(application STATIC ${application_SRC})
-TARGET_LINK_LIBRARIES(application
-2geom ${INKSCAPE_LIBS}) \ No newline at end of file
diff --git a/src/application/Makefile_insert b/src/application/Makefile_insert
deleted file mode 100644
index d3afa2307..000000000
--- a/src/application/Makefile_insert
+++ /dev/null
@@ -1,9 +0,0 @@
-## Makefile.am fragment sourced by src/Makefile.am.
-
-ink_common_sources += \
- application/editor.cpp \
- application/editor.h \
- application/application.cpp \
- application/application.h \
- application/app-prototype.cpp \
- application/app-prototype.h
diff --git a/src/application/app-prototype.cpp b/src/application/app-prototype.cpp
deleted file mode 100644
index 27f58d92a..000000000
--- a/src/application/app-prototype.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/** @file
- * @brief Base class for different application modes
- */
-/* Author:
- * Bryce W. Harrington <bryce@bryceharrington.org>
- *
- * Copyright (C) 2005 Bryce Harrington
- *
- * Released under GNU GPL. Read the file 'COPYING' for more information.
- */
-
-#include "app-prototype.h"
-
-namespace Inkscape {
-namespace NSApplication {
-
-AppPrototype::AppPrototype()
-{
-}
-
-AppPrototype::AppPrototype(int /*argc*/, const char **/*argv*/)
-{
-}
-
-AppPrototype::~AppPrototype()
-{
-}
-
-
-} // namespace NSApplication
-} // namespace Inkscape
-
-
-/*
- 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 :
diff --git a/src/application/app-prototype.h b/src/application/app-prototype.h
deleted file mode 100644
index ce1cd3c8e..000000000
--- a/src/application/app-prototype.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/** @file
- * @brief Base class for different application modes
- */
-/* Author:
- * Bryce W. Harrington <bryce@bryceharrington.org>
- *
- * Copyright (C) 2005 Bryce Harrington
- *
- * Released under GNU GPL. Read the file 'COPYING' for more information.
- */
-
-#ifndef INKSCAPE_APPLICATION_APP_PROTOTYPE_H
-#define INKSCAPE_APPLICATION_APP_PROTOTYPE_H
-
-namespace Gtk {
-class Window;
-}
-
-
-namespace Inkscape {
-namespace NSApplication {
-
-class AppPrototype
-{
-public:
- AppPrototype();
- AppPrototype(int argc, const char **argv);
- virtual ~AppPrototype();
-
- virtual void* getWindow() = 0;
-
-protected:
- AppPrototype(AppPrototype const &);
- AppPrototype& operator=(AppPrototype const &);
-
-};
-
-} // namespace NSApplication
-} // namespace Inkscape
-
-
-#endif /* !INKSCAPE_APPLICATION_APP_PROTOTYPE_H */
-
-/*
- 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 :
diff --git a/src/application/application.cpp b/src/application/application.cpp
deleted file mode 100644
index ab516b9d4..000000000
--- a/src/application/application.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-/** @file
- * @brief The top level class for managing the application
- */
-/* Authors:
- * Bryce W. Harrington <bryce@bryceharrington.org>
- * Ralf Stephan <ralf@ark.in-berlin.de>
- *
- * Copyright (C) 2005 Authors
- *
- * Released under GNU GPL. Read the file 'COPYING' for more information.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gtkmm/main.h>
-
-#include "preferences.h"
-#include "application.h"
-#include "editor.h"
-
-int sp_main_gui(int argc, char const **argv);
-int sp_main_console(int argc, char const **argv);
-
-static Gtk::Main *_gtk_main;
-static bool _use_gui, _new_gui;
-
-namespace Inkscape {
-namespace NSApplication {
-
-Application::Application(int argc, char **argv, bool use_gui, bool new_gui)
- : _argc(argc),
- _argv(NULL),
- _app_impl(NULL),
- _path_home(NULL)
-{
- _use_gui = use_gui;
- _new_gui = new_gui;
-
- if (argv != NULL) {
- _argv = argv; // TODO: Is this correct?
- }
-
- if (new_gui) {
- _gtk_main = new Gtk::Main(argc, argv, true);
-
- // TODO: Determine class by arguments
- g_warning("Creating new Editor");
- _app_impl = (AppPrototype*) Editor::create(_argc, _argv);
-
- } else if (use_gui) {
- // No op - we'll use the old interface
- } else {
- _app_impl = NULL; // = Cmdline(_argc, _argv);
- }
-
- /// \todo Install segv handler here?
-
-// Inkscape::Extension::init();
-}
-
-Application::~Application()
-{
- g_free(_path_home);
-}
-
-
-/** Returns the current home directory location */
-gchar const*
-Application::homedir() const
-{
- if ( !_path_home ) {
- _path_home = g_strdup(g_get_home_dir());
- gchar* utf8Path = g_filename_to_utf8( _path_home, -1, NULL, NULL, NULL );
- if ( utf8Path ) {
- _path_home = utf8Path;
- if ( !g_utf8_validate(_path_home, -1, NULL) ) {
- g_warning( "Home directory is non-UTF-8" );
- }
- }
- }
- if ( !_path_home && _argv != NULL) {
- gchar * path = g_path_get_dirname(_argv[0]);
- gchar * utf8Path = g_filename_to_utf8( path, -1, NULL, NULL, NULL );
- g_free(path);
- if (utf8Path) {
- _path_home = utf8Path;
- if ( !g_utf8_validate(_path_home, -1, NULL) ) {
- g_warning( "Application run directory is non-UTF-8" );
- }
- }
- }
- return _path_home;
-}
-
-gint
-Application::run()
-{
- gint result = 0;
-
- /* Note: This if loop should be replaced by calls to the
- * various subclasses of I::A::AppPrototype.
- */
- if (_gtk_main != NULL) {
- g_assert(_app_impl != NULL);
- g_warning("Running main window");
- Gtk::Window *win = static_cast<Gtk::Window*>(_app_impl->getWindow());
- g_assert(win != NULL);
- _gtk_main->run(*win);
- result = 0;
-
- } else if (_use_gui) {
- result = sp_main_gui(_argc, (const char**)_argv);
-
- } else {
- result = sp_main_console(_argc, (const char**)_argv);
- }
-
- return result;
-}
-
-void
-Application::exit()
-{
- Inkscape::Preferences::unload();
-
- if (_gtk_main != NULL) {
- _gtk_main->quit();
- }
-
-}
-
-bool
-Application::getUseGui()
-{
- return _use_gui;
-}
-
-bool
-Application::getNewGui()
-{
- return _new_gui;
-}
-
-
-} // namespace NSApplication
-} // namespace Inkscape
-
-
-/*
- 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 :
diff --git a/src/application/application.h b/src/application/application.h
deleted file mode 100644
index fce6bd47f..000000000
--- a/src/application/application.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/** @file
- * @brief The top level class for managing the application.
- */
-/* Authors:
- * Bryce W. Harrington <bryce@bryceharrington.org>
- * Ralf Stephan <ralf@ark.in-berlin.de>
- *
- * Copyright (C) 2005 Authors
- *
- * Released under GNU GPL. Read the file 'COPYING' for more information.
- */
-
-#ifndef INKSCAPE_APPLICATION_APPLICATION_H
-#define INKSCAPE_APPLICATION_APPLICATION_H
-
-#include <glib/gtypes.h>
-
-namespace Gtk {
-class Main;
-}
-
-namespace Inkscape {
-namespace NSApplication {
-class AppPrototype;
-
-class Application
-{
-public:
- Application(int argc, char **argv, bool use_gui=true, bool new_gui=false);
- virtual ~Application();
-
- gchar const *homedir() const;
-
- gint run();
-
- static bool getUseGui();
- static bool getNewGui();
- static void exit();
-
-protected:
- Application(Application const &);
- Application& operator=(Application const &);
-
- gint _argc;
- char **_argv;
- AppPrototype *_app_impl;
-
- mutable gchar *_path_home;
-};
-
-} // namespace NSApplication
-} // namespace Inkscape
-
-#endif /* !INKSCAPE_APPLICATION_APPLICATION_H */
-
-/*
- 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 :
diff --git a/src/application/editor.cpp b/src/application/editor.cpp
deleted file mode 100644
index 49010efdc..000000000
--- a/src/application/editor.cpp
+++ /dev/null
@@ -1,420 +0,0 @@
-/** @file
- * @brief Editor class declaration. This
- * singleton class implements much of the functionality of the former
- * 'inkscape' object and its services and signals.
- */
-/* Authors:
- * Bryce W. Harrington <bryce@bryceharrington.org>
- * Derek P. Moore <derekm@hackunix.org>
- * Ralf Stephan <ralf@ark.in-berlin.de>
- *
- * Copyright (C) 2004-2005 Authors
- *
- * Released under GNU GPL. Read the file 'COPYING' for more information.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-/*
- TODO: Replace SPDocument with the new Inkscape::Document
- TODO: Change 'desktop's to 'view*'s
- TODO: Add derivation from Inkscape::Application::RunMode
-*/
-
-
-#include "path-prefix.h"
-#include "io/sys.h"
-#include "sp-object-repr.h"
-#include <desktop-handles.h>
-#include "document.h"
-#include "sp-namedview.h"
-#include "event-context.h"
-#include "sp-guide.h"
-#include "selection.h"
-#include "editor.h"
-#include "application/application.h"
-#include "preferences.h"
-#include "ui/view/edit-widget.h"
-
-namespace Inkscape {
-namespace NSApplication {
-
-static Editor *_instance = 0;
-static void *_window;
-
-Editor*
-Editor::create (gint argc, char **argv)
-{
- if (_instance == 0)
- {
- _instance = new Editor (argc, argv);
- _instance->init();
- }
- return _instance;
-}
-
-Editor::Editor (gint /*argc*/, char **argv)
-: _documents (0),
- _desktops (0),
- _argv0 (argv[0]),
- _dialogs_toggle (true)
-
-{
- sp_object_type_register ("sodipodi:namedview", SP_TYPE_NAMEDVIEW);
- sp_object_type_register ("sodipodi:guide", SP_TYPE_GUIDE);
-
- Inkscape::Preferences::get(); // Ensure preferences are loaded
-}
-
-bool
-Editor::init()
-{
- // Load non-local template until we have everything right
- // This code formerly lived in file.cpp
- //
- gchar const *tmpl = g_build_filename ((INKSCAPE_TEMPLATESDIR), "default.svg", NULL);
- bool have_default = Inkscape::IO::file_test (tmpl, G_FILE_TEST_IS_REGULAR);
- SPDocument *doc = sp_document_new (have_default? tmpl:0, true, true);
- g_return_val_if_fail (doc != 0, false);
- Inkscape::UI::View::EditWidget *ew = new Inkscape::UI::View::EditWidget (doc);
- sp_document_unref (doc);
- _window = ew->getWindow();
- return ew != 0;
-}
-
-Editor::~Editor()
-{
-}
-
-/// Returns the Window representation of this application object
-void*
-Editor::getWindow()
-{
- return _window;
-}
-
-/// Returns the active document
-SPDocument*
-Editor::getActiveDocument()
-{
- if (getActiveDesktop()) {
- return sp_desktop_document (getActiveDesktop());
- }
-
- return NULL;
-}
-
-void
-Editor::addDocument (SPDocument *doc)
-{
- if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) {
- _instance->_documents = g_slist_append (_instance->_documents, doc);
- }
- _instance->_document_set.insert(doc);
-}
-
-void
-Editor::removeDocument (SPDocument *doc)
-{
- _instance->_document_set.erase(doc);
- if ( _instance->_document_set.find(doc) == _instance->_document_set.end() ) {
- _instance->_documents = g_slist_remove (_instance->_documents, doc);
- }
-}
-
-SPDesktop*
-Editor::createDesktop (SPDocument* doc)
-{
- g_assert (doc != 0);
- (new Inkscape::UI::View::EditWidget (doc))->present();
- sp_document_unref (doc);
- SPDesktop *dt = getActiveDesktop();
- reactivateDesktop (dt);
- return dt;
-}
-
-/// Returns the currently active desktop
-SPDesktop*
-Editor::getActiveDesktop()
-{
- if (_instance->_desktops == NULL) {
- return NULL;
- }
-
- return (SPDesktop *) _instance->_desktops->data;
-}
-
-/// Add desktop to list of desktops
-void
-Editor::addDesktop (SPDesktop *dt)
-{
- g_return_if_fail (dt != 0);
- g_assert (!g_slist_find (_instance->_desktops, dt));
-
- _instance->_desktops = g_slist_append (_instance->_desktops, dt);
-
- if (isDesktopActive (dt)) {
- _instance->_desktop_activated_signal.emit (dt);
- _instance->_event_context_set_signal.emit (sp_desktop_event_context (dt));
- _instance->_selection_set_signal.emit (sp_desktop_selection (dt));
- _instance->_selection_changed_signal.emit (sp_desktop_selection (dt));
- }
-}
-
-/// Remove desktop from list of desktops
-void
-Editor::removeDesktop (SPDesktop *dt)
-{
- g_return_if_fail (dt != 0);
- g_assert (g_slist_find (_instance->_desktops, dt));
-
- if (dt == _instance->_desktops->data) { // is it the active desktop?
- _instance->_desktop_deactivated_signal.emit (dt);
- if (_instance->_desktops->next != 0) {
- SPDesktop * new_desktop = (SPDesktop *) _instance->_desktops->next->data;
- _instance->_desktops = g_slist_remove (_instance->_desktops, new_desktop);
- _instance->_desktops = g_slist_prepend (_instance->_desktops, new_desktop);
- _instance->_desktop_activated_signal.emit (new_desktop);
- _instance->_event_context_set_signal.emit (sp_desktop_event_context (new_desktop));
- _instance->_selection_set_signal.emit (sp_desktop_selection (new_desktop));
- _instance->_selection_changed_signal.emit (sp_desktop_selection (new_desktop));
- } else {
- _instance->_event_context_set_signal.emit (0);
- if (sp_desktop_selection(dt))
- sp_desktop_selection(dt)->clear();
- }
- }
-
- _instance->_desktops = g_slist_remove (_instance->_desktops, dt);
-
- // if this was the last desktop, shut down the program
- if (_instance->_desktops == NULL) {
- _instance->_shutdown_signal.emit();
- Inkscape::NSApplication::Application::exit();
- }
-}
-
-void
-Editor::activateDesktop (SPDesktop* dt)
-{
- g_assert (dt != 0);
- if (isDesktopActive (dt))
- return;
-
- g_assert (g_slist_find (_instance->_desktops, dt));
- SPDesktop *curr = (SPDesktop*)_instance->_desktops->data;
- _instance->_desktop_deactivated_signal.emit (curr);
-
- _instance->_desktops = g_slist_remove (_instance->_desktops, dt);
- _instance->_desktops = g_slist_prepend (_instance->_desktops, dt);
-
- _instance->_desktop_activated_signal.emit (dt);
- _instance->_event_context_set_signal.emit (sp_desktop_event_context(dt));
- _instance->_selection_set_signal.emit (sp_desktop_selection(dt));
- _instance->_selection_changed_signal.emit (sp_desktop_selection(dt));
-}
-
-void
-Editor::reactivateDesktop (SPDesktop* dt)
-{
- g_assert (dt != 0);
- if (isDesktopActive(dt))
- _instance->_desktop_activated_signal.emit (dt);
-}
-
-bool
-Editor::isDuplicatedView (SPDesktop* dt)
-{
- SPDocument const* document = dt->doc();
- if (!document) {
- return false;
- }
- for ( GSList *iter = _instance->_desktops ; iter ; iter = iter->next ) {
- SPDesktop *other_desktop=(SPDesktop *)iter->data;
- SPDocument *other_document=other_desktop->doc();
- if ( other_document == document && other_desktop != dt ) {
- return true;
- }
- }
- return false;
-}
-
- /// Returns the event context
-//SPEventContext*
-//Editor::getEventContext()
-//{
-// if (getActiveDesktop()) {
-// return sp_desktop_event_context (getActiveDesktop());
-// }
-//
-// return NULL;
-//}
-
-
-void
-Editor::selectionModified (Inkscape::Selection* sel, guint flags)
-{
- g_return_if_fail (sel != NULL);
- if (isDesktopActive (sel->desktop()))
- _instance->_selection_modified_signal.emit (sel, flags);
-}
-
-void
-Editor::selectionChanged (Inkscape::Selection* sel)
-{
- g_return_if_fail (sel != NULL);
- if (isDesktopActive (sel->desktop()))
- _instance->_selection_changed_signal.emit (sel);
-}
-
-void
-Editor::subSelectionChanged (SPDesktop* dt)
-{
- g_return_if_fail (dt != NULL);
- if (isDesktopActive (dt))
- _instance->_subselection_changed_signal.emit (dt);
-}
-
-void
-Editor::selectionSet (Inkscape::Selection* sel)
-{
- g_return_if_fail (sel != NULL);
- if (isDesktopActive (sel->desktop())) {
- _instance->_selection_set_signal.emit (sel);
- _instance->_selection_changed_signal.emit (sel);
- }
-}
-
-void
-Editor::eventContextSet (SPEventContext* ec)
-{
- g_return_if_fail (ec != NULL);
- g_return_if_fail (SP_IS_EVENT_CONTEXT (ec));
- if (isDesktopActive (ec->desktop))
- _instance->_event_context_set_signal.emit (ec);
-}
-
-void
-Editor::hideDialogs()
-{
- _instance->_dialogs_hidden_signal.emit();
- _instance->_dialogs_toggle = false;
-}
-
-void
-Editor::unhideDialogs()
-{
- _instance->_dialogs_unhidden_signal.emit();
- _instance->_dialogs_toggle = true;
-}
-
-void
-Editor::toggleDialogs()
-{
- if (_dialogs_toggle) {
- hideDialogs();
- } else {
- unhideDialogs();
- }
-}
-
-void
-Editor::refreshDisplay()
-{
- // TODO
-}
-
-void
-Editor::exit()
-{
- //emit shutdown signal so that dialogs could remember layout
- _shutdown_signal.emit();
- Inkscape::Preferences::unload();
-}
-
-//==================================================================
-
-sigc::connection
-Editor::connectSelectionModified
-(const sigc::slot<void, Inkscape::Selection*, guint> &slot)
-{
- return _instance->_selection_modified_signal.connect (slot);
-}
-
-sigc::connection
-Editor::connectSelectionChanged
-(const sigc::slot<void, Inkscape::Selection*> &slot)
-{
- return _instance->_selection_changed_signal.connect (slot);
-}
-
-sigc::connection
-Editor::connectSubselectionChanged (const sigc::slot<void, SPDesktop*> &slot)
-{
- return _instance->_subselection_changed_signal.connect (slot);
-}
-
-sigc::connection
-Editor::connectSelectionSet (const sigc::slot<void, Inkscape::Selection*> &slot)
-{
- return _instance->_selection_set_signal.connect (slot);
-}
-
-sigc::connection
-Editor::connectEventContextSet (const sigc::slot<void, SPEventContext*> &slot)
-{
- return _instance->_event_context_set_signal.connect (slot);
-}
-
-sigc::connection
-Editor::connectDesktopActivated (const sigc::slot<void, SPDesktop*> &slot)
-{
- return _instance->_desktop_activated_signal.connect (slot);
-}
-
-sigc::connection
-Editor::connectDesktopDeactivated (const sigc::slot<void, SPDesktop*> &slot)
-{
- return _instance->_desktop_deactivated_signal.connect (slot);
-}
-
-sigc::connection
-Editor::connectShutdown (const sigc::slot<void> &slot)
-{
- return _instance->_shutdown_signal.connect (slot);
-}
-
-sigc::connection
-Editor::connectDialogsHidden (const sigc::slot<void> &slot)
-{
- return _instance->_dialogs_hidden_signal.connect (slot);
-}
-
-sigc::connection
-Editor::connectDialogsUnhidden (const sigc::slot<void> &slot)
-{
- return _instance->_dialogs_unhidden_signal.connect (slot);
-}
-
-sigc::connection
-Editor::connectExternalChange (const sigc::slot<void> &slot)
-{
- return _instance->_external_change_signal.connect (slot);
-}
-
-
-} // namespace NSApplication
-} // namespace Inkscape
-
-/*
- 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 :
diff --git a/src/application/editor.h b/src/application/editor.h
deleted file mode 100644
index 4545022b8..000000000
--- a/src/application/editor.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/** @file
- * @brief Singleton class to manage an application used for editing SVG
- * documents using GUI views
- */
-/*
- * Authors:
- * Bryce W. Harrington <bryce@bryceharrington.org>
- * Ralf Stephan <ralf@ark.in-berlin.de>
- *
- * Copyright (C) 2004 Bryce Harrington
- *
- * Released under GNU GPL. Read the file 'COPYING' for more information.
- */
-
-#ifndef INKSCAPE_APPLICATION_EDITOR_H
-#define INKSCAPE_APPLICATION_EDITOR_H
-
-#include <sigc++/sigc++.h>
-#include <glib/gslist.h>
-#include <glibmm/ustring.h>
-#include <set>
-#include "app-prototype.h"
-
-class SPDesktop;
-class SPDocument;
-class SPEventContext;
-
-namespace Inkscape {
- class Selection;
- namespace XML {
- class Document;
- }
- namespace UI {
- namespace View {
- class Edit;
- }
- }
- namespace NSApplication {
-
-class Editor : public AppPrototype
-{
-public:
- static Editor *create (int argc, char **argv);
- virtual ~Editor();
-
- void* getWindow();
-
- void toggleDialogs();
- void nextDesktop();
- void prevDesktop();
-
- void refreshDisplay();
- void exit();
-
- bool lastViewOfDocument(SPDocument* doc, SPDesktop* view) const;
-
- bool addView(SPDesktop* view);
- bool deleteView(SPDesktop* view);
-
- static Inkscape::XML::Document *getPreferences();
- static SPDesktop* getActiveDesktop();
- static bool isDesktopActive (SPDesktop* dt) { return getActiveDesktop()==dt; }
- static SPDesktop* createDesktop (SPDocument* doc);
- static void addDesktop (SPDesktop* dt);
- static void removeDesktop (SPDesktop* dt);
- static void activateDesktop (SPDesktop* dt);
- static void reactivateDesktop (SPDesktop* dt);
- static bool isDuplicatedView (SPDesktop* dt);
-
- static SPDocument* getActiveDocument();
- static void addDocument (SPDocument* doc);
- static void removeDocument (SPDocument* doc);
-
- static void selectionModified (Inkscape::Selection*, guint);
- static void selectionChanged (Inkscape::Selection*);
- static void subSelectionChanged (SPDesktop*);
- static void selectionSet (Inkscape::Selection*);
- static void eventContextSet (SPEventContext*);
- static void hideDialogs();
- static void unhideDialogs();
-
- static sigc::connection connectSelectionModified (const sigc::slot<void, Inkscape::Selection*, guint> &slot);
- static sigc::connection connectSelectionChanged (const sigc::slot<void, Inkscape::Selection*> &slot);
- static sigc::connection connectSubselectionChanged (const sigc::slot<void, SPDesktop*> &slot);
- static sigc::connection connectSelectionSet (const sigc::slot<void, Inkscape::Selection*> &slot);
- static sigc::connection connectEventContextSet (const sigc::slot<void, SPEventContext*> &slot);
- static sigc::connection connectDesktopActivated (const sigc::slot<void, SPDesktop*> &slot);
- static sigc::connection connectDesktopDeactivated (const sigc::slot<void, SPDesktop*> &slot);
- static sigc::connection connectShutdown (const sigc::slot<void> &slot);
- static sigc::connection connectDialogsHidden (const sigc::slot<void> &slot);
- static sigc::connection connectDialogsUnhidden (const sigc::slot<void> &slot);
- static sigc::connection connectExternalChange (const sigc::slot<void> &slot);
-
-
-protected:
- Editor(Editor const &);
- Editor& operator=(Editor const &);
-
- std::multiset<SPDocument *> _document_set;
- GSList *_documents;
- GSList *_desktops;
- gchar *_argv0;
-
- bool _dialogs_toggle;
-
- sigc::signal <void, Inkscape::Selection*, guint> _selection_modified_signal;
- sigc::signal <void, Inkscape::Selection*> _selection_changed_signal;
- sigc::signal <void, SPDesktop*> _subselection_changed_signal;
- sigc::signal <void, Inkscape::Selection*> _selection_set_signal;
- sigc::signal <void, SPEventContext*> _event_context_set_signal;
- sigc::signal <void, SPDesktop*> _desktop_activated_signal;
- sigc::signal <void, SPDesktop*> _desktop_deactivated_signal;
- sigc::signal <void> _shutdown_signal;
- sigc::signal <void> _dialogs_hidden_signal;
- sigc::signal <void> _dialogs_unhidden_signal;
- sigc::signal <void> _external_change_signal;
-
-private:
- Editor(int argc, char **argv);
- bool init();
-};
-
-#define ACTIVE_DESKTOP Inkscape::NSApplication::Editor::getActiveDesktop()
-
-} // namespace NSApplication
-} // namespace Inkscape
-
-
-#endif /* !INKSCAPE_APPLICATION_EDITOR_H */
-
-/*
- 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 :
diff --git a/src/application/makefile.in b/src/application/makefile.in
deleted file mode 100644
index 7a879dba2..000000000
--- a/src/application/makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Convenience stub makefile to call the real Makefile.
-
-@SET_MAKE@
-
-OBJEXT = @OBJEXT@
-
-# Explicit so that it's the default rule.
-all:
- cd .. && $(MAKE) application/all
-
-clean %.a %.$(OBJEXT):
- cd .. && $(MAKE) application/$@
-
-.PHONY: all clean
-
-.SUFFIXES:
-.SUFFIXES: .a .$(OBJEXT)