diff options
| author | MenTaLguY <mental@rydia.net> | 2006-01-16 02:36:01 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-01-16 02:36:01 +0000 |
| commit | 179fa413b047bede6e32109e2ce82437c5fb8d34 (patch) | |
| tree | a5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/extension/script/InkscapeBinding.cpp | |
| download | inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip | |
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/extension/script/InkscapeBinding.cpp')
| -rw-r--r-- | src/extension/script/InkscapeBinding.cpp | 199 |
1 files changed, 199 insertions, 0 deletions
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 : |
