# -*- coding: utf-8 -*-

## Copyright 2005, Danger, Inc.  All Rights Reserved.
## This file is subject to the Danger, Inc. Sample Code License,
## which is provided in the file SAMPLE_CODE_LICENSE.
## Copies are also available from http://developer.danger.com/

package "com.danger.text"

interface "{source}com/danger/text/Resources.java"
events "{source}com/danger/text/Events.java"


string ID_APP_NAME      "Text Demo"
string ID_APP_CLASS     "com.danger.text.Text"
string ID_APP_FLAGS     ""

bitmap ID_LARGE_ICON	"{base}ID_LARGE_ICON.png"
bitmap ID_SMALL_ICON	"{base}ID_SMALL_ICON.png"

string ID_LOCALE            "en_US"

string ID_ALTERED_DISPLAY	"Altered at display time"
string ID_MIRRORED			"Mirrored from other buffer"
string ID_QUICK_BROWN		"The quick brown fox jumps over the lazy dog."

string ID_DEMO_GET_DISPLAY_TEXT "Display-time text changes"
string ID_DEMO_GREENBAR			"Greenbar text"
string ID_DEMO_CONVERSATION 	"Conversation"
string ID_DEMO_NESTED_MARGINS	"Nested margins"
string ID_DEMO_IMAGES			"Images"
string ID_DEMO_HTML				"HTML"
string ID_DEMO_EMBEDDED			"Embedded widgets"
string ID_DEMO_FORMATTING		"Format enforcement"

menu ID_DEMOS_MENU
	menuItem
		title = ID_DEMO_GET_DISPLAY_TEXT
		event = EVENT_GET_DISPLAY_TEXT

	menuItem
		title = ID_DEMO_GREENBAR
		event = EVENT_GREENBAR

	menuItem
		title = ID_DEMO_CONVERSATION
		event = EVENT_CONVERSATION

	menuItem
		title = ID_DEMO_NESTED_MARGINS
		event = EVENT_NESTED_MARGINS

	menuItem
		title = ID_DEMO_IMAGES
		event = EVENT_IMAGES

	menuItem
		title = ID_DEMO_HTML
		event = EVENT_HTML

	menuItem
		title = ID_DEMO_EMBEDDED
		event = EVENT_EMBEDDED

	menuItem
		title = ID_DEMO_FORMATTING
		event = EVENT_FORMATTING

endMenu

string ID_INTRO """<html>
<h1>Text Demo</h1>
<p>
Welcome to the text demo.
Open the menu and
choose a text box feature you would like to see demonstrated.
</p>
"""

string ID_HOLMES "" +
	"We met next day as he had arranged, and inspected the rooms " +
	"at No. 221B, Baker Street, of which he had spoken at our " +
	"meeting.  They consisted of a couple of comfortable bed-rooms " +
	"and a single large airy sitting-room, cheerfully furnished, " +
	"and illuminated by two broad windows.  So desirable in every " +
	"way were the apartments, and so moderate did the terms seem " +
	"when divided between us, that the bargain was concluded upon " +
	"the spot, and we at once entered into possession.  That very " +
	"evening I moved my things round from the hotel, and on the " +
	"following morning Sherlock Holmes followed me with several " +
	"boxes and portmanteaus.  For a day or two we were busily " +
	"employed in unpacking and laying out our property to the best " +
	"advantage.  That done, we gradually began to settle down and " +
	"to accommodate ourselves to our new surroundings.\r" +
	"\r" +
	"Holmes was certainly not a difficult man to live with. " +
	"He was quiet in his ways, and his habits were regular. " +
	"It was rare for him to be up after ten at night, and he had " +
	"invariably breakfasted and gone out before I rose in the " +
	"morning.  Sometimes he spent his day at the chemical " +
	"laboratory, sometimes in the dissecting-rooms, and " +
	"occasionally in long walks, which appeared to take him into " +
	"the lowest portions of the City.  Nothing could exceed his " +
	"energy when the working fit was upon him; but now and again " +
	"a reaction would seize him, and for days on end he would lie " +
	"upon the sofa in the sitting-room, hardly uttering a word or " +
	"moving a muscle from morning to night.  On these occasions " +
	"I have noticed such a dreamy, vacant expression in his eyes, " +
	"that I might have suspected him of being addicted to the use " +
	"of some narcotic, had not the temperance and cleanliness of " +
	"his whole life forbidden such a notion.\r" +
	"\r" +
	"As the weeks went by, my interest in him and my curiosity " +
	"as to his aims in life, gradually deepened and increased. " +
	"His very person and appearance were such as to strike the " +
	"attention of the most casual observer.  In height he was " +
	"rather over six feet, and so excessively lean that he seemed " +
	"to be considerably taller.  His eyes were sharp and piercing, " +
	"save during those intervals of torpor to which I have alluded; " +
	"and his thin, hawk-like nose gave his whole expression an air " +
	"of alertness and decision.  His chin, too, had the prominence " +
	"and squareness which mark the man of determination.  His hands " +
	"were invariably blotted with ink and stained with chemicals, " +
	"yet he was possessed of extraordinary delicacy of touch, " +
	"as I frequently had occasion to observe when I watched him " +
	"manipulating his fragile philosophical instruments." +
	""

stringArray ID_CONVERSATION
	"Poor devil! What are you up to now?"
	"Looking for lodgings. Trying to solve the problem as to whether it is possible to get comfortable rooms at a reasonable price."
	"That's a strange thing, you are the second man to-day that has used that expression to me."
	"And who was the first?"
	"A fellow who is working at the chemical laboratory up at the hospital.  He was bemoaning himself this morning because he could not get someone to go halves with him in some nice rooms which he had found, and which were too much for his purse."
	"By Jove! if he really wants someone to share the rooms and the expense, I am the very man for him.  I should prefer having a partner to being alone."
	"You don't know Sherlock Holmes yet.  Perhaps you would not care for him as a constant companion."
	"Why, what is there against him?"
	"Oh, I didn't say there was anything against him.  He is a little queer in his ideas -- an enthusiast in some branches of science.  As far as I know he is a decent fellow enough."
	"A medical student, I suppose?"
	"No -- I have no idea what he intends to go in for.  I believe he is well up in anatomy, and he is a first-class chemist; but, as far as I know, he has never taken out any systematic medical classes.  His studies are very desultory and eccentric, but he has amassed a lot of out-of-the way knowledge which would astonish his professors."
	"Did you never ask him what he was going in for?"
	"No; he is not a man that it is easy to draw out, though he can be communicative enough when the fancy seizes him."
	"I should like to meet him. If I am to lodge with anyone, I should prefer a man of studious and quiet habits.  I am not strong enough yet to stand much noise or excitement.  I had enough of both in Afghanistan to last me for the remainder of my natural existence.  How could I meet this friend of yours?"
	"He is sure to be at the laboratory. He either avoids the place for weeks, or else he works there from morning to night.  If you like, we shall drive round together after luncheon."
	"Certainly."
	"You mustn't blame me if you don't get on with him. I know nothing more of him than I have learned from meeting him occasionally in the laboratory.  You proposed this arrangement, so you must not hold me responsible."
	"If we don't get on it will be easy to part company.  It seems to me, Stamford, that you have some reason for washing your hands of the matter.  Is this fellow's temper so formidable, or what is it?  Don't be mealy-mouthed about it."
	"It is not easy to express the inexpressible.  Holmes is a little too scientific for my tastes -- it approaches to cold-bloodedness.  I could imagine his giving a friend a little pinch of the latest vegetable alkaloid, not out of malevolence, you understand, but simply out of a spirit of inquiry in order to have an accurate idea of the effects.  To do him justice, I think that he would take it himself with the same readiness.  He appears to have a passion for definite and exact knowledge."
	"Very right too."
	"Yes, but it may be pushed to excess.  When it comes to beating the subjects in the dissecting-rooms with a stick, it is certainly taking rather a bizarre shape."
	"Beating the subjects!"
	"Yes, to verify how far bruises may be produced after death.  I saw him at it with my own eyes."
	"And yet you say he is not a medical student?"
	"No.  Heaven knows what the objects of his studies are.  But here we are, and you must form your own impressions about him."
endStringArray

bitmap ID_INCOMING "{base}ID_INCOMING.png"
bitmap ID_OUTGOING "{base}ID_OUTGOING.png"

bitmap ID_ROCKS "{base}ID_ROCKS.png"
bitmap ID_NOTES "{base}ID_NOTES.png"

string ID_IMAGES_TEXT "<html>" +
	"Sometimes it's nice to be able to include images in with text. " +
	"Here is the icon from " +
	"<img src=\"rsrc:" + ID_ROCKS + "\" alt=\"[Rocks]\">&nbsp;Rock &amp; Rocket " +
	"and here is the one from " +
	"<img src=\"rsrc:" + ID_NOTES + "\" alt=\"[Notes]\">&nbsp;Notes." +
	"<p>" +
	"And here is one I'm going to try to load over the network, " +
	"if I can get away with it: " +
	"<img src=\"http://www.google.com/images/logo_sm.gif\" alt=\"[Google]\">. " +
	"I bet they change the URL on me or something."

string ID_HTML_TEXT """<html>
<h1>HTML demo</h1>
<p>
We probably need a demonstration of all the supported HTML tags,
so here one is.  It's a bit slow unfortunately.
<p>
You can of course have <a href="http://www.danger.com">links</a>
and links that point to internal <a href="#blah">anchors</a>.
<p>
You can<br>insert line breaks.
<blockquote>
Blockquotes look like the ones that people tend to see in mail messages.
If you like your blockquotes to look like something else, you can search
the text for instances of <code>StripeSpan</code> and replace them with
a generic <code>LeftMarginSpan</code> or something.
</blockquote>
You can have <b>bold</b> text.  You can have <big>big</big> text.
<p>
<body bgcolor=black text=green>
You can set the bgcolor and text color in body tags if you really want to.
</body>
<center>
You can have centered text.
</center>
You can include <code>code</code> and <cite>citations</cite>.
<dl>
<dt>
Definition list
<dd>
It's a definition list, with hanging tags.  Whee.  Let me fill
this paragraph up with something.
<dt>
Another
<dd>
I should put something in this paragraph too.
</dl>
Oh great, more font synonyms.  <dfn>Definitions</dfn> are yet another
thing that is italic.  As is <em>emphasis</em>.  The font tag
takes a <font color=blue>color</font> argument.
<p>
There are several classes of headers.
<h1>Class 1 header</h1>
<h2>Class 2 header</h2>
<h3>Class 3 header</h3>
<h4>Class 4 header</h4>
<h5>Class 5 header</h5>
<h6>Class 6 header</h6>
<p>
Here is <a name="blah">where</a> that anchor earlier pointed to.
<p>
You can use &lt;hr&gt; but it looks pretty awful now.
<p>
Another way to say <i>italics</i>.  An <img src="http://www.danger.com/assets/images/home_logo.gif">&nbsp;image.  <kbd>Kbd</kbd> is another way to say monospaced.
<ul>
<li>Let's have an unordered list
<li>It's got items in it
<li>Hey, this one has a sublist:
<ul>
<li>item
<li>item
</ul>
<li>OK, enough of that.
</ul>
<ol>
<li>OK, this one is numbered.
<li>It's got items in it
<li>And look, it has a sublist too.
<ol>
<li>item
<li>item
</ol>
<li>OK, enough of that.
</ol>
You already saw
<p>
paragraph breaks.
<p>
<pre>
It is our friend
 __   __    __
|__| |__|  |__
|    |  \\  |__

for all your ASCII art needs.
</pre>
<p>
Yes, it's <strike>strikethrough</strike>.  And <small>small</small>.
And even <sub>subscript</sub> and <sup>superscript</sup>.
How many style synonyms does HTML have?  <strong>Strong</strong>
and <samp>samp</samp>.
<p>
Forget I said anything about tables.  It's all a lie.
<p>
But <tt>typewriter text</tt> works!  As does <u>underline</u> and even
<var>var</var>, the last of the zillion ways to get italics.
"""

string ID_EMBEDDED_TEXT "You can't really embed any old widget into text, " +
	"but you can sort of fake it.\r\rLet's stick in a couple of buttons " +
	"here: -1- and -2-\r\rAnd maybe a pop-up menu too: -3-\r\r" +
	"Did it work?"

string ID_BUTTON1 "First button"
string ID_BUTTON2 "Other button"

menu ID_POPUP
	menuItem
		title = "Yes"

	menuItem
		title = "No"

	menuItem
		title = "Maybe"

	divider

	menuItem
		title = "What?"
endMenu

string ID_FORMAT_TITLE "Hey, type a phone number:"
