#include "gui.h"

VERSION 1 "0.1"
ICON "icon.bmp"

FORM ID formID_main AT ( 0 0 160 160 )
USABLE
NOFRAME
MENUID menuID_main
BEGIN
  TITLE "PCompress         "

  BUTTON "\n" ID buttonID_help AT (64 2 10 10) FRAME FONT 3 NONUSABLE

  POPUPTRIGGER "" ID triggerID_view AT (80 0 80 AUTO) LEFTANCHOR
  LIST "All" "Compressed" "Uncompressed" ID listID_view AT (PREVLEFT PREVTOP PREVWIDTH AUTO) NONUSABLE VISIBLEITEMS 3
  POPUPLIST triggerID_view listID_view

  TABLE ID tableID_main AT (0 27 160 110) ROWS 10 COLUMNS 3 COLUMNWIDTHS 18 110 32
  LABEL "Bak" ID labelID_bak AT (0 15) FONT 0
  LABEL "Database" ID labelID_DBase AT (20 15) FONT 0
  LABEL "Size" ID labelID_size AT (144 15) FONT 0

  LABEL "Please Wait..." ID labelID_wait AT (CENTER CENTER) FONT 0

  CHECKBOX "Show apps only" ID boxID_apps AT (5 147 AUTO AUTO)

  BUTTON "Reload" ID buttonID_reload AT (100 147 AUTO AUTO) FRAME FONT 0 USABLE

  REPEATBUTTON "\1" ID buttonID_up AT (147 144 13 8) NOFRAME FONT 5 NONUSABLE
  REPEATBUTTON "\2" ID buttonID_down AT (PREVLEFT PREVTOP+8 PREVWIDTH PREVHEIGHT) NOFRAME FONT 5 NONUSABLE
END

MENU ID menuID_main
BEGIN
  PULLDOWN "File"
  BEGIN
    MENUITEM "Automated Test"	menuitemID_test		"T"
    MENUITEM SEPARATOR
    MENUITEM "About"		menuitemID_about
  END
END

FORM ID formID_dbView AT ( 0 0 160 160 )
NOFRAME
USABLE
BEGIN
  TITLE "Database View         "

  BUTTON "\n" ID buttonID_help AT (85 2 10 10) FRAME FONT 3 NONUSABLE

  LABEL "Compress Level" ID labelID_level AT (CENTER 70) FONT 1
  PUSHBUTTON "0" ID level_0 AT (15 PREVBOTTOM+1 12 AUTO) GROUP groupID_level
  PUSHBUTTON "1" ID level_1 AT (PREVRIGHT+1 PREVTOP 12 AUTO) GROUP groupID_level
  PUSHBUTTON "2" ID level_2 AT (PREVRIGHT+1 PREVTOP 12 AUTO) GROUP groupID_level
  PUSHBUTTON "3" ID level_3 AT (PREVRIGHT+1 PREVTOP 12 AUTO) GROUP groupID_level
  PUSHBUTTON "4" ID level_4 AT (PREVRIGHT+1 PREVTOP 12 AUTO) GROUP groupID_level
  PUSHBUTTON "5" ID level_5 AT (PREVRIGHT+1 PREVTOP 12 AUTO) GROUP groupID_level
  PUSHBUTTON "6" ID level_6 AT (PREVRIGHT+1 PREVTOP 12 AUTO) GROUP groupID_level
  PUSHBUTTON "7" ID level_7 AT (PREVRIGHT+1 PREVTOP 12 AUTO) GROUP groupID_level
  PUSHBUTTON "8" ID level_8 AT (PREVRIGHT+1 PREVTOP 12 AUTO) GROUP groupID_level
  PUSHBUTTON "9" ID level_9 AT (PREVRIGHT+1 PREVTOP 12 AUTO) GROUP groupID_level
  LABEL "Faster" ID labelID_faster AT (15 PREVBOTTOM+1) FONT 0
  LABEL "Better" ID labelID_better AT (118 PREVTOP) FONT 0

  CHECKBOX "Delete after compress" ID boxID_delete AT (20 PREVBOTTOM+5 AUTO AUTO)
  CHECKBOX "Compress all data also" ID boxID_data AT (PREVLEFT PREVBOTTOM+1 AUTO AUTO)

  BUTTON "Done" ID buttonID_done AT (5 144 AUTO AUTO) FRAME FONT 0 USABLE
  BUTTON "Compress" ID buttonID_compress AT (PREVRIGHT+10 PREVTOP AUTO AUTO) FRAME FONT 0 USABLE
  BUTTON "Delete" ID buttonID_delete AT (PREVRIGHT+10 PREVTOP AUTO AUTO) FRAME FONT 0 USABLE
END

FORM ID formID_dbComp AT ( 5 30 150 100 )
FRAME
USABLE
MODAL
BEGIN
  BUTTON "Cancel" ID buttonID_cancel AT (CENTER 84 AUTO AUTO) FRAME FONT 0 USABLE
  BUTTON "Done" ID buttonID_done AT (CENTER PREVTOP AUTO AUTO) FRAME FONT 0 USABLE
END

FORM ID formID_test AT ( 0 0 160 160 )
NOFRAME
USABLE
BEGIN
  TITLE "Testing"
  CHECKBOX "Run Forever" ID boxID_forever AT (88 1 AUTO AUTO)
  BUTTON "Cancel" ID buttonID_cancel AT (120 147 AUTO AUTO) FRAME FONT 0 USABLE
END

ALERT ID alertID_about
INFORMATION
BEGIN
  TITLE "About PCompress"
  MESSAGE "PCompress v0.1 Copyright \251 1999 Britt Yenne\n"
  BUTTONS "Done" "License"
END

ALERT ID alertID_systemDB
CONFIRMATION
BEGIN
  TITLE "System Database"
  MESSAGE "This database is for system use and may cause your PalmPilot " \
    "or its built-in applications to fail if modified.  Are you sure " \
    "you want to ^1 it?"
  BUTTONS "Cancel" "Yes"
END

ALERT ID alertID_database
CONFIRMATION
BEGIN
  TITLE "Confirm"
  MESSAGE "Modifying a database may cause the application that uses it "\
    "to fail.  Are you sure you want to ^1 this database?"
  BUTTONS "Cancel" "Yes"
END

ALERT ID alertID_rcFail
ERROR
BEGIN
  TITLE "Failed"
  MESSAGE "The operation failed because ^1.^2"
  BUTTONS "Ok"
END

ALERT ID alertID_cantDelete
WARNING
BEGIN
  TITLE "Delete Failed"
  MESSAGE "Cannot delete '^1' due to a system error."
  BUTTONS "Ok"
END

ALERT ID alertID_noMem
ERROR
BEGIN
  TITLE "Out of Memory"
  MESSAGE "PCompress has run out of process memory and cannot function properly.  Please exit."
  BUTTONS "Ok"
END

ALERT ID alertID_backupErr
ERROR
BEGIN
  TITLE "Failed"
  MESSAGE "Cannot change this backup bit for some reason."
  BUTTONS "Ok"
END

ALERT ID alertID_compExists
WARNING
HELPID helpStr_compExists
BEGIN
  TITLE "Database Exists"
  MESSAGE "A compressed version of '^1' already exists."
  BUTTONS "Skip" "Delete" "Ignore"
END

ALERT ID alertID_uncompExists
WARNING
HELPID helpStr_uncompExists
BEGIN
  TITLE "Database Exists"
  MESSAGE "A database named '^1' already exists."
  BUTTONS "Skip" "Delete"
END

ALERT ID alertID_confirm
CONFIRMATION
BEGIN
  TITLE "Confirm"
  MESSAGE "Are you sure you want to ^1?"
  BUTTONS "Cancel" "Yes"
END

ALERT ID alertID_cantCompress
INFORMATION
BEGIN
  TITLE "Not Compressible"
  MESSAGE "PCompress was not able to compress '^1' any further.  It is " \
    "already the optimal size."
  BUTTONS "OK"
END

STRING helpStr_license "" \
  "\tThis 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.\n" \
  "\tThis 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.\n" \
  "\tYou 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.\n" \
  "\tFor source code or links to the full license text, visit " \
  "http://www.jump.net/~syenne/pilot"

STRING helpStr_compExists "" \
  "This database has been compressed before, and that compressed " \
  "database still exists.  You may Delete the existing compressed " \
  "database, Ignore it and create a second compressed version, or " \
  "Skip this database entirely."

STRING helpStr_uncompExists "" \
  "A database with this name already exists.  You may Delete the " \
  "existing database or Skip this database entirely."

STRING helpStr_main "" \
  "\tThis screen shows the databases in your Palm Pilot along with " \
  "their sizes and the state of their backup bits.  Normal databases " \
  "are shown in the standard font, and compressed databases are shown in " \
  "the bold font.  You may use the category selector to limit the view " \
  "to only compressed or uncompressed databases, and you can click the " \
  "'apps only' checkbox at the bottom of the screen to limit the view " \
  "to applications.  Tap the 'Reload' button to refresh the view.\n" \
  "\tTap on a database name to view detailed information and to see " \
  "the available compression options.\n" \
  "\tTap on a backup bit checkbox to change the backup bit for that " \
  "database (be careful). "

STRING helpStr_dbView "" \
  "\tThis screen shows detailed information about a database, including " \
  "its type, creator, and size.  If the database is compressed, then both " \
  "the compressed and uncompressed sizes are shown.  If the database is " \
  "an application, then the total size of its databases (if any) is also " \
  "shown.\n" \
  "\tTo compress a database, select the desired compression level and tap " \
  "the 'compress' button.  Higher compression levels produce better results " \
  "but require more time.\n" \
  "\tTo uncompress a database, tap the 'uncompress' button.\n" \
  "\tSelect 'delete after (un)compress' to automatically delete the " \
  "original database(s) if the (un)compress is successful.\n" \
  "\tSelect '(un)compress all data' to also (un)compress all databases " \
  "owned by the application."

