Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rebol [
- file: %mockup.reb
- ]
- if not value? 'to-text [ load-gui ]
- dpi: gui-metric 'screen-dpi
- gui-metric/set 'unit-size dpi / 96
- scr: round/floor (gui-metric 'work-size) - gui-metric 'title-size
- stylize [
- but: button [
- facets: [
- init-size: 24x34 ; 100x48
- max-size: 60x34 ;260x48
- min-size: 24x34
- align: 'center
- ]
- ]
- ]
- ;; grab some images
- icons: [
- fork http://i.stack.imgur.com/VWHTU.png?s=128&g=1&g&s=16
- graham http://i.stack.imgur.com/LBnjL.png?s=128&g=1&g&s=16
- josh http://i.stack.imgur.com/brRFc.png?s=128&g=1&g&s=16
- brain http://i.stack.imgur.com/6KbV5.jpg?s=128&g=1&g&s=32
- rebolbot http://i.stack.imgur.com/x2LdO.png?s=128&g=1&g&s=16
- ]
- icon-bar: copy []
- foreach [ person link ] icons [
- append icon-bar form person
- repend/only icon-bar[ 'print form person ]
- print [ "loading ... " person ]
- either find suffix? link %.jpg [
- set person decode 'JPEG read link
- ][
- set person decode 'PNG read link
- ]
- insert back back tail icon-bar person
- ]
- icon-bar: reduce icon-bar
- ms: 20x20
- mh: 100x100
- message: [
- vpanel [
- hpanel [
- image graham options [ max-size: ms max-hint: mh ]
- hpanel [ text [ bold "Graham" ] ]
- hpanel [ text [ (form ++ n) ] ]
- ] options [black border-size: [1x1 1x1]]
- text [ bold "Hmm. " drop red "From the file datestamps," drop italic "it is the one with the text entry bug. And more text that hopefully will wrap. One of the best things about moving major functionality into external entities is that they can be developed wholly independently of the core, which can result in more resources being dedicated to it and more support and compatibility across versions. And of course, its optional, can be swapped for alternative APIs or implementations."] options [ max-hint: reduce [scr/x 500] max-size: 400x500]
- but "Reply" on-action [ alert "Todo" ]
- ] options [box-model: 'frame]
- ]
- messages: copy []
- n: 1
- loop 5 [ append messages compose/deep copy/deep message ]
- view/options compose/deep [
- vpanel [
- scroll-panel [
- (messages)
- ]
- scroll-panel [
- tool-bar [ (icon-bar) ]
- ] options [ max-hint: reduce [ scr/x 50] ]
- ; page: field slider green attach 'page on-action [ print get-face page]
- hpanel [ button "New Post" button "<<Previous" button "Next>>" ]
- ] options [max-hint: guie/max-pair pane-align: 'center]
- ][offset: 0x0 max-hint: reduce [scr/x guie/max-coord]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement