summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e612f49)
raw | patch | inline | side by side (parent: e612f49)
author | joncruz <joncruz@users.sourceforge.net> | |
Mon, 26 Nov 2007 20:54:55 +0000 (20:54 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Mon, 26 Nov 2007 20:54:55 +0000 (20:54 +0000) |
diff --git a/src/desktop.cpp b/src/desktop.cpp
index f12d0ffd799957e377ac7e0d11e5925b5f3392a7..7cc77cbab82650bfe90d4850b4594c0cded016b3 100644 (file)
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
{
if (displayMode == RENDERMODE_OUTLINE)
setDisplayModeNormal();
- else
+ else
setDisplayModeOutline();
}
/**
* Sets the current layer of the desktop.
- *
+ *
* Make \a object the top layer.
*/
void SPDesktop::setCurrentLayer(SPObject *object) {
if (changed & (GDK_WINDOW_STATE_FULLSCREEN|GDK_WINDOW_STATE_MAXIMIZED)) {
layoutWidget();
}
-
+
return false;
}
sp_event_context_update_cursor(sp_desktop_event_context(this));
}
+void SPDesktop::toggleColorProfAdjust()
+{
+ _widget->toggleColorProfAdjust();
+}
+
void SPDesktop::toggleGrids()
{
if (namedview->grids) {
((CtrlRect *) desktop->page)->setShadow(0, 0x00000000);
}
}
-
+
/* Show/hide page shadow */
if (nv->showpageshadow && nv->pageshadow) {
((CtrlRect *) desktop->page_border)->setShadow(nv->pageshadow, nv->bordercolor);
*nv.gridtoleranceunit,
px));
}
-
+
nv.snap_manager.guide.setDistance(sp_convert_distance_full(nv.guidetolerance,
*nv.guidetoleranceunit,
px));
diff --git a/src/desktop.h b/src/desktop.h
index fa8b4f84e8aede1ad414e0ecfa4de4a2068b9b3e..4c9d1ece8cfcaed5ebdd4d0987ddce8f642ef4c4 100644 (file)
--- a/src/desktop.h
+++ b/src/desktop.h
-#ifndef __SP_DESKTOP_H__
-#define __SP_DESKTOP_H__
+#ifndef SEEN_SP_DESKTOP_H
+#define SEEN_SP_DESKTOP_H
/** \file
* SPDesktop: an editable view.
-namespace Inkscape {
+namespace Inkscape {
class Application;
class MessageContext;
- class Selection;
+ class Selection;
class ObjectHierarchy;
class LayerManager;
class EventLog;
- namespace UI {
- namespace Dialog {
- class DialogManager;
+ namespace UI {
+ namespace Dialog {
+ class DialogManager;
}
}
namespace Whiteboard {
/// \todo fixme: This has to be implemented in different way */
guint guides_active : 1;
- // storage for selected dragger used by GrDrag as it's
+ // storage for selected dragger used by GrDrag as it's
// created and deleted by tools
SPItem *gr_item;
guint gr_point_type;
guint gr_point_i;
- bool gr_fill_or_stroke;
-
+ bool gr_fill_or_stroke;
+
Inkscape::ObjectHierarchy *_layer_hierarchy;
gchar * _reconstruction_old_layer_id;
{
return _document_replaced_signal.connect (slot);
}
-
- sigc::connection connectEventContextChanged (const sigc::slot<void,SPDesktop*,SPEventContext*> & slot)
+
+ sigc::connection connectEventContextChanged (const sigc::slot<void,SPDesktop*,SPEventContext*> & slot)
{
return _event_context_changed_signal.connect (slot);
}
- sigc::connection connectSetStyle (const sigc::slot<bool, const SPCSSAttr *> & slot)
+ sigc::connection connectSetStyle (const sigc::slot<bool, const SPCSSAttr *> & slot)
{
- return _set_style_signal.connect (slot);
+ return _set_style_signal.connect (slot);
}
- sigc::connection connectQueryStyle (const sigc::slot<int, SPStyle *, int> & slot)
+ sigc::connection connectQueryStyle (const sigc::slot<int, SPStyle *, int> & slot)
{
- return _query_style_signal.connect (slot);
+ return _query_style_signal.connect (slot);
}
// subselection is some sort of selection which is specific to the tool, such as a handle in gradient tool, or a text selection
sigc::connection connectToolSubselectionChanged(const sigc::slot<void, gpointer> & slot) {
- return _tool_subselection_changed.connect(slot);
+ return _tool_subselection_changed.connect(slot);
}
- void emitToolSubselectionChanged(gpointer data);
+ void emitToolSubselectionChanged(gpointer data);
sigc::connection connectCurrentLayerChanged(const sigc::slot<void, SPObject *> & slot) {
- return _layer_changed_signal.connect(slot);
+ return _layer_changed_signal.connect(slot);
}
-
- // Whiteboard changes
+
+ // Whiteboard changes
#ifdef WITH_INKBOARD
- Inkscape::Whiteboard::SessionManager* whiteboard_session_manager() {
- return _whiteboard_session_manager;
- }
+ Inkscape::Whiteboard::SessionManager* whiteboard_session_manager() {
+ return _whiteboard_session_manager;
+ }
- Inkscape::Whiteboard::SessionManager* _whiteboard_session_manager;
+ Inkscape::Whiteboard::SessionManager* _whiteboard_session_manager;
#endif
-
+
SPDesktop();
void init (SPNamedView* nv, SPCanvas* canvas);
virtual ~SPDesktop();
void destroy();
Inkscape::MessageContext *guidesMessageContext() const {
- return _guides_message_context;
+ return _guides_message_context;
}
void setDisplayModeNormal();
bool isLayer(SPObject *object) const;
bool isWithinViewport(SPItem *item) const;
bool itemIsHidden(SPItem const *item) const;
-
+
void activate_guides (bool activate);
void change_document (SPDocument *document);
bool isToolboxButtonActive (gchar const *id);
void updateNow();
void updateCanvasNow();
-
+
void enableInteraction();
void disableInteraction();
void setWaitingCursor();
void clearWaitingCursor();
-
+
+ void toggleColorProfAdjust();
+
void toggleGrids();
bool gridsEnabled() { return grids_visible; }
void showGrids(bool show, bool dirty_document = true);
static void _onSelectionModified (Inkscape::Selection *selection, guint flags, SPDesktop *dt);
};
-#endif
+#endif // SEEN_SP_DESKTOP_H
/*
Local Variables:
diff --git a/src/helper/window.cpp b/src/helper/window.cpp
index 6f898ee3e084c6c5a31efc9e23b5f5071a92afb4..b814424e5caa5d3eff20c522e8eec02d99d5d9a3 100644 (file)
--- a/src/helper/window.cpp
+++ b/src/helper/window.cpp
window->set_title (title);
window->set_resizable (resizeable);
window->signal_key_press_event().connect(sigc::ptr_fun(&on_window_key_press));
-
+
return window;
}
static gboolean
-sp_window_key_press (GtkWidget *widget, GdkEventKey *event)
+sp_window_key_press(GtkWidget */*widget*/, GdkEventKey *event)
{
- return on_window_key_press(event);
+ return on_window_key_press(event);
}
GtkWidget *
diff --git a/src/menus-skeleton.h b/src/menus-skeleton.h
index 1b793919461524da538f55cdd3dc8a9300b6f2a2..7bff62c29fa9ba03cc94df7a03e7388f654b31e8 100644 (file)
--- a/src/menus-skeleton.h
+++ b/src/menus-skeleton.h
" <separator/>\n"
" <verb verb-id=\"ToggleGrid\" />\n"
" <verb verb-id=\"ToggleGuides\" />\n"
+" <verb verb-id=\"ViewCmsToggle\" />\n"
" <separator/>\n"
" <submenu name=\"" N_("Show/Hide") "\">\n"
" <objects-checkboxes/>\n"
index c8219b7b24509e974fa3712bd86840e74ffa15b7..f148bb71530d89e8fa74fcb11e92cb2cf2c4ccda 100644 (file)
* Abstract base class for all EditWidget implementations.
*
* Authors:
- * Ralf Stephan <ralf@ark.in-berlin.de>
+ * Ralf Stephan <ralf@ark.in-berlin.de>
* John Bintz <jcoswell@coswellproductions.org>
*
* Copyright (C) 2006 John Bintz
/// Returns pointer to window UI object as void*
virtual Gtk::Window *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 iconified
virtual void setIconified() = 0;
-
+
/// Make widget maximized on screen
virtual void setMaximized() = 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;
-
+
/// Force a redraw of the canvas
virtual void requestCanvasUpdateAndWait() = 0;
-
+
/// Enable interaction on this desktop
virtual void enableInteraction() = 0;
-
+
/// Disable interaction on this desktop
virtual void disableInteraction() = 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;
-
+
+ /// Toggle CMS on/off and set preference value accordingly
+ virtual void toggleColorProfAdjust() = 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, select one of the "select one" options (usually radio toggles)
virtual void setToolboxSelectOneValue (const gchar *, gint) = 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;
index f99658f97d942ae2240895a2e986d24f2d8ad462..7bf4fc752b7db2d829e6cd343eed6512abb95f1e 100644 (file)
}
}
+void EditWidget::toggleColorProfAdjust()
+{
+ // TODO implement
+}
+
void
EditWidget::updateZoom()
{
index 4341f667cb2981aeb3793d59cd42f5a423a9344f..e665b2faec88682773a667cdd3e721da432cc2a5 100644 (file)
namespace UI {
namespace View {
-class EditWidget : public Gtk::Window,
+class EditWidget : public Gtk::Window,
public EditWidgetInterface {
public:
EditWidget (SPDocument*);
void onDialogTrace();
void onDialogXmlEditor();
- // Whiteboard (Inkboard)
+ // Whiteboard (Inkboard)
#ifdef WITH_INKBOARD
- void onDialogWhiteboardConnect();
- void onDialogWhiteboardShareWithUser();
- void onDialogWhiteboardShareWithChat();
- void onDialogOpenSessionFile();
- void onDumpXMLTracker();
+ void onDialogWhiteboardConnect();
+ void onDialogWhiteboardShareWithUser();
+ void onDialogWhiteboardShareWithChat();
+ void onDialogOpenSessionFile();
+ void onDumpXMLTracker();
#endif
void onUriChanged();
virtual void updateScrollbars (double scale);
virtual void toggleRulers();
virtual void toggleScrollbars();
+ virtual void toggleColorProfAdjust();
virtual void updateZoom();
virtual void letZoomGrabFocus();
virtual void setToolboxFocusTo (const gchar *);
void _namedview_modified(SPObject *namedview, guint);
Gtk::Tooltips _tooltips;
-
+
// Child widgets:
Gtk::Table _main_window_table;
Gtk::VBox _toolbars_vbox;
Gtk::Table _coord_status;
Gtk::Label _coord_status_x, _coord_status_y;
Gtk::Label _select_status;
-
+
SPDesktop* _desktop;
SPNamedView* _namedview;
double _dt2r;
diff --git a/src/verbs.cpp b/src/verbs.cpp
index a1947fb97e0a2e4be1afe60fd5781dc00de8f467..ea4ffd71bcdef5ac9ad8d47b0dd499419f3560ae 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
case SP_VERB_VIEW_MODE_TOGGLE:
dt->displayModeToggle();
break;
+ case SP_VERB_VIEW_CMS_TOGGLE:
+ dt->toggleColorProfAdjust();
+ break;
case SP_VERB_VIEW_ICON_PREVIEW:
inkscape_dialogs_unhide();
dt->_dlg_mgr->showDialog("IconPreviewPanel");
new ZoomVerb(SP_VERB_VIEW_MODE_TOGGLE, "ViewModeToggle", N_("_Toggle"),
N_("Toggle between normal and outline display modes"), NULL),
+ new ZoomVerb(SP_VERB_VIEW_CMS_TOGGLE, "ViewCmsToggle", N_("Display Adjustment"),
+ N_("Toggle CMS display adjustment on and off"), "swatches"),
+
new ZoomVerb(SP_VERB_VIEW_ICON_PREVIEW, "ViewIconPreview", N_("Ico_n Preview..."),
N_("Open a window to preview objects at different icon resolutions"), "view_icon_preview"),
new ZoomVerb(SP_VERB_ZOOM_PAGE, "ZoomPage", N_("_Page"),
diff --git a/src/verbs.h b/src/verbs.h
index b9c05dbc7d0a563a34da6d3767800aeac67cc012..be9405f9bac09e4cd4235094acfdbb37f07d0fd8 100644 (file)
--- a/src/verbs.h
+++ b/src/verbs.h
SP_VERB_VIEW_MODE_NORMAL,
SP_VERB_VIEW_MODE_OUTLINE,
SP_VERB_VIEW_MODE_TOGGLE,
+ SP_VERB_VIEW_CMS_TOGGLE,
SP_VERB_VIEW_ICON_PREVIEW,
SP_VERB_ZOOM_PAGE,
SP_VERB_ZOOM_PAGE_WIDTH,
index 580274dc4e4b64cc8fb14ef456799ca97ea88716..b0bd3a260d6704caf7d4580514a83e0acb8f71b2 100644 (file)
}
}
+void sp_desktop_widget_toggle_color_prof_adj( SPDesktopWidget *dtw )
+{
+
+ if ( GTK_WIDGET_SENSITIVE( dtw->cms_adjust ) ) {
+ if ( SP_BUTTON_IS_DOWN(dtw->cms_adjust) ) {
+ sp_button_toggle_set_down( SP_BUTTON(dtw->cms_adjust), FALSE );
+ } else {
+ sp_button_toggle_set_down( SP_BUTTON(dtw->cms_adjust), TRUE );
+ }
+ }
+}
+
/* Unused
void
sp_spw_toggle_menubar (SPDesktopWidget *dtw, bool is_fullscreen)
index a0b97f9d899d5e964165b75f98b6ce1045c9ba6b..8f38277abc72d33b5a54a7cb1f06b534d5bda900 100644 (file)
void sp_desktop_widget_toggle_rulers (SPDesktopWidget *dtw);
void sp_desktop_widget_toggle_scrollbars (SPDesktopWidget *dtw);
void sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale);
+void sp_desktop_widget_toggle_color_prof_adj( SPDesktopWidget *dtw );
void sp_dtw_desktop_activate (SPDesktopWidget *dtw);
void sp_dtw_desktop_deactivate (SPDesktopWidget *dtw);
{ sp_desktop_widget_toggle_rulers (_dtw); }
virtual void toggleScrollbars()
{ sp_desktop_widget_toggle_scrollbars (_dtw); }
+ virtual void toggleColorProfAdjust()
+ { sp_desktop_widget_toggle_color_prof_adj(_dtw); }
virtual void updateZoom()
{ sp_desktop_widget_update_zoom (_dtw); }
virtual void letZoomGrabFocus()