Slide 7.5: Demonstrations
  Slide 7.7: Demonstrations (cont.)
  Home


Demonstrations (Cont.)


Using Palm OS Resource Editor, you can visually create the previous user interface as follows:
  1. A form with an ID 1000, a Help ID 1000, and a Title “Hello World”


  2. A string with an ID 1000 for Help


  3. A button with a Control ID 1003 and Text “OK”


  4. A bitmap image with an ID 1005 shown in the Files pane


  5. A bitmap image, which is the same as the above image, for the application icon with an ID 1000 shown in the Files pane

The resource editor will automatically generate the following resource description file ResourceDescription1.xrd (.xrd or .txt) from the above editing by selecting File > Save As ...:

 ResourceDescription1.xrd 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<PALMOS_RESOURCE_FILE>

 <APP_ICON_BITMAP_RESOURCE RESOURCE_ID="1000">
  <BITMAPS>
   <BITMAP>
    <WIDTH> 22 </WIDTH>
    <HEIGHT> 22 </HEIGHT>
    <BIT_DEPTH> 1 </BIT_DEPTH>
    <BITMAP_COMPRESSION> BEST </BITMAP_COMPRESSION>
    <HAS_TRANSPARENCY> FALSE </HAS_TRANSPARENCY>
    <HAS_COLOR_TABLE> FALSE </HAS_COLOR_TABLE>
    <BITMAP_FILE> "AppIcon_Large_X1_1.bmp" </BITMAP_FILE>
   </BITMAP>
  </BITMAPS>
 </APP_ICON_BITMAP_RESOURCE>

 <BITMAP_RESOURCE RESOURCE_ID="1005">
  <BITMAPS>
   <BITMAP>
    <WIDTH> 50 </WIDTH>
    <HEIGHT> 50 </HEIGHT>
    <BIT_DEPTH> 1 </BIT_DEPTH>
    <BITMAP_COMPRESSION> BEST </BITMAP_COMPRESSION>
    <HAS_TRANSPARENCY> FALSE </HAS_TRANSPARENCY>
    <HAS_COLOR_TABLE> FALSE </HAS_COLOR_TABLE>
    <BITMAP_DATA>
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 1F FF 00 00 00 00
     00 01 FF 1F F0 00 00 00
     00 01 FF 1F F0 00 00 00
     00 06 23 18 8C 00 00 00
     00 38 C3 18 63 80 00 00
     00 38 C3 18 63 80 00 00
     00 C0 C4 04 60 60 00 00
     00 C1 04 04 10 60 00 00
     00 C1 04 04 10 60 00 00
     01 01 04 04 10 10 00 00
     01 01 04 04 10 10 00 00
     01 FF 04 04 1F F0 00 00
     01 01 FF FF F0 10 00 00
     01 01 FF FF F0 10 00 00
     01 01 04 04 10 10 00 00
     01 01 04 04 10 10 00 00
     01 01 04 04 10 10 00 00
     00 C1 04 04 10 60 00 00
     00 C0 C4 04 60 60 00 00
     00 C0 C4 04 60 60 00 00
     00 38 C3 18 63 80 00 00
     00 06 23 18 8C 00 00 00
     00 06 23 18 8C 00 00 00
     00 01 FF 1F F0 00 00 00
     00 01 FF 1F F0 00 00 00
     00 00 1F FF 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00
    </BITMAP_DATA>
   </BITMAP>
  </BITMAPS>
 </BITMAP_RESOURCE>

 <FORM_RESOURCE RESOURCE_ID="1000">
  <FORM_ID> 1000 </FORM_ID>
  <BOUNDS>
   <LEFT> 0 </LEFT>
   <TOP> 0 </TOP>
   <WIDTH> 160 </WIDTH>
   <HEIGHT> 160 </HEIGHT>
  </BOUNDS>
  <USABLE> TRUE </USABLE>
  <MODAL> TRUE </MODAL>
  <SAVE_BEHIND> FALSE </SAVE_BEHIND>
  <HELP_ID> 1000 </HELP_ID>
  <MENU_ID> 0 </MENU_ID>
  <DEFAULT_BUTTON> 0 </DEFAULT_BUTTON>
  <TITLE_ICON> TRUE </TITLE_ICON>
  <TITLE_BAR_FOCUSABLE> FALSE </TITLE_BAR_FOCUSABLE>
  <FORM_OBJECTS>
   <FORM_TITLE>
    <TEXT> "Hello World" </TEXT>
   </FORM_TITLE>
   <FORM_LABEL>
    <ID> 1000 </ID>
    <LOCATION>
     <X> 56 </X>
     <Y> 66 </Y>
    </LOCATION>
    <USABLE> TRUE </USABLE>
    <FONT_ID> STD_FONT </FONT_ID>
    <TEXT> "Mobile world!" </TEXT>
   </FORM_LABEL>
   <FORM_LABEL>
    <ID> 1001 </ID>
    <LOCATION>
     <X> 72 </X>
     <Y> 47 </Y>
    </LOCATION>
    <USABLE> TRUE </USABLE>
    <FONT_ID> STD_FONT </FONT_ID>
    <TEXT> "Hello," </TEXT>
   </FORM_LABEL>
   <FORM_LABEL>
    <ID> 1002 </ID>
    <LOCATION>
     <X> 71 </X>
      <Y> 101 </Y>
    </LOCATION>
    <USABLE> TRUE </USABLE>
    <FONT_ID> STD_FONT </FONT_ID>
    <TEXT> "#:-)" </TEXT>
   </FORM_LABEL>
   <FORM_BUTTON>
    <ID> 1003 </ID>
    <BOUNDS>
     <LEFT> 66 </LEFT>
     <TOP> 135 </TOP>
     <WIDTH> 36 </WIDTH>
     <HEIGHT> 12 </HEIGHT>
    </BOUNDS>
    <USABLE> TRUE </USABLE>
    <ENABLED> TRUE </ENABLED>
    <TEXT> "OK" </TEXT>
    <LEFT_ANCHOR> FALSE </LEFT_ANCHOR>
    <FONT_ID> STD_FONT </FONT_ID>
    <BUTTON_FRAME> STANDARD_BUTTON_FRAME </BUTTON_FRAME>
   </FORM_BUTTON>
   <FORM_BITMAP>
    <USABLE> TRUE </USABLE>
    <LOCATION>
     <X> 0 </X>
     <Y> 12 </Y>
    </LOCATION>
    <BITMAP_ID> 1005 </BITMAP_ID>
   </FORM_BITMAP>
  </FORM_OBJECTS>
 </FORM_RESOURCE>

 <STRING_RESOURCE RESOURCE_ID="1000">
  <TEXT>
   "This is the mobile version of the programming classics \"Hello, world!\"."
  </TEXT>
 </STRING_RESOURCE>

</PALMOS_RESOURCE_FILE>