This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Date: 4-Sep-2019 | |
Description: {Mouse sensitive zooming function} | |
Author: "Toomas Vooglaid" | |
Licence: "Public domain" | |
] | |
zooming: function [face event][ | |
;face's draw-block needs to have matrix defined | |
mx: face/draw/matrix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Date: 28-July-2019 | |
Notes: {Click on window to add flies} | |
] | |
bb: [] fc: target: none | |
web: load %web.png | |
set-step: func [face][as-pair | |
face/extra/speed * (cosine face/extra/dir) | |
face/extra/speed * (sine face/extra/dir) | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebol [ | |
Title: "Build" | |
Author: ["Ladislav Mecir" "Brian Hawley"] | |
File: %build.r | |
Date: 2-May-2006/13:36:38+2:00 | |
History: [ | |
7/apr/2003/19:02 {using INSERT and ONLY keywords} | |
30/Oct/2004/12:55 {intermediate version - alpha} | |
31/Oct/2004/9:49 {intermediate - word - insert/only, :word - insert} | |
4/Nov/2004/6:55 {word - insert and evaluate, :word - insert/only} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
name: 'inject | |
file: %inject.red | |
author: "Gregg Irwin" | |
notes: { | |
Red version of Ladislav Mecir's R2 `build` func. I can't find his on | |
the net, to link to, but can post his original if desired. His point | |
was that `compose` isn't always easy to use, when parens are part of | |
block you're composing, or how your blocks are structured, whether you | |
can use `/only` with `compose`. e.g. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
->: make op! :function ; arrow-style lambdas: [x]->[x + 1] | |
id: ["Identity function, one in, same out" x]->[x] | |
;-------------------------------------------------------------------------------------- | |
cmp: ["Gets a block! of words! or blcoks! that represent a function! and composes it in the usual way" | |
fs [any-block!]]->[ [x]-> compose/deep/only [take reduce append (reduce fs) [x] ] | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [] | |
e.g.: :comment | |
; ideally not exported on the global context | |
delta-time*: function [code count] [ | |
start: now/precise | |
loop count code | |
difference now/precise start | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Started: 2018-05-16 | |
Date: 2019-01-25 | |
Needs: View | |
;%range.red ;https://gist.github.com/toomasv/0e3244375afbedce89b3719c8be7eac0 | |
;TinyURL https://tinyurl.com/y7bt2nqy | |
File: %date-picker.red | |
] | |
context [ | |
y: d: none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Author: "Toomas Vooglaid" | |
Started: 2018-05-01 | |
Purpose: "First steps into rich-text box" | |
] | |
ctx: context [ | |
env: self | |
start: end: 1 | |
diff: 0 | |
dbl: no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Author: "Toomas Vooglaid" | |
Date: 2017-12-31 | |
History: [ | |
2017-12-28 {First draft} | |
2018-01-20 {Added arrows, subtree moving, elementary interactive editing} | |
2018-01-24 {Edges formatting} | |
2018-02-01 {Added differnt edge-ends, layout orientations, improved options-handling} | |
2018-02-03 {Implemented stepped (orthogonal) edges, improved star layout} | |
2018-02-06 {Added directions `across` (default: perpendicular to the step-away direction) and `away` (in the step-away direction). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Author: "Toomas Vooglaid" | |
Date: 26-11-2017 | |
] | |
range: function [val1 val2 /step stp /limit /enbase ebase /debase dbase /unicode][ | |
stp+?: none | |
stp: any [stp either any [percent? val1 percent? val2] [1%][1]] | |
if any [all [block? stp zero? stp/3] zero? stp] [return none] | |
case [ | |
debase [ |
NewerOlder