home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase Pro v7.0 / DATA1.CAB / Sample_dBASE / Fish.pop < prev    next >
Encoding:
Text File  |  1997-11-20  |  4.5 KB  |  193 lines

  1. ** END HEADER -- do not remove this line
  2. //
  3. // Generated on 10/03/97
  4. //
  5. parameter formObj, popupName
  6. new FishPOPUP(formObj, popupName)
  7.  
  8. class FishPOPUP(formObj, popupName) of POPUP(formObj, popupName)
  9.    with (this)
  10.       onInitMenu = class::ROOT_ONINITMENU
  11.       left = 0
  12.       top = 0
  13.       trackRight = true
  14.    endwith
  15.  
  16.  
  17.    this.POPADD = new MENU(this)
  18.    with (this.POPADD)
  19.       onClick = class::POPADD_ONCLICK
  20.       text = "Add a Fish"
  21.       shortCut = "Ctrl+A"
  22.    endwith
  23.  
  24.  
  25.    this.POPDELETE = new MENU(this)
  26.    with (this.POPDELETE)
  27.       onClick = class::POPDELETE_ONCLICK
  28.       text = "Delete the Current Fish..."
  29.    endwith
  30.  
  31.  
  32.    this.POPSAVE = new MENU(this)
  33.    with (this.POPSAVE)
  34.       onClick = class::POPSAVE_ONCLICK
  35.       text = "Save Changes"
  36.       shortCut = "Ctrl+S"
  37.    endwith
  38.  
  39.  
  40.    this.POPABANDON = new MENU(this)
  41.    with (this.POPABANDON)
  42.       onClick = class::POPABANDON_ONCLICK
  43.       text = "Abandon Changes"
  44.    endwith
  45.  
  46.  
  47.    this.POPSEP1 = new MENU(this)
  48.    with (this.POPSEP1)
  49.       text = ""
  50.       separator = true
  51.    endwith
  52.  
  53.  
  54.    this.POPPREV = new MENU(this)
  55.    with (this.POPPREV)
  56.       onClick = class::POPPREV_ONCLICK
  57.       text = "Previous Fish"
  58.       enabled = false
  59.       shortCut = "PgUp"
  60.    endwith
  61.  
  62.  
  63.    this.POPNEXT = new MENU(this)
  64.    with (this.POPNEXT)
  65.       onClick = class::POPNEXT_ONCLICK
  66.       text = "Next Fish"
  67.       shortCut = "PgDn"
  68.    endwith
  69.  
  70.  
  71.    this.POPFIRST = new MENU(this)
  72.    with (this.POPFIRST)
  73.       onClick = class::POPFIRST_ONCLICK
  74.       text = "First Fish"
  75.       enabled = false
  76.       shortCut = "Ctrl+F"
  77.    endwith
  78.  
  79.  
  80.    this.POPLAST = new MENU(this)
  81.    with (this.POPLAST)
  82.       onClick = class::POPLAST_ONCLICK
  83.       text = "Last Fish"
  84.       shortCut = "Ctrl+L"
  85.    endwith
  86.  
  87.  
  88.    this.POPSEP2 = new MENU(this)
  89.    with (this.POPSEP2)
  90.       text = ""
  91.       separator = true
  92.    endwith
  93.  
  94.  
  95.    this.POPCUT = new MENU(this)
  96.    with (this.POPCUT)
  97.       onClick = class::POPCUT_ONCLICK
  98.       text = "Cut"
  99.       shortCut = "Ctrl+X"
  100.    endwith
  101.  
  102.  
  103.    this.POPCOPY = new MENU(this)
  104.    with (this.POPCOPY)
  105.       onClick = class::POPCOPY_ONCLICK
  106.       text = "Copy"
  107.       shortCut = "Ctrl+C"
  108.    endwith
  109.  
  110.  
  111.    this.POPPASTE = new MENU(this)
  112.    with (this.POPPASTE)
  113.       onClick = class::POPPASTE_ONCLICK
  114.       text = "Paste"
  115.       shortCut = "Ctrl+V"
  116.    endwith
  117.  
  118.  
  119.    function POPADD_OnClick
  120.       local thisForm
  121.       thisform = this.parent.parent
  122.    return ( thisForm.rowAdd( thisForm ) )
  123.  
  124.    function POPDELETE_OnClick
  125.       local thisForm
  126.       thisform = this.parent.parent
  127.    return ( thisForm.rowDelete( thisForm ) )
  128.  
  129.    function POPSAVE_OnClick
  130.       local thisForm
  131.       thisform = this.parent.parent
  132.    return ( thisForm.rowSave( thisForm ) )
  133.  
  134.    // {Linked Method} form.root.onInitMenu
  135.    function ROOT_onInitMenu
  136.       local bClip
  137.       bClip = ( TYPE("this.parent.activeControl") == "O" )
  138.       if ( bClip )
  139.          with ( this )            
  140.             popCut.enabled   := TYPE("this.parent.activeControl.cut") == "FP"
  141.             popCopy.enabled  := TYPE("this.parent.activeControl.copy") == "FP"
  142.             popPaste.enabled := TYPE("this.parent.activeControl.paste") == "FP"
  143.          endwith
  144.       else
  145.          with ( this )
  146.             popCut.enabled   := false
  147.             popCopy.enabled  := false
  148.             popPaste.enabled := false
  149.          endwith
  150.       endif      
  151.    return ( bClip )
  152.  
  153.    function POPABANDON_OnClick
  154.       local thisForm
  155.       thisform = this.parent.parent
  156.    return ( thisForm.rowAbandon( thisForm ) )
  157.  
  158.    function POPFIRST_OnClick
  159.       local thisForm
  160.       thisform = this.parent.parent
  161.    return ( thisForm.goFirst( thisForm ) )
  162.  
  163.    function POPLAST_OnClick
  164.       local thisForm
  165.       thisForm = this.parent.parent
  166.    return ( thisForm.goLast( thisForm ) )
  167.  
  168.    function POPNEXT_onClick
  169.       local thisForm
  170.       thisform = this.parent.parent
  171.    return ( thisForm.goNext( thisForm ) )
  172.  
  173.    function POPPREV_onClick
  174.       local thisForm
  175.       thisform = this.parent.parent
  176.    return ( thisForm.goPrev( thisForm ) )      
  177.  
  178.    function POPCUT_onClick
  179.       local thisForm
  180.       thisForm = this.parent.parent
  181.    return ( thisForm.activeControl.cut() )
  182.  
  183.    function POPCOPY_onClick
  184.       local thisForm
  185.       thisForm = this.parent.parent
  186.    return ( thisForm.activeControl.copy() )
  187.  
  188.    function POPPASTE_onClick
  189.       local thisForm
  190.       thisForm = this.parent.parent
  191.    return ( thisForm.activeControl.paste() )
  192. endclass
  193.