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/ui/view/edit-widget-interface.h | |
| download | inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip | |
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/ui/view/edit-widget-interface.h')
| -rw-r--r-- | src/ui/view/edit-widget-interface.h | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/src/ui/view/edit-widget-interface.h b/src/ui/view/edit-widget-interface.h new file mode 100644 index 000000000..689eff4a7 --- /dev/null +++ b/src/ui/view/edit-widget-interface.h @@ -0,0 +1,134 @@ +/** + * \file + * + * Abstract base class for all EditWidget implementations. + * + * Authors: + * Ralf Stephan <ralf@ark.in-berlin.de> + * + * Copyright (C) 2005 Ralf Stephan + * + * Released under GNU GPL. Read the file 'COPYING' for more information. + */ + +#ifndef INKSCAPE_UI_VIEW_EDIT_WIDGET_IFACE_H +#define INKSCAPE_UI_VIEW_EDIT_WIDGET_IFACE_H + +#include "gdk/gdktypes.h" +#include "libnr/nr-point.h" +#include "message.h" + +namespace Inkscape { +namespace UI { +namespace View { + +struct EditWidgetInterface +{ + EditWidgetInterface() {} + virtual ~EditWidgetInterface() {} + + /// Returns pointer to window UI object as void* + virtual void *getWindow() = 0; + + /// Set the widget's title + virtual void setTitle (gchar const*) = 0; + + /// Show all parts of widget the user wants to see. + virtual void layout() = 0; + + /// Present widget to user + virtual void present() = 0; + + /// Returns geometry of widget + virtual void getGeometry (gint &x, gint &y, gint &w, gint &h) = 0; + + /// Change the widget's size + virtual void setSize (gint w, gint h) = 0; + + /// Move widget to specified position + virtual void setPosition (NR::Point p) = 0; + + /// Transientize widget + virtual void setTransient (void*, int) = 0; + + /// Return mouse position in widget + virtual NR::Point getPointer() = 0; + + /// Make widget fill screen and show it if possible. + virtual void setFullscreen() = 0; + + /// Shuts down the desktop object for the view being closed. It checks + /// to see if the document has been edited, and if so prompts the user + /// to save, discard, or cancel. Returns TRUE if the shutdown operation + /// is cancelled or if the save is cancelled or fails, FALSE otherwise. + virtual bool shutdown() = 0; + + /// Destroy and delete widget. + virtual void destroy() = 0; + + + /// Queue a redraw request with the canvas + virtual void requestCanvasUpdate() = 0; + + /// Update the "active desktop" indicator + virtual void activateDesktop() = 0; + + /// Update the "inactive desktop" indicator + virtual void deactivateDesktop() = 0; + + /// Set rulers to position + virtual void viewSetPosition (NR::Point p) = 0; + + /// Update rulers from current values + virtual void updateRulers() = 0; + + /// Update scrollbars from current values + virtual void updateScrollbars (double scale) = 0; + + /// Toggle rulers on/off and set preference value accordingly + virtual void toggleRulers() = 0; + + /// Toggle scrollbars on/off and set preference value accordingly + virtual void toggleScrollbars() = 0; + + /// Temporarily block signals and update zoom display + virtual void updateZoom() = 0; + + /// The zoom display will get the keyboard focus. + virtual void letZoomGrabFocus() = 0; + + /// In auxiliary toolbox, set focus to widget having specific id + virtual void setToolboxFocusTo (const gchar *) = 0; + + /// In auxiliary toolbox, set value of adjustment with specific id + virtual void setToolboxAdjustmentValue (const gchar *, double) = 0; + + /// In auxiliary toolbox, return true if specific togglebutton is active + virtual bool isToolboxButtonActive (gchar const*) = 0; + + /// Set the coordinate display + virtual void setCoordinateStatus (NR::Point p) = 0; + + /// Message widget will get no content + virtual void setMessage (Inkscape::MessageType type, gchar const* msg) = 0; + + /// Open yes/no dialog with warning text and confirmation question. + virtual bool warnDialog (gchar*) = 0; +}; + +} // namespace View +} // namespace UI +} // namespace Inkscape + +#endif // INKSCAPE_UI_VIEW_EDIT_WIDGET_IFACE_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 : |
