About - Download - History - Archive - Manual - Contributors

PilRC v2.8 p7
User Manual

Aaron Ardiri (aaron@ardiri.com)
27 July 2001
Check the PilRC Home Page for the latest version.

Description

Table of Contents Usage Example: Understanding the Manual

Syntax

Types Comments

Include Files

Resource Language Reference FORM (tFRM)

Where <OBJECTS> is one or more of:

Notes:

Example:

FORM ID 1 AT (2 2 156 156)
  USABLE MODAL 
  HELPID 1 
  MENUID 1
  LOCALE "enUS"
BEGIN
  TITLE "AlarmHack"
  LABEL "Repeat Datebook alarm sound" AUTOID AT (CENTER 16)
  PUSHBUTTON "1" ID 2001 AT (20 PrevBottom+2 12) AUTO GROUP 1
  PUSHBUTTON "2" ID 2002 AT (PrevRight+1 PrevTop PrevWidth PrevHeight) GROUP 1
  PUSHBUTTON "3" ID 2003 AT (PrevRight+1 PrevTop PrevWidth PrevHeight) GROUP 1

  LABEL "times. Ring again every" AUTOID AT (CENTER PrevBottom+2) FONT 0

  PUSHBUTTON "never" ID 3000 AT (13 PrevBottom+2 32 12) GROUP 2
  PUSHBUTTON "10 sec" ID 3001 AT (PrevRight+1 PrevTop PrevWidth PrevHeight) GROUP 2
  PUSHBUTTON "30 sec" ID 3002 AT (PrevRight+1 PrevTop PrevWidth PrevHeight) GROUP 2
  PUSHBUTTON "1 min" ID 3003 AT (PrevRight+1 PrevTop PrevWidth PrevHeight) GROUP 2

  LABEL "Alarm sound:" AUTOID AT (24 PrevBottom+4)
  POPUPTRIGGER "" ID 5000 AT (PrevRight+4 PrevTop 62 AUTO) LEFTANCHOR
  LIST "Standard" "Bleep" ID 6000 AT (PrevLeft PrevTop 52 1) VISIBLEITEMS 2 NONUSABLE
  POPUPLIST ID 5000 6000

  BUTTON "Test" ID 1202 AT (CENTER 138 AUTO AUTO)
  GRAFFITISTATEINDICATOR AT (100 100)
END
MENU (MBAR)

Where <PULLDOWNS> is one or more of:

Where <MENUITEMS> is one or more of:

Example: ALERT (Talt)

Notes:

Example:

ALERT ID 1000
  HELPID 100
  DEFAULTBUTTON 1
  CONFIRMATION
  LOCALE "enUS"
BEGIN
  TITLE "AlarmHack"
  MESSAGE "Continuing will cause you 7 years of bad luck\n" \
          "Are you sure?"
  BUTTONS "Ok" "Cancel"
END
VERSION (tver)

Notes: Example: STRING (tSTR)

Example: STRINGTABLE (tSTL)

Notes:
  • a limitation of 384 strings apply

    Example:

    CATEGORIES (tAIS)

    Notes: Example: APPLICATIONICONNAME (tAIN)

    Example: APPLICATION (APPL)

    Notes:

    Example:

    LAUNCHERCATEGORY (taic)

    Example: ICON (tAIB)

    Notes:

    Example:

    SMALLICON (tAIB)

    Notes:

    Example:

    BITMAP (Tbmp) (tbsb)

    Notes:

    Example:

    TRAP (TRAP)

    Notes: Example: FONT (NFNT)

    FONT file format

    The file containing the font information is plain ASCII. To understand how it works it is first necessary to understand how a font is arranged in memory. A font consists of four main parts, a header, a bitmap image, a bitmap location table, and an offset/width table. The bitmap image and location table are generated for you 100% automatically.

    The ASCII file consists of two parts, the header and the font data (glyph objects). A full font file is provided with the PilRC distribution.

    The FONT header has the following fields:

    Each glyph has a bitmap, offset, and a width associated with it. The width can be overridden, however it is not recommended as it is set automatically. Notes:

    FONTINDEX (fnti)

    Notes:

    Example:
    HEX

    Notes:

    Example:
    DATA

    Example: INTEGER (tint)

    Notes:

    Example:
    BYTELIST (BLST)

    Example:
    BYTELIST ID 1000
    BEGIN
    	23
    	3
    	205
    	55
    END
    
    WORDLIST (wrdl)

    Example:
    WORDLIST ID 1000
    BEGIN
    	23
    	1303
    	2505
    	2055
    END
    
    LONGWORDLIST (DLST)

    Example:
    LONGWORDLIST ID 1000
    BEGIN
    	123456789
    	130300
    	78005
    	200055
    END
    
    PALETTETABLE (tclt)

    Example:
    PALETTETABLE ID 1000
    BEGIN
    	0x00 0xFF 0xFF 0xFF
    	0x01 0x00 0x00 0x00
    END 
    FEATURE (feat)

    Example:
    FEATURE ID 1000
    BEGIN
    	[CREATOR <creator.s>]
    	BEGIN
    		ENTRY NUMBER 5 VALUE 0
    		ENTRY NUMBER 6 VALUE 0
    	END
    END
    GRAFFITIINPUTAREA (silk)

    Where <OBJECTS> is one or more of:

    Notes:

    Example:

    GRAFFITIINPUTAREA ID 10000
      VERSION 1
      CREATOR "psys"
      LANGUAGE "English"
      COUNTRY "UnitedStates"
    BEGIN
    	AREA AT (0 0 160 160) SCREEN INDEX 0
    	AREA AT (27 164 62 56) GRAFFITI INDEX 0
    	AREA AT (89 164 44 56) GRAFFITI INDEX 1
    	BUTTON AT (27 206 18 14) KEYDOWNCHR 272 KEYDOWNKEYCODE 0 KEYDOWNMODIFIERS 8
    	BUTTON AT (115 206 18 14) KEYDOWNCHR 273 KEYDOWNKEYCODE 0 KEYDOWNMODIFIERS 8
    	BUTTON AT (0 164 27 28) KEYDOWNCHR 264 KEYDOWNKEYCODE 0 KEYDOWNMODIFIERS 8
    	BUTTON AT (0 192 27 28) KEYDOWNCHR 261 KEYDOWNKEYCODE 0 KEYDOWNMODIFIERS 8
    	BUTTON AT (133 164 27 28) KEYDOWNCHR 267 KEYDOWNKEYCODE 0 KEYDOWNMODIFIERS 8
    	BUTTON AT (133 192 27 28) KEYDOWNCHR 266 KEYDOWNKEYCODE 0 KEYDOWNMODIFIERS 8
    END
    
    COUNTRYLOCALISATION (cnty)

    Notes:

    Example:
    COUNTRYLOCALISATION ID 10000
    BEGIN
    	BEGIN
    		NUMBER 7
    		NAME "France"
    		DATEFORMAT 1
    		LONGDATEFORMAT 8
    		WEEKSTARTDAY 1
    		TIMEFORMAT 2
    		NUMBERFORMAT 2
    		CURRENCYNAME "Franc"
    		CURRENCYSYMBOL "F"
    		CURRENCYUNIQUESYMBOL "FRF"
    		CURRENCYDECIMALPLACES 2
    		DAYLIGHTSAVINGS 3
    		MINUTESWESTOFGMT 60
    		MEASUREMENTSYSTEM 1
    	END
    	BEGIN
    		NUMBER 23
    		NAME "United States"
    		DATEFORMAT 0
    		LONGDATEFORMAT 7
    		WEEKSTARTDAY 0
    		TIMEFORMAT 1
    		NUMBERFORMAT 0
    		CURRENCYNAME "US Dollar"
    		CURRENCYSYMBOL "$"
    		CURRENCYUNIQUESYMBOL "$US"
    		CURRENCYDECIMALPLACES 2
    		DAYLIGHTSAVINGS 1
    		MINUTESWESTOFGMT 1140
    		MEASUREMENTSYSTEM 0
    	END
    END
    LOCALES (locs)

    Notes:

    Example:
    LOCALES ID 10000
    BEGIN
    	VERSION 1
    	BEGIN
    		LANGUAGES 1
    		COUNTRYS 7
    		COUNTRYNAME "France"
    		DATEFORMAT 1
    		LONGDATEFORMAT 8
    		TIMEFORMAT 2
    		WEEKSTARTDAY 1
    		TIMEZONE 60
    		NUMBERFORMAT 2
    		CURRENCYNAME "Franc"
    		CURRENCYSYMBOL "F"
    		CURRENCYUNIQUESYMBOL "FRF"
    		CURRENCYDECIMALPLACES 2
    		MEASUREMENTSYSTEM 1
    	END
    	BEGIN
    		LANGUAGES 0
    		COUNTRYS 23
    		COUNTRYNAME "United States"
    		DATEFORMAT 0
    		LONGDATEFORMAT 7
    		TIMEFORMAT 1
    		WEEKSTARTDAY 0
    		TIMEZONE -480
    		NUMBERFORMAT 0
    		CURRENCYNAME "US Dollar"
    		CURRENCYSYMBOL "$"
    		CURRENCYUNIQUESYMBOL "$US"
    		CURRENCYDECIMALPLACES 2
    		MEASUREMENTSYSTEM 0
    	END
    END
    KEYBOARD (tkbd)

    Notes:

    Example:
    MIDI (MIDI)

    Notes:

    Example:
    HARDSOFTBUTTONDEFAULT (hsbd)

    Notes:

    Example:
    HARDSOFTBUTTONDEFAULT ID 10000
    BEGIN
    	BEGIN
    		NUMBER 516
    		CREATOR "date"
    	END
    	BEGIN
    		NUMBER 517
    		CREATOR "addr"
    	END
    	BEGIN
    		NUMBER 518
    		CREATOR "todo"
    	END
    	BEGIN
    		NUMBER 519
    		CREATOR "memo"
    	END
    	BEGIN
    		NUMBER 521
    		CREATOR "sync"
    	END
    	BEGIN
    		NUMBER 264
    		CREATOR "lnch"
    	END
    	BEGIN
    		NUMBER 267
    		CREATOR "calc"
    	END
    
    END
    SYSAPPLICATIONPREFERENCES (pref)

    Notes:

    • This resource is system reserved.
    Example:
    SYSAPPLICATIONPREFERENCES ID 1000 PRIORITY 30 STACKSIZE 0x1000 MINHEAPSPACE 0x1000
    

    International Support

      PilRC supports a limited form of international tokenization. It works by substituting strings in the resource definitions with replacements specified in a TRANSLATION section. Multiple translation blocks may be specified in a resource script. The active language is specified with the "-L" flag to PilRC.

      Positioning of controls is a large problem if absolute values are used. It is recommended you use AUTO, CENTER and PREVRIGHT et al when defining the contents of your forms.

    Example:
      pilrc -L FRENCH myscript.rcp res
    TRANSLATION

      TRANSLATION <Language.s>
      BEGIN
        <STRINGTRANSLATIONS>
      END
    Where <STRINGTRANSLATIONS> is one or more of:

      <Original.s> = <Translated.ss>
    Notes:

    • Declare a short keyword for long strings, and define native and foriegn translations for it.

    Example:

      TRANSLATION "FRENCH"
      BEGIN
        "Repeat Datebook alarm sound" = "Répétitions Alarme Agenda"
        "Ring again every" = "Rappel tous les"
      END
    Known Bugs

    • LIST
      • DISABLED does not work.
      • VISIBLEITEMS may be required for list objects to show properly.
    • FIELD
      • MAXCHARS required for field control to accept characters to work.
      • NUMERIC doesn't work in Palm Operating System prior to 3.0
    • FORM
      • Using NOSAVEBEHIND on Palm Operating System prior to 3.0 may cause errors.
    • FONT
      • Developed based on reverse-engineering.
        The complete operation of how Palm handles FONT manipulation is unknown.

    Further Reading

      For Palm Computing Platform reference information, be sure to also visit the following websites: