Advertisement
GrahamC

mockup2.reb

Mar 15th, 2014
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. rebol [
  2. file: %mockup.reb
  3. ]
  4.  
  5. if not value? 'to-text [ load-gui ]
  6. dpi: gui-metric 'screen-dpi
  7. gui-metric/set 'unit-size dpi / 96
  8. scr: round/floor (gui-metric 'work-size) - gui-metric 'title-size
  9.  
  10. stylize [
  11. but: button [
  12. facets: [
  13. init-size: 24x34 ; 100x48
  14. max-size: 60x34 ;260x48
  15. min-size: 24x34
  16. align: 'center
  17. ]
  18. ]
  19. ]
  20. ;; grab some images
  21.  
  22. icons: [
  23. fork http://i.stack.imgur.com/VWHTU.png?s=128&g=1&g&s=16
  24. graham http://i.stack.imgur.com/LBnjL.png?s=128&g=1&g&s=16
  25. josh http://i.stack.imgur.com/brRFc.png?s=128&g=1&g&s=16
  26. brain http://i.stack.imgur.com/6KbV5.jpg?s=128&g=1&g&s=32
  27. rebolbot http://i.stack.imgur.com/x2LdO.png?s=128&g=1&g&s=16
  28. ]
  29.  
  30. icon-bar: copy []
  31.  
  32. foreach [ person link ] icons [
  33. append icon-bar form person
  34. repend/only icon-bar[ 'print form person ]
  35. print [ "loading ... " person ]
  36. either find suffix? link %.jpg [
  37. set person decode 'JPEG read link
  38. ][
  39. set person decode 'PNG read link
  40. ]
  41. insert back back tail icon-bar person
  42. ]
  43.  
  44. icon-bar: reduce icon-bar
  45.  
  46. ms: 20x20
  47. mh: 100x100
  48.  
  49. message: [
  50. vpanel [
  51. hpanel [
  52. image graham options [ max-size: ms max-hint: mh ]
  53. hpanel [ text [ bold "Graham" ] ]
  54. hpanel [ text [ (form ++ n) ] ]
  55. ] options [black border-size: [1x1 1x1]]
  56. 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]
  57. but "Reply" on-action [ alert "Todo" ]
  58. ] options [box-model: 'frame]
  59. ]
  60.  
  61. messages: copy []
  62. n: 1
  63. loop 5 [ append messages compose/deep copy/deep message ]
  64.  
  65. view/options compose/deep [
  66. vpanel [
  67. scroll-panel [
  68. (messages)
  69. ]
  70. scroll-panel [
  71. tool-bar [ (icon-bar) ]
  72. ] options [ max-hint: reduce [ scr/x 50] ]
  73. ; page: field slider green attach 'page on-action [ print get-face page]
  74. hpanel [ button "New Post" button "<<Previous" button "Next>>" ]
  75. ] options [max-hint: guie/max-pair pane-align: 'center]
  76. ][offset: 0x0 max-hint: reduce [scr/x guie/max-coord]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement