AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 132 |
r3wp | 2173 |
total: | 2305 |
results window for this page: [start: 201 end: 300]
world-name: r3wp
Group: RAMBO ... The REBOL bug and enhancement database [web-public] | ||
eFishAnt: 1-Jan-2005 | I noticed that the library version of rebocalc.r doesn't display the COLUMN Letters, but puts them all at offset 100x20 which is the size of the cells, which somehow gets into the offset. | |
ICarii: 1-Jan-2005 | anton: the behavior I was expecting is as follows: to-binary integer! value -> binary of smallest possible byte size. Example: n: between 0 and 255 to-binary n -> single byte binary #{XX} n: between 256 and 65535 to-binary n -> 2 byte binary #{XXXX} n: between 65536 and 16777215 to-binary n -> 3 byte binary #{XXXXXX} etc. | |
Volker: 8-Jan-2005 | execve("../rebol2558042", ["../rebol2558042"], [/* 18 vars */]) = 0 uname({sys="Linux", node="dino.local", ...}) = 0 brk(0) = 0x809b000 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 7 fstat64(7, {st_mode=S_IFREG|0644, st_size=51977, ...}) = 0 old_mmap(NULL, 51977, PROT_READ, MAP_PRIVATE, 7, 0) = 0x40018000 close(7) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/tls/libm.so.6", O_RDONLY) = 7 read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\2405\0"..., 512) = 512 fstat64(7, {st_mode=S_IFREG|0644, st_size=141236, ...}) = 0 old_mmap(NULL, 139712, PROT_READ|PROT_EXEC, MAP_PRIVATE, 7, 0) = 0x40025000 old_mmap(0x40047000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 7, 0x22000) = 0x40047000 close(7) = 0 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) open("/lib/tls/libc.so.6", O_RDONLY) = 7 read(7, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200X\1"..., 512) = 512 fstat64(7, {st_mode=S_IFREG|0644, st_size=1270908, ...}) = 0 old_mmap(NULL, 1281292, PROT_READ|PROT_EXEC, MAP_PRIVATE, 7, 0) = 0x40048000 old_mmap(0x40176000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 7, 0x12d000) = 0x40176000 old_mmap(0x4017f000, 7436, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4017f000 close(7) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40181000 set_thread_area({entry_number:-1 -> 6, base_addr:0x401812a0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0 munmap(0x40018000, 51977) = 0 rt_sigaction(SIGCONT, {0x804b6c4, [CONT], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGTSTP, {0x804b67c, [TSTP], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGINT, {0x804b700, [INT], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGTERM, {0x804b700, [TERM], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGHUP, {0x804b700, [HUP], SA_RESTART}, {SIG_DFL}, 8) = 0 rt_sigaction(SIGCHLD, {0x804b718, [CHLD], SA_RESTART}, {SIG_DFL}, 8) = 0 socketpair(PF_UNIX, SOCK_DGRAM, 0, [7, 8]) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x401812e8) = 21686 close(8) = 0 brk(0) = 0x809b000 brk(0x80be000) = 0x80be000 brk(0) = 0x80be000 brk(0) = 0x80be000 brk(0x80eb000) = 0x80eb000 brk(0) = 0x80eb000 brk(0x810c000) = 0x810c000 ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(0, TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0 open("/etc/termcap", O_RDONLY) = -1 ENOENT (No such file or directory) write(1, "R", 1) = 1 | |
Volker: 8-Jan-2005 | stat64("/home/volker/d/t/rebol.r", 0xbffff11c) = -1 ENOENT (No such file or directory) stat64("/home/volker/rebol.r", 0xbffff11c) = -1 ENOENT (No such file or directory) stat64("/home/volker/d/t/user.r", 0xbffff11c) = -1 ENOENT (No such file or directory) stat64("/home/volker/user.r", {st_mode=S_IFREG|0644, st_size=3086, ...}) = 0 time([1105173013]) = 1105173013 open("/home/volker/user.r", O_RDONLY) = 8 fstat64(8, {st_mode=S_IFREG|0644, st_size=3086, ...}) = 0 time([1105173013]) = 1105173013 read(8, "REBOL [\n Title: \"%~/user.r\" \n"..., 3086) = 3086 close(8) = 0 | |
Group: Core ... Discuss core issues [web-public] | ||
Robert: 27-Jan-2005 | stack!: make object! [ stack: make block! [] push: func['value /flattend][ either (type? value) == block! [ either flattend [foreach entry value [insert head stack entry]] [insert/only head stack value] ] [insert head stack value] ] pop: does [ either (length? stack) > 0 [ value: first stack remove stack return value ] [return none] ] top: does [ if not empty? [return first stack] ] empty?: does [ either (length? stack) == 0 [return true][return false] ] ontop?: func ['value][ either value == top [return true][return false] ] instack?: func ['value][ either result: find stack value [return index? result][return none] ] reset: does [ clear stack ] size: does [ return length? stack ] print: does [ probe reduce ["stack:" stack] ] ] ; stack | |
Gregg: 27-Jan-2005 | So, in a large class library, or even a medium size one, how do you find all the different method names, and how do you remember them? His answer is that you give the methods the same name. In REBOL, that would mean using words like Insert, Remove, First, Last, etc. That's how REBOL works with all it's built-in datatypes, and we like it for that, so I think it's worth keeping in mind. | |
Group: Script Library ... REBOL.org: Script library and Mailing list archive [web-public] | ||
Sunanda: 26-Aug-2009 | Good news -- no absolutely positiioned DIVs, so it is a fairly fluid layout, will flow easily into most window size. Bad news -- main frame of site is a table. Originally, it was nested DIVs but that caused some layout problems when displaying <pre> sections of code. Going to a table was a quick fix that has never been looked at again. | |
WuJian: 18-Jan-2010 | Good... frames must already be saved in GIF format (UnFREEz does no converting), and that they should be the same dimensions If there is a function in REBOL. It could be more convenient. make-animated-gif: func[images[block!] /size image-size [pair!] /delay [integer!] /loop]...................... | |
Group: MySQL ... [web-public] | ||
Ammon: 17-Jan-2006 | Doc, I'm not sure if you've got this yet or not, but we found a bug where the 'read-packet function's buffer was not getting expanded properly which was causing it to truncate some of our data. To fix this problem then we added a local variable and added these lines: tmp: pl/cache pl/cache: make binary! pl/buf-size system/words/insert tail pl/cache tmp after this line: pl/buffer: make binary! pl/buf-size: packet-len | |
Dockimbel: 18-Jan-2006 | Hi Ammon, it is possible that there's some issue maintainin the 2 buffers size in sync. I've added your patch (with small modifications) to the current code. | |
Dockimbel: 25-Jan-2006 | The new 4.1.1+ protocol fixes that kind of issue by sending the string size first (like in Pascal language). The current driver doesn't implement the new protocol. This will be the main feature of the v2 of the MySQL driver. | |
Group: !Readmail ... a Rebol mail client [web-public] | ||
Fabrice: 20-May-2005 | Received: from web26108.mail.ukl.yahoo.com ([217.12.10.232]) by mail.prosygma-asp.com (Merak 7.5.2) with SMTP id 1TI26716 for <[me-:-you-:-com]>; Tue, 26 Apr 2005 04:58:31 +0200 Received: (qmail 67900 invoked by uid 60001); 26 Apr 2005 02:58:30 -0000 Message-ID: <[20050426025830-:-67898-:-qmail-:-web26108-:-mail-:-ukl-:-yahoo-:-com]> Received: from [81.248.68.164] by web26108.mail.ukl.yahoo.com via HTTP; Tue, 26 Apr 2005 04:58:29 CEST Date: Tue, 26 Apr 2005 04:58:29 +0200 (CEST) From: Rodrigue <[you-:-me-:-com]> Subject: Re: Erreur lors de l'enregistrement d'une news To: Admin Rebol <[me-:-you-:-com]> In-Reply-To: 6667 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-370637848-1114484309=:67141" Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 0517-0, 25/04/2005), Inbound message X-Antivirus-Status: Clean --0-370637848-1114484309=:67141 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Salut Fabrice, Peux tu me redire sous quel format je dois envoyer les photos Rodrigue Admin Rebol <[me-:-you-:-com]> wrote: Bonjour Rodrigue, >Salut Fabrice, >contrairement à ce que je t'expliquais hier soir, les news ne s'enregistrent pas. >voilà le message d'erreur : Peux-tu m'envoyer ce que tu veux mettre en ligne par @ ? Je vérifierais directement avec tes données car il n'y a pas de problème de mon côté pour ajouter les news. Merci. -- Fabrice --------------------------------- Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail --0-370637848-1114484309=:67141 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit <DIV>Salut Fabrice,</DIV> <DIV> </DIV> <DIV>Peux tu me redire sous quel format je dois envoyer les photos<BR></DIV> <DIV>Rodrigue</DIV> <DIV><BR><B><I>Admin Rebol <[me-:-you-:-com]></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Bonjour Rodrigue,<BR><BR>>Salut Fabrice,<BR>>contrairement à ce que je t'expliquais hier soir, les news ne s'enregistrent pas.<BR>>voilà le message d'erreur : <BR><BR>Peux-tu m'envoyer ce que tu veux mettre en ligne par @ ?<BR>Je vérifierais directement avec tes données car il n'y a pas de problème de mon côté pour ajouter les news.<BR><BR>Merci.<BR><BR>-- <BR>Fabrice<BR></BLOCKQUOTE><p> <hr size=1> Découvrez le nouveau Yahoo! Mail : <font color="red">250 Mo d'espace</font> de stockage pour vos mails !<br><a href="http://fr.rd.yahoo.com/mail/taglines/*http://us.rd.yahoo.com/evt=25917/*http://us.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_250/default/*http://fr.promotions.yahoo.com/mail/creer28.html">Créez votre Yahoo! Mail</a> --0-370637848-1114484309=:67141-- | |
PhilB: 16-Nov-2006 | Hi Sunada ..... Is there a size limit on scripts? | |
Sunanda: 16-Nov-2006 | Not at all -- there is no limit on size The largest _single_ script so far is Space game -- at 0.25 meg. http://www.rebol.org/cgi-bin/cgiwrap/rebol/search.r?find=size+%3E+200000 *** If readmail.r is not a single script (ie it is a collection of scripts and files), then we can handle it as a package. Again, no limits on size: http://www.rebol.org/cgi-bin/cgiwrap/rebol/search.r?filter=type-package | |
Group: SDK ... [web-public] | ||
Cyphre: 8-Apr-2005 | the best tool for PNG optimization in size is pngout.exe from famous ken Silverman: http://advsys.net/ken/utils.htm | |
Henrik: 1-Nov-2005 | well, it shouldn't be anything. there should be limits to the size of the source you could encap, plus isn't it possible to encap with only ordinary REBOL/View capabilities? | |
Ashley: 4-Dec-2005 | Most of the GUI work I do does not use VID or networking, so enface without any of the view-* or prot-* scripts is what I want. I do not want to use a loader front-end based on rebview that includes all this code. The cost in executable size may be small (less than 100Kb), but it's the start-up time and memory cost that I like to get as lean as possible. This will become more of an issue if and when REBOL is ported to small memory footprint devices. | |
Group: !RebGUI ... A lightweight alternative to VID [web-public] | ||
DideC: 4-Mar-2005 | view layout [box edge [size: 10x10 image: logo.gif]] | |
DideC: 4-Mar-2005 | view layout [box edge [size: 12x12 image: logo.gif effect: [tile gradcol 1x1 255.0.0 0.0.2 55]]] | |
Vincent: 4-Mar-2005 | progress: make face [ effect: copy [draw [pen blue fill-pen blue box 0x0 0x0]] data: 0 font: none para: none feel: make feel [ redraw: func [face act pos] [ if act = 'show [ face/data: min 1 max 0 face/data face/effect/draw/box: to-pair reduce [to-integer face/size/x * face/data face/size/y] ] ] ] ] | |
Vincent: 4-Mar-2005 | just a detail: in facets document, /span datatype is pair! . you could use it to store other data, but if you set a pair! to /span, /view will use it as virtual size for face (it still works in later betas, so one should be careful to not use it to store coordinates) ie: f: layout [ banner "Testing /span" guide box 400x400 effect [gradient 1x1 0.0.0 255.255.255] button "Hello!" return text-list data ["just" "a" "list"] image logo.gif logo.gif/size * 2 ] f/span: f/size ; here we tells /view to use virtual coordinates for all subfaces view/options f 'resize ; will give a fully resizable window (widgets included), but it only works for reducing window's size. | |
Vincent: 5-Mar-2005 | bug: the last widget in a rebgui layout determine the width of the face - if the last widget is narrow, the window is narrow. fix: in %display.r, you have to keep track of the maximum x value: - near "xy: origin-size" you can initialize a 'max-width: "max-width: origin-size/x" - in parse loop, just after xy update "xy/x: xy/x + last-face/size/x", you can update the 'max-width: "max-width: max max-width xy/x" - after (outside) the parse, near where the y size is last updated "xy/y: xy/y + last-face/size/y", you can set the x size to be the 'max-width: "xy/x: max-width" | |
Vincent: 5-Mar-2005 | usage: check [ text "a label" size 100x15 data true ] | |
shadwolf: 6-Mar-2005 | progress: make face [ effect: copy [draw [pen blue fill-pen blue box 0x0 0x0]] ; is copy needed? data: 0 font: none para: none feel: make feel [ redraw: func [face act pos] [ if act = 'show [ face/effect/draw/box: to pair! reduce [ to integer! face/size/x * face/data: min 1 max 0 face/data face/size/y ] recycle ] ] ] ] | |
shadwolf: 6-Mar-2005 | for example: face/effect/draw/box: to pair! reduce [ to integer! face/size/x * face/data: min 1 max 0 face/data face/size/y | |
Vincent: 6-Mar-2005 | i think 'show use some memory, and don't recycle it it would be bigger else, something like n * image size I tried with bigger images (400x400 instead of 40x40) and only 16k more is allocated at each time | |
Ashley: 7-Mar-2005 | RebGUI uses the standard View face (25 facets) and 'data is not used by REBOL/View. VID extends this face by an additional 22 facets: state style alt-action facets related words colors texts images file var keycode reset styles init multi blinker pane-size dirty? help user-data flags and provides 'user-data as it uses the 'data facet itself. RebGUI widgets use 'data as the "interface" attribute (e.g. setting a progress bar's value) and may define additional facets for internal use on a widget by widget basis. The idea is to make best use of the 25 available View facets and not have every widget using 47 facets regardless of whether it needs to or not! ;) | |
shadwolf: 7-Mar-2005 | it's box edge [ size 3x3 color: gray effect: 'ibevel ] :) | |
Vincent: 9-Mar-2005 | v-splitter: make face [ size: 5x100 edge: make edge [size: 1x1 effect: 'bevel] feel: make feel [ engage: function [face act event][f p n delta][ if event/type = 'move [ f: find face/parent-face/pane face p: first back f n: first next f delta: face/offset/x - face/offset/x: min n/offset/x + n/size/x - 1 - face/size/x max p/offset/x + 1 face/offset/x + event/offset/x p/size/x: p/size/x - delta n/size/x: n/size/x + delta n/offset/x: n/offset/x - delta show [p face n] ] ] ] ] | |
Vincent: 9-Mar-2005 | To use it, just insert it between the faces you want to resize: text [text "Some text" 320x40] v-splitter [size 5x40] box [size 60x40 color blue] | |
Vincent: 11-Mar-2005 | a little correction to 'progress (didn't count the 'edge size and 0x0 origin in draw): | |
Vincent: 11-Mar-2005 | face/effect/draw/box: to pair! reduce [ to integer! face/size/x - 3 * face/data: min 1 max 0 face/data face/size/y - 3 ] | |
Vincent: 11-Mar-2005 | hslider: make face [ size: 200x20 data: 0.0 effect: [draw [pen 48.48.48 fill-pen 192.192.192 box 1x0 10x17]] feel: make feel [ redraw: function [face act pos][delta][ if act = 'show [ face/effect/draw/7/y: face/size/y - 3 delta: 5 + to-integer face/size/x - 12 * min 1.0 max 0.0 face/data face/effect/draw/6/x: delta - 5 face/effect/draw/7/x: delta + 4 ] ] ] init: does [ feel/engage: func [face act event][ if find [move down] event/type [ face/data: min 1.0 max 0.0 event/offset/x / face/size/x show face face/action face ] ] ] ] | |
Vincent: 11-Mar-2005 | for 'hslider - 'init is used to allow 'action in definition, as with 'action feel/engage is modified - must be tuned and modified according to futur specifications - usage example, in %example-misc.r, you can test it adding "hslider [size 200x20 data 0.75 action [p/data: face/data show p]]" - for a 'vslider, same code with all x and y swapped | |
Vincent: 11-Mar-2005 | more complex widgets shouldn't be done until we have a more detailled specification about global look and feel (colors, text size, ...) | |
Graham: 13-Mar-2005 | When you resize the tabbed view to a smaller size, I notice that the window obscures tabs to the right. Can you put an arrow widget to scroll the tabs across ? | |
Vincent: 20-Mar-2005 | A little correction to 'slider - 'slider position was set with an edge in mind, so I subtracted edge/size to it. Without edge, the correct formulas are: for y-slider, delta: 5 + to integer! face/size/y - 10 * min 1 max 0 face/data for x-slider, delta: 5 + to integer! face/size/x - 10 * min 1 max 0 face/data it will remove the visible gaps in Sliders demo | |
Vincent: 20-Mar-2005 | there's a compatibilty problem with 'check and 'led : #[none] #[true] #[false] don't works in /View 1.2.1 . it can be fixed by using reduce [true [...] false [...] none [...]]. (I think backward compatibility should be mandatory only for core functions/widgets, for additional optional elements like 'request-file function and /min-size option, a short note in documentation is enough) | |
Ashley: 24-Mar-2005 | Latest release available at: http://www.dobeash.com/files/RebGUI-016.zip Highlights include: - New bar, group-box and toolbar widgets - Removed icon and text+ widgets - Added accessor functions - Added pad keyword - text and size attribute handling improved - Numerous minor improvements and fixes - Documentation update - Added a simple install example | |
Ammon: 25-Mar-2005 | Ashley, on this page: http://www.dobeash.com/it/rebgui/display.html What does this mean? "Unless otherwise specified, text size reverts to 200x9999 if the string contains a newline." | |
Ashley: 26-Mar-2005 | Vincent: 'list behavior & features - less is more at this stage, once we have something to look at we can refine it. shadwolf: 'text+ removal. While a useful widget for certain domains (like WYSIWYG editors / browsers) it's not a basic building block widget. There were also some unresolved implementation issues with it at this stage - I'll add it back in at a later date as an optional or advanced widget. shadwolf: multi-column list. An implementation model I liked was that adopted by Gui4Cli ( http://users.hol.gr/~dck/g4c/) which allows simple "table" representations (including column type and alignment definitions). Can't say I've come across that many UI's that use anything other than text / numbers in a standard list (thumbnails and scrolling check-box options are usually implemented in an app specific manner). Ammon: 'display/popup. If it's sufficiently different from 'display/layout then I'm all for it. Ammon: Wizard style. A wizard widget, if simple enough, would be a good addition. Like 'group-box and 'tab-panel it is a meta-widget that groups / uses other widgets. I'll make this distinction clearer in the next version of the docs. On a side note, my install example has convinced me of the need for an 'indent option (and the fact that use of 'offset should reset the line-height calculation). Ammon: "Unless otherwise specified, text size reverts to 200x9999 if the string contains a newline." I probably need to rephrase this, but what I was trying to say was that by default 'text is 9999x20 which let's you write a string without having to know it's width in advance (9999 will auto-size it), *but* if the string contains a newline then it is the height that is the more important variable so it'll use 200x9999 instead. Of course it'll only do this if you don't provide an explicit size yourself (the "unless otherwise specified" bit). Hope that makes a bit more sense. | |
Graham: 27-Mar-2005 | What's wrong here ? display "Configuration" [ group-box [ "Panel" data [ text [ size 90 "Server (IP) " ] svr: field [ size 100x20 ]return text [ size 90 "Userid: " ] uid: field [ size 80x20 ] return text [ size 90 "Password: " ] pwd: field hide [ size 80x20 ] return text [ size 90 "Period (secs): " ] pd: field [ size 40x20 ] return text [ size 90 "Start Date: " ] dp: field [ size 80x20 ] return ] ] ] | |
shadwolf: 29-Mar-2005 | very nice work as usual I have one little impprovement that I would like to add to my ctx-menu adaptation to RebGUI is the size calculation instead of passing to it staticly it would be better to calculate in relation with the parent-face and be able to use the resize on it | |
shadwolf: 29-Mar-2005 | or do we let user size it's image be it self ? | |
shadwolf: 29-Mar-2005 | img: to image! make face [edge: none image: img size: 22x22] | |
shadwolf: 29-Mar-2005 | insert tail sub/pane make item-f [;menu item type: 'item text: itm offset: oft root: sub font-colors: either dis? [[172.168.153 172.168.153]] [font-colors] font: make font [align: 'left color: font-colors/2] para: make para [wrap?: false origin: 22x1 + (lineh * 1x0)] size: 0x2 + get-tsize/fnt itm font | |
Robert: 31-Mar-2005 | tab / group: Is the DATA part realy required as a structural element? What about this? tab-panel [ size 1000x300 "Tab1" [...] "Tab2" [...] The idea is to implicitly add a tab for each STRING! BLOCK! pair. ] | |
shadwolf: 1-Apr-2005 | hum depending on the size if it's low sized you can put it on rebol.org with a comment and naming it ARROW4REBGUI.R for axample | |
Brock: 2-Apr-2005 | Ashley, simple question. Is the display/min-size expected to always open atleast the size of min-size. I noticed it does not, however, when you attempt to resize the window, it will not allow resize smaller than min-size. See example 2.1.2 in your RebGui Display guide. | |
Ashley: 2-Apr-2005 | Min-size limits the OS window size on resize only, the documentation will be updated to make this clearer (note that the OS window size includes an unknown number [to REBOL/View at least] of border / title pixels that varies by OS / Window style). | |
shadwolf: 5-Apr-2005 | like do %gui.r display "Test window" [ button [text "Exit " size 50x20 action [ quit]] ]] | |
shadwolf: 9-Apr-2005 | ashley it could be cool to add 2 arrows left and right in the notepad header (where you have the buttons to open the panels of the notepad) when they are hided because the size of the window is smaller than the needed | |
Ashley: 10-Apr-2005 | Ah, nailed the radio-group problem under 1.2.1 by replacing this line: pos: pos + either size/y > 20 [0x20] [as-pair width 0] with these two: tmp: either size/y > 20 [0x20] [as-pair width 0] ; required for 1.2.1 pos: pos + tmp | |
Vincent: 10-Apr-2005 | Proposal: IMHO, it would be better to use the VID convention for auto-size: negative size -> auto-size as 9999 can lead to weird errors and crashs, if someone set dimensions to 999x999, or worst 99999x99999 . ...and 10k screen size isn't that improbable (the size of a virtual screen can be that big!) | |
Ashley: 10-Apr-2005 | I was wondering when someone was going to ask about the whole 9999 thing. ;) It's an optimization to avoid a redundant size assignment prior to 'size-text but has the problems you quoted. I'll probably change it back to -1x-1 in the next build or two. | |
shadwolf: 11-Apr-2005 | redraw: function [face act pos] [test-size test-wid] [ if act = 'show [face/pane/1/size: face/size - 0x20 either not dir-buttons [ dir-buttons: true test-wid: last face/pane test-size: test-wid/offset/x + test-wid/size/x if greater? test-size face/size/x [ insert tail face/pane face/l-arw: make arrow [ size: 20x20 offset: as-pair (face/size/x - 40) 0 data: 'left action: [print "you clicked left" ] ] do face/l-arw/init insert tail face/pane face/r-arw: make arrow [ size: 20x20 offset: as-pair (face/size/x - 20) 0 action: [print "you clicked right" ] data: 'right ] do face/r-arw/init ] ][ face/r-arw/offset: as-pair (face/size/x - 20) 0 face/l-arw/offset: as-pair (face/size/x - 40) 0 ] print "la liste des bouttn est plus grande que ce que l'on voit!!!" ] | |
shadwolf: 11-Apr-2005 | Well I'm going to sleep :) I have 2 bugs with current implementation 1) clicking into the panel arrow is not possibe ... 2) header button countainer and sub countainer have the 100x100 size ... | |
shadwolf: 11-Apr-2005 | tab-panel: make face [ color: none pane: [] l-arw: none r-arw: none dir-buttons: false feel: make default-feel [ redraw: function [face act pos] [test-size test-wid] [ if act = 'show [face/pane/1/size: face/size - 0x20 ; ; test-wid: face/pane/1 ; test-size: test-wid/size/x ; if greater? test-size face/size/x [ ; either not dir-buttons [ ; dir-buttons: true ; insert tail face/pane face/l-arw: make arrow [ ; size: 20x20 ; offset: as-pair (face/size/x - 40) 0 ; data: 'left ; action: [print "you clicked left" ] ; ] do face/l-arw/init ; insert tail face/pane face/r-arw: make arrow [ ; size: 20x20 ; offset: as-pair (face/size/x - 20) 0 ; action: [print "you clicked right" ] ; data: 'right ; ] do face/r-arw/init ; ][ ; face/r-arw/offset: as-pair (face/size/x - 20) 0 ; face/l-arw/offset: as-pair (face/size/x - 40) 0 ; ] ; ] ; print "la liste des bouttn est plus grande que ce que l'on voit!!!" ] ] ] init: has [tab-offset last-tab] [ ; create main display area insert pane make face [ offset: 0x20 edge: default-edge] ; add tabs tab-offset: 0x0 insert tail pane make face [ offset: 0x0 pane: [] color: none ] container: last pane insert container/pane make face [ offset: 0x0 pane: [] color: none] foreach [title spec] data [ insert tail container/pane/1/pane make face [ offset: tab-offset size: 1x20 pane: [] text: title effect: reduce ['round edge-color 5 'draw copy []] resize: none font: make default-font [align: 'center valign: 'bottom] para: default-para feel: make default-feel [ over: func [face act pos] [ either act [ insert face/effect/draw compose [ ; compose required for AGG betas pen over-color line 3x1 (as-pair face/size/x - 4 1) line 2x2 (as-pair face/size/x - 3 2) line 1x3 (as-pair face/size/x - 2 3) ] show face ][ if face/parent-face/parent-face/parent-face/pane/1/pane <> face/data [ ; clear unless selected clear face/effect/draw show face ] ] ] engage: function [face act event] [pf old-face] [ if event/type = 'down [ pf: face/parent-face pf3: pf/parent-face/parent-face if pf3/pane/1/pane = face/data [return] ; has a new tab been selected? clear face/effect/draw old-face: pick pf/pane pf3/data ; find previous tab old-face/resize: pf3/size ; remember last size old-face/size: old-face/size - 0x1 ; deflag old clear old-face/effect/draw face/size: face/size + 0x1 ; flag new face/feel/over face true 0x0 pf3/data: index? find pf/pane face ; set new pane# pf3/pane/1/pane: face/data ; init tab panel if pf3/size <> face/resize [ ; recursive resize span-resize pf3/pane/1 pf3/size - face/resize face/resize: pf3/size ] show pf3 ] ] ] ] last-tab: last container/pane/1/pane last-tab/size/x: 10 + first size-text last-tab ; set tab title width display/layout "" spec last-tab ; generate tab spec into tab pane last-tab/data: last-tab/pane ; swap pane into data last-tab/pane: none ; clear pane last-tab/resize: size ; original panel size tab-offset/x: tab-offset/x + last-tab/size/x ; set offset for next tab title ] print "size et countainer a la con !!" probe size/x container/size: as-pair size/x 20 probe container/size/x container/pane/1/size: container/size container/pane/1/pane/1/size: container/pane/1/pane/1/size + 0x1 ; flag 1st tab data: 1 ; set pane# pane/1/pane: container/pane/1/pane/1/data ; init tab panel container/pane/1/pane/1/feel/over container/pane/1/pane/1 true 0x0 ; flag first as active ] ] | |
Ashley: 24-Apr-2005 | Alpha2 build available at: http://www.dobeash.com/files/RebGUI-020.zip Highlights include: - New, unit based sizing model (see http://www.dobeash.com/it/rebgui/display.html) - Improved language localization (see http://www.dobeash.com/it/rebgui/locale.html) - New arrow, chevron, check-group, led-group, scroller, spinner and drop-list widgets - Lots of minor fixes - show redefine removed - Use of -1 instead of 9999 to denote auto-size - Aesthetic improvements (use of gradients) - %tour.r substantially rewritten Known issues - spinner and drop-list widgets need more work - scroller needs more work (resizeable dragger) In progress - Improved tab-panel (shadwolf) - Menu (cyphre / shadwolf) - tabbing - field input validation (field input masks, etc) That leaves less than half a dozen widgets to go! list single column listview multi-column treeview popup-menu context menu status status bar with one or more “segments” | |
Vincent: 27-Apr-2005 | x-face: make face [ size: -1x-1 init: does [ pane: get data pane/offset: 0x0 if negative? size/x [size/x: pane/size/x] if negative? size/y [size/y: pane/size/y] ] ] | |
Vincent: 27-Apr-2005 | x-face: make face [ size: -1x-1 init: does [ pane: reduce [get data] pane/1/offset: 0x0 if negative? size/x [size/x: pane/1/size/x] if negative? size/y [size/y: pane/1/size/y] ] ] | |
Volker: 27-Apr-2005 | Ashley: changed %display.r to use more parse-features. Hope you like it. but introduced a bug, scrollers are broken now. Would now be easy to detect something like button "hello" but then that string has it has to be merged with the attributes-block somehow. I let you think about it ;) because the attributes are in a block we clash with vid-style action. MAybe we could put the action in parens then, like parse does? button "quit" [size 200x100] (quit) | |
Brock: 30-Apr-2005 | I was also thinking about the feature that was being discussed that allows for more tabs than the width of the layout. How about an option to allow the tabs to wrap when larger than the layout? Take the number of tabs, divide the total by two and auto-size the tabs to the full width of the layout, just now there is two rows. I think this would be a nice alternative behaviour for when the user interface benefits from being able to see all possible tabs. | |
shadwolf: 30-Apr-2005 | Brock datas are organised like that [ [ "title" type size (and so on)] [ data1 (and so on) ] ] size is not implemented yet | |
shadwolf: 30-Apr-2005 | normally size data will be linked with resizing feature | |
shadwolf: 30-Apr-2005 | I'm trying to implement the resizing of the colonne conserving it's size but I it's hard to write I spent so mutch nights with out sleep this week that my neurons are not working properly ;) | |
shadwolf: 30-Apr-2005 | when you move a splitter this influance the left colone size and only change header button and all the widgets on the right size | |
shadwolf: 30-Apr-2005 | this version includes colums left of the spliter resizing and keeping the right columns same size and scolling them | |
shadwolf: 30-Apr-2005 | the last bug I have is related to horizontal scroller when the size changes it does work | |
Brock: 30-Apr-2005 | My only comment about that is there isn't much margin for error, I think the two pixel activation of the column resizing is a little limited and requires concentration. In Excel, they have about 16 pixels (approximately the full size of the mouse pointer area, not just the immediate selection area. | |
Brock: 1-May-2005 | That looks like the ouline of the original size of the cell. Don't see that here. | |
Brock: 1-May-2005 | I'm not talking about when reducing the size of the column, I'm talking when enlarging the size of the column, I can't resize larger then the max width of the column to the right. | |
Group: !Uniserve ... Creating Uniserve processes [web-public] | ||
Graham: 25-Jan-2006 | I think the problem I had is that uniserve either uses a terminating sequence, or a preset number of bytes. If the size of each "packet" changes with encryption, how does one cope with that? | |
Group: Hardware ... Computer Hardware Issues [web-public] | ||
[unknown: 9]: 23-May-2006 | Are there any advantages of one over the other? I have only used PGP. What I like is: I can create a file (x.pgp) of any size, then mount it as a drive. This allows me to do things like make a file that is the size of a DVD disk, and if I need to burn it I just copy the folder to the DVD drive. Although, since Qtask exists, I stopped burning CDs and DVDs, since my data is safer on Qtask. | |
Group: SVG Renderer ... SVG rendering in Draw AGG [web-public] | ||
shadwolf: 23-Jun-2005 | REBOL [ Title: "SVG Demo" Owner: "Ashley G. Trüter" Version: 0.0.1 Date: 21-Jun-2005 Purpose: "Loads and displays a resizeable SVG file." History: { 0.0.1 Initial release } Notes: { Tested on very simple SVG icons Only a few basic styles / attributes / commands supported Does not handle sizes in units other than pixels (e.g. pt, in, cm, mm, etc) SVG path has an optional close command, "z" ... AGG shape equivalent auto-closes load-svg function needs to be totally refactored / optimized ... *sample only* } ] ; The following commands are available for path data: ; ; M = moveto ; L = lineto ; H = horizontal lineto ; V = vertical lineto ; C = curveto ; S = smooth curveto ; Q = quadratic Belzier curve ; T = smooth quadratic Belzier curveto ; A = elliptical Arc ; Z = closepath ;print: none ; comment out this line to enable debug messages load-svg: function [svg-file [file! string!] size [pair!]] [ id defs x y to-color to-byte draw-blk append-style svg-size scale-x scale-y ][ xml: either string? svg-file [parse-xml svg-file] [ unless %.svg = suffix? svg-file [to error! "File has an invalid suffix!"] parse-xml read svg-file ] unless xml/3/1/1 = "svg" [to error! "Could not find SVG header!"] ;unless find ["id" "xmlns"] xml/3/1/2/1 [to error! "Could not find ID header!"] ;unless xml/3/1/3/1/1 = "defs" [to error! "Could not find DEFS header!"] id: xml/3/1/2 defs: xml/3/1/3 ; ; --- Parse SVG id ; svg-size: either find ["32pt" "48pt" "72pt"] select id "width" [ switch select id "width" [ "72pt" [120x120] "48pt" [80x80] "32pt" [60x60] ] ][ as-pair to integer! any [select id "width" "100"] to integer! any [select id "height" "100"] ] x: to integer! any [select id "x" "0"] y: to integer! any [select id "y" "0"] scale-x: size/x / svg-size/x scale-y: size/y / svg-size/y ; ; --- Helper functions ; to-color: func [s [string!]] [ ; converts a string in the form "#FFFFFF" to a 4-byte tuple to tuple! load rejoin ["#{" next s "00}"] ] to-byte: func [s [string!]] [ ; converts a string with a value 0-1 to an inverted byte 255 - to integer! 255 * to decimal! s ] ; ; --- Parse SVG defs ; draw-blk: copy [] append-style: function [ command [string!] blk [block!] ][ x xy pen-color fill-color line-width mode size radius shape closed? matrix transf-command ][ xy: 0x0 size: 0x0 line-width: 1 matrice: make block! [] radius: none transf-command: none foreach [attr val] blk [ switch attr [ "transform" [print "tranform have been found" ;probe val halt val: parse val "()," transf-command: first val probe transf-command switch transf-command [ "matrix" [ foreach word val [ if not find word "matrix" [ insert tail matrice to-decimal word ] ] ] ] ] "style" [ foreach [attr val] parse val ":;" [ switch/default attr [ "font-size" [ ] "stroke" [ switch/default first val [ #"#" [pen-color: to-color val] #"n" [pen-color: none] ][ print ["Unknown stroke:" val] ] ] "stroke-width" [line-width: to decimal! val] "fill" [ fill-color: switch/default first val [ #"#" [to-color val] #"n" [none] ][ print ["Unknown fill value:" val] none ] ] "fill-rule" [ mode: switch/default val [ "evenodd" ['even-odd] ][ print ["Unknown fill-rule value:" val] none ] ] "stroke-opacity" [pen-color: any [pen-color 0.0.0.0] pen-color/4: to-byte val] "fill-opacity" [fill-color: any [fill-color 0.0.0.0] fill-color/4: to-byte val] "stroke-linejoin" [ insert tail draw-blk switch/default val [ "miter" [compose [line-join miter]] "round" [compose [line-join round]] "bevel" [compose [line-join bevel]] ][ print ["Unknown stroke-linejoin value:" val] none ] ] "stroke-linecap" [ insert tail draw-blk 'line-cap insert tail draw-blk to word! val ] ][ print ["Unknown style:" attr] ] ] ] "x" [xy/x: scale-x * val] "y" [xy/y: scale-y * val] "width" [size/x: scale-x * val] "height" [size/y: scale-y * val] "rx" [print "rx"] "ry" [radius: to decimal! val] "d" [ shape: copy [] x: none closed?: false foreach token load val [ switch/default token [ M [insert tail shape 'move] C [insert tail shape 'curve] L [insert tail shape 'line] z [closed?: true] ][ unless number? token [print ["Unknown path command:" token]] either x [insert tail shape as-pair x scale-y * token x: none] [x: scale-x * token] ] ] ] ] ] insert tail draw-blk compose [ pen (pen-color) fill-pen (fill-color) fill-rule (mode) line-width (line-width * min scale-x scale-y) ] switch command [ "rect" [ insert tail draw-blk compose [box (xy) (xy + size)] if radius [insert tail draw-blk radius] ] "path" [ unless closed? [print "Path closed"] either transf-command <> none [ switch transf-command [ "matrix" [insert tail draw-blk compose/only [ (to-word transf-command) (matrice) shape (shape) reset-matrix]] ] ][ insert tail draw-blk compose/only [shape (shape)] ] ] "g" [ print "Write here how to handle G insertion to Draw block" insert tail draw-blk probe compose/only [reset-matrix (to-word transf-command) (matrice)] ] ] ] probe defs foreach blk defs [ switch first blk [ "rect" [append-style first blk second blk] "path" [append-style first blk second blk] "g" [ print "key word" probe first blk print "matrix and style in G" probe second blk append-style first blk second blk ;print "what to draw in G" probe third blk foreach blk2 third blk [ probe blk2 switch first blk2[ "path" [append-style first blk2 second blk2] ] ] ] ] ] probe draw-blk draw-blk ] view make face [ offset: 100x100 size: 200x200 action: request-file/filter/only "*.svg" text: rejoin ["SVG Demo [" last split-path action "]"] data: read action color: white effect: compose/only [draw (load-svg data size)] edge: font: para: none feel: make feel [ detect: func [face event] [ if event/type = 'resize [ insert clear face/effect/draw load-svg face/data face/size show face ] if event/type = 'close [quit] ] ] options: [resize] ] | |
shadwolf: 23-Jun-2005 | REBOL [ Title: "SVG Demo" Owner: "Ashley G. Trüter" Version: 0.0.1 Date: 21-Jun-2005 Purpose: "Loads and displays a resizeable SVG file." History: { 0.0.1 Initial release } Notes: { Tested on very simple SVG icons Only a few basic styles / attributes / commands supported Does not handle sizes in units other than pixels (e.g. pt, in, cm, mm, etc) SVG path has an optional close command, "z" ... AGG shape equivalent auto-closes load-svg function needs to be totally refactored / optimized ... *sample only* } ] ; The following commands are available for path data: ; ; M = moveto ; L = lineto ; H = horizontal lineto ; V = vertical lineto ; C = curveto ; S = smooth curveto ; Q = quadratic Belzier curve ; T = smooth quadratic Belzier curveto ; A = elliptical Arc ; Z = closepath ;print: none ; comment out this line to enable debug messages load-svg: function [svg-file [file! string!] size [pair!]] [ id defs x y to-color to-byte draw-blk append-style svg-size scale-x scale-y ][ xml: either string? svg-file [parse-xml svg-file] [ unless %.svg = suffix? svg-file [to error! "File has an invalid suffix!"] parse-xml read svg-file ] unless xml/3/1/1 = "svg" [to error! "Could not find SVG header!"] ;unless find ["id" "xmlns"] xml/3/1/2/1 [to error! "Could not find ID header!"] ;unless xml/3/1/3/1/1 = "defs" [to error! "Could not find DEFS header!"] id: xml/3/1/2 defs: xml/3/1/3 ; ; --- Parse SVG id ; svg-size: either find ["32pt" "48pt" "72pt"] select id "width" [ switch select id "width" [ "72pt" [120x120] "48pt" [80x80] "32pt" [60x60] ] ][ as-pair to integer! any [select id "width" "100"] to integer! any [select id "height" "100"] ] x: to integer! any [select id "x" "0"] y: to integer! any [select id "y" "0"] scale-x: size/x / svg-size/x scale-y: size/y / svg-size/y ; ; --- Helper functions ; to-color: func [s [string!]] [ ; converts a string in the form "#FFFFFF" to a 4-byte tuple to tuple! load rejoin ["#{" next s "00}"] ] to-byte: func [s [string!]] [ ; converts a string with a value 0-1 to an inverted byte 255 - to integer! 255 * to decimal! s ] ; ; --- Parse SVG defs ; draw-blk: copy [] append-style: function [ command [string!] blk [block!] ][ x xy pen-color fill-color line-width mode size radius shape closed? matrix transf-command ][ xy: 0x0 size: 0x0 line-width: 1 matrice: make block! [] radius: none transf-command: none foreach [attr val] blk [ switch attr [ "transform" [print "tranform have been found" ;probe val halt val: parse val "()," transf-command: first val probe transf-command switch transf-command [ "matrix" [ foreach word val [ if not find word "matrix" [ insert tail matrice to-decimal word ] ] ] ] ] "style" [ foreach [attr val] parse val ":;" [ switch/default attr [ "font-size" [ ] "stroke" [ switch/default first val [ #"#" [pen-color: to-color val] #"n" [pen-color: none] ][ print ["Unknown stroke:" val] ] ] "stroke-width" [line-width: to decimal! val] "fill" [ fill-color: switch/default first val [ #"#" [to-color val] #"n" [none] ][ print ["Unknown fill value:" val] none ] ] "fill-rule" [ mode: switch/default val [ "evenodd" ['even-odd] ][ print ["Unknown fill-rule value:" val] none ] ] "stroke-opacity" [pen-color: any [pen-color 0.0.0.0] pen-color/4: to-byte val] "fill-opacity" [fill-color: any [fill-color 0.0.0.0] fill-color/4: to-byte val] "stroke-linejoin" [ insert tail draw-blk switch/default val [ "miter" [compose [line-join miter]] "round" [compose [line-join round]] "bevel" [compose [line-join bevel]] ][ print ["Unknown stroke-linejoin value:" val] none ] ] "stroke-linecap" [ insert tail draw-blk 'line-cap insert tail draw-blk to word! val ] ][ print ["Unknown style:" attr] ] ] ] "x" [xy/x: scale-x * val] "y" [xy/y: scale-y * val] "width" [size/x: scale-x * val] "height" [size/y: scale-y * val] "rx" [print "rx"] "ry" [radius: to decimal! val] "d" [ shape: copy [] x: none closed?: false foreach token load val [ switch/default token [ M [insert tail shape 'move] C [insert tail shape 'curve] S [insert tail shape 'curv] L [insert tail shape 'line] Q [insert tail shape 'qcurve] T [insert tail shape 'qcurv] z [closed?: true] H [insert tail shape 'hline] V [insert tail shape 'vline] A [insert tail shape 'arc] ][ unless number? token [print ["Unknown path command:" token]] either x [insert tail shape as-pair x scale-y * token x: none] [x: scale-x * token] ] ] ] ] ] insert tail draw-blk compose [ pen (pen-color) fill-pen (fill-color) fill-rule (mode) line-width (line-width * min scale-x scale-y) ] switch command [ "rect" [ insert tail draw-blk compose [box (xy) (xy + size)] if radius [insert tail draw-blk radius] ] "path" [ unless closed? [print "Path closed"] either transf-command <> none [ switch transf-command [ "matrix" [insert tail draw-blk compose/only [ (to-word transf-command) (matrice) shape (shape) reset-matrix]] ] ][ insert tail draw-blk compose/only [shape (shape)] ] ] "g" [ print "Write here how to handle G insertion to Draw block" insert tail draw-blk probe compose/only [reset-matrix (to-word transf-command) (matrice)] ] ] ] probe defs foreach blk defs [ switch first blk [ "rect" [append-style first blk second blk] "path" [append-style first blk second blk] "g" [ print "key word" probe first blk print "matrix and style in G" probe second blk append-style first blk second blk ;print "what to draw in G" probe third blk foreach blk2 third blk [ probe blk2 switch first blk2[ "path" [append-style first blk2 second blk2] ] ] ] ] ] probe draw-blk draw-blk ] view make face [ offset: 100x100 size: 200x200 action: request-file/filter/only "*.svg" text: rejoin ["SVG Demo [" last split-path action "]"] data: read action color: white effect: compose/only [draw (load-svg data size)] edge: font: para: none feel: make feel [ detect: func [face event] [ if event/type = 'resize [ insert clear face/effect/draw load-svg face/data face/size show face ] if event/type = 'close [quit] ] ] options: [resize] ] | |
shadwolf: 23-Jun-2005 | REBOL [ Title: "SVG Demo" Owner: "Ashley G. Trüter" Version: 0.0.1 Date: 21-Jun-2005 Purpose: "Loads and displays a resizeable SVG file." History: { 0.0.1 Initial release } Notes: { Tested on very simple SVG icons Only a few basic styles / attributes / commands supported Does not handle sizes in units other than pixels (e.g. pt, in, cm, mm, etc) SVG path has an optional close command, "z" ... AGG shape equivalent auto-closes load-svg function needs to be totally refactored / optimized ... *sample only* } ] ; The following commands are available for path data: ; ; M = moveto ; L = lineto ; H = horizontal lineto ; V = vertical lineto ; C = curveto ; S = smooth curveto ; Q = quadratic Belzier curve ; T = smooth quadratic Belzier curveto ; A = elliptical Arc ; Z = closepath ;print: none ; comment out this line to enable debug messages load-svg: function [svg-file [file! string!] size [pair!]] [ id defs x y to-color to-byte draw-blk append-style svg-size scale-x scale-y ][ xml: either string? svg-file [parse-xml svg-file] [ unless %.svg = suffix? svg-file [to error! "File has an invalid suffix!"] parse-xml read svg-file ] unless xml/3/1/1 = "svg" [to error! "Could not find SVG header!"] ;unless find ["id" "xmlns"] xml/3/1/2/1 [to error! "Could not find ID header!"] ;unless xml/3/1/3/1/1 = "defs" [to error! "Could not find DEFS header!"] id: xml/3/1/2 defs: xml/3/1/3 ; ; --- Parse SVG id ; svg-size: either find ["32pt" "48pt" "72pt"] select id "width" [ switch select id "width" [ "72pt" [120x120] "48pt" [80x80] "32pt" [60x60] ] ][ as-pair to integer! any [select id "width" "100"] to integer! any [select id "height" "100"] ] x: to integer! any [select id "x" "0"] y: to integer! any [select id "y" "0"] scale-x: size/x / svg-size/x scale-y: size/y / svg-size/y ; ; --- Helper functions ; to-color: func [s [string!]] [ ; converts a string in the form "#FFFFFF" to a 4-byte tuple to tuple! load rejoin ["#{" next s "00}"] ] to-byte: func [s [string!]] [ ; converts a string with a value 0-1 to an inverted byte 255 - to integer! 255 * to decimal! s ] ; ; --- Parse SVG defs ; draw-blk: copy [] append-style: function [ command [string!] blk [block!] ][ x xy pen-color fill-color line-width mode size radius shape closed? matrix transf-command ][ xy: 0x0 size: 0x0 line-width: 1 matrice: make block! [] radius: none transf-command: none foreach [attr val] blk [ switch attr [ "transform" [print "tranform have been found" ;probe val halt val: parse val "()," transf-command: first val probe transf-command switch transf-command [ "matrix" [ foreach word val [ if not find word "matrix" [ insert tail matrice to-decimal word ] ] ] ] ] "style" [ foreach [attr val] parse val ":;" [ switch/default attr [ "font-size" [ ] "stroke" [ switch/default first val [ #"#" [pen-color: to-color val] #"n" [pen-color: none] ][ print ["Unknown stroke:" val] ] ] "stroke-width" [line-width: to decimal! val] "fill" [ fill-color: switch/default first val [ #"#" [to-color val] #"n" [none] ][ print ["Unknown fill value:" val] none ] ] "fill-rule" [ mode: switch/default val [ "evenodd" ['even-odd] ][ print ["Unknown fill-rule value:" val] none ] ] "stroke-opacity" [pen-color: any [pen-color 0.0.0.0] pen-color/4: to-byte val] "fill-opacity" [fill-color: any [fill-color 0.0.0.0] fill-color/4: to-byte val] "stroke-linejoin" [ insert tail draw-blk switch/default val [ "miter" [compose [line-join miter]] "round" [compose [line-join round]] "bevel" [compose [line-join bevel]] ][ print ["Unknown stroke-linejoin value:" val] none ] ] "stroke-linecap" [ insert tail draw-blk 'line-cap insert tail draw-blk to word! val ] ][ print ["Unknown style:" attr] ] ] ] "x" [xy/x: scale-x * val] "y" [xy/y: scale-y * val] "width" [size/x: scale-x * val] "height" [size/y: scale-y * val] "rx" [print "rx"] "ry" [radius: to decimal! val] "d" [ shape: copy [] x: none closed?: false if all [x not number? token] [ insert tail shape x * either token = 'V [scale-y][scale-x] x: none ] foreach token load val [ switch/default token [ M [insert tail shape 'move] C [insert tail shape 'curve] S [insert tail shape 'curv] L [insert tail shape 'line] Q [insert tail shape 'qcurve] T [insert tail shape 'qcurv] z [closed?: true] H [insert tail shape 'hline] V [insert tail shape 'vline] A [insert tail shape 'arc] ][ unless number? token [print ["Unknown path command:" token]] either x [insert tail shape as-pair x scale-y * token x: none] [x: scale-x * token] ] ] ] ] ] insert tail draw-blk compose [ pen (pen-color) fill-pen (fill-color) fill-rule (mode) line-width (line-width * min scale-x scale-y) ] switch command [ "rect" [ insert tail draw-blk compose [box (xy) (xy + size)] if radius [insert tail draw-blk radius] ] "path" [ unless closed? [print "Path closed"] either transf-command <> none [ switch transf-command [ "matrix" [insert tail draw-blk compose/only [ (to-word transf-command) (matrice) shape (shape) reset-matrix]] ] ][ insert tail draw-blk compose/only [shape (shape)] ] ] "g" [ print "Write here how to handle G insertion to Draw block" insert tail draw-blk probe compose/only [reset-matrix (to-word transf-command) (matrice)] ] ] ] probe defs foreach blk defs [ switch first blk [ "rect" [append-style first blk second blk] "path" [append-style first blk second blk] "g" [ print "key word" probe first blk print "matrix and style in G" probe second blk append-style first blk second blk ;print "what to draw in G" probe third blk foreach blk2 third blk [ probe blk2 switch first blk2[ "path" [append-style first blk2 second blk2] ] ] ] ] ] probe draw-blk draw-blk ] view make face [ offset: 100x100 size: 200x200 action: request-file/filter/only "*.svg" text: rejoin ["SVG Demo [" last split-path action "]"] data: read action color: white effect: compose/only [draw (load-svg data size)] edge: font: para: none feel: make feel [ detect: func [face event] [ if event/type = 'resize [ insert clear face/effect/draw load-svg face/data face/size show face ] if event/type = 'close [quit] ] ] options: [resize] ] | |
Ashley: 23-Jun-2005 | Thanks for taking this up and running with it guys, you're making great progress (far better than I could have). Feel free to take ownership of the code and refactor it as needed. Two minor improvements are: unless closed? [insert tail shape reduce ['move 0x0]] which is Gabriele's fix to the shape close problem, and: feel: make feel [ redraw: func [face act pos] [ if act = 'draw [insert clear face/effect/draw load-svg face/data face/size] ] ] which cleans the sample feel code up a bit. I'd also remove "VID" from the title of this group as DRAW AGG is tied to View. ;) | |
shadwolf: 26-Jun-2005 | in svg-size | |
Ashley: 26-Jun-2005 | Yes, to-unit is called from svg-size; and also from "path d", stroke-width, fill-width, etc ... probably anywhere in SVG where we "expect" an integer or decimal! ;) | |
shadwolf: 2-Jan-2006 | for me to be honnest the advantages of using SVG instead of images are a lot this is a quick list of my thoughts on what can be done with SVG format. - easier embeding of graphical content - resizing auto ith not grphics quality loss - cheap but sharp skining - graphical content of an User Interface very low because rebol is pretty able to work with compression of text content ( compress/decompress) A little sample to enlight this compressed SVG file with blender logo -> less than 500 octets (any size can be applyed with no graphic loss (aliasing, color loose, blur, pixelisation etc..) ) a fixed jped for same content will use around 50ko. This means less datas in memory to as graphic pixel tables are very heavy in VM memory - Dynamic graphical content. some thing like text scrolling or efffect like Flash ones but with a reduction of 1000 of the data and memory use SVG use a labeling system for each graphical content that compose the image we can provided a tiny system to handle easy animation and show/hide of graphical content using raw rebol commands -> this will make pretty easier the realisation of dynamic animations in rebol ViD content and as any REBOL/View face is DRaw/AGG capable the effects that we can create isn the futur with this idea will have no limits -> this means too to have a pretty fast and ell designed SVG engine (that's my actual path on research) | |
Group: rebcode ... Rebcode discussion [web-public] | ||
Henrik: 12-Oct-2005 | screen area = window size, sorry | |
Group: Tech News ... Interesting technology [web-public] | ||
Terry: 4-Mar-2006 | Sorry about the size of that paste above,.. only mean to post the last paragraph, and then my connection went down right after.. | |
Pekr: 22-Mar-2006 | that is strange - all mail is plain text and can be og GBs of size ..... | |
[unknown: 10]: 23-Mar-2006 | I cant realy place this product -> http://www.runrev.com/but Its somehow nice but also somehow very ugly product... Anyone any experies with it? Its commercial though it like the GUI part of Rebol in a very Big box.. (in size that is..) | |
Group: !RebDB ... REBOL Pseudo-Relational Database [web-public] | ||
Ashley: 8-Feb-2006 | JOIN differs from SUB-SELECT where you want to aggregate the columns of more than one table, so: select a.col, b.col from a, b cannot be refactored as a sub-select. There are two reasons why I have not implemented JOINs in RebDB [yet]: 1) Dramatic increase in code complexity 2) You can almost always do it more efficiently in REBOL as you *know* the data structures and desired result set *in advance*. About the only time this does not work well [in RebDB] is where you have to pull the contents of more than one table across a network to derive a small subset as the result set. So while this SQL would not suffer: select a.col, b.col from a, b this might: select a.key, b.val from a, b where a.key = b.key depending on the size of b. | |
Group: SQLite ... C library embeddable DB [web-public]. | ||
Ashley: 13-Feb-2006 | Re: RebDB. I'm coming to the conclusion that SQLite is a superset of all I wanted from RIF; and it's: 1) Here today 2)Lean & mean 3)One small (256KB) drop in DLL 4)Works well with REBOL 5)Public Domain And, like RebDB, it is pretty flexible about column values (it uses column affinity to suggest how values may be coerced – so an INTEGER column could contain [1 999 “three” “four”]) which is more REBOLish than most other RDBMS's; and all values (TEXT, INTEGER, REAL and BLOB) are stored as variable byte length. My benchmarking of RebDB vs SQLite with three tables; Customers (100), Orders (10 per customer) and Items (10 per order) gave the following results (measured in Transactions Per Second, with the first for RebDB and the second for SQLite): select * from Customers 148 120 select * from Orders 141 11 select * from Items 76 .73 selective join on Order-Items for one order 8.93 437.23 join on all Order-Items .08 4.93 size of all dat file(s) 410KB 625KB What you have to remember is that RebDB is 100% memory-based using tight loops and REBOL natives where possible, versus SQLite which is disk-based and being called via routines. | |
Pekr: 15-Feb-2006 | Alek - as for backups, one file per table is imo better, because imagine your all-tables-in-one-file containing blog, the db may easily exceed large size .... | |
Ashley: 12-Mar-2006 | do you know if it's possible to separate sqlite's engine from the rest of the code? ... I don't believe so, but I haven't personally checked the C source code; although there are numerous compilation options that could be turned off to reduce the size of the 254KB DLL (or *nix .so) even further. | |
Group: Postscript ... Emitting Postscript from REBOL [web-public] | ||
Maxim: 7-Apr-2006 | 300dpi = 300 ticks in an inch. if you know the printer edges to be 1/2 inch, then you can juste calculate a 2250 wide bitmap (using US letter size paper) and send it . this works. simple math . | |
Maxim: 7-Apr-2006 | a good solution might be to use decimal 0-1 values and just recompute them to whatever output you are using (so adapt to any paper/bitmap size) | |
Henrik: 7-Apr-2006 | positioning and size is the most important in the preview. rendering and prettiness is less important | |
Henrik: 7-Apr-2006 | I didn't discover the error until I tried it on the expensive printer. besides the size and position of the line was supposed to be correct. the barcode was created with PDF Maker | |
Group: !GLayout ... ask questions and now get answers about GLayout. [web-public] | ||
Maxim: 3-Jan-2007 | calc-size also lets you allocate default size and hard set minimal size of your face. | |
Maxim: 3-Jan-2007 | once all face have resolved the size they need/expect/allow a second process is space attribution | |
Maxim: 3-Jan-2007 | basically, you receive a size as input and then refresh your face based on that size. it will always be guaranteed to fit within the specs you gave within calc-size | |
Maxim: 3-Jan-2007 | this means that if no face in a layout can stretch or is elastic, the window will never allow resizing in that direction... trying to resize it beyon, will effetively resize the window back to its nominal size, allowing the other axis to resize freely. | |
Group: !Liquid ... any questions about liquid dataflow core. [web-public] | ||
Maxim: 7-Mar-2009 | the shared class, already speeds up the memory handling of the GC by a factor of 20 or 100 based on the size of your application (exponentially faster, as the app grows) | |
Maxim: 13-Mar-2009 | glue now has a plug that returns gfx text size given any value and a font :-) | |
Maxim: 13-Mar-2009 | ------------------------------------------------- NOTE: FROM NOW ON, every usable !plug definition that I post will be in black, to make it easy to differentiate from test code, and copy in your own libs. ------------------------------------------------- ;- glue-proc-face: glue-proc-face: make face [size: 100x100] ;----------------- ;- !gfx-text-area ;----------------- ; this class returns the area which a value, when represented as a string, occupies. ; ; returns: a pair representing width and height ; ; usage: ; linked only, unlabeled. (filling this node will permanently freeze it) ; ; inputs: ; (1) [any!] value ; the first input is formed to a string, or set to "" ; ; (2) [object!:font] font to use ; the test will be run with this font, irrelevant of what font is currently set in the face. ; ; <TO DO>: add explicit support for /para facet ;----------------- !gfx-text-area: make !plug [ liquid: 0x0 ;----------------- ;- frozen?() ;----------------- ; plug won't do anything until you have proper linkage done. ;----------------- frozen?: func [ ][ vin ["" self/valve/type {/frozen?()}] vout (2 <> length? subordinates) ] valve: make valve [ ;----------------- ;- process() ;----------------- process: func [ plug data ][ vin ["" self/valve/type {/process()}] plug/liquid: 0x0 glue-proc-face/font: data/2 glue-proc-face/size: 1000x1000 glue-proc-face/text: any [ attempt [to-string data/1] "" ] plug/liquid: size-text glue-proc-face vout ] ] ] |
201 / 2305 | 1 | 2 | [3] | 4 | 5 | ... | 20 | 21 | 22 | 23 | 24 |