InfoSource.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /*
  2. * This source file is part of RmlUi, the HTML/CSS Interface Middleware
  3. *
  4. * For the latest information, see http://github.com/mikke89/RmlUi
  5. *
  6. * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
  7. * Copyright (c) 2019 The RmlUi Team, and contributors
  8. *
  9. * Permission is hereby granted, free of charge, to any person obtaining a copy
  10. * of this software and associated documentation files (the "Software"), to deal
  11. * in the Software without restriction, including without limitation the rights
  12. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13. * copies of the Software, and to permit persons to whom the Software is
  14. * furnished to do so, subject to the following conditions:
  15. *
  16. * The above copyright notice and this permission notice shall be included in
  17. * all copies or substantial portions of the Software.
  18. *
  19. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25. * THE SOFTWARE.
  26. *
  27. */
  28. static const char* info_rcss = R"RCSS(
  29. body
  30. {
  31. width: 320dp;
  32. min-width: 320dp;
  33. min-height: 150dp;
  34. margin-top: 42dp;
  35. margin-right: 20dp;
  36. margin-left: auto;
  37. }
  38. div#content
  39. {
  40. height: auto;
  41. max-height: 650dp;
  42. }
  43. div#content div h2
  44. {
  45. padding-left: 5dp;
  46. }
  47. div#content div div
  48. {
  49. font-size: 12dp;
  50. padding-left: 10dp;
  51. }
  52. div#content .name
  53. {
  54. color: #610;
  55. }
  56. div#ancestors p:hover,
  57. div#children p:hover
  58. {
  59. background-color: #ddd;
  60. }
  61. scrollbarvertical
  62. {
  63. scrollbar-margin: 0px;
  64. }
  65. h3.strong
  66. {
  67. margin-top: 1.0em;
  68. padding: 2dp;
  69. color: #900;
  70. background-color: #eee;
  71. }
  72. #pseudo
  73. {
  74. line-height: 1.4em;
  75. padding: 2px 0;
  76. }
  77. #pseudo pseudo
  78. {
  79. padding: 0 3dp;
  80. background-color: #ddd;
  81. border: 2px #aaa;
  82. }
  83. #pseudo span
  84. {
  85. padding-left: 3dp;
  86. }
  87. #pseudo pseudo.active
  88. {
  89. border-color: #8af;
  90. background-color: #eef;
  91. }
  92. div.header_button
  93. {
  94. font-size: 0.9em;
  95. margin-left: 3dp;
  96. z-index: 1;
  97. float: right;
  98. width: 18dp;
  99. color: #999;
  100. background-color: #666;
  101. border-width: 1px;
  102. border-color: #666;
  103. text-align: center;
  104. }
  105. div.header_button.active
  106. {
  107. border-color: #ccc;
  108. color: #fff;
  109. }
  110. div.header_button:hover
  111. {
  112. background-color: #555;
  113. }
  114. div.header_button:active
  115. {
  116. background-color: #444;
  117. }
  118. div#title-content {
  119. width: 220dp;
  120. }
  121. div#title-content em {
  122. font-size: 14dp;
  123. }
  124. )RCSS";
  125. static const char* info_rml = R"RML(
  126. <h1>
  127. <handle id="position_handle" move_target="#document"/>
  128. <div id="close_button">X</div>
  129. <div id="update_source" class="header_button active">U</div>
  130. <div id="show_source" class="header_button active">D</div>
  131. <div id="title-content">Element Information</div>
  132. </h1>
  133. <div id="content">
  134. <div id="pseudo">
  135. <pseudo name="hover" class="active">:hover</pseudo>
  136. <pseudo name="active">:active</pseudo>
  137. <pseudo name="focus">:focus</pseudo>
  138. <pseudo name="checked">:checked</pseudo>
  139. <span id="extra"></span>
  140. </div>
  141. <div id="attributes">
  142. <h2>Attributes</h2>
  143. <div id="attributes-content">
  144. </div>
  145. </div>
  146. <div id="properties">
  147. <h2>Properties</h2>
  148. <div id="properties-content">
  149. </div>
  150. </div>
  151. <div id="events">
  152. <h2>Events</h2>
  153. <div id="events-content">
  154. </div>
  155. </div>
  156. <div id="position">
  157. <h2>Position</h2>
  158. <div id="position-content">
  159. </div>
  160. </div>
  161. <div id="ancestors">
  162. <h2>Ancestors</h2>
  163. <div id="ancestors-content">
  164. </div>
  165. </div>
  166. <div id="children">
  167. <h2>Children</h2>
  168. <div id="children-content">
  169. </div>
  170. </div>
  171. </div>
  172. )RML";