home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / gkdemo.zip / GKFILES.SET / EMPLAPPL.GKR < prev    next >
Text File  |  1994-12-08  |  6KB  |  270 lines

  1. #
  2. # Employee Maintenance Example
  3. #
  4.  
  5. !include "gui-kit.gkr"
  6.  
  7. ObjectGroup "EmplGroup" {
  8.     # ----------------------------------------
  9.     # This font is used on the title
  10.     #
  11.     Object Font "Helv-Italic" {
  12.         Name         "Arial-Italic"
  13.         PointSize    200
  14.     }
  15.  
  16.     # ----------------------------------------
  17.     # Create bitmap/text button labels
  18.     #
  19.     Object GfxContainer "oklabel" {
  20.         Layout    LeftToRight|CenterVertical
  21.  
  22.         Object GfxImage "okcheck" {
  23.             ImageFile             "okcheck.xpm"
  24.             TransparentColor    "White"
  25.         }
  26.  
  27.         Object GfxText - { String "OK" }
  28.     }
  29.  
  30.     Object GfxContainer "cancellabel" {
  31.         Layout    LeftToRight|CenterVertical
  32.  
  33.         Object GfxImage "cancelx" {
  34.             ImageFile             "cancelx.xpm"
  35.             TransparentColor    "White"
  36.         }
  37.  
  38.         Object GfxText - { String "Cancel" }
  39.     }
  40.  
  41.     Object GfxContainer "helplabel" {
  42.         Layout    LeftToRight|CenterVertical
  43.  
  44.         Object GfxImage "help" {
  45.             ImageFile             "help.xpm"
  46.             TransparentColor    "White"
  47.         }
  48.  
  49.         Object GfxText - { String "Help" }
  50.     }
  51.  
  52.     Object GfxContainer "searchlabel" {
  53.         Layout    LeftToRight|CenterVertical
  54.  
  55.         Object GfxImage "search" {
  56.             ImageFile             "search.xpm"
  57.             TransparentColor    "Cyan"
  58.         }
  59.  
  60.         Object GfxText - { String "Search" }
  61.     }
  62.  
  63.     # ----------------------------------------
  64.     # This is the employee's picture to be displayed in the ViewPort
  65.     #
  66.     Object GfxImage "EmplPicture" {
  67.         ImageFile            "einstien.bmp"
  68.     }
  69.  
  70.     # ----------------------------------------
  71.     # This is the large window title
  72.     #
  73.     Object GfxText "Title" {
  74.         String "{Font:Helv-Italic}{Color:Red}Employee Information" 
  75.         Center True
  76.         Geometry "0,0, 19cm, 0"
  77.     }
  78.  
  79.     # ----------------------------------------
  80.     # EmplFrame is the main window frame
  81.     #
  82.     Object DialogFrame "EmplFrame" {
  83.         Frame.Title        "Employee Information"
  84.         Window.HelpFile    "emplappl.hlp"
  85.  
  86.         # ----------------------------------------
  87.         # Create a form to layout the controls
  88.         #
  89.         Object FormWithEtchedFrame - {
  90.             Form.AutoTopToBottom -
  91.  
  92.             Object Label "TitleLabel" { GfxObj "Title" }
  93.  
  94.             # ----------------------------------------
  95.             # Create a nested form for the data entry information
  96.             #
  97.             Object FormWithEtchedFrame "AddrForm" {
  98.                 Form.AutoLeftToRight -
  99.  
  100.                 Object Label "NameLabel" { 
  101.                     Text "Name:" 
  102.                     Window.Width 2.75cm
  103.                 }
  104.                 Object Edit "NameEdit" { }
  105.  
  106.                 Object Label "AddrLabel" {
  107.                     Window.LeftObj    NULL
  108.                     Window.UpperObj "NameEdit"
  109.                     Text "Address:"
  110.                     Window.Width 2.75cm
  111.                 }
  112.                 Object Edit "AddrEdit" {
  113.                     VisibleChars 20
  114.                     VisibleLines 3
  115.                     HorzScroll    True
  116.                     VertScroll    True
  117.                 }
  118.  
  119.                 Object Label "CityLabel" { 
  120.                     Window.LeftObj    NULL
  121.                     Window.UpperObj "AddrEdit"
  122.                     Text "City, ST, Zip:" 
  123.                     Window.Width 2.75cm
  124.                 }
  125.                 Object Edit "CityEdit" { VisibleChars 12 }
  126.                 Object Edit "StateEdit" { 
  127.                     VisibleChars 2 
  128.                     MaxEnterableChars 2 
  129.                     CnvUpperCase True
  130.                 }
  131.                 Object Edit "ZipEdit" { VisibleChars 10 }
  132.  
  133.                 Object Label "PhoneLabel" { 
  134.                     Window.LeftObj    NULL
  135.                     Window.UpperObj "CityEdit"
  136.                     Text "Phone:" 
  137.                     Window.Width 2.75cm
  138.                 }
  139.                 Object Edit "PhoneEdit" { VisibleChars 12 }
  140.  
  141.                 Object Label "SSNLabel" { 
  142.                     Window.LeftObj    NULL
  143.                     Window.UpperObj "PhoneEdit"
  144.                     Text "SSN:" 
  145.                     Window.Width 2.75cm
  146.                 }
  147.                 Object Edit "SSNEdit" { VisibleChars 11 }
  148.  
  149.                 Object Label "HireDateLabel" { 
  150.                     Window.LeftObj    NULL
  151.                     Window.UpperObj "SSNEdit"
  152.                     Text "Hire Date:" 
  153.                     Window.Width 2.75cm
  154.                 }
  155.                 Object Edit "HireDateEdit" { VisibleChars 8 }
  156.  
  157.                 Object Label "LastRevLabel" { 
  158.                     Text "Last Review Date:" 
  159.                 }
  160.                 Object Edit "LastRevEdit" { VisibleChars 8 }
  161.  
  162.                 Object Label "StatusLabel" { 
  163.                     Window.LeftObj    NULL
  164.                     Window.UpperObj "HireDateEdit"
  165.                     Text "Status:" 
  166.                     Window.Width 2.75cm
  167.                 }
  168.  
  169.                 Object RadioButton "Status-Active" {
  170.                     Button.Label "Active"
  171.                     Button.ExclGroup 1
  172.                 }
  173.                 Object RadioButton "Status-Term" {
  174.                     Button.Label "Terminated" 
  175.                     Button.ExclGroup 1
  176.                 }
  177.                 Object RadioButton "Status-Leave" {
  178.                     Button.Label "On Leave" 
  179.                     Button.ExclGroup 1
  180.                 }
  181.  
  182.                 Object Label "SexLabel" { 
  183.                     Window.LeftObj    NULL
  184.                     Window.UpperObj "StatusLabel"
  185.                     Text "Sex:" 
  186.                     Window.Width 2.75cm
  187.                 }
  188.  
  189.                 Object RadioButton "Sex-Male" {
  190.                     Button.Label "Male" 
  191.                     Button.ExclGroup 2
  192.                 }
  193.                 Object RadioButton "Sex-Female" {
  194.                     Button.Label "Female" 
  195.                     Button.ExclGroup 2
  196.                 }
  197.  
  198.                 Object Label "ExemptionsLabel" { 
  199.                     Window.LeftObj    NULL
  200.                     Window.UpperObj "SexLabel"
  201.                     Text "Exemptions:" 
  202.                     Window.Width 2.75cm
  203.                 }
  204.  
  205.                 Object CheckButton "Exemptions-FICA" {
  206.                     Button.Label "FICA" 
  207.                 }
  208.                 Object CheckButton "Exemptions-MediCare" {
  209.                     Button.Label "MediCare" 
  210.                 }
  211.                 Object CheckButton "Exemptions-FUTA" {
  212.                     Button.Label "FUTA" 
  213.                 }
  214.                 Object CheckButton "Exemptions-SUTA" {
  215.                     Button.Label "SUTA" 
  216.                 }
  217.  
  218.             } # End Addr Form
  219.  
  220.             # ----------------------------------------
  221.             # This is the ViewPort containing the employee's picture
  222.             #
  223.             Object ViewPort "EmplViewPort" {
  224.                 Window.Width    5cm
  225.                 Window.Height    5.5cm
  226.                 Window.LeftObj    "AddrForm"
  227.                 Window.UpperObj    "TitleLabel"
  228.  
  229.                 Object Window "EmplVPWindow" {
  230.                     BackgroundGfxObj    "EmplPicture"
  231.                     Window.Width        5cm
  232.                     Window.Height        5cm
  233.                 }
  234.             }
  235.  
  236.             # ----------------------------------------
  237.             # The OK, Cancel, Search, and Help buttons
  238.             #
  239.             Object PushButton "OkButton" {
  240.                 Button.LabelGfxObj    "oklabel"
  241.                 Button.Default        True
  242.                 Button.NotifyProc    "OKButtonNotify"
  243.                 Window.Width         3cm
  244.             }
  245.  
  246.             Object PushButton - {
  247.                 Button.LabelGfxObj    "cancellabel"
  248.                 Button.KeyAccelerator    "Key(Escape)"
  249.                 Button.NotifyProc    "CancelButtonNotify"
  250.                 Window.Width         3cm
  251.             }
  252.  
  253.             Object PushButton - {
  254.                 Button.LabelGfxObj    "searchlabel"
  255.                 Button.NotifyProc    "SearchButtonNotify"
  256.                 Window.UpperObj        "EmplViewPort"
  257.                 Window.LeftObj        "OkButton"
  258.                 Window.Width         3cm
  259.             }
  260.  
  261.             Object PushButton - {
  262.                 Button.LabelGfxObj    "helplabel"
  263.                 Button.NotifyProc    "HelpButtonNotify"
  264.                 Window.Width         3cm
  265.             }
  266.  
  267.         } # End Top Form
  268.     } # End Frame
  269. }
  270.