FoodEmojiDataSource.swift 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. //
  2. // FoodEmojiDataSource.swift
  3. // LoopKit
  4. //
  5. // Copyright ยฉ 2017 LoopKit Authors. All rights reserved.
  6. //
  7. public func CarbAbsorptionInputController() -> EmojiInputController {
  8. return EmojiInputController.instance(withEmojis: FoodEmojiDataSource())
  9. }
  10. private class FoodEmojiDataSource: EmojiDataSource {
  11. private static let fast: [String] = {
  12. var fast = [
  13. "๐Ÿญ", // lollipop
  14. "๐Ÿงƒ", // juice box
  15. "๐Ÿฅค", // cup with straw (soda)
  16. "๐Ÿฌ", // candy
  17. "๐Ÿฏ", // honey pot
  18. "๐Ÿ‡", // grapes
  19. "๐Ÿซ", // blueberries
  20. "๐Ÿˆ", // melon
  21. "๐Ÿ‰", // watermelon
  22. "๐ŸŠ", // tangerine
  23. "๐Ÿ‹", // lemon
  24. "๐ŸŒ", // banana
  25. "๐Ÿ", // pineapple
  26. "๐ŸŽ", // red apple
  27. "๐Ÿ", // green apple
  28. "๐Ÿ", // pear
  29. "๐Ÿ‘", // peach
  30. "๐Ÿ’", // cherries
  31. "๐Ÿ“", // strawberry
  32. "๐Ÿฅ", // kiwi fruit
  33. "๐Ÿฅญ", // mango
  34. "๐ŸŒฝ", // ear of corn
  35. "๐Ÿฟ", // popcorn
  36. "๐Ÿ˜", // rice cracker
  37. "๐Ÿก", // dango
  38. "๐Ÿฆ", // soft ice cream
  39. "๐Ÿง", // shaved ice
  40. "๐ŸŽ‚", // birthday cake
  41. "๐Ÿฅ ", // fortune cookie
  42. "โ˜•๏ธ", // coffee
  43. "๐Ÿซ–" // tea
  44. ]
  45. return fast
  46. }()
  47. private static let medium: [String] = {
  48. var medium = [
  49. "๐ŸŒฎ", // taco
  50. "๐ŸŸ", // french fries
  51. "๐Ÿณ", // cooking
  52. "๐Ÿฒ", // pot of food
  53. "๐Ÿฅ˜", // pan of food
  54. "๐Ÿฑ", // bento box
  55. "๐Ÿ›", // curry rice
  56. "๐Ÿœ", // steaming bowl (ramen / noodle soup)
  57. "๐Ÿ ", // roasted sweet potato
  58. "๐Ÿค", // fried shrimp
  59. "๐Ÿฆช", // oyster
  60. "๐Ÿฅ", // fish cake with swirl
  61. "๐Ÿฅช", // sandwich
  62. "๐Ÿฅ™", // pita sandwich
  63. "๐Ÿง†", // falafel
  64. "๐Ÿซ”", // tamale
  65. "๐Ÿฅซ", // canned food
  66. "๐ŸฅŸ", // dumpling
  67. "๐Ÿฅก", // takeout box
  68. "๐Ÿข", // oden
  69. "๐Ÿฃ", // sushi
  70. "๐Ÿ…", // tomato
  71. "๐Ÿฅ”", // potato
  72. "๐Ÿฅ•", // carrot
  73. "๐ŸŒถ", // hot pepper
  74. "๐Ÿซ‘", // bell pepper
  75. "๐Ÿง…", // onion
  76. "๐Ÿง„", // garlic
  77. "๐Ÿฅ”", // potato
  78. "๐Ÿฅ’", // cucumber
  79. "๐Ÿฅ—", // green salad
  80. "๐Ÿฅฌ", // leafy green
  81. "๐Ÿ„", // mushroom
  82. "๐Ÿฅฆ", // broccoli
  83. "๐Ÿ†", // eggplant
  84. "๐Ÿซ˜", // beans
  85. "๐Ÿฅฅ", // coconut
  86. "๐Ÿž", // bread
  87. "๐Ÿฅ", // croissant
  88. "๐Ÿฅ–", // baguette bread
  89. "๐Ÿฅฏ", // bagel
  90. "๐Ÿซ“", // flat bread
  91. "๐Ÿฅจ", // pretzel
  92. "๐Ÿฅž", // pancakes
  93. "๐Ÿง‡", // waffle
  94. "๐Ÿ™", // rice ball
  95. "๐Ÿš", // cooked rice
  96. "๐Ÿผ", // baby bottle
  97. "๐Ÿฅ›", // glass of milk
  98. "๐Ÿฎ", // custard
  99. "๐Ÿฅง", // pie
  100. "๐Ÿจ", // ice cream
  101. "๐Ÿฉ", // doughnut
  102. "๐Ÿช", // cookie
  103. "๐Ÿง", // cupcake
  104. "๐Ÿฅฎ", // moon cake
  105. "๐Ÿฐ", // shortcake
  106. "๐Ÿซ", // chocolate bar
  107. "๐Ÿง‹", // bubble tea
  108. ]
  109. return medium
  110. }()
  111. private static let slow: [String] = {
  112. var slow = [
  113. "๐Ÿ•", // pizza
  114. "๐Ÿฅ‘", // avocado
  115. "๐Ÿฅš", // egg
  116. "๐Ÿฅœ", // peanuts
  117. "๐ŸŒฐ", // chestnut
  118. "๐Ÿง€", // cheese wedge
  119. "๐Ÿซ•", // fondue
  120. "๐Ÿ–", // meat on bone
  121. "๐Ÿ—", // poultry leg
  122. "๐Ÿฅ“", // bacon
  123. "๐Ÿ”", // hamburger
  124. "๐ŸŒญ", // hot dog
  125. "๐ŸŒฏ", // burrito
  126. "๐Ÿ", // spaghetti
  127. "๐Ÿฅฉ", // cut of meat
  128. "๐Ÿงˆ", // butter
  129. "๐Ÿฆด", // bone
  130. ]
  131. return slow
  132. }()
  133. private static let other: [String] = {
  134. var other = [
  135. "๐Ÿถ", // sake
  136. "๐Ÿพ", // bottle with popping cork
  137. "๐Ÿท", // wine glass
  138. "๐Ÿธ", // cocktail glass
  139. "๐Ÿบ", // beer mug
  140. "๐Ÿป", // clinking beer mugs
  141. "๐Ÿฅ‚", // clinking glasses
  142. "๐Ÿฅƒ", // tumbler glass
  143. "๐Ÿน", // tropical drink
  144. "๐Ÿง‰", // mate
  145. "๐Ÿซ—", // pouring liquid
  146. "๐Ÿฅฃ", // bowl with spoon
  147. "๐Ÿฅค", // cup with straw
  148. "๐Ÿฅข", // chopsticks
  149. "๐Ÿต", // teacup without handle
  150. "๐Ÿด", // fork and knife
  151. "๐Ÿฝ", // fork and knife with plate
  152. "๐Ÿฅ„", // spoon
  153. "๐Ÿซ™", // jar
  154. "๐ŸงŠ", // ice cube
  155. "๐Ÿง‚", // salt
  156. "1๏ธโƒฃ", "2๏ธโƒฃ", "3๏ธโƒฃ", "4๏ธโƒฃ", "5๏ธโƒฃ",
  157. "6๏ธโƒฃ", "7๏ธโƒฃ", "8๏ธโƒฃ", "9๏ธโƒฃ", "๐Ÿ”Ÿ"
  158. ]
  159. return other
  160. }()
  161. let sections: [EmojiSection]
  162. init() {
  163. sections = [
  164. EmojiSection(
  165. title: LocalizedString("Fast", comment: "Section title for fast absorbing food"),
  166. items: type(of: self).fast,
  167. indexSymbol: " ๐Ÿญ "
  168. ),
  169. EmojiSection(
  170. title: LocalizedString("Medium", comment: "Section title for medium absorbing food"),
  171. items: type(of: self).medium,
  172. indexSymbol: "๐ŸŒฎ"
  173. ),
  174. EmojiSection(
  175. title: LocalizedString("Slow", comment: "Section title for slow absorbing food"),
  176. items: type(of: self).slow,
  177. indexSymbol: "๐Ÿ•"
  178. ),
  179. EmojiSection(
  180. title: LocalizedString("Other", comment: "Section title for no-carb food"),
  181. items: type(of: self).other,
  182. indexSymbol: "โ‹ฏ "
  183. )
  184. ]
  185. }
  186. }