templates.json 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {
  2. save_changes: {
  3. type: "simpleWindow",
  4. // options: no title bar
  5. pos: [0, 0],
  6. size: [400, 200],
  7. title: "Save changes?",
  8. children: [
  9. { type: "text", pos: [10, 14], value: "", name: "filename" },
  10. { type: "button", pos: [10, 34], size: [90, 30], value: "Save", name: "save" },
  11. { type: "button", pos: [110, 34], size: [90, 30], value: "Discard", name: "discard" },
  12. { type: "button", pos: [210, 34], size: [90, 30], value: "Cancel", name: "cancel" },
  13. ],
  14. },
  15. find_tray: {
  16. type: "window",
  17. size: [0, 40],
  18. flags: "MAXIMIZE_X",
  19. children: [
  20. { type: "text", pos: [5, 10], size: [40, 20], value: "Find:" },
  21. { type: "edit", pos: [50, 10], size: [400, 20], value: "", name: "find" },
  22. { type: "text", pos: [455, 10], size: [80, 20], value: "X of Y", name: "results" },
  23. ],
  24. },
  25. replace_tray: {
  26. type: "window",
  27. size: [0, 70],
  28. flags: "MAXIMIZE_X|CHILD_TABBING",
  29. children: [
  30. { type: "text", pos: [5, 10], size: [40, 20], value: "Find:" },
  31. { type: "edit", pos: [75, 10], size: [400, 20], value: "", name: "find", tabStop: 1 },
  32. { type: "text", pos: [480, 10], size: [80, 20], value: "X of Y", name: "results" },
  33. { type: "text", pos: [5, 40], size: [65, 20], value: "Replace:" },
  34. { type: "edit", pos: [75, 40], size: [400, 20], value: "", name: "replace", tabStop: 2 },
  35. ],
  36. },
  37. goto_tray: {
  38. type: "window",
  39. size: [0, 40],
  40. flags: "MAXIMIZE_X",
  41. children: [
  42. {type: "text", pos: [5, 10], value: "Line:" },
  43. {type: "edit", pos: [50, 10], size: [400, 20] value: "", name: "goto_line" },
  44. ],
  45. },
  46. save_tray: {
  47. type: "window",
  48. size: [0, 80],
  49. flags: "MAXIMIZE_X",
  50. children: [
  51. { type: "text", pos: [10, 10], size: [200, 20], value: "Save file before closing?" },
  52. { type: "text", pos: [210, 10], size: [300, 20], value: "", name: "filename" },
  53. { type: "button", pos: [10, 35], size: [90, 30], value: "Save", name: "save" },
  54. { type: "button", pos: [110, 35], size: [90, 30], value: "Discard", name: "discard" },
  55. { type: "button", pos: [210, 35], size: [90, 30], value: "Cancel", name: "cancel" },
  56. ],
  57. },
  58. }