Commit 7eda3cc0 authored by Alex Valavanis's avatar Alex Valavanis

SnapToolbar: Stop using GtkAction

parent 85f5be05
<ui>
<toolbar name='SnapToolbar'>
<toolitem action='ToggleSnapGlobal' />
<separator />
<toolitem action='ToggleSnapFromBBoxCorner' />
<toolitem action='ToggleSnapToBBoxPath' />
<toolitem action='ToggleSnapToBBoxNode' />
<toolitem action='ToggleSnapToFromBBoxEdgeMidpoints' />
<toolitem action='ToggleSnapToFromBBoxCenters' />
<separator />
<toolitem action='ToggleSnapFromNode' />
<toolitem action='ToggleSnapToItemPath' />
<toolitem action='ToggleSnapToPathIntersections' />
<toolitem action='ToggleSnapToItemNode' />
<toolitem action='ToggleSnapToSmoothNodes' />
<toolitem action='ToggleSnapToFromLineMidpoints' />
<separator />
<toolitem action='ToggleSnapFromOthers' />
<toolitem action='ToggleSnapToFromObjectCenters' />
<toolitem action='ToggleSnapToFromRotationCenter' />
<toolitem action='ToggleSnapToFromTextBaseline' />
<separator />
<toolitem action='ToggleSnapToPageBorder' />
<toolitem action='ToggleSnapToGrids' />
<toolitem action='ToggleSnapToGuides' />
<!--toolitem action='ToggleSnapToGridGuideIntersections' /-->
</toolbar>
</ui>
......@@ -51,6 +51,7 @@ set(ui_SRC
toolbar/pencil-toolbar.cpp
toolbar/rect-toolbar.cpp
toolbar/select-toolbar.cpp
toolbar/snap-toolbar.cpp
toolbar/spiral-toolbar.cpp
toolbar/spray-toolbar.cpp
toolbar/star-toolbar.cpp
......@@ -347,6 +348,7 @@ set(ui_SRC
toolbar/pencil-toolbar.h
toolbar/rect-toolbar.h
toolbar/select-toolbar.h
toolbar/snap-toolbar.h
toolbar/spiral-toolbar.h
toolbar/spray-toolbar.h
toolbar/star-toolbar.h
......
This diff is collapsed.
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef SEEN_SNAP_TOOLBAR_H
#define SEEN_SNAP_TOOLBAR_H
/**
* @file
* Snapping toolbar
*
* @authors Inkscape authors, 2004-2019
*
* Released under GNU GPL v2+, read the file 'COPYING' for more information.
*/
#include "toolbar.h"
enum SPAttributeEnum : unsigned;
namespace Inkscape {
namespace UI {
namespace Toolbar {
class SnapToolbar : public Toolbar {
private:
bool _freeze;
// Toolbar widgets
Gtk::ToggleToolButton *_snap_global_item;
Gtk::ToggleToolButton *_snap_from_bbox_corner_item;
Gtk::ToggleToolButton *_snap_to_bbox_path_item;
Gtk::ToggleToolButton *_snap_to_bbox_node_item;
Gtk::ToggleToolButton *_snap_to_from_bbox_edge_midpoints_item;
Gtk::ToggleToolButton *_snap_to_from_bbox_edge_centers_item;
Gtk::ToggleToolButton *_snap_from_node_item;
Gtk::ToggleToolButton *_snap_to_item_path_item;
Gtk::ToggleToolButton *_snap_to_path_intersections_item;
Gtk::ToggleToolButton *_snap_to_item_node_item;
Gtk::ToggleToolButton *_snap_to_smooth_nodes_item;
Gtk::ToggleToolButton *_snap_to_from_line_midpoints_item;
Gtk::ToggleToolButton *_snap_from_others_item;
Gtk::ToggleToolButton *_snap_to_from_object_centers_item;
Gtk::ToggleToolButton *_snap_to_from_rotation_center_item;
Gtk::ToggleToolButton *_snap_to_from_text_baseline_item;
Gtk::ToggleToolButton *_snap_to_page_border_item;
Gtk::ToggleToolButton *_snap_to_grids_item;
Gtk::ToggleToolButton *_snap_to_guides_item;
void on_snap_toggled(SPAttributeEnum attr);
protected:
SnapToolbar(SPDesktop *desktop);
public:
static GtkWidget * create(SPDesktop *desktop);
static void update(SnapToolbar *tb);
};
}
}
}
#endif /* !SEEN_SNAP_TOOLBAR_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:fileencoding=utf-8:textwidth=99 :
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment