DEV Source Overview - GiuseppeChillemi/VID-Extension-Kit GitHub Wiki
VID Extension Kit - Developers Reference
Author: Henrik Mikael Kristensen
This document is for those who wish to develop new styles for the VID Extension Kit and also help fixing issues in the source code for the VID Extension Kit
The VID Extension Kit consists of multiple source files that can be combined into one uncompressed file, using the build.r file:
>> do %build.r
Script: "VID Build" (5-Apr-2009)
Building VID Extension Kit
Wrote 157821 bytes. Done.
>> _
The output file, vid-ext-kit.r is put in the same directory as the source files.
TBD: ... Building and including works.. ...
Building includes aappinding to a code
vlock all the following elements:
- Comment "do nothing comment function"
---
- All images
- Base Files
- Skins stock loading function
- Styles
And finally writing to disk inserting an header on top of code
Building script build.r appends all the interest files in a block defined as (guess!) code
here. The functions add-file and add-binary are used to append scripts and binary file 64 bit encoded to the code
block.
The very first piece of code which is appended to code
is the line which defines "do nothing but comment" function:
---: func [s][]
add-file
uses load/header
in
data: load/header
to load the header as object, so each its words can be referenced.
add-file
then appends to code
the function ---
and the name of the script defined in header/tittle
as argument (a string).
--- "REBOL/View: Visual Interface Dialect"
The second append
adds the script we are going to include to code
block without the header (which has previosly been removed)
This is the final aspect of an added script is:
--- "REBOL/View: Visual Interface Dialect"
find-key-face: func [
"Search faces to determine if keycode applies."
face [object!] keycode [char! word!] /local w f result
] [
either all [
w: in face 'keycode
.............
add-binary
here is used to append to code
block the base64 rapresentation of gui elements.
These graphic elements are the second thing added to the code block.
Their aspect:
set 'validation-warn.png load 64#{
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAwUlEQVRIDe1TQQ6D
MAxjiOtew/+fsNdwB9JIRqlIGhfGaauEmhLHdlJ1GP7ryxPYhK989HrRyDMxVTt2
CFyCUi6EWceyLrOKjO8PxNL6xzuAk9auFyvuccGbjVuFJfd4B5lANXvrFvch/xRj
czbOBCz2UtwSCN1DiemiJQCeW3skkLqHatbFBCCzGzIGrhjvJYbu8YI9IeSEteKM
RkQ7zICVmoBD9xlRyXtduAIMWYI5eI/AFGgX5twbepy9HL+E3wHHWDVRhz+rmgAA
AABJRU5ErkJggg==
}
Images, as written, are the second thing added and it is done here
The code lists the files of %../resources/images/
and it adds each one as base64 to the code
block unless it starts with a .
dot.
All other scripts/context are added in the subsequent forach loop unless the block element is a TAG
. It this case the tag is skipped and no script is added to the code block. It's another skip condition. Note that file are writted wihout .r
extension which is added later (TBD: I Have to discover why)
skin-dir: %../resources/skins/standard/
make-dir/deep %../release/
Last build action: saving the code block with an header
And providing stats
print ["Wrote" length? mold code "bytes. Done."]
Add-data
accepts a filename as argument
Note: both add-data and add-file ahave code
hardcoded in the block of the function. It would be useful to have it as a parameter (TBD:)
If you simply want to include the sources as-is in the current work project, use include.r:
>> do %include.r
>> _
Here is a descriptive and auto-generated list of each source file:
To Be Written