Sidebar-Ios.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. (function()
  2. {
  3. // Adds iOS shapes
  4. Sidebar.prototype.addIosPalette = function()
  5. {
  6. // Avoids having to bind all functions to "this"
  7. sb = this;
  8. //default tags
  9. var dt = 'ios icon ';
  10. var sizeX = 200; //reference size for iPhone and all other iOS shapes
  11. var sizeY = 2 * sizeX; //change only sizeX, to avoid changing aspect ratio
  12. var s = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;html=1;shadow=0;dashed=0;strokeWidth=1;shape=mxgraph.ios.';
  13. var s2 = mxConstants.STYLE_STROKEWIDTH + '=1;html=1;shadow=0;dashed=0;shape=mxgraph.ios.';
  14. var s3 = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=top;html=1;shadow=0;dashed=0;' + mxConstants.STYLE_VERTICAL_ALIGN + '=bottom;strokeWidth=1;shape=mxgraph.ios.';
  15. var s4 = 'html=1;shadow=0;dashed=0;shape=mxgraph.ios.';
  16. var gn = 'mxgraph.ios';
  17. var fns =
  18. [
  19. this.createVertexTemplateEntry(s + 'iPhone;bgStyle=bgGreen;fillColor=#aaaaaa;', sizeX, sizeY, '', 'iPhone (portrait)', null, null, null),
  20. this.createVertexTemplateEntry(s + 'iPhone;direction=north;bgStyle=bgGreen;fillColor=#aaaaaa;', sizeY, sizeX, '', 'iPhone (landscape)', null, null, null),
  21. this.createVertexTemplateEntry(s + 'iPad;bgStyle=bgGreen;fillColor=#aaaaaa;', sizeX * 2.425, sizeY * 1.5625, '', 'iPad (portrait)', null, null, null),
  22. this.createVertexTemplateEntry(s + 'iPad;direction=north;bgStyle=bgGreen;fillColor=#aaaaaa;', sizeY * 1.5625, sizeX * 2.425, '', 'iPad (landscape)', null, null, null),
  23. this.createVertexTemplateEntry(s + 'iBgFlat;strokeColor=#18211b;fillColor=#ffffff;', sizeX * 0.875, sizeY * 0.7, '', 'iPad background (white)', null, null, null),
  24. this.createVertexTemplateEntry(s + 'iBgFlat;strokeColor=#18211b;fillColor=#1f2923;', sizeX * 0.875, sizeY * 0.7, '', 'iPad background (green)', null, null, null),
  25. this.createVertexTemplateEntry(s + 'iBgFlat;strokeColor=#18211b;fillColor=#dddddd;', sizeX * 0.875, sizeY * 0.7, '', 'iPad background (gray)', null, null, null),
  26. this.createVertexTemplateEntry(s + 'iBgStriped;strokeColor=#18211b;fillColor=#5D7585;strokeColor2=#657E8F;', sizeX * 0.875, sizeY * 0.7, '', 'iPad background (striped)', null, null, null),
  27. this.createVertexTemplateEntry(s + 'iBgMap;strokeColor=#18211b;fillColor=#ffffff;strokeColor2=#008cff;fillColor2=#96D1FF;', sizeX * 0.875, sizeY * 0.7, '', 'iPad background (map)', null, null, null),
  28. this.addEntry(null, function()
  29. {
  30. var bg = new mxCell('', new mxGeometry(0, 0, 165, 50), s4 + 'rrect;rSize=5;strokeColor=#444444;fillColor=#ffffff;gradientColor=none;');
  31. bg.vertex = true;
  32. var button1 = new mxCell('Item 1', new mxGeometry(0, 0, 165, 12.5), s4 + 'topButton;rSize=5;fillColor=none;strokeColor=#c4c4c4;align=left;spacingLeft=10;fontSize=8;fontColor=#666666;');
  33. button1.vertex = true;
  34. bg.insert(button1);
  35. var text1 = new mxCell('>', new mxGeometry(140, 1, 10, 10), s4 + 'anchor;fontColor=#c4c4c4;fontStyle=1;');
  36. text1.vertex = true;
  37. button1.insert(text1);
  38. var button3 = new mxCell('Item 3', new mxGeometry(0, 25, 165, 12.5), s4 + 'rrect;rSize=0;fillColor=none;strokeColor=#c4c4c4;align=left;spacingLeft=10;fontSize=8;fontColor=#666666;');
  39. button3.vertex = true;
  40. bg.insert(button3);
  41. var text3 = new mxCell('>', new mxGeometry(140, 1, 10, 10), s4 + 'anchor;fontColor=#c4c4c4;fontStyle=1;');
  42. text3.vertex = true;
  43. button3.insert(text3);
  44. var button4 = new mxCell('Item 4', new mxGeometry(0, 37.5, 165, 12.5), s4 + 'bottomButton;rSize=5;fillColor=none;strokeColor=#c4c4c4;align=left;spacingLeft=10;fontSize=8;fontColor=#666666;');
  45. button4.vertex = true;
  46. bg.insert(button4);
  47. var text4 = new mxCell('>', new mxGeometry(140, 1, 10, 10), s4 + 'anchor;fontColor=#c4c4c4;fontStyle=1;');
  48. text4.vertex = true;
  49. button4.insert(text4);
  50. var button2 = new mxCell('Item 2', new mxGeometry(0, 12.5, 165, 12.5), s4 + 'rrect;rSize=0;fillColor=#5D7585;strokeColor=none;align=left;spacingLeft=10;fontSize=8;fontColor=#ffffff;gradientColor=#008cff;');
  51. button2.vertex = true;
  52. bg.insert(button2);
  53. var text2 = new mxCell('>', new mxGeometry(140, 1, 10, 10), s4 + 'anchor;fontColor=#c4c4c4;fontStyle=1;');
  54. text2.vertex = true;
  55. button2.insert(text2);
  56. var fg = new mxCell('', new mxGeometry(0, 0, 165, 50), s4 + 'rrect;rSize=5;strokeColor=#444444;fillColor=none;');
  57. fg.vertex = true;
  58. bg.insert(fg);
  59. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Button bar');
  60. }),
  61. this.addEntry(null, function()
  62. {
  63. var bg = new mxCell('', new mxGeometry(0, 0, 175, 15), s4 + 'iAppBar;strokeWidth=1;');
  64. bg.vertex = true;
  65. var text1 = new mxCell('CARRIER', new mxGeometry(0, 2, 50, 13), s4 + 'anchor;align=left;fontSize=8;spacingLeft=18;');
  66. text1.vertex = true;
  67. bg.insert(text1);
  68. var text2 = new mxCell('11:55PM', new mxGeometry(60, 2, 50, 13), s4 + 'rect;fontSize=8;strokeColor=none;fillColor=none;');
  69. text2.vertex = true;
  70. bg.insert(text2);
  71. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'App bar (portrait)');
  72. }),
  73. this.addEntry(null, function()
  74. {
  75. var bg = new mxCell('', new mxGeometry(0, 0, 280, 15), s4 + 'iAppBar;strokeWidth=1;');
  76. bg.vertex = true;
  77. var text1 = new mxCell('CARRIER', new mxGeometry(0, 2, 50, 13), s4 + 'anchor;align=left;fontSize=8;spacingLeft=18;');
  78. text1.vertex = true;
  79. bg.insert(text1);
  80. var text2 = new mxCell('11:55PM', new mxGeometry(115, 2, 50, 13), s4 + 'rect;fontSize=8;strokeColor=none;fillColor=none;');
  81. text2.vertex = true;
  82. bg.insert(text2);
  83. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'App bar (landscape)');
  84. }),
  85. this.addEntry(null, function()
  86. {
  87. var bg = new mxCell('', new mxGeometry(0, 0, 175, 15), s4 + 'iTopBar2;opacity=50;fillColor=#999999;strokeColor=#cccccc;strokeWidth=1;');
  88. bg.vertex = true;
  89. var text1 = new mxCell('CARRIER', new mxGeometry(0, 2, 50, 13), s4 + 'rect;align=left;fontSize=7.5;spacingLeft=18;fontColor=#cccccc;textOpacity=50;strokeColor=none;fillColor=none;');
  90. text1.vertex = true;
  91. bg.insert(text1);
  92. var text2 = new mxCell('11:15AM', new mxGeometry(60, 2, 50, 13), s4 + 'rect;fontSize=7.5;fontColor=#cccccc;textOpacity=50;strokeColor=none;fillColor=none;');
  93. text2.vertex = true;
  94. bg.insert(text2);
  95. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Top bar');
  96. }),
  97. this.addEntry(null, function()
  98. {
  99. var bg = new mxCell('', new mxGeometry(0, 0, 175, 15), s4 + 'iTopBarLocked;strokeWidth=1;');
  100. bg.vertex = true;
  101. var text1 = new mxCell('CARRIER', new mxGeometry(0, 2, 50, 13), s4 + 'anchor;align=left;fontSize=7.5;spacingLeft=18;fontColor=#cccccc;');
  102. text1.vertex = true;
  103. bg.insert(text1);
  104. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Top bar locked');
  105. }),
  106. this.createVertexTemplateEntry(s2 + 'iButton;strokeColor=#444444;fontColor=#ffffff;buttonText=;fontSize=8;fillColor=#dddddd;fillColor2=#3D5565;whiteSpace=wrap;align=center;',
  107. sizeX * 0.2175, sizeY * 0.0375, 'Button', 'Button', null, null, null),
  108. this.createVertexTemplateEntry(s2 + 'iButtonBack;strokeColor=#444444;fontColor=#ffffff;buttonText=;fontSize=8;fillColor=#dddddd;fillColor2=#3D5565;spacingLeft=10;whiteSpace=wrap;align=center;',
  109. sizeX * 0.2175, sizeY * 0.0375, 'Button', 'Back button', null, null, null),
  110. this.createVertexTemplateEntry(s2 + 'iButtonFw;strokeColor=#444444;fontColor=#ffffff;buttonText=;fontSize=8;fillColor=#dddddd;fillColor2=#3D5565;spacingRight=10;whiteSpace=wrap;align=center;',
  111. sizeX * 0.2175, sizeY * 0.0375, 'Button', 'Forward button', null, null, null),
  112. this.createVertexTemplateEntry(s + 'iPrevNext;strokeColor=#444444;fillColor=#dddddd;fillColor2=#3D5565;fillColor3=#ffffff;align=center;',
  113. sizeX * 0.2175, sizeY * 0.0375, '', 'Prev/next button', null, null, null),
  114. this.createVertexTemplateEntry(s2 + 'iTextInput;strokeColor=#444444;fontColor=#000000;buttonText=;fontSize=8;fillColor=#ffffff;whiteSpace=wrap;align=left;',
  115. sizeX * 0.2175, sizeY * 0.0375, 'Default text', 'Text input', null, null, null),
  116. this.addEntry(null, function()
  117. {
  118. var bg = new mxCell('', new mxGeometry(0, 0, 165, 50), s4 + 'rrect;rSize=3;strokeColor=#666666;fillColor=#ffffff;gradientColor=none;recursiveResize=0');
  119. bg.vertex = true;
  120. var radio1 = new mxCell('Option 1', new mxGeometry(2.5, 3.5, 5, 5),
  121. 'shape=ellipse;resizable=0;fillColor=#dddddd;align=left;spacingLeft=2;fontSize=8;fontColor=#666666;labelPosition=right;verticalLabelPosition=middle;verticalAlign=middle;spacingTop=3;');
  122. radio1.vertex = true;
  123. bg.insert(radio1);
  124. var radio2 = new mxCell('Option 2', new mxGeometry(2.5, 16, 5, 5),
  125. 'shape=ellipse;resizable=0;fillColor=#dddddd;align=left;spacingLeft=2;fontSize=8;fontColor=#666666;labelPosition=right;verticalLabelPosition=middle;verticalAlign=middle;spacingTop=3;');
  126. radio2.vertex = true;
  127. bg.insert(radio2);
  128. var radio3 = new mxCell('Option 3', new mxGeometry(2.5, 28.5, 5, 5),
  129. 'shape=ellipse;resizable=0;fillColor=#444444;align=left;spacingLeft=2;fontSize=8;fontColor=#666666;labelPosition=right;verticalLabelPosition=middle;verticalAlign=middle;spacingTop=3;');
  130. radio3.vertex = true;
  131. bg.insert(radio3);
  132. var radio4 = new mxCell('Option 4', new mxGeometry(2.5, 41, 5, 5),
  133. 'shape=ellipse;resizable=0;fillColor=#dddddd;align=left;spacingLeft=2;fontSize=8;fontColor=#666666;labelPosition=right;verticalLabelPosition=middle;verticalAlign=middle;spacingTop=3;');
  134. radio4.vertex = true;
  135. bg.insert(radio4);
  136. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Radio Buttons');
  137. }),
  138. this.addEntry(null, function()
  139. {
  140. var bg = new mxCell('', new mxGeometry(0, 0, 165, 50), s4 + 'rrect;rSize=3;strokeColor=#666666;fillColor=#ffffff;gradientColor=none;recursiveResize=0;');
  141. bg.vertex = true;
  142. var radio1 = new mxCell('Setting 1', new mxGeometry(2.5, 3.5, 5, 5),
  143. s4 + 'rrect;rSize=0;fillColor=#dddddd;align=left;spacingLeft=2;fontSize=8;fontColor=#666666;labelPosition=right;verticalLabelPosition=middle;verticalAlign=middle;spacingTop=3;');
  144. radio1.vertex = true;
  145. bg.insert(radio1);
  146. var radio2 = new mxCell('Setting 2', new mxGeometry(2.5, 16, 5, 5),
  147. s4 + 'rrect;rSize=0;fillColor=#dddddd;align=left;spacingLeft=2;fontSize=8;fontColor=#666666;labelPosition=right;verticalLabelPosition=middle;verticalAlign=middle;spacingTop=3;');
  148. radio2.vertex = true;
  149. bg.insert(radio2);
  150. var radio3 = new mxCell('Setting 3', new mxGeometry(2.5, 28.5, 5, 5),
  151. s4 + 'checkbox;fillColor=#999999;align=left;spacingLeft=2;fontSize=8;fontColor=#666666;labelPosition=right;verticalLabelPosition=middle;verticalAlign=middle;spacingTop=3;');
  152. radio3.vertex = true;
  153. bg.insert(radio3);
  154. var radio4 = new mxCell('Setting 4', new mxGeometry(2.5, 41, 5, 5),
  155. s4 + 'rrect;rSize=0;fillColor=#dddddd;align=left;spacingLeft=2;fontSize=8;fontColor=#666666;labelPosition=right;verticalLabelPosition=middle;verticalAlign=middle;spacingTop=3;');
  156. radio4.vertex = true;
  157. bg.insert(radio4);
  158. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Checkboxes');
  159. }),
  160. this.createVertexTemplateEntry(s2 + 'iComboBox;spacingTop=2;spacingLeft=2;align=left;strokeColor=#444444;fontColor=#666666;buttonText=;fontSize=8;fillColor=#dddddd;fillColor2=#3D5565;',
  161. sizeX * 0.29, sizeY * 0.0375, 'Option 1', 'Combobox', null, null, null),
  162. this.createVertexTemplateEntry(s2 + 'iOnOffButton;mainText=;strokeColor=#444444;fontSize=9;fontColor=#ffffff;spacingRight=14;buttonState=on', sizeX * 0.2175, sizeY * 0.0375,
  163. 'ON', 'On-off button', null, null, null),
  164. this.createVertexTemplateEntry(s2 + 'iTextInput;strokeColor=#444444;fontColor=#000000;align=left;buttonText=;fontSize=8;fillColor=#ffffff;', sizeX * 0.2175, sizeY * 0.0375,
  165. '********', 'Password field', null, null, null),
  166. this.addEntry(null, function()
  167. {
  168. var bg = new mxCell(
  169. 'Alert description text\ndescription text second line',
  170. new mxGeometry(0, 0, 150, 100), s4 + 'fancyRRect;rSize=8;strokeColor=#dddddd;fillColor=#497198;gradientColor=#193168;opacity=80;fontColor=#ffffff;fontSize=9;whiteSpace=wrap;align=center;');
  171. bg.vertex = true;
  172. var text1 = new mxCell('Something happened', new mxGeometry(0, 0, 150, 25), s4 + 'anchor;fontSize=13;fontColor=#ffffff;whiteSpace=wrap;resizeWidth=1;');
  173. text1.geometry.relative = true;
  174. text1.vertex = true;
  175. bg.insert(text1);
  176. var button1 = new mxCell('Button', new mxGeometry(0.5, 1, 80, 20), s4 + 'rrect;rSize=3;fontSize=9;fontColor=#ffffff;strokeColor=#ffffff;fillColor=#497198;gradientColor=#c5cee1;opacity=80;whiteSpace=wrap;');
  177. button1.geometry.relative = true;
  178. button1.geometry.offset = new mxPoint(-40, -25);
  179. button1.vertex = true;
  180. bg.insert(button1);
  181. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Alert Box');
  182. }),
  183. this.addEntry(null, function()
  184. {
  185. var bg = new mxCell(
  186. 'Dialog question text\nquestion text second line',
  187. new mxGeometry(0, 0, 150, 100), s4 + 'fancyRRect;rSize=8;strokeColor=#dddddd;fillColor=#497198;gradientColor=#193168;opacity=80;fontColor=#ffffff;fontSize=9;whiteSpace=wrap;align=center;');
  188. bg.vertex = true;
  189. var text1 = new mxCell('Something happened', new mxGeometry(0, 0, 150, 25), s4 + 'anchor;fontSize=13;fontColor=#ffffff;whiteSpace=wrap;resizeWidth=1;');
  190. text1.geometry.relative = true;
  191. text1.vertex = true;
  192. bg.insert(text1);
  193. var button1 = new mxCell('Cancel', new mxGeometry(0.25, 1, 65, 20), s4 + 'rrect;rSize=3;fontSize=9;fontColor=#ffffff;strokeColor=#ffffff;fillColor=#497198;gradientColor=#c5cee1;opacity=80;whiteSpace=wrap;');
  194. button1.geometry.relative = true;
  195. button1.geometry.offset = new mxPoint(-32.5, -25);
  196. button1.vertex = true;
  197. bg.insert(button1);
  198. var button2 = new mxCell('OK', new mxGeometry(0.75, 1, 65, 20), s4 + 'rrect;rSize=3;fontSize=9;fontColor=#ffffff;strokeColor=#ffffff;fillColor=#497198;gradientColor=#c5cee1;opacity=80;whiteSpace=wrap;');
  199. button2.geometry.relative = true;
  200. button2.geometry.offset = new mxPoint(-32.5, -25);
  201. button2.vertex = true;
  202. bg.insert(button2);
  203. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'Dialog Box');
  204. }),
  205. this.createVertexTemplateEntry(s2 + 'iLockButton;fontColor=#cccccc;fontSize=13;mainText=;spacingLeft=50;spacingRight=10;align=center;', sizeX * 0.87, sizeY * 0.125, 'slide to unlock', 'Lock button', null, null, null),
  206. this.createVertexTemplateEntry(s + 'iArrowIcon;fillColor=#8BbEff;fillColor2=#135Ec8;strokeColor=#ffffff;', sizeX * 0.075, sizeY * 0.0375, '', 'Arrow', null, null, null),
  207. this.createVertexTemplateEntry(s + 'iDeleteIcon;fillColor=#e8878E;fillColor2=#BD1421;strokeColor=#ffffff;', sizeX * 0.075, sizeY * 0.0375, '', 'Delete', null, null, null),
  208. this.createVertexTemplateEntry(s + 'iAddIcon;fillColor=#7AdF78;fillColor2=#1A9917;strokeColor=#ffffff;', sizeX * 0.075, sizeY * 0.0375, '', 'Add', null, null, null),
  209. this.createVertexTemplateEntry(s + 'iInfoIcon;fillColor=#8BbEff;fillColor2=#135Ec8;strokeColor=#ffffff;', sizeX * 0.075, sizeY * 0.0375, '', 'Info', null, null, null),
  210. this.createVertexTemplateEntry(s + 'iSortFindIcon;fillColor=#8BbEff;fillColor2=#135Ec8;strokeColor=#ffffff;', sizeX * 0.075, sizeY * 0.0375, '', 'Sort/find', null, null, null),
  211. this.createVertexTemplateEntry(s + 'iCheckIcon;fillColor=#e8878E;fillColor2=#BD1421;strokeColor=#ffffff;', sizeX * 0.075, sizeY * 0.0375, '', 'Check', null, null, null),
  212. this.createVertexTemplateEntry(s + 'iKeybLett;', sizeX * 0.87, sizeY * 0.25, '', 'Keyboard (letters)', null, null, null),
  213. this.createVertexTemplateEntry(s + 'iKeybNumb;', sizeX * 0.87, sizeY * 0.25, '', 'Keyboard (numbers)', null, null, null),
  214. this.createVertexTemplateEntry(s + 'iKeybSymb;', sizeX * 0.87, sizeY * 0.25, '', 'Keyboard (symbols)', null, null, null),
  215. this.createVertexTemplateEntry(s + 'iDeleteApp;fillColor=#cccccc;fillColor2=#000000;strokeColor=#ffffff;', sizeX * 0.075, sizeY * 0.0375, '', 'Delete app', null, null, null),
  216. this.createVertexTemplateEntry(s + 'iDir;', sizeX * 0.5, sizeY * 0.25, '', 'Direction', null, null, null),
  217. this.createVertexTemplateEntry(s2 + 'iLocBar;align=left;spacingLeft=4;spacingBottom=4;fontColor=#ffffff;fontSize=10;barPos=80;pointerPos=bottom;buttonText=', sizeX * 0.775, sizeY * 0.08125, '5th Street Music Store', 'Location bar', null, null, null),
  218. this.createVertexTemplateEntry(s + 'iCallDialog;', sizeX * 0.75, sizeY * 0.3125, '', 'Call Dialog', null, null, null),
  219. this.createVertexTemplateEntry(s + 'iCallButtons;', sizeX * 0.87, sizeY * 0.575, '', 'Call buttons', null, null, null),
  220. this.createVertexTemplateEntry(s2 + 'iOption;barPos=80;pointerPos=bottom;buttonText=;fontSize=10;fontColor=#ffffff;spacingBottom=6;', sizeX * 0.375, sizeY * 0.06875, 'Option', 'Option', null, null, null),
  221. this.createVertexTemplateEntry(s + 'iAlphaList;fontSize=7.5;', sizeX * 0.075, sizeY * 0.5625, '', 'Alphabet list', null, null, null),
  222. this.createVertexTemplateEntry(s2 + 'iHorButtonBar;strokeColor=#444444;strokeColor2=#c4c4c4;fillColor2=#ffffff;buttonText=,+,,;overflow=width;html=1;fontSize=8;fillColor=#ffffff;fillColor2=#008cff', sizeX * 0.825, sizeY * 0.03125,
  223. '<table cellpadding="0" cellspacing="0" style="font-size:1em;color:#666666;width:100%;"><tr><td align="center" width="25%">Item 1</td><td align="center" style="color:white;" width="25%">Item 2</td><td align="center" width="25%">Item 3</td><td align="center" width="25%">Item 4</td></tr></table>', 'Horizontal button bar', null, null, null),
  224. this.createVertexTemplateEntry(s3 + 'iPin;fillColor2=#00dd00;fillColor3=#004400;strokeColor=#006600;', sizeX * 0.05, sizeY * 0.0625, '', 'Pin', null, null, null),
  225. this.createVertexTemplateEntry(s3 + 'iPin;fillColor2=#dd0000;fillColor3=#440000;strokeColor=#660000;', sizeX * 0.05, sizeY * 0.0625, '', 'Pin', null, null, null),
  226. this.createVertexTemplateEntry(s3 + 'iPin;fillColor2=#ccccff;fillColor3=#0000ff;strokeColor=#000066;', sizeX * 0.05, sizeY * 0.0625, '', 'Pin', null, null, null),
  227. this.createVertexTemplateEntry(s3 + 'iPin;fillColor2=#ffff00;fillColor3=#888800;strokeColor=#999900;', sizeX * 0.05, sizeY * 0.0625, '', 'Pin', null, null, null),
  228. this.createVertexTemplateEntry(s3 + 'iPin;fillColor2=#ffa500;fillColor3=#885000;strokeColor=#997000;', sizeX * 0.05, sizeY * 0.0625, '', 'Pin', null, null, null),
  229. this.createVertexTemplateEntry(s + 'iVideoControls;barPos=20;', sizeX * 0.87, sizeY * 0.125, '', 'Video controls', null, null, null),
  230. this.addEntry(null, function()
  231. {
  232. var bg = new mxCell('Page title', new mxGeometry(0, 0, 175, 30), s4 + 'iURLBar;verticalAlign=top;fontSize=8;spacingTop=-5;align=center;');
  233. bg.vertex = true;
  234. var text1 = new mxCell('https://www.draw.io/', new mxGeometry(5, 12, 115, 13), s4 + 'anchor;fontSize=8;spacingLeft=3;align=left;spacingTop=2;');
  235. text1.vertex = true;
  236. bg.insert(text1);
  237. var text2 = new mxCell('Cancel', new mxGeometry(137, 12, 32, 13), s4 + 'anchor;fontSize=8;fontColor=#ffffff;spacingTop=2;');
  238. text2.vertex = true;
  239. bg.insert(text2);
  240. return sb.createVertexTemplateFromCells([bg], bg.geometry.width, bg.geometry.height, 'URL bar');
  241. }),
  242. this.createVertexTemplateEntry(s + 'iSlider;barPos=20;', sizeX * 0.75, sizeY * 0.025, '', 'Slider', null, null, null),
  243. this.createVertexTemplateEntry(s + 'iProgressBar;barPos=40;', sizeX * 0.75, sizeY * 0.025, '', 'Progress bar', null, null, null),
  244. this.createVertexTemplateEntry(s + 'iCloudProgressBar;barPos=20;', sizeX * 0.75, sizeY * 0.025, '', 'Cloud progress bar', null, null, null),
  245. this.createVertexTemplateEntry(s2 + 'iDownloadBar;verticalAlign=top;spacingTop=-4;fontSize=8;fontColor=#ffffff;buttonText=' + ';barPos=30;align=center;', sizeX * 0.87, sizeY * 0.075, 'Downloading 2 of 6', 'Download bar', null, null, null),
  246. this.createVertexTemplateEntry(s2 + 'iScreenNameBar;fillColor2=#000000;fillColor3=#ffffff;buttonText=;fontColor=#ffffff;fontSize=10;whiteSpace=wrap;align=center;', sizeX * 0.87, sizeY * 0.0625, 'Screen Name', 'Screen name bar', null, null, null),
  247. this.createVertexTemplateEntry(s + 'iIconGrid;fillColor=#ffffff;strokeColor=#000000;gridSize=3,3;', sizeX * 0.75, sizeY * 0.375, '', 'Icon grid', null, null, null),
  248. this.createVertexTemplateEntry(s2 + 'iCopy;fillColor=#000000;strokeColor=#000000;buttonText=;fontColor=#ffffff;spacingBottom=6;fontSize=9;fillColor2=#000000;fillColor3=#ffffff;align=center;', sizeX * 0.2, sizeY * 0.06875, 'Copy', 'Copy', null, null, null),
  249. this.addEntry(null, function()
  250. {
  251. var bg = new mxCell('Copy', new mxGeometry(sizeX * 0.05, 0, sizeX * 0.2, sizeY * 0.06875), s4 + 'iCopy;fillColor=#000000;strokeColor=#000000;buttonText=;fontColor=#ffffff;spacingBottom=6;fontSize=9;fillColor2=#000000;fillColor3=#ffffff;align=center;');
  252. bg.vertex = true;
  253. var area1 = new mxCell('', new mxGeometry(0, sizeY * 0.06875, sizeX * 0.3, sizeY * 0.13125), s4 + 'rect;fillColor=#2266ff;strokeColor=none;opacity=30;');
  254. area1.vertex = true;
  255. return sb.createVertexTemplateFromCells([bg, area1], sizeX * 0.3, sizeY * 0.2, 'Copy Area');
  256. }),
  257. this.createVertexTemplateEntry(s + 'iHomePageControl;fillColor=#666666;strokeColor=#cccccc;', sizeX * 0.25, sizeY * 0.0125, '', 'Home page control', null, null, null),
  258. this.createVertexTemplateEntry(s + 'iPageControl;fillColor=#666666;strokeColor=#cccccc;', sizeX * 0.25, sizeY * 0.0125, '', 'Page control', null, null, null)
  259. ];
  260. this.addPalette('ios', 'iOS6', false, mxUtils.bind(this, function(content)
  261. {
  262. for (var i = 0; i < fns.length; i++)
  263. {
  264. content.appendChild(fns[i](content));
  265. }
  266. }));
  267. };
  268. })();