Browse Source

Replace debugger sources with raw strings.

Michael Ragazzon 6 years ago
parent
commit
39fbdb0e63

+ 26 - 24
Source/Debugger/BeaconSource.h

@@ -26,28 +26,30 @@
  *
  *
  */
  */
 
 
-static const char* beacon_rcss =
-"body\n"
-"{\n"
-"	position: absolute;\n"
-"	top: 5px;\n"
-"	right: 33dp;\n"
-"	z-index: 1000000;\n"
-"	width: 20px;\n"
-"	font-family: Lacuna;\n"
-"	font-size: 12dp;\n"
-"	color: black;\n"
-"	visibility: hidden;\n"
-"}\n"
-"button\n"
-"{\n"
-"	display: block;\n"
-"	width: 18dp;\n"
-"	height: 18dp;\n"
-"	text-align: center;\n"
-"	border-width: 1px;\n"
-"	font-weight: bold;\n"
-"}\n";
+static const char* beacon_rcss = R"RCSS(
+body
+{
+	position: absolute;
+	top: 5px;
+	right: 33dp;
+	z-index: 1000000;
+	width: 20px;
+	font-family: Lacuna;
+	font-size: 12dp;
+	color: black;
+	visibility: hidden;
+}
+button
+{
+	display: block;
+	width: 18dp;
+	height: 18dp;
+	text-align: center;
+	border-width: 1px;
+	font-weight: bold;
+}
+)RCSS";
 
 
-static const char* beacon_rml =
-"<button class=\"error\">!</button>\n";
+static const char* beacon_rml = R"RML(
+<button class="error">!</button>;
+)RML";

+ 150 - 149
Source/Debugger/CommonSource.h

@@ -26,152 +26,153 @@
  *
  *
  */
  */
 
 
-static const char* common_rcss =
-"body\n"
-"{\n"
-"	font-family: Lacuna;\n"
-"	z-index: 1000000;\n"
-"	font-size: 13dp;\n"
-"   line-height: 1.4;\n"
-"	color: black;\n"
-"	padding-top: 30dp;\n"
-"}\n"
-"div, h1, h2, h3, h4, p\n"
-"{\n"
-"	display: block;\n"
-"}\n"
-"em\n"
-"{\n"
-"	font-style: italic;\n"
-"}\n"
-"h1\n"
-"{\n"
-"	position: absolute;\n"
-"	top: 0px;\n"
-"	height: 22dp;\n"
-"	padding: 4dp;\n"
-"	color: white;\n"
-"	background-color: #888;\n"
-"	font-size: 15dp;\n"
-"}\n"
-"h2\n"
-"{\n"
-"	background-color: #ddd;\n"
-"	border-width: 1px 0px;\n"
-"	border-color: #888;\n"
-"}\n"
-"h3\n"
-"{\n"
-"	margin-top: 1em;\n"
-"	color: red;\n"
-"}\n"
-"h4\n"
-"{\n"
-"	color: #cc0000;\n"
-"}\n"
-"handle#position_handle\n"
-"{\n"
-"	height: 100%;\n"
-"	width: 100%;\n"
-"}\n"
-"div#close_button\n"
-"{\n"
-"	margin-left: 10dp;\n"
-"	float: right;\n"
-"	width: 18dp;\n"
-"	color: black;\n"
-"	background-color: #ddd;\n"
-"	border-width: 1px;\n"
-"	border-color: #666;\n"
-"	text-align: center;\n"
-"}\n"
-"div#content\n"
-"{\n"
-"	position: relative;\n"
-"   width: auto;\n"
-"   height: 100%;\n"
-"	overflow: auto;\n"
-"	background: white;\n"
-"	border-width: 2dp;\n"
-"	border-color: #888;\n"
-"	border-top-width: 0px;\n"
-"}\n"
-".error\n"
-"{\n"
-"	background: #d24040;\n"
-"	color: white;\n"
-"	border-color: #b74e4e;\n"
-"}\n"
-".warning\n"
-"{\n"
-"	background: #e8d34e;\n"
-"	color: black;\n"
-"	border-color: #ca9466;\n"
-"}\n"
-".info\n"
-"{\n"
-"	background: #2a9cdb;\n"
-"	color: white;\n"
-"	border-color: #3b70bb;\n"
-"}\n"
-".debug\n"
-"{\n"
-"	background: #3fab2a;\n"
-"	color: white;\n"
-"	border-color: #226c13;\n"
-"}\n"
-"scrollbarvertical\n"
-"{\n"
-"	width: 16dp;\n"
-"	scrollbar-margin: 16px;\n"
-"}\n"
-"scrollbarhorizontal\n"
-"{\n"
-"	height: 16dp;\n"
-"	scrollbar-margin: 16px;\n"
-"}\n"
-"scrollbarvertical slidertrack,\n"
-"scrollbarhorizontal slidertrack\n"
-"{\n"
-"	background: #aaa;\n"
-"	border-color: #888;\n"
-"}\n"
-"scrollbarvertical slidertrack\n"
-"{\n"
-"	border-left-width: 1px;\n"
-"}\n"
-"scrollbarhorizontal slidertrack\n"
-"{\n"
-"	height: 15dp;\n"
-"	border-top-width: 1px;\n"
-"}\n"
-"scrollbarvertical sliderbar,\n"
-"scrollbarhorizontal sliderbar\n"
-"{\n"
-"	background: #ddd;\n"
-"	border-color: #888;\n"
-"}"
-"scrollbarvertical sliderbar\n"
-"{\n"
-"	border-width: 1px 0px;\n"
-"	margin-left: 1dp;\n"
-"}\n"
-"scrollbarhorizontal sliderbar\n"
-"{\n"
-"	height: 15dp;\n"
-"	border-width: 0px 1px;\n"
-"	margin-top: 1dp;\n"
-"}\n"
-"scrollbarcorner\n"
-"{\n"
-"	background: #888;\n"
-"}\n"
-"handle#size_handle\n"
-"{\n"
-"	position: absolute;\n"
-"	width: 16dp;\n"
-"	height: 16dp;\n"
-"	bottom: -2dp;\n"
-"	right: 2dp;\n"
-"	background-color: #888;\n"
-"}\n";
+static const char* common_rcss = R"RCSS(
+body
+{
+	font-family: Lacuna;
+	z-index: 1000000;
+	font-size: 13dp;
+	line-height: 1.4;
+	color: black;
+	padding-top: 30dp;
+}
+div, h1, h2, h3, h4, p
+{
+	display: block;
+}
+em
+{
+	font-style: italic;
+}
+h1
+{
+	position: absolute;
+	top: 0px;
+	height: 22dp;
+	padding: 4dp;
+	color: white;
+	background-color: #888;
+	font-size: 15dp;
+}
+h2
+{
+	background-color: #ddd;
+	border-width: 1px 0px;
+	border-color: #888;
+}
+h3
+{
+	margin-top: 1em;
+	color: red;
+}
+h4
+{
+	color: #cc0000;
+}
+handle#position_handle
+{
+	height: 100%;
+	width: 100%;
+}
+div#close_button
+{
+	margin-left: 10dp;
+	float: right;
+	width: 18dp;
+	color: black;
+	background-color: #ddd;
+	border-width: 1px;
+	border-color: #666;
+	text-align: center;
+}
+div#content
+{
+	position: relative;
+	width: auto;
+	height: 100%;
+	overflow: auto;
+	background: white;
+	border-width: 2dp;
+	border-color: #888;
+	border-top-width: 0px;
+}
+.error
+{
+	background: #d24040;
+	color: white;
+	border-color: #b74e4e;
+}
+.warning
+{
+	background: #e8d34e;
+	color: black;
+	border-color: #ca9466;
+}
+.info
+{
+	background: #2a9cdb;
+	color: white;
+	border-color: #3b70bb;
+}
+.debug
+{
+	background: #3fab2a;
+	color: white;
+	border-color: #226c13;
+}
+scrollbarvertical
+{
+	width: 16dp;
+	scrollbar-margin: 16px;
+}
+scrollbarhorizontal
+{
+	height: 16dp;
+	scrollbar-margin: 16px;
+}
+scrollbarvertical slidertrack,
+scrollbarhorizontal slidertrack
+{
+	background: #aaa;
+	border-color: #888;
+}
+scrollbarvertical slidertrack
+{
+	border-left-width: 1px;
+}
+scrollbarhorizontal slidertrack
+{
+	height: 15dp;
+	border-top-width: 1px;
+}
+scrollbarvertical sliderbar,
+scrollbarhorizontal sliderbar
+{
+	background: #ddd;
+	border-color: #888;
+}
+scrollbarvertical sliderbar
+{
+	border-width: 1px 0px;
+	margin-left: 1dp;
+}
+scrollbarhorizontal sliderbar
+{
+	height: 15dp;
+	border-width: 0px 1px;
+	margin-top: 1dp;
+}
+scrollbarcorner
+{
+	background: #888;
+}
+handle#size_handle
+{
+	position: absolute;
+	width: 16dp;
+	height: 16dp;
+	bottom: -2dp;
+	right: 2dp;
+	background-color: #888;
+}
+)RCSS";

+ 74 - 72
Source/Debugger/InfoSource.h

@@ -26,76 +26,78 @@
  *
  *
  */
  */
 
 
-static const char* info_rcss =
-"body\n"
-"{\n"
-"	width: 320dp;\n"
-"	min-width: 320dp;\n"
-"	min-height: 150dp;\n"
-"	margin-top: 42dp;\n"
-"	margin-right: 20dp;\n"
-"	margin-left: auto;\n"
-"}\n"
-"div#content\n"
-"{\n"
-"   height: auto;\n"
-"	max-height: 650dp;\n"
-"}\n"
-"div#content div h2\n"
-"{\n"
-"	padding-left: 5dp;\n"
-"}\n"
-"div#content div div\n"
-"{\n"
-"	font-size: 12dp;\n"
-"	padding-left: 10dp;\n"
-"}\n"
-"div#ancestors p:hover,\n"
-"div#children p:hover\n"
-"{\n"
-"	background-color: #ddd;\n"
-"}\n"
-"scrollbarvertical\n"
-"{\n"
-"	scrollbar-margin: 0px;\n"
-"}\n";
+static const char* info_rcss = R"RCSS(
+body
+{
+	width: 320dp;
+	min-width: 320dp;
+	min-height: 150dp;
+	margin-top: 42dp;
+	margin-right: 20dp;
+	margin-left: auto;
+}
+div#content
+{
+   height: auto;
+	max-height: 650dp;
+}
+div#content div h2
+{
+	padding-left: 5dp;
+}
+div#content div div
+{
+	font-size: 12dp;
+	padding-left: 10dp;
+}
+div#ancestors p:hover,
+div#children p:hover
+{
+	background-color: #ddd;
+}
+scrollbarvertical
+{
+	scrollbar-margin: 0px;
+}
+)RCSS";
 
 
-static const char* info_rml =
-"<h1>\n"
-"	<handle id=\"position_handle\" move_target=\"#document\">\n"
-"		<div id=\"close_button\">X</div>\n"
-"		<div id=\"title-content\" style=\"width: 200dp;\">Element Information</div>\n"
-"	</handle>\n"
-"</h1>\n"
-"<div id=\"content\">\n"
-"	<div id =\"attributes\">\n"
-"		<h2>Attributes</h2>\n"
-"		<div id=\"attributes-content\">\n"
-"		</div>\n"
-"	</div>\n"
-"	<div id =\"properties\">\n"
-"		<h2>Properties</h2>\n"
-"		<div id=\"properties-content\">\n"
-"		</div>\n"
-"	</div>\n"
-"	<div id =\"events\">\n"
-"		<h2>Events</h2>\n"
-"		<div id=\"events-content\">\n"
-"		</div>\n"
-"	</div>\n"
-"	<div id =\"position\">\n"
-"		<h2>Position</h2>\n"
-"		<div id=\"position-content\">\n"
-"		</div>\n"
-"	</div>\n"
-"	<div id =\"ancestors\">\n"
-"		<h2>Ancestors</h2>\n"
-"		<div id=\"ancestors-content\">\n"
-"		</div>\n"
-"	</div>\n"
-"	<div id =\"children\">\n"
-"		<h2>Children</h2>\n"
-"		<div id=\"children-content\">\n"
-"		</div>\n"
-"	</div>\n"
-"</div>\n";
+static const char* info_rml = R"RML(
+<h1>
+	<handle id="position_handle" move_target="#document">
+		<div id="close_button">X</div>
+		<div id="title-content" style="width: 200dp;">Element Information</div>
+	</handle>
+</h1>
+<div id="content">
+	<div id ="attributes">
+		<h2>Attributes</h2>
+		<div id="attributes-content">
+		</div>
+	</div>
+	<div id ="properties">
+		<h2>Properties</h2>
+		<div id="properties-content">
+		</div>
+	</div>
+	<div id ="events">
+		<h2>Events</h2>
+		<div id="events-content">
+		</div>
+	</div>
+	<div id ="position">
+		<h2>Position</h2>
+		<div id="position-content">
+		</div>
+	</div>
+	<div id ="ancestors">
+		<h2>Ancestors</h2>
+		<div id="ancestors-content">
+		</div>
+	</div>
+	<div id ="children">
+		<h2>Children</h2>
+		<div id="children-content">
+		</div>
+	</div>
+</div>
+)RML";

+ 66 - 65
Source/Debugger/LogSource.h

@@ -26,69 +26,70 @@
  *
  *
  */
  */
 
 
-static const char* log_rcss =
-"body\n"
-"{\n"
-"	width: 400dp;\n"
-"   height: 300dp;\n"
-"	min-width: 200dp;\n"
-"	min-height: 150dp;\n"
-"	top: 42dp;\n"
-"	left: 20dp;\n"
-"}\n"
-"div#tools\n"
-"{\n"
-"	float: right;\n"
-"	width: 137dp;\n"
-"}\n"
-"div.log-entry\n"
-"{\n"
-"	margin: 3dp 2dp;\n"
-"}\n"
-"div.log-entry div.icon\n"
-"{\n"
-"	float: left;\n"
-"	display: block;\n"
-"	width: 18dp;\n"
-"	height: 18dp;\n"
-"	text-align: center;\n"
-"	border-width: 1px;\n"
-"	margin-right: 5dp;\n"
-"	font-weight: bold;\n"
-"}\n"
-"div.button\n"
-"{\n"
-"	display: inline-block;"
-"	width: 30dp;\n"
-"	text-align: center;\n"
-"	border-width: 1px;\n"
-"	font-weight: bold;\n"
-"	margin-right: 3dp;\n"
-"}\n"
-"div.button.last\n"
-"{\n"
-"	margin-right: 0px;\n"
-"}\n"
-"div.log-entry p.message\n"
-"{\n"
-"	display: block;\n"
-"	margin-left: 20dp;\n"
-"}\n";
+static const char* log_rcss = R"RCSS(body
+{
+	width: 400dp;
+	height: 300dp;
+	min-width: 200dp;
+	min-height: 150dp;
+	top: 42dp;
+	left: 20dp;
+}
+div#tools
+{
+	float: right;
+	width: 137dp;
+}
+div.log-entry
+{
+	margin: 3dp 2dp;
+}
+div.log-entry div.icon
+{
+	float: left;
+	display: block;
+	width: 18dp;
+	height: 18dp;
+	text-align: center;
+	border-width: 1px;
+	margin-right: 5dp;
+	font-weight: bold;
+}
+div.button
+{
+	display: inline-block;
+	width: 30dp;
+	text-align: center;
+	border-width: 1px;
+	font-weight: bold;
+	margin-right: 3dp;
+}
+div.button.last
+{
+	margin-right: 0px;
+}
+div.log-entry p.message
+{
+	display: block;
+	margin-left: 20dp;
+}
+)RCSS";
 
 
-static const char* log_rml =
-"<h1>\n"
-"	<handle id=\"position_handle\" move_target=\"#document\">\n"
-"		<div id=\"close_button\">X</div>\n"
-"		<div id=\"tools\">\n"
-"			<div id=\"error_button\" class=\"button error\">On</div>\n"
-"			<div id=\"warning_button\" class=\"button warning\">On</div>\n"
-"			<div id=\"info_button\" class=\"button info\">Off</div>\n"
-"			<div id=\"debug_button\" class=\"button debug last\">On</div>\n"
-"		</div>\n"
-"		<div style=\"width: 100dp;\">Event Log</div>\n"
-"	</handle>\n"
-"</h1>\n"
-"<div id=\"content\">\n"
-"	No messages in log.\n"
-"</div>\n"
-"<handle id=\"size_handle\" size_target=\"#document\" />";
+static const char* log_rml = R"RML(
+<h1>
+	<handle id="position_handle" move_target="#document">
+		<div id="close_button">X</div>
+		<div id="tools">
+			<div id="error_button" class="button error">On</div>
+			<div id="warning_button" class="button warning">On</div>
+			<div id="info_button" class="button info">Off</div>
+			<div id="debug_button" class="button debug last">On</div>
+		</div>
+		<div style="width: 100dp;">Event Log</div>
+	</handle>
+</h1>
+<div id="content">
+	No messages in log.
+</div>
+<handle id="size_handle" size_target="#document" />
+)RML";

+ 60 - 58
Source/Debugger/MenuSource.h

@@ -26,62 +26,64 @@
  *
  *
  */
  */
 
 
-static const char* menu_rcss =
-"body\n"
-"{\n"
-"	width: 100%;\n"
-"	height: 32dp;\n"
-"	position: absolute;\n"
-"	z-index: 1000000;\n"
-"	background: #888;\n"
-"	font-family: Lacuna;\n"
-"	font-size: 14dp;\n"
-"	color: black;\n"
-"}\n"
-"div\n"
-"{\n"
-"	display: block;\n"
-"}\n"
-"div#button-group\n"
-"{\n"
-"	margin-top: 4dp;\n"
-"}\n"
-"button\n"
-"{\n"
-"	border-width: 1px;\n"
-"	border-color: #666;\n"
-"	background: #ddd;\n"
-"	margin-left: 6dp;\n"
-"	display: inline-block;\n"
-"	width: 100dp;\n"
-"   line-height: 22dp;\n"
-"	text-align: center;\n"
-"}\n"
-"button:hover\n"
-"{\n"
-"	background: #eee;\n"
-"}\n"
-"div#version-info\n"
-"{\n"
-"	padding: 0px;\n"
-"	margin-top: 0px;\n"
-"	font-size: 20dp;\n"
-"	float: right;\n"
-"	margin-right: 20dp;\n"
-"	width: 200dp;"
-"	text-align: right;"
-"	color: white;\n"
-"}\n"
-"span#version-number\n"
-"{\n"
-"	font-size: 15dp;\n"
-"}\n"
-;
+static const char* menu_rcss = R"RCSS(
+body
+{
+	width: 100%;
+	height: 32dp;
+	position: absolute;
+	z-index: 1000000;
+	background: #888;
+	font-family: Lacuna;
+	font-size: 14dp;
+	color: black;
+}
+div
+{
+	display: block;
+}
+div#button-group
+{
+	margin-top: 4dp;
+}
+button
+{
+	border-width: 1px;
+	border-color: #666;
+	background: #ddd;
+	margin-left: 6dp;
+	display: inline-block;
+	width: 100dp;
+	line-height: 22dp;
+	text-align: center;
+}
+button:hover
+{
+	background: #eee;
+}
+div#version-info
+{
+	padding: 0px;
+	margin-top: 0px;
+	font-size: 20dp;
+	float: right;
+	margin-right: 20dp;
+	width: 200dp;
+	text-align: right;
+	color: white;
+}
+span#version-number
+{
+	font-size: 15dp;
+}
+)RCSS";
 
 
-static const char* menu_rml =
-"<div id=\"version-info\">RmlUi <span id=\"version-number\"></span></div>\n"
-"<div id =\"button-group\">\n"
-"	<button id =\"event-log-button\">Event Log</button>\n"
-"	<button id =\"debug-info-button\">Element Info</button>\n"
-"	<button id =\"outlines-button\">Outlines</button>\n"
-"</div>\n";
+
+static const char* menu_rml = R"RML(
+<div id="version-info">RmlUi <span id="version-number"></span></div>
+<div id ="button-group">
+	<button id ="event-log-button">Event Log</button>
+	<button id ="debug-info-button">Element Info</button>
+	<button id ="outlines-button">Outlines</button>
+</div>;
+)RML";