Advertisement
GrahamC

mockup.reb

Mar 15th, 2014
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 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: 100x48
  14. max-size: 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. foreach [ person link ] icons [
  31. print [ "loading ... " person ]
  32. either find suffix? link %.jpg [
  33. set person decode 'JPEG read link
  34. ][
  35. set person decode 'PNG read link
  36. ]
  37. ]
  38.  
  39. ms: 20x20
  40. mh: 100x100
  41.  
  42. message: [
  43. vpanel [
  44. hpanel [
  45. image graham options [ max-size: ms max-hint: mh ]
  46. hpanel [ text [ bold "Graham" ] ]
  47. hpanel [ text [ "8:00"] ]
  48. ]
  49. text "Hmm. From the file datestamps, it is the one with the text entry bug."
  50. but "Reply" on-action [ alert "Todo" ]
  51. ]
  52. ]
  53.  
  54. messages: copy []
  55.  
  56. loop 100 [ append messages copy/deep message ]
  57.  
  58. view/options compose/deep [
  59. scroll-panel [
  60. (messages)
  61. ] options [max-hint: guie/max-pair pane-align: 'center]
  62. ][offset: 0x0 max-hint: reduce [scr/x guie/max-coord]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement