From 179fa413b047bede6e32109e2ce82437c5fb8d34 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Mon, 16 Jan 2006 02:36:01 +0000 Subject: moving trunk for module inkscape (bzr r1) --- src/extension/script/InkscapeBinding.cpp | 199 +++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 src/extension/script/InkscapeBinding.cpp (limited to 'src/extension/script/InkscapeBinding.cpp') diff --git a/src/extension/script/InkscapeBinding.cpp b/src/extension/script/InkscapeBinding.cpp new file mode 100644 index 000000000..10cde0774 --- /dev/null +++ b/src/extension/script/InkscapeBinding.cpp @@ -0,0 +1,199 @@ + + +#include "InkscapeBinding.h" + +#include "help.h" + +namespace Inkscape { +namespace Extension { +namespace Script { + + +class InkscapeImpl; +class DesktopImpl; +class DocumentImpl; + + +//######################################################################### +//# D O C U M E N T +//######################################################################### +class DocumentImpl : public Document +{ +public: + DocumentImpl(); + + virtual ~DocumentImpl(); + + virtual void hello(); + +private: + + +}; + + +DocumentImpl::DocumentImpl() +{ + + +} + +DocumentImpl::~DocumentImpl() +{ + + +} + +void DocumentImpl::hello() +{ + printf("######## HELLO, WORLD! #######\n"); +} + + + +//######################################################################### +//# D E S K T O P +//######################################################################### +class DesktopImpl : public Desktop +{ +public: + DesktopImpl(); + + virtual ~DesktopImpl(); + + virtual Document *getDocument(); + +private: + + DocumentImpl document; + +}; + + +DesktopImpl::DesktopImpl() +{ + + +} + +DesktopImpl::~DesktopImpl() +{ + + +} + + +Document *DesktopImpl::getDocument() +{ + return &document; +} + + + +//######################################################################### +//# D I A L O G M A N A G E R +//######################################################################### + +class DialogManagerImpl : public DialogManager +{ +public: + DialogManagerImpl(); + + virtual ~DialogManagerImpl(); + + virtual void showAbout(); + +private: + + +}; + +DialogManagerImpl::DialogManagerImpl() +{ + +} + + +DialogManagerImpl::~DialogManagerImpl() +{ + +} + + +void DialogManagerImpl::showAbout() +{ + sp_help_about(); + +} + + + +//######################################################################### +//# I N K S C A P E +//######################################################################### + +class InkscapeImpl : public Inkscape +{ +public: + InkscapeImpl(); + + virtual ~InkscapeImpl(); + + virtual Desktop *getDesktop(); + + virtual DialogManager *getDialogManager(); + +private: + + DesktopImpl desktop; + + DialogManagerImpl dialogManager; + +}; + +Inkscape *getInkscape() +{ + Inkscape *inkscape = new InkscapeImpl(); + return inkscape; +} + + +InkscapeImpl::InkscapeImpl() +{ + +} + + +InkscapeImpl::~InkscapeImpl() +{ + +} + + +Desktop *InkscapeImpl::getDesktop() +{ + return &desktop; +} + +DialogManager *InkscapeImpl::getDialogManager() +{ + return &dialogManager; +} + + + +}//namespace Script +}//namespace Extension +}//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 : -- cgit v1.2.3