diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
commit | cca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch) | |
tree | 146f39ded1c938019e1ed42d30923c2ac9e86789 /src/live_effects/lpe-measure-segments.h | |
parent | Initial commit. (diff) | |
download | inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.tar.xz inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/live_effects/lpe-measure-segments.h | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/src/live_effects/lpe-measure-segments.h b/src/live_effects/lpe-measure-segments.h new file mode 100644 index 0000000..01b23cc --- /dev/null +++ b/src/live_effects/lpe-measure-segments.h @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +#ifndef INKSCAPE_LPE_MEASURE_SEGMENTS_H +#define INKSCAPE_LPE_MEASURE_SEGMENTS_H + +/* + * Author(s): + * Jabiertxo Arraiza Cenoz <jabier.arraiza@marker.es> + * + * Copyright (C) 2014 Author(s) + * + * Released under GNU GPL v2+, read the file 'COPYING' for more information. + */ +#include <gtkmm.h> + +#include "live_effects/effect.h" +#include "live_effects/parameter/bool.h" +#include "live_effects/parameter/colorpicker.h" +#include "live_effects/parameter/enum.h" +#include "live_effects/parameter/fontbutton.h" +#include "live_effects/parameter/message.h" +#include "live_effects/parameter/satellitearray.h" +#include "live_effects/parameter/text.h" +#include "live_effects/parameter/unit.h" + +namespace Inkscape { +namespace LivePathEffect { + +enum OrientationMethod { + OM_HORIZONTAL, + OM_VERTICAL, + OM_PARALLEL, + OM_END +}; + +class LPEMeasureSegments : public Effect { +public: + LPEMeasureSegments(LivePathEffectObject *lpeobject); + ~LPEMeasureSegments() override; + void doOnApply(SPLPEItem const* lpeitem) override; + void doBeforeEffect (SPLPEItem const* lpeitem) override; + void doOnRemove(SPLPEItem const* /*lpeitem*/) override; + void doEffect (SPCurve * curve) override {}; + void doOnVisibilityToggled(SPLPEItem const* /*lpeitem*/) override; + bool doOnOpen(SPLPEItem const *lpeitem) override; + void processObjects(LPEAction lpe_action) override; + Gtk::Widget * newWidget() override; + void createLine(Geom::Point start,Geom::Point end, Glib::ustring name, size_t counter, bool main, bool remove, bool arrows = false); + void createTextLabel(Geom::Point pos, size_t counter, double length, Geom::Coord angle, bool remove, bool valid); + void createArrowMarker(Glib::ustring mode); + bool isWhitelist(size_t i, std::string listsegments, bool whitelist); + void on_my_switch_page(Gtk::Widget* page, guint page_number); +private: + UnitParam unit; + EnumParam<OrientationMethod> orientation; + ColorPickerParam coloropacity; + FontButtonParam fontbutton; + ScalarParam precision; + ScalarParam fix_overlaps; + ScalarParam position; + ScalarParam text_top_bottom; + ScalarParam helpline_distance; + ScalarParam helpline_overlap; + ScalarParam line_width; + ScalarParam scale; + TextParam format; + TextParam blacklist; + BoolParam scale_sensitive; + BoolParam active_projection; + BoolParam whitelist; + BoolParam showindex; + BoolParam arrows_outside; + BoolParam flip_side; + BoolParam local_locale; + BoolParam rotate_anotation; + BoolParam hide_back; + BoolParam hide_arrows; + BoolParam onbbox; + BoolParam bboxonly; + BoolParam centers; + BoolParam maxmin; + BoolParam smallx100; + std::vector<Glib::ustring> items; + SatelliteArrayParam linked_items; + ScalarParam distance_projection; + ScalarParam angle_projection; + BoolParam avoid_overlapping; + MessageParam helpdata; + Glib::ustring display_unit; + double fontsize; + double anotation_width; + double previous_size; + guint32 rgb32; + double arrow_gap; + guint pagenumber; + gchar const* locale_base; + size_t prevsatellitecount = 0; + bool prev_active_projection = false; + SPObject *parent = nullptr; + LPEMeasureSegments(const LPEMeasureSegments &) = delete; + LPEMeasureSegments &operator=(const LPEMeasureSegments &) = delete; + +}; + +} //namespace LivePathEffect +} //namespace Inkscape + +#endif + +/* + 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 : |