SlideShare una empresa de Scribd logo
1 de 30
VID STYLE CREATION AND DESIGN
                 By
      Richard 'Cyphre' Smolak

            2005
WHAT IS VID?

●   Rebol Visual Interface Dialect
●   Layer over View composition engine
●   Powerful method of describing user interface
●   Simple to learn
Simple VID example
view layout [
    text "Hello world!"
    field "enter any string"
    text-list 200x100 data ["item 1" "item 2"
                                   "item 3"]
    button "Ok"
 ]
VID styles
●   text,field, text-list, button are styles
●   style describes face(s) structure
●   REBOL has more than 50 predefined styles
Facets
                             view layout [
●   Facets are default           text "Hello world!" bold font-size 20 red
    attributes of style       ]

●   modify: text, size,
    color, images,
    actions...
●   can be optionaly used
    in layout definition
Custom styles
●   shortcuts that save time
●   completely new GUI elements
●   can be defined in layout using STYLE keyword
     (usually quick shortcuts)
●   outside layout block using STYLIZE function
    (handy for creating stylesheet(s))
Custom styles
●   Example
    view layout [
        style rtext text bold font-size 20 red
        text "Hello world!"
        rtext "Hello world!"
     ]
Custom styles
●   Strict style definition
    view layout/styles [
        button "Hello world!"
        rtext "Hello world!"
     ] stylize [
        rtext: text bold font-size 20 red
        button: button
     ]
Custom styles
●   enhancement of master stylesheet:
    stylize/master [
         rtext: text bold font-size 20 red
         h1u: h1 underline
         gbut: button green
     ]
     view layout [
         h1 "Hello world!"
         h1u "Hello world!"
         text "Hello world!"
         rtext "Hello world!"
         button "Hello world!"
         gbut "Hello world!"
     ]
WITH keyword
●   direct (re)definition of face
     stylize/master [
        my-banner: banner underline with [
           font: make font [
              shadow: none
              color: white
           ]
           image: make image! [1x4
    #{A4C8FFA4C8FF808080808080}]
           effect: [tile]
        ]
     ]
     view layout [
        banner "Hello world!"
        my-banner "Hello world!"
     ]
Creation of style from scratch
●   use 'template' object system/view/vid/vid-face
●   vid-face object equals to predefined FACE style
●   minimal definition
    stylize/master [
         my-style: face with [
           size: 100x100
           init: []
         ]
     ]
     view layout [
         my-style "Hello world!"
     ]
Useful vid-face fields
●   INIT: block! contaning 'startup' code of style
●   MULTI: object! specifies handling of arguments
●   WORDS: block! with custom defined Facets
●   FLAGS: block! holding flags (behaviour
    attributes)
●   ACCESS: object! with basic accessor functions
●   DOC: object! with style documentation strings
Useful vid-face fields
●   RESIZE: function! hadling the style during
    resizing
●   UPDATE: function! used to actualize style data
    etc.
●   RESET: function! used to reset style to initial
    state
Custom style example
    Let's create a:
●   window style
●   draggable titlebar
●   set content
●   set colors
●   basic resize
Custom style example
●   face skeleton:
         window: face with [
             title: "noname"
             color: none
             titlebar: none
             size: 100x100
             dirty?: true
             click: none
          ]
          feel: …
          init: …
          words: …
          multi: …
          access: …
          update: …
          resize: …
          doc: …
     ]
Custom style example
●   FEEL object:
    feel: make feel [
          engage: func [f a e][
            if a = 'down [
                click: e/offset
            ]
            if a = 'up [
                click: none
            ]
            if all [click find [over away] a][
                f/offset: f/offset + (e/offset – click)
                show f
            ]
          ]
       ]
Custom style example
●   INIT block:
    init-code: does [
         titlebar: make face [
              edge: none
              color: any [all [colors colors/2] white]
              size: 0x20
              text: title
         ]
         if dirty? [
              pane: reduce [titlebar layout/offset data 0x20]
              size: second span? Pane
         ]
         titlebar/size/x: size/x
         pane/2/color: any [color blue]
         dirty?: false
      ]
      init: [
         init-code
      ]
Custom style example
●   WORDS block:
    words: [
        content [
           new/data: second args
           next args
        ]
      ]
Custom style example
●   MULTI object:
    multi: make multi [
         text: func [face blk][
             if pick blk 1 [
                 face/title: first blk
             ]
         ]
         file: image: block: none
     ]
Custom style example
●   ACCESS object:
    access: make object! [
        set-face*: func [face value][
           face/data: value face/dirty?: true
        ]
        get-face*: func [face][face/data]
        clear-face*: func [face][
           face/data: [size 100x100] face/dirty?: true
        ]
        reset-face*: func [face][
           face/data: [size 100x100] face/dirty?: true
        ]
      ]
Custom style example
●   UPDATE function:
    update: does [
       init-code
       show self/parent-face
     ]
Custom style example
●   RESIZE object:
    resize: func [new /x /y][
         either any [x y] [
            if x [size/x: new]
            if y [size/y: new]
         ][
            size: any [new size]
         ]
         pane/1/size/x: size/x
         pane/2/size: size
         foreach f pane/2/pane [
            f/size/x: new/x - (2 * f/offset/x)
         ]
      ]
Custom style example
●   DOC object:
    doc: make object! [
         info: "document text"
         string: "window title"
         image: none
         logic: none
         integer: "width of window"
         pair: "width and height of window"
         tuple: ["background color" "titlebar color"]
         file: none
         url: none
         decimal: none
         time: none
         block: none
         keywords: [content "content layout of window"]
      ]
●   Demo code:
    view layout [
         size 640x480
         win: window "My window" content [button "test"] red green
         button "get face" [probe get-face win]
         button "set face" [set-face win [field "test"]]
         button "clear face" [clear-face win]
         button "resize" [win/resize 40x40 + random 300x300]
         button "update" [win/update]
       ]
Real world examples
Real world examples
Real world examples
Real world examples
Real world examples
THANKS FOR YOUR ATTENTION

     cyphre@seznam.cz

Más contenido relacionado

Destacado

Glance rebol
Glance rebolGlance rebol
Glance rebolcrazyaxe
 
bfarm-v2
bfarm-v2bfarm-v2
bfarm-v2Zeus G
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?lichtkind
 
Rebol installation
Rebol installationRebol installation
Rebol installationcrazyaxe
 
Where is Carl?
Where is Carl?Where is Carl?
Where is Carl?crazyaxe
 
Rebol brainwasher
Rebol brainwasherRebol brainwasher
Rebol brainwashercrazyaxe
 

Destacado (11)

Glance rebol
Glance rebolGlance rebol
Glance rebol
 
Livecode
LivecodeLivecode
Livecode
 
bfarm-v2
bfarm-v2bfarm-v2
bfarm-v2
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?
 
Rebol
RebolRebol
Rebol
 
Rebol installation
Rebol installationRebol installation
Rebol installation
 
Where is Carl?
Where is Carl?Where is Carl?
Where is Carl?
 
Rebol
RebolRebol
Rebol
 
Rebol
RebolRebol
Rebol
 
Rebol brainwasher
Rebol brainwasherRebol brainwasher
Rebol brainwasher
 
Syllable OS
Syllable OSSyllable OS
Syllable OS
 

Similar a Rebol VID STYLE CREATION AND DESIGN

Rethink Frontend Development With Elm
Rethink Frontend Development With ElmRethink Frontend Development With Elm
Rethink Frontend Development With ElmBrian Hogan
 
Advanced Custom Fields - Flexible Content
Advanced Custom Fields - Flexible ContentAdvanced Custom Fields - Flexible Content
Advanced Custom Fields - Flexible ContentNorm Euker
 
Introduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdfIntroduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdfDakshPratapSingh1
 
How to develop frontend application
How to develop frontend applicationHow to develop frontend application
How to develop frontend applicationSeokjun Kim
 
Dreamweaver day4
Dreamweaver day4Dreamweaver day4
Dreamweaver day4Law Chng
 
Youidraw Logo Creator User Guide - online Logo Maker
Youidraw Logo Creator User Guide - online Logo Maker  Youidraw Logo Creator User Guide - online Logo Maker
Youidraw Logo Creator User Guide - online Logo Maker YouiDraw
 
Component-Oriented Web Development with Dart
Component-Oriented Web Development with DartComponent-Oriented Web Development with Dart
Component-Oriented Web Development with DartC4Media
 
Introduction to html5 and css3
Introduction to html5 and css3Introduction to html5 and css3
Introduction to html5 and css3Sunny Batabyal
 
Creating WordPress Sites in 2 Hours
Creating WordPress Sites in 2 HoursCreating WordPress Sites in 2 Hours
Creating WordPress Sites in 2 HoursSvetlin Nakov
 
Adobe demo1 by robin thakral
Adobe demo1 by robin thakralAdobe demo1 by robin thakral
Adobe demo1 by robin thakralRobin Thakral
 
Jetpack Compose a nova forma de implementar UI no Android
Jetpack Compose a nova forma de implementar UI no AndroidJetpack Compose a nova forma de implementar UI no Android
Jetpack Compose a nova forma de implementar UI no AndroidNelson Glauber Leal
 
Rethink Frontend Development With Elm
Rethink Frontend Development With ElmRethink Frontend Development With Elm
Rethink Frontend Development With ElmBrian Hogan
 
Componentization css angular
Componentization css angularComponentization css angular
Componentization css angularDavid Amend
 
Getting Visual with Ruby Processing
Getting Visual with Ruby ProcessingGetting Visual with Ruby Processing
Getting Visual with Ruby ProcessingRichard LeBer
 
Android Jetpack Compose - Turkey 2021
Android Jetpack Compose - Turkey 2021Android Jetpack Compose - Turkey 2021
Android Jetpack Compose - Turkey 2021Nelson Glauber Leal
 
Effective Design in PowerPoint
Effective Design in PowerPoint Effective Design in PowerPoint
Effective Design in PowerPoint Soni Amit K
 

Similar a Rebol VID STYLE CREATION AND DESIGN (20)

Rethink Frontend Development With Elm
Rethink Frontend Development With ElmRethink Frontend Development With Elm
Rethink Frontend Development With Elm
 
Advanced Custom Fields - Flexible Content
Advanced Custom Fields - Flexible ContentAdvanced Custom Fields - Flexible Content
Advanced Custom Fields - Flexible Content
 
Page maker
Page makerPage maker
Page maker
 
Introduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdfIntroduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdf
 
How to develop frontend application
How to develop frontend applicationHow to develop frontend application
How to develop frontend application
 
Variations on a Theme
Variations on a ThemeVariations on a Theme
Variations on a Theme
 
Dreamweaver day4
Dreamweaver day4Dreamweaver day4
Dreamweaver day4
 
Youidraw Logo Creator User Guide - online Logo Maker
Youidraw Logo Creator User Guide - online Logo Maker  Youidraw Logo Creator User Guide - online Logo Maker
Youidraw Logo Creator User Guide - online Logo Maker
 
Component-Oriented Web Development with Dart
Component-Oriented Web Development with DartComponent-Oriented Web Development with Dart
Component-Oriented Web Development with Dart
 
Introduction to html5 and css3
Introduction to html5 and css3Introduction to html5 and css3
Introduction to html5 and css3
 
Creating WordPress Sites in 2 Hours
Creating WordPress Sites in 2 HoursCreating WordPress Sites in 2 Hours
Creating WordPress Sites in 2 Hours
 
Adobe demo1 by robin thakral
Adobe demo1 by robin thakralAdobe demo1 by robin thakral
Adobe demo1 by robin thakral
 
Jetpack Compose a nova forma de implementar UI no Android
Jetpack Compose a nova forma de implementar UI no AndroidJetpack Compose a nova forma de implementar UI no Android
Jetpack Compose a nova forma de implementar UI no Android
 
A proper introduction to Elm
A proper introduction to ElmA proper introduction to Elm
A proper introduction to Elm
 
Rethink Frontend Development With Elm
Rethink Frontend Development With ElmRethink Frontend Development With Elm
Rethink Frontend Development With Elm
 
Libre Office Impress Lesson 1
Libre Office Impress Lesson 1Libre Office Impress Lesson 1
Libre Office Impress Lesson 1
 
Componentization css angular
Componentization css angularComponentization css angular
Componentization css angular
 
Getting Visual with Ruby Processing
Getting Visual with Ruby ProcessingGetting Visual with Ruby Processing
Getting Visual with Ruby Processing
 
Android Jetpack Compose - Turkey 2021
Android Jetpack Compose - Turkey 2021Android Jetpack Compose - Turkey 2021
Android Jetpack Compose - Turkey 2021
 
Effective Design in PowerPoint
Effective Design in PowerPoint Effective Design in PowerPoint
Effective Design in PowerPoint
 

Más de crazyaxe

Livecode widget course
Livecode widget courseLivecode widget course
Livecode widget coursecrazyaxe
 
Introduzione all'open source e Linux
Introduzione all'open source e LinuxIntroduzione all'open source e Linux
Introduzione all'open source e Linuxcrazyaxe
 
1 A Chi Appartiene
1 A Chi Appartiene1 A Chi Appartiene
1 A Chi Appartienecrazyaxe
 
Prodotti Biologici Una Grande Truffa
Prodotti Biologici Una Grande TruffaProdotti Biologici Una Grande Truffa
Prodotti Biologici Una Grande Truffacrazyaxe
 
Introduzione all'Open Source e Linux
Introduzione all'Open Source e LinuxIntroduzione all'Open Source e Linux
Introduzione all'Open Source e Linuxcrazyaxe
 
Come Funzianano Internet Email Chat Newsgro
Come Funzianano Internet Email Chat NewsgroCome Funzianano Internet Email Chat Newsgro
Come Funzianano Internet Email Chat Newsgrocrazyaxe
 
Chromium problems
Chromium problemsChromium problems
Chromium problemscrazyaxe
 

Más de crazyaxe (9)

Livecode widget course
Livecode widget courseLivecode widget course
Livecode widget course
 
Introduzione all'open source e Linux
Introduzione all'open source e LinuxIntroduzione all'open source e Linux
Introduzione all'open source e Linux
 
Neo-Sens
Neo-SensNeo-Sens
Neo-Sens
 
Neo-Sens
Neo-SensNeo-Sens
Neo-Sens
 
1 A Chi Appartiene
1 A Chi Appartiene1 A Chi Appartiene
1 A Chi Appartiene
 
Prodotti Biologici Una Grande Truffa
Prodotti Biologici Una Grande TruffaProdotti Biologici Una Grande Truffa
Prodotti Biologici Una Grande Truffa
 
Introduzione all'Open Source e Linux
Introduzione all'Open Source e LinuxIntroduzione all'Open Source e Linux
Introduzione all'Open Source e Linux
 
Come Funzianano Internet Email Chat Newsgro
Come Funzianano Internet Email Chat NewsgroCome Funzianano Internet Email Chat Newsgro
Come Funzianano Internet Email Chat Newsgro
 
Chromium problems
Chromium problemsChromium problems
Chromium problems
 

Último

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Último (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Rebol VID STYLE CREATION AND DESIGN

  • 1. VID STYLE CREATION AND DESIGN By Richard 'Cyphre' Smolak 2005
  • 2. WHAT IS VID? ● Rebol Visual Interface Dialect ● Layer over View composition engine ● Powerful method of describing user interface ● Simple to learn
  • 3. Simple VID example view layout [ text "Hello world!" field "enter any string" text-list 200x100 data ["item 1" "item 2" "item 3"] button "Ok" ]
  • 4. VID styles ● text,field, text-list, button are styles ● style describes face(s) structure ● REBOL has more than 50 predefined styles
  • 5. Facets view layout [ ● Facets are default text "Hello world!" bold font-size 20 red attributes of style ] ● modify: text, size, color, images, actions... ● can be optionaly used in layout definition
  • 6. Custom styles ● shortcuts that save time ● completely new GUI elements ● can be defined in layout using STYLE keyword (usually quick shortcuts) ● outside layout block using STYLIZE function (handy for creating stylesheet(s))
  • 7. Custom styles ● Example view layout [ style rtext text bold font-size 20 red text "Hello world!" rtext "Hello world!" ]
  • 8. Custom styles ● Strict style definition view layout/styles [ button "Hello world!" rtext "Hello world!" ] stylize [ rtext: text bold font-size 20 red button: button ]
  • 9. Custom styles ● enhancement of master stylesheet: stylize/master [ rtext: text bold font-size 20 red h1u: h1 underline gbut: button green ] view layout [ h1 "Hello world!" h1u "Hello world!" text "Hello world!" rtext "Hello world!" button "Hello world!" gbut "Hello world!" ]
  • 10. WITH keyword ● direct (re)definition of face stylize/master [ my-banner: banner underline with [ font: make font [ shadow: none color: white ] image: make image! [1x4 #{A4C8FFA4C8FF808080808080}] effect: [tile] ] ] view layout [ banner "Hello world!" my-banner "Hello world!" ]
  • 11. Creation of style from scratch ● use 'template' object system/view/vid/vid-face ● vid-face object equals to predefined FACE style ● minimal definition stylize/master [ my-style: face with [ size: 100x100 init: [] ] ] view layout [ my-style "Hello world!" ]
  • 12. Useful vid-face fields ● INIT: block! contaning 'startup' code of style ● MULTI: object! specifies handling of arguments ● WORDS: block! with custom defined Facets ● FLAGS: block! holding flags (behaviour attributes) ● ACCESS: object! with basic accessor functions ● DOC: object! with style documentation strings
  • 13. Useful vid-face fields ● RESIZE: function! hadling the style during resizing ● UPDATE: function! used to actualize style data etc. ● RESET: function! used to reset style to initial state
  • 14. Custom style example Let's create a: ● window style ● draggable titlebar ● set content ● set colors ● basic resize
  • 15. Custom style example ● face skeleton: window: face with [ title: "noname" color: none titlebar: none size: 100x100 dirty?: true click: none ] feel: … init: … words: … multi: … access: … update: … resize: … doc: … ]
  • 16. Custom style example ● FEEL object: feel: make feel [ engage: func [f a e][ if a = 'down [ click: e/offset ] if a = 'up [ click: none ] if all [click find [over away] a][ f/offset: f/offset + (e/offset – click) show f ] ] ]
  • 17. Custom style example ● INIT block: init-code: does [ titlebar: make face [ edge: none color: any [all [colors colors/2] white] size: 0x20 text: title ] if dirty? [ pane: reduce [titlebar layout/offset data 0x20] size: second span? Pane ] titlebar/size/x: size/x pane/2/color: any [color blue] dirty?: false ] init: [ init-code ]
  • 18. Custom style example ● WORDS block: words: [ content [ new/data: second args next args ] ]
  • 19. Custom style example ● MULTI object: multi: make multi [ text: func [face blk][ if pick blk 1 [ face/title: first blk ] ] file: image: block: none ]
  • 20. Custom style example ● ACCESS object: access: make object! [ set-face*: func [face value][ face/data: value face/dirty?: true ] get-face*: func [face][face/data] clear-face*: func [face][ face/data: [size 100x100] face/dirty?: true ] reset-face*: func [face][ face/data: [size 100x100] face/dirty?: true ] ]
  • 21. Custom style example ● UPDATE function: update: does [ init-code show self/parent-face ]
  • 22. Custom style example ● RESIZE object: resize: func [new /x /y][ either any [x y] [ if x [size/x: new] if y [size/y: new] ][ size: any [new size] ] pane/1/size/x: size/x pane/2/size: size foreach f pane/2/pane [ f/size/x: new/x - (2 * f/offset/x) ] ]
  • 23. Custom style example ● DOC object: doc: make object! [ info: "document text" string: "window title" image: none logic: none integer: "width of window" pair: "width and height of window" tuple: ["background color" "titlebar color"] file: none url: none decimal: none time: none block: none keywords: [content "content layout of window"] ]
  • 24. Demo code: view layout [ size 640x480 win: window "My window" content [button "test"] red green button "get face" [probe get-face win] button "set face" [set-face win [field "test"]] button "clear face" [clear-face win] button "resize" [win/resize 40x40 + random 300x300] button "update" [win/update] ]
  • 30. THANKS FOR YOUR ATTENTION cyphre@seznam.cz