InfoSource.h 3.7 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-2023 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#position p:hover,
  57. div#ancestors p:hover,
  58. div#children p:hover
  59. {
  60. background-color: #ddd;
  61. }
  62. scrollbarvertical
  63. {
  64. scrollbar-margin: 0px;
  65. }
  66. h3.strong
  67. {
  68. margin-top: 1.0em;
  69. padding: 2dp;
  70. color: #900;
  71. background-color: #eee;
  72. }
  73. #pseudo pseudo
  74. {
  75. padding: 0 8dp 0 3dp;
  76. background-color: #ddd;
  77. border: 2px #aaa;
  78. display: inline-block;
  79. }
  80. #pseudo pseudo.active
  81. {
  82. border-color: #8af;
  83. background-color: #eef;
  84. }
  85. div.header_button
  86. {
  87. font-size: 0.9em;
  88. margin-left: 3dp;
  89. z-index: 1;
  90. float: right;
  91. width: 18dp;
  92. color: #999;
  93. background-color: #666;
  94. border-width: 1px;
  95. border-color: #666;
  96. text-align: center;
  97. }
  98. div.header_button.active
  99. {
  100. border-color: #ccc;
  101. color: #fff;
  102. }
  103. div.header_button:hover
  104. {
  105. background-color: #555;
  106. }
  107. div.header_button:active
  108. {
  109. background-color: #444;
  110. }
  111. div#title-content {
  112. width: 220dp;
  113. }
  114. div#title-content em {
  115. font-size: 14dp;
  116. }
  117. p.non_dom {
  118. font-style: italic;
  119. }
  120. .break-all {
  121. word-break: break-all;
  122. }
  123. )RCSS";
  124. static const char* info_rml = R"RML(
  125. <h1>
  126. <handle id="position_handle" move_target="#document"/>
  127. <div id="close_button">X</div>
  128. <div id="update_source" class="header_button active">U</div>
  129. <div id="show_source" class="header_button active">D</div>
  130. <div id="enable_element_select" class="header_button active">*</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";