kredki 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/kredki/core/application.rb +314 -0
- data/lib/kredki/core/color.rb +100 -0
- data/lib/kredki/core/event/block_event_reaction.rb +44 -0
- data/lib/kredki/core/event/composite_event_manager.rb +37 -0
- data/lib/kredki/core/event/event.rb +91 -0
- data/lib/kredki/core/event/event_manager.rb +60 -0
- data/lib/kredki/core/event/event_manager_jobs.rb +53 -0
- data/lib/kredki/core/event/event_reaction.rb +36 -0
- data/lib/kredki/core/event/family/drop_event.rb +40 -0
- data/lib/kredki/core/event/family/exit_event.rb +5 -0
- data/lib/kredki/core/event/family/focus_enter_event.rb +5 -0
- data/lib/kredki/core/event/family/focus_leave_event.rb +5 -0
- data/lib/kredki/core/event/family/hide_event.rb +5 -0
- data/lib/kredki/core/event/family/joystick_event.rb +102 -0
- data/lib/kredki/core/event/family/key_event.rb +40 -0
- data/lib/kredki/core/event/family/mouse_event.rb +190 -0
- data/lib/kredki/core/event/family/pastele_event.rb +11 -0
- data/lib/kredki/core/event/family/show_event.rb +5 -0
- data/lib/kredki/core/event/family/text_event.rb +23 -0
- data/lib/kredki/core/event/family/tick_event.rb +5 -0
- data/lib/kredki/core/event/family/update_complete_event.rb +5 -0
- data/lib/kredki/core/event/family/window_event.rb +108 -0
- data/lib/kredki/core/event/job_event_reaction.rb +44 -0
- data/lib/kredki/core/event/joystick_event_manager.rb +30 -0
- data/lib/kredki/core/event/keyboard_event_manager.rb +29 -0
- data/lib/kredki/core/event/method_event_reaction.rb +46 -0
- data/lib/kredki/core/event/mouse_event_manager.rb +27 -0
- data/lib/kredki/core/font.rb +53 -0
- data/lib/kredki/core/job/after_job.rb +59 -0
- data/lib/kredki/core/job/job.rb +108 -0
- data/lib/kredki/core/job/loop_job.rb +87 -0
- data/lib/kredki/core/job/play_animation_job.rb +44 -0
- data/lib/kredki/core/job/play_job.rb +41 -0
- data/lib/kredki/core/job/play_loop_animation_job.rb +98 -0
- data/lib/kredki/core/job/play_loop_job.rb +104 -0
- data/lib/kredki/core/job/side_job.rb +62 -0
- data/lib/kredki/core/kernel-path.rb +71 -0
- data/lib/kredki/core/kredki.rb +89 -0
- data/lib/kredki/core/linear_gradient.rb +43 -0
- data/lib/kredki/core/media/clipboard.rb +35 -0
- data/lib/kredki/core/media/joystick.rb +199 -0
- data/lib/kredki/core/media/keyboard.rb +84 -0
- data/lib/kredki/core/media/keyboard_modifiers_decoder.rb +154 -0
- data/lib/kredki/core/media/mouse.rb +197 -0
- data/lib/kredki/core/paint/animation.rb +247 -0
- data/lib/kredki/core/paint/area.rb +67 -0
- data/lib/kredki/core/paint/block_shape_area.rb +102 -0
- data/lib/kredki/core/paint/ellipse.rb +22 -0
- data/lib/kredki/core/paint/paint.rb +392 -0
- data/lib/kredki/core/paint/picture.rb +126 -0
- data/lib/kredki/core/paint/rectangle.rb +202 -0
- data/lib/kredki/core/paint/scene.rb +277 -0
- data/lib/kredki/core/paint/shape.rb +394 -0
- data/lib/kredki/core/paint/shape_area.rb +57 -0
- data/lib/kredki/core/paint/text.rb +222 -0
- data/lib/kredki/core/pastele/pastele-extern.rb +139 -0
- data/lib/kredki/core/pastele/pastele.rb +205 -0
- data/lib/kredki/core/radial_gradient.rb +45 -0
- data/lib/kredki/core/setup.rb +214 -0
- data/lib/kredki/core/window/pane.rb +178 -0
- data/lib/kredki/core/window/pane_event_manager.rb +44 -0
- data/lib/kredki/core/window/pane_events.rb +366 -0
- data/lib/kredki/core/window/window.rb +584 -0
- data/lib/kredki/core.rb +2 -0
- data/lib/kredki/hide.rb +9 -0
- data/lib/kredki/irb.rb +90 -0
- data/lib/kredki/module.rb +3 -0
- data/lib/kredki/pads/application.rb +13 -0
- data/lib/kredki/pads/button.rb +151 -0
- data/lib/kredki/pads/checkbox/checkbox.rb +68 -0
- data/lib/kredki/pads/checkbox/checkbox_button.rb +65 -0
- data/lib/kredki/pads/context/item.rb +65 -0
- data/lib/kredki/pads/context/item_group.rb +10 -0
- data/lib/kredki/pads/context/layer.rb +59 -0
- data/lib/kredki/pads/context/menu.rb +77 -0
- data/lib/kredki/pads/context/pad.rb +26 -0
- data/lib/kredki/pads/context/primary_layer.rb +51 -0
- data/lib/kredki/pads/context/secondary_layer.rb +60 -0
- data/lib/kredki/pads/item/item.rb +140 -0
- data/lib/kredki/pads/item/item_group.rb +44 -0
- data/lib/kredki/pads/item/item_x.rb +22 -0
- data/lib/kredki/pads/item/item_y.rb +31 -0
- data/lib/kredki/pads/label.rb +71 -0
- data/lib/kredki/pads/layer.rb +326 -0
- data/lib/kredki/pads/layout/align.rb +10 -0
- data/lib/kredki/pads/layout/layout.rb +88 -0
- data/lib/kredki/pads/layout/way.rb +99 -0
- data/lib/kredki/pads/layout/x_way.rb +119 -0
- data/lib/kredki/pads/layout/y_way.rb +120 -0
- data/lib/kredki/pads/list/item.rb +117 -0
- data/lib/kredki/pads/list/item_group.rb +36 -0
- data/lib/kredki/pads/list/pad.rb +74 -0
- data/lib/kredki/pads/list/tree/item.rb +138 -0
- data/lib/kredki/pads/list/tree/item_group.rb +86 -0
- data/lib/kredki/pads/list/tree/pad.rb +94 -0
- data/lib/kredki/pads/module.rb +11 -0
- data/lib/kredki/pads/note.rb +212 -0
- data/lib/kredki/pads/notes.rb +32 -0
- data/lib/kredki/pads/option/option.rb +121 -0
- data/lib/kredki/pads/option/option_item.rb +15 -0
- data/lib/kredki/pads/option/option_item_group.rb +16 -0
- data/lib/kredki/pads/option/option_layer.rb +81 -0
- data/lib/kredki/pads/pad/animation_pad.rb +106 -0
- data/lib/kredki/pads/pad/glyph_pad.rb +71 -0
- data/lib/kredki/pads/pad/pad.rb +1290 -0
- data/lib/kredki/pads/pad/pad_events.rb +358 -0
- data/lib/kredki/pads/pad/picture_pad.rb +89 -0
- data/lib/kredki/pads/pad/rectangle_pad.rb +181 -0
- data/lib/kredki/pads/pad/scroll_pad.rb +176 -0
- data/lib/kredki/pads/pad/shape_pad.rb +148 -0
- data/lib/kredki/pads/pad/space_pad.rb +33 -0
- data/lib/kredki/pads/pad/text_pad.rb +310 -0
- data/lib/kredki/pads/pane.rb +267 -0
- data/lib/kredki/pads/portal_layer.rb +94 -0
- data/lib/kredki/pads/radio/group.rb +45 -0
- data/lib/kredki/pads/radio/item.rb +69 -0
- data/lib/kredki/pads/radio/item_button.rb +143 -0
- data/lib/kredki/pads/service/event_queue.rb +79 -0
- data/lib/kredki/pads/service/service.rb +248 -0
- data/lib/kredki/pads/service/service_event_manager.rb +43 -0
- data/lib/kredki/pads/service/service_filter.rb +98 -0
- data/lib/kredki/pads/service/service_inherited.rb +48 -0
- data/lib/kredki/pads/setup.rb +36 -0
- data/lib/kredki/pads/slider/slider.rb +145 -0
- data/lib/kredki/pads/slider/slider_x.rb +41 -0
- data/lib/kredki/pads/slider/slider_y.rb +41 -0
- data/lib/kredki/pads/table/cell.rb +22 -0
- data/lib/kredki/pads/table/column.rb +63 -0
- data/lib/kredki/pads/table/column_layout.rb +88 -0
- data/lib/kredki/pads/table/pad.rb +116 -0
- data/lib/kredki/pads/table/row.rb +24 -0
- data/lib/kredki/pads/table/scroll_rows.rb +50 -0
- data/lib/kredki/pads/text/editable_text_verse.rb +77 -0
- data/lib/kredki/pads/text/editable_text_verses.rb +59 -0
- data/lib/kredki/pads/text/navigable_text_pad.rb +413 -0
- data/lib/kredki/pads/text/text_edition.rb +97 -0
- data/lib/kredki/pads/text/text_navigation.rb +109 -0
- data/lib/kredki/pads/toolbar/item.rb +62 -0
- data/lib/kredki/pads/toolbar/item_group.rb +22 -0
- data/lib/kredki/pads/toolbar/layer.rb +41 -0
- data/lib/kredki/pads/toolbar/pad.rb +51 -0
- data/lib/kredki/pads/toolbar/primary_layer.rb +64 -0
- data/lib/kredki/pads/window.rb +11 -0
- data/lib/kredki/script.rb +29 -0
- data/lib/kredki/setup.rb +2 -0
- data/lib/kredki/test.rb +35 -0
- data/lib/kredki.rb +10 -0
- data/lib/readme.md +31 -0
- data/stuff/config/config.rb +431 -0
- data/stuff/config/pads_config.rb +111 -0
- data/stuff/dll/SDL3.dll +0 -0
- data/stuff/dll/pastele.dll +0 -0
- data/stuff/dll/thorvg-1.dll +0 -0
- data/stuff/font/MartianMono-StdRg.ttf +0 -0
- data/stuff/font/MavenPro-Medium.ttf +0 -0
- data/stuff/font/MavenPro-Regular.ttf +0 -0
- data/stuff/glyph/alert-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/alert-triangle-svgrepo-com.svg +12 -0
- data/stuff/glyph/archivebox-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-2-ccw-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-2-cw-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-2-rectangle-path-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-4-way-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-ccw-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-circle-down-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-circle-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-circle-right-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-circle-up-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-cw-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-down-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-from-line-down-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-from-line-left-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-from-line-right-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-from-line-up-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-from-shape-right-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-from-shape-up-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-right-arrow-left-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-right-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-shape-turn-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-shape-turn-right-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-small-down-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-small-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-small-right-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-small-up-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-thin-down-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-thin-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-thin-right-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-thin-up-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-to-line-down-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-to-line-left-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-to-line-right-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-to-line-up-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-to-shape-down-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-to-shape-right-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-trend-down-svgrepo-com.svg +12 -0
- data/stuff/glyph/arrow-trend-up-svgrepo-com.svg +12 -0
- data/stuff/glyph/arrow-turn-down-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-turn-down-right-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-turn-left-down-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-turn-left-up-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-turn-right-down-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-turn-right-up-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-turn-up-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-turn-up-right-svgrepo-com.svg +4 -0
- data/stuff/glyph/arrow-up-arrow-down-svgrepo-com.svg +5 -0
- data/stuff/glyph/arrow-up-svgrepo-com.svg +4 -0
- data/stuff/glyph/at-sign-svgrepo-com.svg +4 -0
- data/stuff/glyph/bag-svgrepo-com.svg +4 -0
- data/stuff/glyph/bell-slash-svgrepo-com.svg +6 -0
- data/stuff/glyph/bell-svgrepo-com.svg +5 -0
- data/stuff/glyph/book-open-svgrepo-com.svg +5 -0
- data/stuff/glyph/bookmark-svgrepo-com.svg +4 -0
- data/stuff/glyph/box-svgrepo-com.svg +6 -0
- data/stuff/glyph/calendar-svgrepo-com.svg +5 -0
- data/stuff/glyph/camera-svgrepo-com.svg +4 -0
- data/stuff/glyph/caret-down-svgrepo-com.svg +4 -0
- data/stuff/glyph/caret-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/caret-right-svgrepo-com.svg +4 -0
- data/stuff/glyph/caret-up-svgrepo-com.svg +4 -0
- data/stuff/glyph/cart-svgrepo-com.svg +6 -0
- data/stuff/glyph/chart-pie-svgrepo-com.svg +5 -0
- data/stuff/glyph/chartbar-2-svgrepo-com.svg +7 -0
- data/stuff/glyph/chartbar-svgrepo-com.svg +7 -0
- data/stuff/glyph/checkmark-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/checkmark-double-svgrepo-com.svg +5 -0
- data/stuff/glyph/checkmark-square-svgrepo-com.svg +4 -0
- data/stuff/glyph/checkmark-svgrepo-com.svg +4 -0
- data/stuff/glyph/chevron-down-svgrepo-com.svg +4 -0
- data/stuff/glyph/chevron-left-chevron-right-svgrepo-com.svg +5 -0
- data/stuff/glyph/chevron-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/chevron-right-svgrepo-com.svg +4 -0
- data/stuff/glyph/chevron-small-down-svgrepo-com.svg +4 -0
- data/stuff/glyph/chevron-small-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/chevron-small-right-svgrepo-com.svg +4 -0
- data/stuff/glyph/chevron-small-up-svgrepo-com.svg +4 -0
- data/stuff/glyph/chevron-up-chevron-down-svgrepo-com.svg +5 -0
- data/stuff/glyph/chevron-up-svgrepo-com.svg +4 -0
- data/stuff/glyph/clock-svgrepo-com.svg +4 -0
- data/stuff/glyph/cloud-arrow-up-svgrepo-com.svg +4 -0
- data/stuff/glyph/cloud-download-svgrepo-com.svg +4 -0
- data/stuff/glyph/cloud-slash-svgrepo-com.svg +5 -0
- data/stuff/glyph/cloud-svgrepo-com.svg +4 -0
- data/stuff/glyph/columns-svgrepo-com.svg +5 -0
- data/stuff/glyph/command-svgrepo-com.svg +4 -0
- data/stuff/glyph/compass-svgrepo-com.svg +5 -0
- data/stuff/glyph/credit-card-svgrepo-com.svg +5 -0
- data/stuff/glyph/crop-svgrepo-com.svg +5 -0
- data/stuff/glyph/crown-svgrepo-com.svg +4 -0
- data/stuff/glyph/delete-left-svgrepo-com.svg +4 -0
- data/stuff/glyph/device-desktop-svgrepo-com.svg +4 -0
- data/stuff/glyph/device-mobile-svgrepo-com.svg +4 -0
- data/stuff/glyph/device-tablet-svgrepo-com.svg +4 -0
- data/stuff/glyph/doc-svgrepo-com.svg +5 -0
- data/stuff/glyph/dot-small-svgrepo-com.svg +4 -0
- data/stuff/glyph/dots-3-horizontal-svgrepo-com.svg +6 -0
- data/stuff/glyph/dots-3-vertical-svgrepo-com.svg +6 -0
- data/stuff/glyph/dots-6-horizontal-svgrepo-com.svg +9 -0
- data/stuff/glyph/dots-6-vertical-svgrepo-com.svg +9 -0
- data/stuff/glyph/dots-9-svgrepo-com.svg +12 -0
- data/stuff/glyph/emoji-frown-svgrepo-com.svg +4 -0
- data/stuff/glyph/emoji-meh-svgrepo-com.svg +4 -0
- data/stuff/glyph/emoji-smile-svgrepo-com.svg +4 -0
- data/stuff/glyph/envelope-svgrepo-com.svg +5 -0
- data/stuff/glyph/external-link-svgrepo-com.svg +5 -0
- data/stuff/glyph/eye-slash-svgrepo-com.svg +15 -0
- data/stuff/glyph/eye-svgrepo-com.svg +4 -0
- data/stuff/glyph/filter-svgrepo-com.svg +4 -0
- data/stuff/glyph/flame-svgrepo-com.svg +4 -0
- data/stuff/glyph/floppy-disk-svgrepo-com.svg +4 -0
- data/stuff/glyph/folder-svgrepo-com.svg +4 -0
- data/stuff/glyph/fullscreen-alt-svgrepo-com.svg +7 -0
- data/stuff/glyph/fullscreen-exit-alt-svgrepo-com.svg +7 -0
- data/stuff/glyph/fullscreen-exit-svgrepo-com.svg +5 -0
- data/stuff/glyph/fullscreen-svgrepo-com.svg +5 -0
- data/stuff/glyph/gear-svgrepo-com.svg +4 -0
- data/stuff/glyph/giftbox-svgrepo-com.svg +6 -0
- data/stuff/glyph/half-star-svgrepo-com.svg +4 -0
- data/stuff/glyph/hashtag-svgrepo-com.svg +4 -0
- data/stuff/glyph/headphones-svgrepo-com.svg +4 -0
- data/stuff/glyph/heart-half-svgrepo-com.svg +4 -0
- data/stuff/glyph/heart-svgrepo-com.svg +4 -0
- data/stuff/glyph/house-svgrepo-com.svg +4 -0
- data/stuff/glyph/image-svgrepo-com.svg +4 -0
- data/stuff/glyph/info-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/key-svgrepo-com.svg +4 -0
- data/stuff/glyph/layers-3-svgrepo-com.svg +6 -0
- data/stuff/glyph/layout-svgrepo-com.svg +6 -0
- data/stuff/glyph/line-3-svgrepo-com.svg +6 -0
- data/stuff/glyph/link-alt-svgrepo-com.svg +5 -0
- data/stuff/glyph/link-svgrepo-com.svg +6 -0
- data/stuff/glyph/list-bullet-svgrepo-com.svg +9 -0
- data/stuff/glyph/location-svgrepo-com.svg +4 -0
- data/stuff/glyph/lock-open-svgrepo-com.svg +4 -0
- data/stuff/glyph/lock-svgrepo-com.svg +4 -0
- data/stuff/glyph/map-pin-svgrepo-com.svg +4 -0
- data/stuff/glyph/medal-svgrepo-com.svg +13 -0
- data/stuff/glyph/media-backward-end-svgrepo-com.svg +5 -0
- data/stuff/glyph/media-backward-svgrepo-com.svg +5 -0
- data/stuff/glyph/media-forward-end-svgrepo-com.svg +5 -0
- data/stuff/glyph/media-forward-svgrepo-com.svg +4 -0
- data/stuff/glyph/media-pause-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/media-pause-svgrepo-com.svg +5 -0
- data/stuff/glyph/media-play-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/media-play-svgrepo-com.svg +4 -0
- data/stuff/glyph/media-stop-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/media-stop-svgrepo-com.svg +4 -0
- data/stuff/glyph/message-bubble-2-svgrepo-com.svg +4 -0
- data/stuff/glyph/message-bubble-svgrepo-com.svg +4 -0
- data/stuff/glyph/mic-slash-svgrepo-com.svg +6 -0
- data/stuff/glyph/mic-svgrepo-com.svg +5 -0
- data/stuff/glyph/minus-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/minus-square-svgrepo-com.svg +4 -0
- data/stuff/glyph/minus-svgrepo-com.svg +4 -0
- data/stuff/glyph/moon-svgrepo-com.svg +4 -0
- data/stuff/glyph/music-note-svgrepo-com.svg +4 -0
- data/stuff/glyph/nosign-svgrepo-com.svg +4 -0
- data/stuff/glyph/paper-clip-svgrepo-com.svg +4 -0
- data/stuff/glyph/paper-plane-svgrepo-com.svg +4 -0
- data/stuff/glyph/pen-tool-svgrepo-com.svg +4 -0
- data/stuff/glyph/pencil-svgrepo-com.svg +5 -0
- data/stuff/glyph/percent-svgrepo-com.svg +6 -0
- data/stuff/glyph/phone-incoming-svgrepo-com.svg +5 -0
- data/stuff/glyph/phone-missed-svgrepo-com.svg +4 -0
- data/stuff/glyph/phone-outgoing-svgrepo-com.svg +5 -0
- data/stuff/glyph/phone-slash-svgrepo-com.svg +4 -0
- data/stuff/glyph/phone-svgrepo-com.svg +4 -0
- data/stuff/glyph/plus-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/plus-square-svgrepo-com.svg +4 -0
- data/stuff/glyph/plus-svgrepo-com.svg +4 -0
- data/stuff/glyph/power-svgrepo-com.svg +5 -0
- data/stuff/glyph/printer-svgrepo-com.svg +5 -0
- data/stuff/glyph/question-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/scissors-svgrepo-com.svg +5 -0
- data/stuff/glyph/search-svgrepo-com.svg +4 -0
- data/stuff/glyph/server-svgrepo-com.svg +5 -0
- data/stuff/glyph/shape-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/shape-rhombus-svgrepo-com.svg +4 -0
- data/stuff/glyph/shape-square-svgrepo-com.svg +4 -0
- data/stuff/glyph/shape-triangle-svgrepo-com.svg +12 -0
- data/stuff/glyph/share-svgrepo-com.svg +4 -0
- data/stuff/glyph/shield-slash-svgrepo-com.svg +13 -0
- data/stuff/glyph/shield-svgrepo-com.svg +4 -0
- data/stuff/glyph/shippingbox-svgrepo-com.svg +7 -0
- data/stuff/glyph/slider-3-horizontal-svgrepo-com.svg +9 -0
- data/stuff/glyph/slider-3-vertical-svgrepo-com.svg +9 -0
- data/stuff/glyph/speaker-svgrepo-com.svg +4 -0
- data/stuff/glyph/speaker-wave-1-svgrepo-com.svg +5 -0
- data/stuff/glyph/speaker-wave-2-svgrepo-com.svg +6 -0
- data/stuff/glyph/speaker-xmark-svgrepo-com.svg +5 -0
- data/stuff/glyph/square-4-grid-svgrepo-com.svg +7 -0
- data/stuff/glyph/square-on-square-svgrepo-com.svg +5 -0
- data/stuff/glyph/star-svgrepo-com.svg +4 -0
- data/stuff/glyph/sun-svgrepo-com.svg +12 -0
- data/stuff/glyph/tag-svgrepo-com.svg +4 -0
- data/stuff/glyph/text-align-center-svgrepo-com.svg +7 -0
- data/stuff/glyph/text-align-justify-svgrepo-com.svg +7 -0
- data/stuff/glyph/text-align-left-svgrepo-com.svg +7 -0
- data/stuff/glyph/text-align-right-svgrepo-com.svg +7 -0
- data/stuff/glyph/text-bold-svgrepo-com.svg +4 -0
- data/stuff/glyph/text-heading-svgrepo-com.svg +4 -0
- data/stuff/glyph/text-italic-svgrepo-com.svg +4 -0
- data/stuff/glyph/text-svgrepo-com.svg +4 -0
- data/stuff/glyph/text-underline-svgrepo-com.svg +5 -0
- data/stuff/glyph/thumbs-down-svgrepo-com.svg +5 -0
- data/stuff/glyph/thumbs-up-svgrepo-com.svg +5 -0
- data/stuff/glyph/trash-svgrepo-com.svg +5 -0
- data/stuff/glyph/tray-svgrepo-com.svg +4 -0
- data/stuff/glyph/umbrela-svgrepo-com.svg +4 -0
- data/stuff/glyph/user-svgrepo-com.svg +5 -0
- data/stuff/glyph/users-svgrepo-com.svg +7 -0
- data/stuff/glyph/video-svgrepo-com.svg +12 -0
- data/stuff/glyph/waveform-ecg-svgrepo-com.svg +4 -0
- data/stuff/glyph/wi-fi-svgrepo-com.svg +7 -0
- data/stuff/glyph/xmark-circle-svgrepo-com.svg +4 -0
- data/stuff/glyph/xmark-small-svgrepo-com.svg +4 -0
- data/stuff/glyph/xmark-svgrepo-com.svg +4 -0
- data/stuff/glyph/zap-svgrepo-com.svg +4 -0
- data/stuff/glyph/zoom-in-svgrepo-com.svg +5 -0
- data/stuff/glyph/zoom-out-svgrepo-com.svg +5 -0
- data/stuff/readme.md +266 -0
- data/stuff/so/libSDL3.so +0 -0
- data/stuff/so/libpastele.so +0 -0
- data/stuff/so/libthorvg-1.so +0 -0
- metadata +427 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Kredki
|
|
2
|
+
module Pads
|
|
3
|
+
module Table
|
|
4
|
+
# Table cell model.
|
|
5
|
+
class Cell < RectanglePad
|
|
6
|
+
|
|
7
|
+
# :section: LEVEL 2
|
|
8
|
+
|
|
9
|
+
def sketch
|
|
10
|
+
super
|
|
11
|
+
|
|
12
|
+
set_size 1r
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def min_size_y
|
|
16
|
+
fit_size_y
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
module Kredki
|
|
2
|
+
module Pads
|
|
3
|
+
module Table
|
|
4
|
+
# Table column model.
|
|
5
|
+
class Column
|
|
6
|
+
|
|
7
|
+
# Set size.
|
|
8
|
+
def set_size size = @size
|
|
9
|
+
return send_bundle :set_size, yield(self.size) if block_given?
|
|
10
|
+
return if @size == size
|
|
11
|
+
@size = size
|
|
12
|
+
true
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# See #set_size.
|
|
16
|
+
def size= param
|
|
17
|
+
send_bundle :set_size, param
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Get size.
|
|
21
|
+
def size
|
|
22
|
+
@size
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Set size limit.
|
|
26
|
+
def set_limit limit = @limit
|
|
27
|
+
return send_bundle :set_limit, yield(self.limit) if block_given?
|
|
28
|
+
return if @limit == limit
|
|
29
|
+
@limit = limit
|
|
30
|
+
true
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# See #set_limit.
|
|
34
|
+
def limit= param
|
|
35
|
+
send_bundle :set_limit, param
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Get size limit.
|
|
39
|
+
def limit
|
|
40
|
+
@limit
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Set a feature recognized by its class.
|
|
44
|
+
def << feature
|
|
45
|
+
case feature
|
|
46
|
+
when Numeric
|
|
47
|
+
set_size feature
|
|
48
|
+
when Range
|
|
49
|
+
set_limit feature
|
|
50
|
+
else raise_ia feature
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# :section: LEVEL 2
|
|
55
|
+
|
|
56
|
+
def initialize
|
|
57
|
+
@size = Auto
|
|
58
|
+
@limit = nil
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
module Kredki
|
|
2
|
+
module Pads
|
|
3
|
+
module Table
|
|
4
|
+
# Column layout.
|
|
5
|
+
class ColumnLayout < Layout::XWay
|
|
6
|
+
|
|
7
|
+
# Add new column.
|
|
8
|
+
def column! ...
|
|
9
|
+
@columns << Column.new.set(...)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Set space between columns.
|
|
13
|
+
def set_space space = @space
|
|
14
|
+
return if @space == space
|
|
15
|
+
@space = space
|
|
16
|
+
true
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# See #set_space.
|
|
20
|
+
def space= param
|
|
21
|
+
send_bundle :set_space, param
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Get space between columns.
|
|
25
|
+
def space
|
|
26
|
+
@space
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# :section: LEVEL 2
|
|
30
|
+
|
|
31
|
+
def initialize table, x, y
|
|
32
|
+
super(x, y)
|
|
33
|
+
@table = table
|
|
34
|
+
@columns = []
|
|
35
|
+
@measurement = nil
|
|
36
|
+
@spans = nil
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def arrange pad
|
|
40
|
+
@measurement ? proper_arrange(pad) : measure_arrange(pad)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def measure_arrange pad
|
|
44
|
+
csx = @table.clip_size_x
|
|
45
|
+
|
|
46
|
+
@spans = pad.pads_layoutic.zip(@columns, @spans).map do |p1, column, span|
|
|
47
|
+
n = get_span p1, column.size, column.limit, csx
|
|
48
|
+
span ? [n[0], a = [n[1], span[1]].max, [n[2], span[2]].min, a] : n
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def proper_arrange pad
|
|
53
|
+
client_size_y = pad.clip_size_y
|
|
54
|
+
client_size_x = @table.clip_size_x
|
|
55
|
+
size_x = @size_x
|
|
56
|
+
|
|
57
|
+
pad.pads_layoutic.zip @measurement do |p1, measured|
|
|
58
|
+
if measured
|
|
59
|
+
sx = measured
|
|
60
|
+
else
|
|
61
|
+
sx = client_size_x - size_x
|
|
62
|
+
size_x = client_size_x
|
|
63
|
+
end
|
|
64
|
+
sy = p1.get_size_y client_size_y
|
|
65
|
+
p1.update_size sx, sy
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
arrange_pads pad.arranged_pads, size_x, client_size_x, client_size_y, @space || 0
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def prepare
|
|
72
|
+
@measurement = nil
|
|
73
|
+
@spans = []
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def designate
|
|
77
|
+
@measurement, @size_x = spans @spans, @table.clip_size_x, @space || 0
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def release
|
|
81
|
+
@measurement = nil
|
|
82
|
+
@spans = nil
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
module Kredki
|
|
2
|
+
module Pads
|
|
3
|
+
module Table
|
|
4
|
+
class Pad < RectanglePad
|
|
5
|
+
|
|
6
|
+
# Add new column.
|
|
7
|
+
def column! ...
|
|
8
|
+
@column_layout.column!(...) and layer&.break_layout
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Get default row features.
|
|
12
|
+
def row
|
|
13
|
+
{
|
|
14
|
+
size_x: 1r,
|
|
15
|
+
size_y: Fit,
|
|
16
|
+
layout: @column_layout
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Add new row.
|
|
21
|
+
def row! ...
|
|
22
|
+
put(Row, :row!, row, ...)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Set spacer in X axis.
|
|
26
|
+
def set_spacer_x ...
|
|
27
|
+
if @column_layout.set_space(...)
|
|
28
|
+
layer&.break_layout
|
|
29
|
+
true
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# See #set_spacer_x.
|
|
34
|
+
def spacer_x= param
|
|
35
|
+
send_bundle :set_spacer_x, param
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Get spacer in X axis.
|
|
39
|
+
def spacer_x
|
|
40
|
+
@column_layout.space
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Set spacer in Y axis.
|
|
44
|
+
def set_spacer_y spacer_y = @spacer
|
|
45
|
+
return set_spacer_y yield @spacer if block_given?
|
|
46
|
+
return if Util.eqr @spacer, spacer_y
|
|
47
|
+
@spacer = spacer_y
|
|
48
|
+
layer&.break_layout
|
|
49
|
+
true
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# See #set_spacer_y.
|
|
53
|
+
def spacer_y= param
|
|
54
|
+
send_bundle :set_spacer_y, param
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Get spacer in Y axis.
|
|
58
|
+
def spacer_y
|
|
59
|
+
@spacer
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Set spacer value.
|
|
63
|
+
def set_spacer spacer_x = @column_layout.space, spacer_y = spacer_x
|
|
64
|
+
return set_spacer yield(self.spacer) if block_given?
|
|
65
|
+
set_spacer_x(spacer_x) | set_spacer_y(spacer_y)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# See #set_spacer.
|
|
69
|
+
def spacer= param
|
|
70
|
+
send_bundle :set_spacer, param
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Get spacer value.
|
|
74
|
+
def spacer
|
|
75
|
+
spacer_y
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Add new scroll rows.
|
|
79
|
+
def scroll_rows! ...
|
|
80
|
+
put(ScrollRows, :scroll_rows!, spacer: spacer_y).set(...)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# :section: LEVEL 2
|
|
84
|
+
|
|
85
|
+
def initialize
|
|
86
|
+
super
|
|
87
|
+
|
|
88
|
+
@column_layout = ColumnLayout.new self, 0, 0
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def sketch
|
|
92
|
+
super
|
|
93
|
+
|
|
94
|
+
set_fill false
|
|
95
|
+
set_layout :yss
|
|
96
|
+
set_size_y Fit
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def arrange
|
|
100
|
+
@column_layout.prepare
|
|
101
|
+
super
|
|
102
|
+
@column_layout.designate
|
|
103
|
+
super
|
|
104
|
+
@column_layout.release
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
end#Pad
|
|
108
|
+
|
|
109
|
+
require_relative 'column'
|
|
110
|
+
require_relative 'column_layout'
|
|
111
|
+
require_relative 'cell'
|
|
112
|
+
require_relative 'row'
|
|
113
|
+
require_relative 'scroll_rows'
|
|
114
|
+
end#Table
|
|
115
|
+
end#Pads
|
|
116
|
+
end#Kredki
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module Kredki
|
|
2
|
+
module Pads
|
|
3
|
+
module Table
|
|
4
|
+
# Table row model.
|
|
5
|
+
class Row < RectanglePad
|
|
6
|
+
|
|
7
|
+
# Add new cell.
|
|
8
|
+
def cell! ...
|
|
9
|
+
put(Cell, __method__, ...)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# :section: LEVEL 2
|
|
13
|
+
|
|
14
|
+
def sketch
|
|
15
|
+
super
|
|
16
|
+
|
|
17
|
+
set_size 1r, Fit
|
|
18
|
+
set_fill false
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
module Kredki
|
|
2
|
+
module Pads
|
|
3
|
+
module Table
|
|
4
|
+
|
|
5
|
+
class ScrollCell < Cell
|
|
6
|
+
def fit_size_x
|
|
7
|
+
fit = super
|
|
8
|
+
if lower_pad.pads.last == self
|
|
9
|
+
slider_y = find_lower(ScrollRows)&.slider_y
|
|
10
|
+
fit += slider_y.get_size_x + lower_pad.margin_xe if slider_y.displayed
|
|
11
|
+
end
|
|
12
|
+
fit
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def update_size x, y
|
|
16
|
+
if lower_pad.pads.last == self
|
|
17
|
+
slider_y = find_lower(ScrollRows)&.slider_y
|
|
18
|
+
return super(x - slider_y.get_size_x - lower_pad.margin_xe, y) if slider_y.displayed
|
|
19
|
+
end
|
|
20
|
+
super
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
class ScrollRow < Row
|
|
25
|
+
def cell! ...
|
|
26
|
+
put(ScrollCell, __method__, ...)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Scrolled table row set.
|
|
31
|
+
class ScrollRows < ScrollPad
|
|
32
|
+
|
|
33
|
+
# Add new row.
|
|
34
|
+
def row! ...
|
|
35
|
+
put(ScrollRow, __method__, lower.row, ...)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# :section: LEVEL 2
|
|
39
|
+
|
|
40
|
+
def sketch
|
|
41
|
+
super
|
|
42
|
+
|
|
43
|
+
set_size_x 1r
|
|
44
|
+
set_layout :yss
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
require_relative 'text_edition'
|
|
2
|
+
|
|
3
|
+
module Kredki
|
|
4
|
+
module Pads
|
|
5
|
+
class EditableTextVerse < NavigableTextPad
|
|
6
|
+
|
|
7
|
+
# :section: LEVEL 2
|
|
8
|
+
|
|
9
|
+
def paste pasted
|
|
10
|
+
new_content = content_after_edit pasted, @selection_start, @selection_end
|
|
11
|
+
report TextEdition::EditEvent.new @selection_start, @selection_end, new_content, pasted, :paste
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def backspace
|
|
15
|
+
if any_selected
|
|
16
|
+
new_content = content_after_edit "", @selection_start, @selection_end
|
|
17
|
+
report TextEdition::EditEvent.new @selection_start, @selection_end, new_content, "", :backspace
|
|
18
|
+
elsif @cursor_position > 0
|
|
19
|
+
new_content = content_after_edit "", @cursor_position - 1, @cursor_position
|
|
20
|
+
report TextEdition::EditEvent.new @cursor_position - 1, @cursor_position, new_content, "", :backspace
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def delete
|
|
25
|
+
length = text.length
|
|
26
|
+
if any_selected
|
|
27
|
+
new_content = content_after_edit "", @selection_start, @selection_end
|
|
28
|
+
report TextEdition::EditEvent.new @selection_start, @selection_end, new_content, "", :delete
|
|
29
|
+
elsif @cursor_position < length
|
|
30
|
+
new_content = content_after_edit "", @cursor_position, @cursor_position + 1
|
|
31
|
+
report TextEdition::EditEvent.new @cursor_position, @cursor_position + 1, new_content, "", :delete
|
|
32
|
+
elsif length > 0
|
|
33
|
+
backspace
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def set_subject subject = @subject, cursor_position = 0, &b
|
|
38
|
+
super("#{subject}\n".each_line(chomp: true).to_a.join, cursor_position, &b)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def edit new_content, new_cursor_position
|
|
42
|
+
v = @verses.first
|
|
43
|
+
initial_size_x = v.size_x
|
|
44
|
+
set_subject new_content, new_cursor_position
|
|
45
|
+
case @verse_layout
|
|
46
|
+
when :yss, :ysc, :yse
|
|
47
|
+
nil
|
|
48
|
+
when :yes, :yec, :yee
|
|
49
|
+
v = @verses.first
|
|
50
|
+
@scene.x = area_x >= 0 && v.size_x > area_size_x ? @scene.x + v.size_x - initial_size_x : 0
|
|
51
|
+
when :ycs, :ycc, :yce
|
|
52
|
+
@scene.x = 0
|
|
53
|
+
else raise_is @verse_layout
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def drop_move x, y
|
|
58
|
+
cursor_position = cursor_position_for_coordinates x, y
|
|
59
|
+
if @cursor_position != cursor_position && @selection_start == @selection_end
|
|
60
|
+
@selection_start = @selection_end = @cursor_position = cursor_position
|
|
61
|
+
layer&.break_layout
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def content_after_edit inset, from, to
|
|
66
|
+
string = text.to_s
|
|
67
|
+
if string == ""
|
|
68
|
+
inset
|
|
69
|
+
elsif to < string.length
|
|
70
|
+
string[...from] + inset + string[to..]
|
|
71
|
+
else
|
|
72
|
+
string[...from] + inset
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
require_relative 'text_edition'
|
|
2
|
+
|
|
3
|
+
module Kredki
|
|
4
|
+
module Pads
|
|
5
|
+
class EditableTextVerses < NavigableTextPad
|
|
6
|
+
|
|
7
|
+
# :section: LEVEL 2
|
|
8
|
+
|
|
9
|
+
def paste pasted
|
|
10
|
+
new_content = content_after_edit pasted, @selection_start, @selection_end
|
|
11
|
+
report TextEdition::EditEvent.new @selection_start, @selection_end, new_content, pasted, :paste
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def backspace
|
|
15
|
+
if any_selected
|
|
16
|
+
new_content = content_after_edit "", @selection_start, @selection_end
|
|
17
|
+
report TextEdition::EditEvent.new @selection_start, @selection_end, new_content, "", :backspace
|
|
18
|
+
elsif @cursor_position > 0
|
|
19
|
+
new_content = content_after_edit "", @cursor_position - 1, @cursor_position
|
|
20
|
+
report TextEdition::EditEvent.new @cursor_position - 1, @cursor_position, new_content, "", :backspace
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def delete
|
|
25
|
+
length = subject.length
|
|
26
|
+
if any_selected
|
|
27
|
+
new_content = content_after_edit "", @selection_start, @selection_end
|
|
28
|
+
report TextEdition::EditEvent.new @selection_start, @selection_end, new_content, "", :delete
|
|
29
|
+
elsif @cursor_position < length
|
|
30
|
+
new_content = content_after_edit "", @cursor_position, @cursor_position + 1
|
|
31
|
+
report TextEdition::EditEvent.new @cursor_position, @cursor_position + 1, new_content, "", :delete
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def edit new_content, new_cursor_position
|
|
36
|
+
set_subject new_content, new_cursor_position
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def drop_move x, y
|
|
40
|
+
cursor_position = cursor_position_for_coordinates x, y
|
|
41
|
+
if @cursor_position != cursor_position && @selection_start == @selection_end
|
|
42
|
+
@selection_start = @selection_end = @cursor_position = cursor_position
|
|
43
|
+
layer&.break_layout
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def content_after_edit inset, from, to
|
|
48
|
+
string = text
|
|
49
|
+
if string == ""
|
|
50
|
+
inset
|
|
51
|
+
elsif to < string.length
|
|
52
|
+
string[...from] + inset + string[to..]
|
|
53
|
+
else
|
|
54
|
+
string[...from] + inset
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|