/* $Id: schizophrenic.rcp,v 1.3 2002/12/08 17:42:59 mankoff Exp $ */

/*
 * UI Elements:
 * o CONFIG FORM: The primary UI element is the Config Form. See
 *   comments at the top of code07d0.c for more information.
 * o ABOUT FORM: A little info screen, thats all.
 * o SAVE ALERT 0: Save pressed when no app selected
 * o SAVE ALERT 1: Save pressed when no personality details entered
 *   (will use 0 and null for personality). Maybe no alert here?
 * o DEL ALERT 0: Are you sure you want to delete this personality?
 * o DEL ALERT 1: Select app is not a personality, or no app selected.
 *
 * o RESET ALERT: There was a reset while a personality was
 *     installed. Ask the user to help us help them fix it
 * o SYSDEFAULT FORM: A simple form (ala ChangeName) to set the default.
 *     Or, maybe, RESET ALERT just tells them to install ChangeName
 *     and make sure not to give it a personality when they use it.
 */

/*
 * NUMBERING SCHEME:
 *
 * The HackMaster API states that the ABOUT form must be at 3000 and
 * the CONFIG form at 2000.  PalmOS specifies some other things in the
 * 1000 range (VERSION, TRAP, etc).
 *
 * We will try to keep everything close to 2000. This involves both
 * the hardcoded values you see in this file, and the #define
 * statements that are in 'resource.h'. Any form element that
 * interacts with the code is done with a #define and a
 * variable. Statice form elements that don't get touched by code are
 * hard-coded here.
 *
 * The ABOUT form:
 *   VARS: none
 *   HARD: 3000+
 *
 * The CONFIG form:
 *   VARS: 2000+
 *   HARD: 2100+
 *
 * The DELETE ALERT form:
 *   VARS: 2200+
 *   HARD: 2210+
 *
 */

#include "resource.h"

/* the version of the program
 * KEEP UP-TO-DATE with Makefile!
 * KEEP UP-TO-DATE with About form below */
VERSION ID 1000 "0.2.beta"
/* The name of this application */
APPLICATIONICONNAME ID 3000 "Schizophrenic"
/* The procedure address (trap address) to hack */
TRAP ID 1000 VALUE 0xA08E /* this is SysAppLaunch */


/* Config Form */
FORM 2000 AT (2 2 156 156)
	MODAL 
	USABLE
	SAVEBEHIND
	HELPID 2000
	DEFAULTBTNID btnDone
BEGIN
	TITLE "Schizophrenic"

    /* This is the POPUP list of applications/personalities */
    POPUPTRIGGER " " ID configPopup AT (3 15 AUTO AUTO) LEFTANCHOR
    LIST "Select Application" ID configAppList 
    AT (PREVRIGHT PREVTOP 90 AUTO) VISIBLEITEMS 10 NONUSABLE
    POPUPLIST ID configPopup configAppList

    /*
	LABEL "App Name:" ID 2101 AT (3 40) FONT 1
	FIELD ID configFieldApp AT (PREVRIGHT+3 PREVTOP 145-PREVRIGHT AUTO)
		MAXCHARS 40 USABLE EDITABLE UNDERLINED SINGLELINE AUTOSHIFT
    */
	LABEL "UserName:" ID 2100 AT (3 40) FONT 1
	FIELD ID configFieldName AT (PREVRIGHT+3 PREVTOP 145-PREVRIGHT AUTO) 
		MAXCHARS 40 USABLE EDITABLE UNDERLINED SINGLELINE
	LABEL "User ID:" ID 2101 AT (RIGHT@PREVLEFT-3 PREVBOTTOM) FONT 1
	FIELD ID configFieldUser AT (PREVRIGHT+3 PREVTOP 145-PREVRIGHT AUTO) 
		MAXCHARS 5 USABLE EDITABLE UNDERLINED SINGLELINE NUMERIC
	LABEL "OS ver*:" ID 2102 AT (RIGHT@PREVLEFT-3 PREVBOTTOM) FONT 1
	FIELD ID configFieldOS AT (PREVRIGHT+3 PREVTOP 145-PREVRIGHT AUTO) 
		MAXCHARS 40 USABLE EDITABLE UNDERLINED SINGLELINE
	LABEL "ROM ID*:" ID 2103 AT (RIGHT@PREVLEFT-3 PREVBOTTOM) FONT 1
	FIELD ID configFieldROM AT (PREVRIGHT+3 PREVTOP 145-PREVRIGHT AUTO) 
		MAXCHARS 40 USABLE EDITABLE UNDERLINED SINGLELINE

    LABEL "* Not yet implemented" ID 2104 AT (3 PREVBOTTOM+5)

	BUTTON "Done" ID btnDone AT (5 139 AUTO 12)
	BUTTON "Save" ID btnSave AT (PREVRIGHT+6 PREVTOP AUTO 12)
	BUTTON "Del"  ID btnDel  AT (PREVRIGHT+6 PREVTOP AUTO 12)

    GRAFFITISTATEINDICATOR AT (143 140)
END
/* the help string, when the user taps the "(i)" */
STRING ID configHelp "\225 Fill me in!\n\n" \
  "\225 (Provide help.)\n\n"



/* ABOUT form */
FORM ID 3000 AT (2 2 156 156)
	USABLE 
	MODAL 
	SAVEBEHIND
	HELPID 3000	
	DEFAULTBTNID 3006
BEGIN
    TITLE "Schizophrenic"
	LABEL "Schizophrenic" 3001 AT (CENTER 25) FONT 2
	LABEL "version 0.2.beta" 3002 AT (CENTER PREVBOTTOM)
	LABEL "http://schizophrenic.sf.net" 3003 AT (CENTER PREVBOTTOM+15)
	LABEL "Give your Palm"  3004 AT (CENTER PREVBOTTOM+15)
	LABEL "Multiple Personality Disorder" 3005 AT (CENTER PREVBOTTOM)
	BUTTON "OK" 3006 AT (5 139 30 12)
END
/* help that the user gets when they tap the "(i)" in the about form */
STRING ID 3000	"Schizophrenic allows your Palm to have " \
	   "Multiple Personality Disorder.\n\n" \
	   "You need to configure Schizophrenic by telling it what " \
	   "personality to use for each program.\n\n" \
	   "Read the help in the configuration form for more information."
/* Anything else relevant? License? Warning? */


/* ALERT Form */
ALERT ID alertDelete
  /* HELPID 2200 */
  DEFAULTBUTTON 1
  CONFIRMATION
BEGIN
  TITLE "Delete Personality?"
  MESSAGE "Are you sure you want to delete this personality?"
  BUTTONS "OK" "Cancel"
END
