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,16 @@
|
|
|
1
|
+
require_relative '../item/item_group'
|
|
2
|
+
require_relative 'option_item'
|
|
3
|
+
|
|
4
|
+
module Kredki
|
|
5
|
+
module Pads
|
|
6
|
+
# Group of items.
|
|
7
|
+
class OptionItemGroup < ItemGroup
|
|
8
|
+
|
|
9
|
+
# Add new item.
|
|
10
|
+
def item!(...)
|
|
11
|
+
put(OptionItem, __method__, ...)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
end#OptionItemGroup
|
|
15
|
+
end#Pads
|
|
16
|
+
end#Kredki
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
require_relative 'option_item_group'
|
|
2
|
+
|
|
3
|
+
module Kredki
|
|
4
|
+
module Pads
|
|
5
|
+
# Layer of option list
|
|
6
|
+
class OptionLayer < Layer
|
|
7
|
+
|
|
8
|
+
# Add new item.
|
|
9
|
+
def item! ...
|
|
10
|
+
@item_group.item!(...)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# :section: LEVEL 2
|
|
14
|
+
|
|
15
|
+
def initialize
|
|
16
|
+
super
|
|
17
|
+
|
|
18
|
+
@scroll = put ScrollPad, layout: :yss do
|
|
19
|
+
# scene.drop_shadow color: :black # this is too expensive at the moment
|
|
20
|
+
end
|
|
21
|
+
@pad = @scroll.put RectanglePad, fill: :gray, layout: :yss, size_y: Fit
|
|
22
|
+
@item_group = @pad.put OptionItemGroup
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def behavior
|
|
26
|
+
super
|
|
27
|
+
|
|
28
|
+
on_key_press :escape do |e|
|
|
29
|
+
unload
|
|
30
|
+
e.close
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def arrange
|
|
35
|
+
@note&.layer&.arrange
|
|
36
|
+
super
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def load note
|
|
40
|
+
@note = note
|
|
41
|
+
@scroll.x = proc do |psx, sx|
|
|
42
|
+
x, y = *note.translate(0, note.area_size_y)
|
|
43
|
+
dsx = window.size_x - sx
|
|
44
|
+
x = [dsx, 0].max if x > dsx
|
|
45
|
+
x
|
|
46
|
+
end
|
|
47
|
+
@scroll.y = proc do |psy, sy|
|
|
48
|
+
x, y = *note.translate(0, note.area_size_y)
|
|
49
|
+
dsy = window.size_y - sy
|
|
50
|
+
y = [dsy, 0].max if y > dsy
|
|
51
|
+
y
|
|
52
|
+
end
|
|
53
|
+
@scroll.size_x = proc{ note.area_size_x }
|
|
54
|
+
@pad.size_x = proc do
|
|
55
|
+
psx = lower.area_size_x
|
|
56
|
+
psx -= 10 if @scroll.area_size_y < @pad.get_size_y
|
|
57
|
+
[psx, fit_size_x].max
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
note.pane.put self
|
|
61
|
+
@pad.find_upper(Item)&.keyboard_request
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def unload
|
|
65
|
+
pad_detach
|
|
66
|
+
@note = nil
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def loaded
|
|
70
|
+
!!@note
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def mouse_press e
|
|
74
|
+
# unload
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def mouse_release e
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
module Kredki
|
|
2
|
+
module Pads
|
|
3
|
+
# Pad with animation area.
|
|
4
|
+
class AnimationPad < Pad
|
|
5
|
+
|
|
6
|
+
# Set a feature recognized by its class.
|
|
7
|
+
def << arg
|
|
8
|
+
case arg
|
|
9
|
+
when String
|
|
10
|
+
set_subject arg
|
|
11
|
+
else
|
|
12
|
+
super
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def set_frame ...
|
|
17
|
+
@area.set_frame(...)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def frame= param
|
|
21
|
+
send_bundle :set_frame, param
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def frame
|
|
25
|
+
@area.frame
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Get duration.
|
|
29
|
+
def duration
|
|
30
|
+
@area.duration
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# :section: LEVEL 2
|
|
34
|
+
|
|
35
|
+
def initialize_area
|
|
36
|
+
@area = @scene.new_animation
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def update_subject subject
|
|
40
|
+
@area.content = subject.to_s
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def min_size_x_value m
|
|
44
|
+
case @size_x
|
|
45
|
+
when Ratio
|
|
46
|
+
get_size_y * @area.picture.aspect_ratio
|
|
47
|
+
else super
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def min_size_x_limit limit, m
|
|
52
|
+
case limit
|
|
53
|
+
when Ratio
|
|
54
|
+
get_size_y * @area.picture.aspect_ratio
|
|
55
|
+
else super
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def get_size_x_value size_x, target_size_x, size_y
|
|
60
|
+
case size_x
|
|
61
|
+
when Ratio
|
|
62
|
+
if @ratio
|
|
63
|
+
size_y ||= @area.picture.original_size[1]
|
|
64
|
+
else
|
|
65
|
+
@ratio = true
|
|
66
|
+
size_y ||= get_size_y
|
|
67
|
+
@ratio = false
|
|
68
|
+
end
|
|
69
|
+
size_y * @area.picture.aspect_ratio
|
|
70
|
+
else super
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def min_size_y_value m
|
|
75
|
+
case @size_y
|
|
76
|
+
when Ratio
|
|
77
|
+
get_size_x / @area.picture.aspect_ratio
|
|
78
|
+
else super
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def min_size_y_limit limit, m
|
|
83
|
+
case limit
|
|
84
|
+
when Ratio
|
|
85
|
+
get_size_x / @area.picture.aspect_ratio
|
|
86
|
+
else super
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def get_size_y_value size_y, target_size_y, size_x
|
|
91
|
+
case size_y
|
|
92
|
+
when Ratio
|
|
93
|
+
if @ratio
|
|
94
|
+
size_x ||= @area.picture.original_size[0]
|
|
95
|
+
else
|
|
96
|
+
@ratio = true
|
|
97
|
+
size_x ||= get_size_x
|
|
98
|
+
@ratio = false
|
|
99
|
+
end
|
|
100
|
+
size_x / @area.picture.aspect_ratio
|
|
101
|
+
else super
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
module Kredki
|
|
2
|
+
module Pads
|
|
3
|
+
# Pad with glyph area.
|
|
4
|
+
class GlyphPad < PicturePad
|
|
5
|
+
|
|
6
|
+
# Set subject.
|
|
7
|
+
def set_subject subject = @subject
|
|
8
|
+
return send_bundle :set_subject, yield(self.subject) if block_given?
|
|
9
|
+
return if @subject == subject && subject != :random
|
|
10
|
+
if update_subject Kredki.glyph(subject)
|
|
11
|
+
update_color if @fill
|
|
12
|
+
end
|
|
13
|
+
@subject = subject
|
|
14
|
+
true
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Set fill.
|
|
18
|
+
def set_fill *fill
|
|
19
|
+
return send_bundle :set_fill, yield(self.fill) if block_given?
|
|
20
|
+
fill = Util.uncover fill
|
|
21
|
+
return if @fill == fill && fill != :random
|
|
22
|
+
@fill = fill
|
|
23
|
+
update_color
|
|
24
|
+
true
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# See #set_fill.
|
|
28
|
+
def fill= param
|
|
29
|
+
send_bundle :set_fill, param
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Get fill.
|
|
33
|
+
def fill
|
|
34
|
+
@fill
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Set a feature recognized by its class.
|
|
38
|
+
def << arg
|
|
39
|
+
case arg
|
|
40
|
+
when Symbol
|
|
41
|
+
set_subject arg if arg =~ /^[a-z_0-9]+$/
|
|
42
|
+
super
|
|
43
|
+
else
|
|
44
|
+
super
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# :section: LEVEL 2
|
|
49
|
+
|
|
50
|
+
def initialize ...
|
|
51
|
+
super
|
|
52
|
+
|
|
53
|
+
@fill = nil
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def sketch
|
|
57
|
+
super
|
|
58
|
+
|
|
59
|
+
set_size Kredki.text_size
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def update_color
|
|
63
|
+
color = Kredki.color @fill
|
|
64
|
+
@area.each_shape do |shape|
|
|
65
|
+
Pastele.shape_set_fill_color shape.pointer, *color
|
|
66
|
+
end
|
|
67
|
+
@area.update
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|