// Resource file for screen-calc *

//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 2 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 

//                          ----=====88888=====----

APPLICATION ID 1 "ScCl"

ICON "../calc.bmp"
BITMAP ID logo "../calc.bmp"

//                          ----=====88888=====----

STRING helpText   FILE "../help.txt"
STRING gnuLicence FILE "../licence.txt"

ALERT ID copyrightNotice
  HELPID gnuLicence
  DEFAULTBUTTON 1
  INFORMATION
BEGIN
	TITLE   "Copyleft notice"
	MESSAGE "This program is licenced under the terms of the GNU General Public Licence\n\n(Use the help button for details)"
	BUTTONS "OK" "Cancel"
END

ALERT ID mathLibNotice
  ERROR
BEGIN
	TITLE "Missing library"
	MESSAGE "This application requires the MathLib shared library to be installed (available from http://www.probe.net/~rhuebner/mathlib.html)"
	BUTTONS "Darn it!"
END

ALERT ID mathLibError
  ERROR
BEGIN
	TITLE "MathLib error"
	MESSAGE "Unable to start MathLib"
	BUTTONS "Cancel"
END

ALERT ID debugNotice
  INFORMATION
BEGIN
	TITLE "Debug alert"
	MESSAGE "Bing!"
	BUTTONS "OK"
END

ALERT ID prefNotice
  WARNING
BEGIN
	TITLE "Preferences"
	MESSAGE "The saved preferences are not current (resetting)"
	BUTTONS "OK"
END

//                          ----=====88888=====----

// The main calculator window

FORM ID screenCalcMain AT (0 0 160 160)
NOFRAME
NOSAVEBEHIND
MENUID screenCalcMainMenu
BEGIN
  TITLE "Calculator"
  BUTTON "Done" ID scmDone      AT (4 147 AUTO AUTO)
  FIELD         ID inputField   AT (PREVRIGHT+5 147 110 AUTO) USABLE EDITABLE UNDERLINED MULTIPLELINES MAXCHARS 255
  GRAFFITISTATEINDICATOR AT (150 150)

  FIELD         ID displayField AT (0 18 153 124)        NONEDITABLE MULTIPLELINES DYNAMICSIZE MAXCHARS 64 HASSCROLLBAR
  SCROLLBAR     ID displayScroll AT (PREVRIGHT 18 7 124) VALUE 0 MIN 0 MAX 0 PAGESIZE 11
END

// The main calculator menu

MENU ID screenCalcMainMenu
BEGIN
	PULLDOWN "Options"
	BEGIN
		MENUITEM "Display..." ID displayOption
	END
	PULLDOWN "Info"
	BEGIN
		MENUITEM "About..." ID aboutOption
		MENUITEM "Licence..." ID licenceOption
		MENUITEM "Help..."  ID helpOption
	END
END

//                          ----=====88888=====----

// The about form
FORM ID aboutCalc AT (20 20 120 77)
MODAL
FRAME
BEGIN
	TITLE "About calculator"
	FORMBITMAP AT (1 18) BITMAP logo
	LABEL "Screen Calculator" AUTOID AT (35 17)
	LABEL "\xa9 Andrew Hunter" AUTOID AT (35 27)
	LABEL "Version 0.1.0 (devel)" AUTOID AT (CENTER 43) FONT 2
	BUTTON "OK" ID aboutOK AT (CENTER 60 AUTO AUTO)
END
