home *** CD-ROM | disk | FTP | other *** search
/ ftp.alaska-software.com / 2014.06.ftp.alaska-software.com.tar / ftp.alaska-software.com / acsn / BusiCalc_v1-40.Zip / BusCalcCls.prg next >
Text File  |  2002-10-06  |  44KB  |  1,025 lines

  1. *****************************************************************************
  2. *
  3. *  Module:     BusCalcCls.prg
  4. *  Category:   Calculator Class
  5. *  Used By:    BusiCalc.prg
  6. *
  7. *  Author:     Greg Doran, Dublin Ireland  e-mail: GDO@eircom.net
  8. *  Version:    1.40
  9. *  Date:       6th.Oct.2002
  10. *  Language:   Xbase++
  11. *  Compile:    Standard.
  12. *  Link:       Standard.
  13. *
  14. *****************************************************************************
  15. *
  16. *  Revision History:
  17. *  =================
  18. *  Rev 1.10 12th.Jul.2001
  19. *           Initial release.
  20. *
  21. *  Rev 1.30 30.Sep.2002
  22. *           Changed Rev. for Release to Public Domain and added copyright.
  23. *
  24. *  Rev 1.40 6.Oct.2002
  25. *           Changed position, height and width of oDlg:mask
  26. *
  27. *****************************************************************************
  28. *  Copyright (c) Greg J Doran. 2001-2002   GDO@eircom.net
  29. *
  30. *  This code is released under the GNU General Public Licence
  31. *  and is governed by the conditions and protocols setout therein.
  32. *
  33. *  The code is provided "as is", without warranty of any kind,
  34. *  either expressed, or implied, including, but not limited to,
  35. *  the implied warranties of merchantability and fitness for a
  36. *  particular purpose. The entire risk as to the quality of this
  37. *  software, its use or misuse, modified or otherwise, lies with
  38. *  you, the recipient.
  39. *
  40. *****************************************************************************
  41.  
  42. #include "Gra.ch"
  43. #include "Xbp.ch"
  44. #include "Common.ch"
  45. #include "Appevent.ch"
  46. #include "Busicalc.ch"
  47.  
  48. #ifndef _BUSCALC_
  49. #define _BUSCALC_
  50.  
  51. Class _BUSCALC From Xbpdialog
  52.  
  53. EXPORTED:
  54.    VAR aCalcSize             // The Calculator dimensions
  55.    VAR aDataStore            // Array of variables for Push-Pop on decimal precision change
  56.    VAR aHelp                 // Help Headers, Text, Bmps
  57.    VAR aPos                  // Position of Window
  58.    VAR aPreBracket           // Stores bracketed operation information
  59.    VAR aSize                 // Window Size
  60.    VAR cClipText             // Clip board text.
  61.    VAR cDisplay              // Main display character value
  62.    VAR cGenText              // General text - Help, About, Message
  63.    VAR cTopText              // Top Line(s)  - Help, About, Message
  64.    VAR cXRate                // The current Exchange Rate Mode P-E, D-E, D-P
  65.    VAR lBS_Enabled           // BackSpace enabled / disabled flag
  66.    VAR lGettingDecsInput     // Flag for processing the Enter Key during decimal precision change
  67.    VAR lHaveDecimal          // Decimal point flag
  68.    VAR lKeysEnabled          // Flag to indicate if the number keys are enabled or disabled
  69.    VAR lKillKeys             // Flag to disable the processing of keystrokes under certain conditions
  70.    VAR lLBracketOpen         // Flag that indicates that the left bracket is open/closed
  71.    VAR lLastOpWasImmediate   // Flag to indicate that the last operation was immediate ( x^2, 1/x etc)
  72.    VAR lNewCalculation       // Indicates when a new Operation is required
  73.    VAR lNewInput             // Flag that indicates that the input is new or in progress
  74.    VAR lOperator             // Test for keystrike preceding bracketed operation
  75.    VAR lPercent              // Records whether the current display is a percent or not.
  76.    VAR lRBracketClosed       // Flag that indicates that the right bracket is open/closed
  77.    VAR nAccumStore           // A temporary store for the value in the accumulator
  78.    VAR nAccumulator          // Holds the result of calculations
  79.    VAR nAction               // The number of the action being performed
  80.    VAR nBMP                  // The Bitmap associated the the action being performed
  81.    VAR nConvertRate          // The currently active Exchange Rate
  82.    VAR nDE                   // The current exchange rate Dollars to Euro
  83.    VAR nDP                   // The current exchange rate Dollars to Pounds British
  84.    VAR nDecs                 // Holds the number of decimals displayed (Rounded)
  85.    VAR nDisplay              // Holds the Input/Value being processed
  86.    VAR nImmediateValue       // The value returned by an immediated operation ( x^2, 1/x etc)
  87.    VAR nIntermediate         // Store for display purposes, the intermediate value
  88.    VAR nLastKey              // Stores the current key value to be checked on next keystrike
  89.    VAR nMemVal               // Holds the current value in 'Memory'
  90.    VAR nOpCount              // Operator counter.
  91.    VAR nOperation            // Stores the currently active Operator/ion number
  92.    VAR nPE                   // The current exchange rate Pounds British to Euro
  93.    VAR nPage                 // Help page
  94.    VAR nStoredOpNbr          // Stores the operation number preceding a bracketed operation
  95.    VAR nStoredValue          // Stores the accumulator value preceding a bracketed operation
  96.    VAR nSymbol               // The Bitmap number for the Symbol in front of the main display
  97.    VAR nValueStore           // A store for the accumulator, recovery on divide by zero attempt
  98.    VAR oBmpBar               // Static in Help/About/Error/Rates
  99.    VAR oBrackets             // Displays Active brackets
  100.    VAR oClipBoard            // The ClipBoard Object
  101.    VAR oDecSet2              // Display for current number of decimal places displayed.
  102.    VAR oDisplay              // The main display.
  103.    VAR oGenText              // Static in Help/About/Error/Rates
  104.    VAR oKeyTrap              // Traps all keystrokes
  105.    VAR oMask                 // Prevents Mouse-Down on oDa activation (Move)
  106.    VAR oMemStore             // The memory display VAR
  107.    VAR oOpenUp               // The 'Maximize' (Openup) VAR on the minimised window
  108.    VAR oOperText             // The Operator bitmap between the Input and Intermediate displays
  109.    VAR oPBCA                 // Button 'Clear Acummulator'
  110.    VAR oPBCE                 // Button 'Clear Entry'
  111.    VAR oPBClose              // Button 'Close app'
  112.    VAR oPBDtoE               // Button 'Dollars to Euros' ($|E)
  113.    VAR oPBDtoP               // Button 'Dollars to Pounds' ($|ú)
  114.    VAR oPBExit               // Close button on minimised decal
  115.    VAR oPBFactoral           // Button 'n!'
  116.    VAR oPBForeignTo          // Button [Depends on currency] E|ú or ú|$ or E|$
  117.    VAR oPBHelp               // Button 'Help'
  118.    VAR oPBInfo               // Button 'Information about'
  119.    VAR oPBLbracket           // Button '('
  120.    VAR oPBLocalTo            // Button [Depends on currency] ú|E or $|ú or $|E
  121.    VAR oPBMC                 // Button 'Memory Clear'
  122.    VAR oPBPi                 // Button 'Pi' (3.14159....)
  123.    VAR oPBPlus               // Button '+'
  124.    VAR oPBPtoE               // Button 'Pounds to Euro' (ú|E)
  125.    VAR oPBRbracket           // Button ')'
  126.    VAR oPBRecall             // Button 'Memory Recall'
  127.    VAR oPB_0                 // Button as indicated.
  128.    VAR oPB_1                 // Button as indicated.
  129.    VAR oPB_2                 // Button as indicated.
  130.    VAR oPB_3                 // Button as indicated.
  131.    VAR oPB_4                 // Button as indicated.
  132.    VAR oPB_5                 // Button as indicated.
  133.    VAR oPB_6                 // Button as indicated.
  134.    VAR oPB_7                 // Button as indicated.
  135.    VAR oPB_8                 // Button as indicated.
  136.    VAR oPB_9                 // Button as indicated.
  137.    VAR oPBbspace             // Button as indicated.
  138.    VAR oPBcopy               // Button as indicated.
  139.    VAR oPBdivide             // Button as indicated.
  140.    VAR oPBequals             // Button as indicated.
  141.    VAR oPBmemadd             // Button as indicated.
  142.    VAR oPBmemsub             // Button as indicated.
  143.    VAR oPBminus              // Button as indicated.
  144.    VAR oPBmultiply           // Button as indicated.
  145.    VAR oPBnegate             // Button as indicated.
  146.    VAR oPBnthPwr             // Button as indicated.
  147.    VAR oPBnthRoot            // Button as indicated.
  148.    VAR oPBpaste              // Button as indicated.
  149.    VAR oPBpercent            // Button as indicated.
  150.    VAR oPBpoint              // Button as indicated.
  151.    VAR oPBrecip              // Button as indicated.
  152.    VAR oPBsetDec             // Button as indicated.
  153.    VAR oPBsetRate            // Button as indicated.
  154.    VAR oPBspace              // Button as indicated ([-] Min. [i][-][x] Translated as SpaceBar key).
  155.    VAR oPBsqroot             // Button as indicated.
  156.    VAR oPBsquare             // Button as indicated.
  157.    VAR oSetDecMsg            // Set number of Decimals message
  158.    VAR oSymbol               // Symbol in front of Main Display
  159.    VAR oTopLine              // Static in Help/About/Error/Rates
  160.    VAR oValAccum             // The Accumulator value display  (Trail)
  161.    VAR oValInput             // The Input value display        (Trail)
  162.    VAR oValInter             // The Intemediate value display  (Trail)
  163.    VAR oXchgRate             // VAR to display the current exchange rate
  164.  
  165.  
  166.    METHOD init
  167.    METHOD create
  168.    METHOD destroy
  169.  
  170. ENDCLASS
  171. *                     END CLASS _BUSCALC
  172. ******************************************************************************
  173.  
  174. ******************************************************************************
  175. *                  METHOD _BUSCALC:init()
  176. ******************************************************************************
  177. *
  178. METHOD _BUSCALC:init(oParent, oOwner, aPos, aSize, aPP, lVisible)
  179.  
  180. LOCAL nPx               := -2
  181. LOCAL nPy               := +9
  182. DEFAULT oOwner TO SetAppWindow()
  183.    ***** VARs
  184.    ::aCalcSize             := {}
  185.    ::aDataStore            := {}
  186.    ::aHelp                 := {}
  187.    ::aPos                  := aPos
  188.    ::aPreBracket           := {}
  189.    ::aSize                 := aSize
  190.    ::cClipText             := ""
  191.    ::cDisplay              := ""
  192.    ::cGenText              := ""
  193.    ::cTopText              := ""
  194.    ::cXRate                := ""
  195.    ::lBS_Enabled           := .F.
  196.    ::lGettingDecsInput     := .F.
  197.    ::lHaveDecimal          := .F.
  198.    ::lKeysEnabled          := .F.
  199.    ::lKillKeys             := .F.
  200.    ::lLBracketOpen         := .F.
  201.    ::lLastOpWasImmediate   := .F.
  202.    ::lNewCalculation       := .F.
  203.    ::lNewInput             := .F.
  204.    ::lOperator             := .F.
  205.    ::lPercent              := .F.
  206.    ::lRBracketClosed       := .F.
  207.    ::nAccumStore           := 0
  208.    ::nAccumulator          := 0
  209.    ::nAction               := 0
  210.    ::nBMP                  := 0
  211.    ::nConvertRate          := 0
  212.    ::nDE                   := 0
  213.    ::nDP                   := 0
  214.    ::nDecs                 := 0
  215.    ::nDisplay              := 0
  216.    ::nImmediateValue       := 0
  217.    ::nIntermediate         := 0
  218.    ::nLastKey              := 0
  219.    ::nMemVal               := 0
  220.    ::nOpCount              := 0
  221.    ::nOperation            := 0
  222.    ::nPE                   := 0
  223.    ::nPage                 := 1
  224.    ::nStoredOpNbr          := 0
  225.    ::nStoredValue          := 0
  226.    ::nSymbol               := 0
  227.    ::nValueStore           := 0
  228.    ***** END VARS
  229.  
  230.  
  231.    ***** DIALOG
  232.    ::XbpDialog:init( oParent,oOwner,aPos,aSize,aPP,lVisible)
  233.  
  234.    ****** MASK TO PREVENT MOUSE DOWN ON oDA ACTIVATION (MOVE)
  235.    *
  236.    ::oMask:= XbpStatic():new( ::drawingArea, ,{0,0}, {315,304}, { ;
  237.                               { XBP_PP_BGCLR, XBPSYSCLR_TRANSPARENT }, ;
  238.                               { XBP_PP_FGCLR, XBPSYSCLR_TRANSPARENT }, ;
  239.                               { XBP_PP_COMPOUNDNAME, "8.Arial" } } )
  240.    ::oMask:caption      := ""
  241.    ::oMask:clipSiblings:= .F.
  242.    *** Create()
  243.  
  244.    ****** KEYBOARD KEYSTROKE TRAP
  245.    *
  246.    ::oKeyTrap:= XbpStatic():new( ::drawingArea, ,{nPx+ 18,34+nPy}, {286,48}, { ;
  247.                               { XBP_PP_BGCLR, GRA_CLR_DARKBLUE }, ;
  248.                               { XBP_PP_FGCLR, GRA_CLR_PALEGRAY }, ;
  249.                               { XBP_PP_COMPOUNDNAME, "8.Arial" } } )
  250.    ::oKeyTrap:caption      := ""
  251.    ::oKeyTrap:clipSiblings:= .T.
  252.    ::oKeyTrap:options      :=  XBPSTATIC_TEXT_VCENTER
  253.    *** Create()
  254.  
  255.    ***** TRAIL
  256.    ::oValInput:= XbpStatic():new( ::drawingArea, ,{nPx+ 22,281+nPy}, { 76, 12}, { ;
  257.                               { XBP_PP_BGCLR, GRA_CLR_PALEGRAY }, ;
  258.                               { XBP_PP_FGCLR, GRA_CLR_BLACK    } } )
  259.    ::oValInput:caption     := "ValInput"
  260.    ::oValInput:clipSiblings:= .T.
  261.    ::oValInput:options     := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT
  262.    *** Create()
  263.  
  264.    ::oOperText:= XbpStatic():new( ::drawingArea, ,{nPx+102,279+nPy}, {22,16})
  265.    ::oOperText:caption     := BM_NIL_BLANK  //
  266.    ::oOperText:type        := XBPSTATIC_TYPE_BITMAP
  267.    ::oOperText:clipSiblings:= .T.
  268.    ::oOperText:options     := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_CENTER
  269.    *** Create()
  270.  
  271.    ::oValInter:= XbpStatic():new( ::drawingArea, ,{nPx+128,281+nPy}, { 76, 12}, { ;
  272.                               { XBP_PP_BGCLR, GRA_CLR_PALEGRAY }, ;
  273.                               { XBP_PP_FGCLR, GRA_CLR_BLACK    } } )
  274.    ::oValInter:caption     := "ValInter"
  275.    ::oValInter:clipSiblings:= .T.
  276.    ::oValInter:options     := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT
  277.    *** Create()
  278.  
  279.    ::oValAccum:= XbpStatic():new( ::drawingArea, ,{nPx+224,281+nPy}, { 76, 12}, { ;
  280.                               { XBP_PP_BGCLR, GRA_CLR_PALEGRAY }, ;
  281.                               { XBP_PP_FGCLR, GRA_CLR_BLACK    } } )
  282.    ::oValAccum:caption     := "ValAccum"
  283.    ::oValAccum:clipSiblings:= .T.
  284.    ::oValAccum:options     := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT
  285.    *** Create()
  286.  
  287.    ******* MASTER DISPLAY LINE
  288.    *
  289.    ::oDisplay:= XbpStatic():new( ::drawingArea, ,{nPx+ 59,253+nPy}, {241,18}, { ;
  290.                               { XBP_PP_BGCLR, GRA_CLR_BLACK },   ;
  291.                               { XBP_PP_FGCLR, GRA_CLR_GREEN },   ;
  292.                               { XBP_PP_COMPOUNDNAME,"16.Arial"} } )
  293.    ::oDisplay:caption      := "0."
  294.    ::oDisplay:clipSiblings := .T.
  295.    ::oDisplay:options      := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT
  296.    *** Create()
  297.  
  298.    ::oSymbol:= XbpStatic():new( ::drawingArea, ,{nPx+30,254+nPy}, {20,16})
  299.    ::oSymbol:caption       := BM_NIL_BLANK   // Blank
  300.    ::oSymbol:clipSiblings  := .T.
  301.    ::oSymbol:type          := XBPSTATIC_TYPE_BITMAP
  302.    *** Create()
  303.  
  304.    ::oBrackets:= XbpStatic():new( ::drawingArea, ,{nPx+ 121,223+nPy}, {48,16}, { ;
  305.                               { XBP_PP_BGCLR, GRA_CLR_DARKBLUE },   ;
  306.                               { XBP_PP_FGCLR, GRA_CLR_CYAN },   ;
  307.                               { XBP_PP_COMPOUNDNAME,"9.Arial"} } )
  308.    ::oBrackets:caption      := " ( ... 1"
  309.    ::oBrackets:clipSiblings := .T.
  310.    ::oBrackets:options      := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_LEFT
  311.    *** Create()
  312.  
  313.  
  314.    *******  Memory Store
  315.    *
  316.    ::oMemStore:= XbpStatic():new( ::drawingArea, ,{nPx+21,205+nPy}, {131,12}, { ;
  317.                               { XBP_PP_BGCLR, GRA_CLR_PALEGRAY },    ;
  318.                               { XBP_PP_FGCLR, GRA_CLR_BLACK }      } )
  319.    ::oMemStore:caption     := "Memory Store"+Space(7)+"0."
  320.    ::oMemStore:clipSiblings:= .T.
  321.    ::oMemStore:options     := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT
  322.    *** Create()
  323.  
  324.    ******************************************************
  325.    *********    START  STANDARD PUSH BUTTONS    *********
  326.    ******************************************************
  327.  
  328.    ::oPBInfo   := XbpPushButton():new( ::drawingArea, ,{nPx+256,304+nPy}, {16,14} )
  329.    ::oPBInfo:activate      := {|| postAppEvent(xbeP_Keyboard,asc("q"),,::oKeyTrap) }
  330.    ::oPBInfo:caption       := PB_INFO   // [i] "Info"  (About)
  331.    ::oPBInfo:clipSiblings  := .T.
  332.    ::oPBInfo:group         := XBP_NO_GROUP
  333.    ::oPBInfo:tabStop       := .T.
  334.    *** Create()
  335.  
  336.    ::oPBspace   := XbpPushButton():new( ::drawingArea, ,{nPx+272,304+nPy}, {16,14} )
  337.    ::oPBspace:activate     := {|| postAppEvent(xbeP_Keyboard,32,,::oKeyTrap) }
  338.    ::oPBspace:caption      := PB_MIN_SPACE   // [-] "SpaceBar" (Minimize)
  339.    ::oPBspace:clipSiblings := .T.
  340.    ::oPBspace:group        := XBP_NO_GROUP
  341.    ::oPBspace:tabStop      := .T.
  342.    *** Create()
  343.  
  344.    ::oPBClose   := XbpPushButton():new( ::drawingArea, ,{nPx+288,304+nPy}, {16,14} )
  345.    ::oPBClose:activate     := {|| PostAppEvent( xbeP_Close,,, self ) }
  346.    ::oPBClose:caption      := PB_CLOSE   // [x] "Close App"
  347.    ::oPBClose:clipSiblings := .T.
  348.    ::oPBClose:group        := XBP_NO_GROUP
  349.    ::oPBClose:tabStop      := .T.
  350.    *** Create()
  351.  
  352.    ******* Help Button
  353.    *
  354.    ::oPBHelp       := XbpPushButton():new( ::drawingArea, ,{nPx+ 19,223+nPy}, {41,16} )
  355.    ::oPBHelp:activate      := {|| postAppEvent(xbeP_Keyboard,xbeK_F1,,::oKeyTrap) }
  356.    ::oPBHelp:caption       := PB_HELP   //"Help"
  357.    ::oPBHelp:clipSiblings  := .T.
  358.    ::oPBHelp:group         := XBP_NO_GROUP
  359.    ::oPBHelp:tabStop       := .T.
  360.    *** Create()
  361.  
  362.    ******* Push Buttons MEMORY
  363.    *
  364.    ::oPBMC       := XbpPushButton():new( ::drawingArea, ,{nPx+ 19,169+nPy}, {32,32} )
  365.    ::oPBMC:activate        := {|| postAppEvent(xbeP_Keyboard,asc('W'),,::oKeyTrap) }
  366.    ::oPBMC:caption         := PB_MEM_CLEAR   //"MC"
  367.    ::oPBMC:clipSiblings    := .T.
  368.    ::oPBMC:group           := XBP_NO_GROUP
  369.    ::oPBMC:tabStop         := .T.
  370.    *** Create()
  371.  
  372.    ::oPBmemsub   := XbpPushButton():new( ::drawingArea, ,{nPx+ 54,169+nPy}, {32,32} )
  373.    ::oPBmemsub:activate    := {|| postAppEvent(xbeP_Keyboard,asc('T'),,::oKeyTrap) }
  374.    ::oPBmemsub:caption     := PB_MEM_SUB   //"M-"
  375.    ::oPBmemsub:clipSiblings:= .T.
  376.    ::oPBmemsub:group       := XBP_NO_GROUP
  377.    ::oPBmemsub:tabStop     := .T.
  378.    *** Create()
  379.  
  380.    ::oPBRecall   := XbpPushButton():new( ::drawingArea, ,{nPx+ 89,169+nPy}, {32,32} )
  381.    ::oPBRecall:activate    := {|| postAppEvent(xbeP_Keyboard,asc('G'),,::oKeyTrap) }
  382.    ::oPBRecall:caption     := PB_MEM_RECALL  //"MR"
  383.    ::oPBRecall:clipSiblings:= .T.
  384.    ::oPBRecall:group       := XBP_NO_GROUP
  385.    ::oPBRecall:tabStop     := .T.
  386.    *** Create()
  387.  
  388.    ::oPBmemadd   := XbpPushButton():new( ::drawingArea, ,{nPx+124,169+nPy}, {32,32} )
  389.    ::oPBmemadd:activate    := {|| postAppEvent(xbeP_Keyboard,asc('A'),,::oKeyTrap) }
  390.    ::oPBmemadd:caption     := PB_MEM_ADD   //"M+"
  391.    ::oPBmemadd:clipSiblings:= .T.
  392.    ::oPBmemadd:group       := XBP_NO_GROUP
  393.    ::oPBmemadd:tabStop     := .T.
  394.    *** Create()
  395.  
  396.    ******* Push Buttons NUMERIC
  397.    *
  398.    ::oPB_0       := XbpPushButton():new( ::drawingArea, ,{nPx+202, 64+nPy}, {32,32} )
  399.    ::oPB_0:activate        := {|| postAppEvent(xbeP_Keyboard,asc('0'),,::oKeyTrap) }
  400.    ::oPB_0:caption         := PB__0_ENA     // PB__0_DIS  disabled
  401.    ::oPB_0:clipSiblings    := .T.
  402.    ::oPB_0:group           := XBP_NO_GROUP
  403.    ::oPB_0:tabStop         := .T.
  404.    *** Create()
  405.  
  406.    ::oPB_1       := XbpPushButton():new( ::drawingArea, ,{nPx+167, 99+nPy}, {32,32} )
  407.    ::oPB_1:activate        := {|| postAppEvent(xbeP_Keyboard,asc('1'),,::oKeyTrap) }
  408.    ::oPB_1:caption         := PB__1_ENA     // PB__1_DIS  disabled
  409.    ::oPB_1:clipSiblings    := .T.
  410.    ::oPB_1:group           := XBP_NO_GROUP
  411.    ::oPB_1:tabStop         := .T.
  412.    *** Create()
  413.  
  414.    ::oPB_2       := XbpPushButton():new( ::drawingArea, ,{nPx+202, 99+nPy}, {32,32} )
  415.    ::oPB_2:activate        := {|| postAppEvent(xbeP_Keyboard,asc('2'),,::oKeyTrap) }
  416.    ::oPB_2:caption         := PB__2_ENA     // PB__2_DIS  disabled
  417.    ::oPB_2:clipSiblings    := .T.
  418.    ::oPB_2:group           := XBP_NO_GROUP
  419.    ::oPB_2:tabStop         := .T.
  420.    *** Create()
  421.  
  422.    ::oPB_3       := XbpPushButton():new( ::drawingArea, ,{nPx+237, 99+nPy}, {32,32} )
  423.    ::oPB_3:activate        := {|| postAppEvent(xbeP_Keyboard,asc('3'),,::oKeyTrap) }
  424.    ::oPB_3:caption         := PB__3_ENA     // PB__3_DIS  disabled
  425.    ::oPB_3:clipSiblings    := .T.
  426.    ::oPB_3:group           := XBP_NO_GROUP
  427.    ::oPB_3:tabStop         := .T.
  428.    *** Create()
  429.  
  430.    ::oPB_4       := XbpPushButton():new( ::drawingArea, ,{nPx+167,134+nPy}, {32,32} )
  431.    ::oPB_4:activate        := {|| postAppEvent(xbeP_Keyboard,asc('4'),,::oKeyTrap) }
  432.    ::oPB_4:caption         := PB__4_ENA     // PB__4_DIS  disabled
  433.    ::oPB_4:clipSiblings    := .T.
  434.    ::oPB_4:group           := XBP_NO_GROUP
  435.    ::oPB_4:tabStop         := .T.
  436.    *** Create()
  437.  
  438.    ::oPB_5       := XbpPushButton():new( ::drawingArea, ,{nPx+202,134+nPy}, {32,32} )
  439.    ::oPB_5:activate        := {|| postAppEvent(xbeP_Keyboard,asc('5'),,::oKeyTrap) }
  440.    ::oPB_5:caption         := PB__5_ENA     // PB__5_DIS  disabled
  441.    ::oPB_5:clipSiblings    := .T.
  442.    ::oPB_5:group           := XBP_NO_GROUP
  443.    ::oPB_5:tabStop         := .T.
  444.    *** Create()
  445.  
  446.    ::oPB_6       := XbpPushButton():new( ::drawingArea, ,{nPx+237,134+nPy}, {32,32} )
  447.    ::oPB_6:activate        := {|| postAppEvent(xbeP_Keyboard,asc('6'),,::oKeyTrap) }
  448.    ::oPB_6:caption         := PB__6_ENA     // PB__6_DIS  disabled
  449.    ::oPB_6:clipSiblings    := .T.
  450.    ::oPB_6:group           := XBP_NO_GROUP
  451.    ::oPB_6:tabStop         := .T.
  452.    *** Create()
  453.  
  454.    ::oPB_7       := XbpPushButton():new( ::drawingArea, ,{nPx+167,169+nPy}, {32,32} )
  455.    ::oPB_7:activate        := {|| postAppEvent(xbeP_Keyboard,asc('7'),,::oKeyTrap) }
  456.    ::oPB_7:caption         := PB__7_ENA     // PB__7_DIS  disabled
  457.    ::oPB_7:clipSiblings    := .T.
  458.    ::oPB_7:group           := XBP_NO_GROUP
  459.    ::oPB_7:tabStop         := .T.
  460.    *** Create()
  461.  
  462.    ::oPB_8       := XbpPushButton():new( ::drawingArea, ,{nPx+202,169+nPy}, {32,32} )
  463.    ::oPB_8:activate        := {|| postAppEvent(xbeP_Keyboard,asc('8'),,::oKeyTrap) }
  464.    ::oPB_8:caption         := PB__8_ENA     // PB__8_DIS  disabled
  465.    ::oPB_8:clipSiblings    := .T.
  466.    ::oPB_8:group           := XBP_NO_GROUP
  467.    ::oPB_8:tabStop         := .T.
  468.    *** Create()
  469.  
  470.    ::oPB_9       := XbpPushButton():new( ::drawingArea, ,{nPx+237,169+nPy}, {32,32} )
  471.    ::oPB_9:activate        := {|| postAppEvent(xbeP_Keyboard,asc('9'),,::oKeyTrap) }
  472.    ::oPB_9:caption         := PB__9_ENA     // PB__9_DIS  disabled
  473.    ::oPB_9:clipSiblings    := .T.
  474.    ::oPB_9:group           := XBP_NO_GROUP
  475.    ::oPB_9:tabStop         := .T.
  476.    *** Create()
  477.  
  478.    ::oPBpoint   := XbpPushButton():new( ::drawingArea, ,{nPx+237, 64+nPy}, {32,32} )
  479.    ::oPBpoint:activate     := {|| postAppEvent(xbeP_Keyboard,asc('.'),,::oKeyTrap) }
  480.    ::oPBpoint:caption      := PB_POINT_ENA     // PB_POINT_DIS  disabled
  481.    ::oPBpoint:clipSiblings := .T.
  482.    ::oPBpoint:tabStop      := .T.
  483.    *** Create()
  484.  
  485.    ******** Push Buttons OPERATORS
  486.    *
  487.    ::oPBPlus     := XbpPushButton():new( ::drawingArea, ,{nPx+272,169+nPy}, {32,32} )
  488.    ::oPBPlus:activate      := {|| postAppEvent(xbeP_Keyboard,asc('+'),,::oKeyTrap) }
  489.    ::oPBPlus:caption       := PB_PLUS   // [+]
  490.    ::oPBPlus:clipSiblings  := .T.
  491.    ::oPBPlus:group         := XBP_NO_GROUP
  492.    ::oPBPlus:tabStop       := .T.
  493.    *** Create()
  494.  
  495.    ::oPBLbracket   := XbpPushButton():new( ::drawingArea, ,{nPx+272,134+nPy}, {16,32} )
  496.    ::oPBLbracket:activate  := {|| postAppEvent(xbeP_Keyboard,40,,::oKeyTrap) }
  497.    ::oPBLbracket:caption   := PB_L_BRACKET   // [(]
  498.    ::oPBLbracket:clipSiblings:= .T.
  499.    ::oPBLbracket:group     := XBP_NO_GROUP
  500.    ::oPBLbracket:tabStop   := .T.
  501.    *** Create()
  502.  
  503.    ::oPBRbracket   := XbpPushButton():new( ::drawingArea, ,{nPx+288,134+nPy}, {16,32} )
  504.    ::oPBRbracket:activate  := {|| postAppEvent(xbeP_Keyboard,41,,::oKeyTrap) }
  505.    ::oPBRbracket:caption   := PB_R_BRACKET   // [)]
  506.    ::oPBRbracket:clipSiblings:= .T.
  507.    ::oPBRbracket:group     := XBP_NO_GROUP
  508.    ::oPBRbracket:tabStop   := .T.
  509.    *** Create()
  510.  
  511.  
  512.    ::oPBminus    := XbpPushButton():new( ::drawingArea, ,{nPx+272,204+nPy}, {32,32} )
  513.    ::oPBminus:activate     := {|| postAppEvent(xbeP_Keyboard,asc('-'),,::oKeyTrap) }
  514.    ::oPBminus:caption      := PB_MINUS   //
  515.    ::oPBminus:clipSiblings := .T.
  516.    ::oPBminus:group        := XBP_NO_GROUP
  517.    ::oPBminus:tabStop      := .T.
  518.    *** Create()
  519.  
  520.    ::oPBmultiply := XbpPushButton():new( ::drawingArea, ,{nPx+237,204+nPy}, {32,32} )
  521.    ::oPBmultiply:activate  := {|| postAppEvent(xbeP_Keyboard,asc('*'),,::oKeyTrap) }
  522.    ::oPBmultiply:caption   := PB_MULTIPLY   //
  523.    ::oPBmultiply:clipSiblings:= .T.
  524.    ::oPBmultiply:group     := XBP_NO_GROUP
  525.    ::oPBmultiply:tabStop   := .T.
  526.    *** Create()
  527.  
  528.    ::oPBdivide   := XbpPushButton():new( ::drawingArea, ,{nPx+202,204+nPy}, {32,32} )
  529.    ::oPBdivide:activate    := {|| postAppEvent(xbeP_Keyboard,asc('/'),,::oKeyTrap) }
  530.    ::oPBdivide:caption     := PB_DIVIDE  //
  531.    ::oPBdivide:clipSiblings:= .T.
  532.    ::oPBdivide:group       := XBP_NO_GROUP
  533.    ::oPBdivide:tabStop     := .T.
  534.    *** Create()
  535.  
  536.    ::oPBequals   := XbpPushButton():new( ::drawingArea, ,{nPx+272, 64+nPy}, {32,67} )
  537.    ::oPBequals:activate    := {|| postAppEvent(xbeP_Keyboard,asc('='),,::oKeyTrap) }
  538.    ::oPBequals:caption     := PB_EQUALS_ENA   //
  539.    ::oPBequals:clipSiblings:= .T.
  540.    ::oPBequals:tabStop     := .T.
  541.    *** Create()
  542.  
  543.  
  544.    ****** Push Buttons CLEAR
  545.    *
  546.    ::oPBCA       := XbpPushButton():new( ::drawingArea, ,{nPx+ 19,134+nPy}, {32,32} )
  547.    ::oPBCA:activate        := {|| postAppEvent(xbeP_Keyboard,asc('C'),,::oKeyTrap) }
  548.    ::oPBCA:caption         := PB_CLEAR_ACCUM    //"CA"
  549.    ::oPBCA:clipSiblings    := .T.
  550.    ::oPBCA:group           := XBP_NO_GROUP
  551.    ::oPBCA:tabStop         := .T.
  552.    *** Create()
  553.  
  554.    ::oPBCE       := XbpPushButton():new( ::drawingArea, ,{nPx+ 19, 99+nPy}, {32,32} )
  555.    ::oPBCE:activate        := {|| postAppEvent(xbeP_Keyboard,asc('E'),,::oKeyTrap) }
  556.    ::oPBCE:caption         := PB_CLEAR_ENTRY    //"CE"
  557.    ::oPBCE:clipSiblings    := .T.
  558.    ::oPBCE:group           := XBP_NO_GROUP
  559.    ::oPBCE:tabStop         := .T.
  560.    *** Create()
  561.  
  562.    ::oPBFactoral  := XbpPushButton():new( ::drawingArea, ,{nPx+ 54, 64+nPy}, {32,32} )
  563.    ::oPBFactoral:activate  := {|| postAppEvent(xbeP_Keyboard,asc('!'),,::oKeyTrap) }
  564.    ::oPBFactoral:caption   := PB_N_FACTORIAL   // [n!] Factoral  Max: 22!
  565.    ::oPBFactoral:clipSiblings:= .T.
  566.    ::oPBFactoral:group     := XBP_NO_GROUP
  567.    ::oPBFactoral:tabStop   := .T.
  568.    *** Create()
  569.  
  570.  
  571.    ******* Push Buttons Currency EXCHANGE
  572.    *
  573.    ::oPBForeignTo:= XbpPushButton():new( ::drawingArea, ,{nPx+124, 64+nPy}, {32,32} )
  574.    ::oPBForeignTo:activate := {|| postAppEvent(xbeP_Keyboard,asc('F'),,::oKeyTrap) }
  575.    ::oPBForeignTo:caption  := PB_EUR_TO_PND   // "E>ú"   PB_DLR_TO_PND  = $|ú  PB_EUR_TO_DLR  = E|$
  576.    ::oPBForeignTo:clipSiblings:= .T.
  577.    ::oPBForeignTo:group    := XBP_NO_GROUP
  578.    ::oPBForeignTo:tabStop  := .T.
  579.    *** Create()
  580.  
  581.    ::oPBLocalTo  := XbpPushButton():new( ::drawingArea, ,{nPx+ 89, 64+nPy}, {32,32} )
  582.    ::oPBLocalTo:activate   := {|| postAppEvent(xbeP_Keyboard,asc('L'),,::oKeyTrap) }
  583.    ::oPBLocalTo:caption    := PB_PND_TO_EUR   //"ú>E"   PB_PND_TO_DLR  = ú|$  PB_DLR_TO_EUR  = $|E
  584.    ::oPBLocalTo:clipSiblings:= .T.
  585.    ::oPBLocalTo:group      := XBP_NO_GROUP
  586.    ::oPBLocalTo:tabStop    := .T.
  587.    *** Create()
  588.  
  589.  
  590.    ******* Push Buttons MANIPULATION
  591.    *
  592.    ::oPBnegate   := XbpPushButton():new( ::drawingArea, ,{nPx+167, 64+nPy}, {32,32} )
  593.    ::oPBnegate:activate    := {|| postAppEvent(xbeP_Keyboard,asc('N'),,::oKeyTrap) }
  594.    ::oPBnegate:caption     := PB_NEGATE   //"+/-"
  595.    ::oPBnegate:clipSiblings:= .T.
  596.    ::oPBnegate:group       := XBP_NO_GROUP
  597.    ::oPBnegate:tabStop     := .T.
  598.    *** Create()
  599.  
  600.    ::oPBpercent   := XbpPushButton():new( ::drawingArea, ,{nPx+124,134+nPy}, {32,32} )
  601.    ::oPBpercent:activate   := {|| postAppEvent(xbeP_Keyboard,asc('%'),,::oKeyTrap) }
  602.    ::oPBpercent:caption    := PB_PERCENT   //"%"
  603.    ::oPBpercent:clipSiblings:= .T.
  604.    ::oPBpercent:tabStop    := .T.
  605.    *** Create()
  606.  
  607.    ::oPBrecip    := XbpPushButton():new( ::drawingArea, ,{nPx+124, 99+nPy}, {32,32} )
  608.    ::oPBrecip:activate     := {|| postAppEvent(xbeP_Keyboard,asc('I'),,::oKeyTrap) }
  609.    ::oPBrecip:caption      := PB_RECIPROCAL   //"1/x"
  610.    ::oPBrecip:clipSiblings := .T.
  611.    ::oPBrecip:group        := XBP_NO_GROUP
  612.    ::oPBrecip:tabStop      := .T.
  613.    *** Create()
  614.  
  615.    ::oPBnthRoot   := XbpPushButton():new( ::drawingArea, ,{nPx+ 89,134+nPy}, {32,32} )
  616.    ::oPBnthRoot:activate   := {|| postAppEvent(xbeP_Keyboard,asc('#'),,::oKeyTrap) }
  617.    ::oPBnthRoot:caption    := PB_NTH_ROOT   //Nth Root
  618.    ::oPBnthRoot:clipSiblings:= .T.
  619.    ::oPBnthRoot:group      := XBP_NO_GROUP
  620.    ::oPBnthRoot:tabStop    := .T.
  621.    *** Create()
  622.  
  623.    ::oPBnthPwr  := XbpPushButton():new( ::drawingArea, ,{nPx+ 54,134+nPy}, {32,32} )
  624.    ::oPBnthPwr:activate    := {|| postAppEvent(xbeP_Keyboard,asc('^'),,::oKeyTrap) }
  625.    ::oPBnthPwr:caption     := PB_NTH_POWER   //Nth Power
  626.    ::oPBnthPwr:clipSiblings:= .T.
  627.    ::oPBnthPwr:group       := XBP_NO_GROUP
  628.    ::oPBnthPwr:tabStop     := .T.
  629.    *** Create()
  630.  
  631.    ::oPBsqroot   := XbpPushButton():new( ::drawingArea, ,{nPx+ 89, 99+nPy}, {32,32} )
  632.    ::oPBsqroot:activate    := {|| postAppEvent(xbeP_Keyboard,asc('R'),,::oKeyTrap) }
  633.    ::oPBsqroot:caption     := PB_SQR_ROOT   //SqRoot
  634.    ::oPBsqroot:clipSiblings:= .T.
  635.    ::oPBsqroot:group       := XBP_NO_GROUP
  636.    ::oPBsqroot:tabStop     := .T.
  637.    *** Create()
  638.  
  639.    ::oPBsquare  := XbpPushButton():new( ::drawingArea, ,{nPx+ 54, 99+nPy}, {32,32} )
  640.    ::oPBsquare:activate    := {|| postAppEvent(xbeP_Keyboard,asc('S'),,::oKeyTrap) }
  641.    ::oPBsquare:caption     := PB_SQUARED   //Squared
  642.    ::oPBsquare:clipSiblings:= .T.
  643.    ::oPBsquare:group       := XBP_NO_GROUP
  644.    ::oPBsquare:tabStop     := .T.
  645.    *** Create()
  646.  
  647.    ::oPBPi       := XbpPushButton():new( ::drawingArea, ,{nPx+ 19, 64+nPy}, {32,32} )
  648.    ::oPBPi:activate        := {|| postAppEvent(xbeP_Keyboard,asc('K'),,::oKeyTrap) }
  649.    ::oPBPi:caption         := PB_PI    //"Pi"
  650.    ::oPBPi:clipSiblings    := .T.
  651.    ::oPBPi:group           := XBP_NO_GROUP
  652.    ::oPBPi:tabStop         := .T.
  653.    *** Create()
  654.  
  655.    ::oPBbspace   := XbpPushButton():new( ::drawingArea, ,{nPx+167,204+nPy}, {32,32} )
  656.    ::oPBbspace:activate    := {|| postAppEvent(xbeP_Keyboard,8,,::oKeyTrap) }
  657.    ::oPBbspace:caption     := PB_BSPACE_ENA   //"BSpace"
  658.    ::oPBbspace:clipSiblings:= .T.
  659.    ::oPBbspace:group       := XBP_NO_GROUP
  660.    ::oPBbspace:tabStop     := .T.
  661.    *** Create()
  662.    *********    END OF STANDARD PUSH BUTTONS    *********
  663.    ******************************************************
  664.  
  665.  
  666.    ::oSetDecMsg:= XbpStatic():new( ::drawingArea, ,{nPx+ 19, 48+nPy}, {286, 14}, { ;
  667.                                  { XBP_PP_BGCLR, GRA_CLR_DARKBLUE },  ;
  668.                                  { XBP_PP_FGCLR, GRA_CLR_DARKGRAY },  ;
  669.                                  { XBP_PP_COMPOUNDNAME, "8.Arial"}  } )
  670.    ::oSetDecMsg:caption      := "Press SpaceBar to minimize"
  671.    ::oSetDecMsg:clipSiblings := .F.
  672.    ::oSetDecMsg:options      :=  XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_CENTER
  673.    *** Create()
  674.  
  675.    ::oPBsetRate      := XbpPushButton():new( ::drawingArea, ,{nPx+19, 28+nPy}, {64,16} )
  676.    ::oPBsetRate:activate   := {|| postAppEvent(xbeP_Keyboard,asc('X'),,::oKeyTrap) }
  677.    ::oPBsetRate:caption    := PB_SET_RATE   //Set Exchange Rate(s)
  678.    ::oPBsetRate:clipSiblings:= .T.
  679.    ::oPBsetRate:tabStop    := .T.
  680.    *** Create()
  681.  
  682.    ::oPBpaste       := XbpPushButton():new( ::drawingArea, ,{nPx+93,  7+nPy}, {64,16} )
  683.    ::oPBpaste:activate     := {|| postAppEvent(xbeP_Keyboard,xbeK_CTRL_V,,::oKeyTrap) }
  684.    ::oPBpaste:caption      := PB_PASTE   //Paste
  685.    ::oPBpaste:clipSiblings := .F.
  686.    ::oPBpaste:tabStop      := .T.
  687.    *** Create()
  688.  
  689.    ::oPBcopy       := XbpPushButton():new( ::drawingArea, ,{nPx+166,  7+nPy}, {64,16} )
  690.    ::oPBcopy:activate      := {|| postAppEvent(xbeP_Keyboard,xbeK_CTRL_C,,::oKeyTrap) }
  691.    ::oPBcopy:caption       := PB_COPY   //Copy
  692.    ::oPBcopy:clipSiblings  := .F.
  693.    ::oPBcopy:tabStop       := .T.
  694.    *** Create()
  695.  
  696.    ::oPBsetDec       := XbpPushButton():new( ::drawingArea, ,{nPx+240, 28+nPy}, {64,16} )
  697.    ::oPBsetDec:activate    := {|| postAppEvent(xbeP_Keyboard,asc('D'),,::oKeyTrap) }
  698.    ::oPBsetDec:caption     := PB_SET_DEC   //Set Decimals
  699.    ::oPBsetDec:clipSiblings:= .T.
  700.    ::oPBsetDec:tabStop     := .T.
  701.    *** Create()
  702.  
  703.    ****** Information Line
  704.    *
  705.    ::oXchgRate:= XbpStatic():new( ::drawingArea, ,{nPx+ 20, 11+nPy}, {60,12}, { ;
  706.                               { XBP_PP_BGCLR, GRA_CLR_PALEGRAY },    ;
  707.                               { XBP_PP_FGCLR, GRA_CLR_BLACK },       ;
  708.                               { XBP_PP_COMPOUNDNAME, "8.Arial"}    } )
  709.    ::oXchgRate:caption := "0.787645"
  710.    ::oXchgRate:clipSiblings:= .T.
  711.    ::oXchgRate:options:= XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT
  712.    *** Create()
  713.  
  714.  
  715.    ::oPBPtoE         := XbpPushButton():new( ::drawingArea, ,{nPx+106, 28+nPy}, {32,16} )
  716.    ::oPBPtoE:activate      := {|| postAppEvent(xbeP_Keyboard,asc('P'),,::oKeyTrap) }
  717.    ::oPBPtoE:caption       := PB_PND_EUR   //Pound to Euro
  718.    ::oPBPtoE:clipSiblings  := .T.
  719.    ::oPBPtoE:tabStop       := .T.
  720.    *** Create()
  721.  
  722.    ::oPBDtoE         := XbpPushButton():new( ::drawingArea, ,{nPx+144, 28+nPy}, {32,16} )
  723.    ::oPBDtoE:activate      := {|| postAppEvent(xbeP_Keyboard,asc('B'),,::oKeyTrap) }
  724.    ::oPBDtoE:caption       := PB_DLR_PND   //Dollar to Pound
  725.    ::oPBDtoE:clipSiblings  := .T.
  726.    ::oPBDtoE:tabStop       := .T.
  727.    *** Create()
  728.  
  729.    ::oPBDtoP         := XbpPushButton():new( ::drawingArea, ,{nPx+182, 28+nPy}, {32,16} )
  730.    ::oPBDtoP:activate      := {|| postAppEvent(xbeP_Keyboard,asc('U'),,::oKeyTrap) }
  731.    ::oPBDtoP:caption       := PB_DLR_EUR   //Dollar to Euro
  732.    ::oPBDtoP:clipSiblings  := .T.
  733.    ::oPBDtoP:tabStop       := .T.
  734.    *** Create()
  735.  
  736.    ::oDecSet2:= XbpStatic():new( ::drawingArea, ,{nPx+241, 10+nPy}, { 60, 12}, { ;
  737.                                  { XBP_PP_BGCLR, GRA_CLR_PALEGRAY },  ;
  738.                                  { XBP_PP_FGCLR, GRA_CLR_BLACK },     ;
  739.                                  { XBP_PP_COMPOUNDNAME, "8.Arial" } } )
  740.    ::oDecSet2:caption      := "4 Places"
  741.    ::oDecSet2:clipSiblings := .T.
  742.    ::oDecSet2:options      := XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_RIGHT
  743.    *** Create()
  744.  
  745.    ::oOpenUp := XbpPushButton():new( ::drawingArea, ,{0,0}, {104,16} )
  746.    ::oOpenUp:activate      := {|| postAppEvent(xbeP_Keyboard,524320,,::oKeyTrap) }
  747.    ::oOpenUp:caption       := PB_OPEN_UP           // OPENUP
  748.    ::oOpenUp:visible       := .F.           // HIDDEN
  749.    ::oOpenUp:clipSiblings  := .F.
  750.    ::oOpenUp:group         := XBP_NO_GROUP
  751.    *** Create()
  752.  
  753.    ::oPBExit   := XbpPushButton():new( ::drawingArea, ,{105,1}, {16,14} )
  754.    ::oPBExit:activate := {|| PostAppEvent( xbeP_Close,,, self ) }
  755.    ::oPBExit:caption := PB_CLOSE   // "Close App"
  756.    ::oPBExit:clipSiblings:= .T.
  757.    ::oPBExit:visible := .F.    // HIDDEN
  758.    ::oPBExit:group := XBP_NO_GROUP
  759.    ::oPBExit:tabStop := .F.
  760.    *** Create()
  761.  
  762. RETURN self
  763. *                   END METHOD _BUSCALC:init()
  764. ******************************************************************************
  765.  
  766. ******************************************************************************
  767. *                  METHOD _BUSCALC:create()
  768. ******************************************************************************
  769. *
  770. METHOD _BUSCALC:create(oParent, oOwner, aPos, aSize, aPP, lVisible)
  771.  
  772.    ::XbpDialog:create(oParent, oOwner, aPos, aSize, aPP, lVisible)
  773.  
  774.    ::oMask:Create()
  775.    ::oKeyTrap:Create()
  776.    ::oClipBoard := XbpClipBoard():new():create()
  777.    ********************* Trail Display Line
  778.    ::oValInput:Create()
  779.    ::oOperText:Create()
  780.    ::oValInter:Create()
  781.    ::oValAccum:Create()
  782.    ********************* Master Display Line
  783.    ::oDisplay:Create()
  784.    ::oSymbol:Create()
  785.    ********************* Brackets Active
  786.    ::oBrackets:Create()
  787.    *********************  Memory Store
  788.    ::oMemStore:Create()
  789.    ********************* START STANDARD PUSH BUTTONS
  790.    ::oPBInfo:Create()   // [i]
  791.    ::oPBspace:Create()  // [-] == Spacebar
  792.    ::oPBClose:Create()  // [x]
  793.    ********************* Help Button
  794.    ::oPBHelp:Create()
  795.    ********************* Push Buttons MEMORY
  796.    ::oPBMC:Create()
  797.    ::oPBmemsub:Create()
  798.    ::oPBRecall:Create()
  799.    ::oPBmemadd:Create()
  800.    ********************* Push Buttons NUMERIC
  801.    ::oPB_0:Create()
  802.    ::oPB_1:Create()
  803.    ::oPB_2:Create()
  804.    ::oPB_3:Create()
  805.    ::oPB_4:Create()
  806.    ::oPB_5:Create()
  807.    ::oPB_6:Create()
  808.    ::oPB_7:Create()
  809.    ::oPB_8:Create()
  810.    ::oPB_9:Create()
  811.    ::oPBpoint:Create()
  812.    ********************* Push Buttons OPERATORS
  813.    ::oPBPlus:Create()
  814.    ::oPBLbracket:Create()
  815.    ::oPBRbracket:Create()
  816.    ::oPBminus:Create()
  817.    ::oPBmultiply:Create()
  818.    ::oPBdivide:Create()
  819.    ::oPBequals:Create()
  820.    ********************* Push Buttons CLEAR
  821.    ::oPBCA:Create()
  822.    ::oPBCE:Create()
  823.    ::oPBFactoral:Create()
  824.    ********************* Push Buttons Currency EXCHANGE
  825.    ::oPBForeignTo:Create()
  826.    ::oPBLocalTo:Create()
  827.    ********************* Push Buttons MANIPULATION
  828.    ::oPBnegate:Create()
  829.    ::oPBpercent:Create()
  830.    ::oPBrecip:Create()
  831.    ::oPBnthRoot:Create()
  832.    ::oPBnthPwr:Create()
  833.    ::oPBsqroot:Create()
  834.    ::oPBsquare:Create()
  835.    ::oPBPi:Create()
  836.    ::oPBbspace:Create()
  837.    ********************* END OF STANDARD PUSH BUTTONS
  838.    ********************* Bottom Segment
  839.    ::oSetDecMsg:Create()
  840.    ::oPBsetRate:Create()
  841.    ::oPBpaste:Create()
  842.    ::oPBcopy:Create()
  843.    ::oPBsetDec:Create()
  844.    ********************* Information Line
  845.    ::oXchgRate:Create()
  846.    ::oPBPtoE:Create()
  847.    ::oPBDtoE:Create()
  848.    ::oPBDtoP:Create()
  849.    ::oDecSet2:Create()
  850.    ::oOpenUp:Create()   // On minimised decal
  851.    ::oPBExit:Create()   // On minimsed decal
  852. RETURN self
  853. *                     END METHOD _BUSCALC:create()
  854. ******************************************************************************
  855. ******************************************************************************
  856. *                  METHOD _BUSCALC:destroy()
  857. ******************************************************************************
  858. *
  859. METHOD _BUSCALC:destroy()
  860.  
  861.    ::aCalcSize             := nil
  862.    ::aDataStore            := nil
  863.    ::aPos                  := nil
  864.    ::aPreBracket           := nil
  865.    ::aSize                 := nil
  866.    ::cClipText             := nil
  867.    ::cDisplay              := nil
  868.    ::cXRate                := nil
  869.    ::lBS_Enabled           := nil
  870.    ::lGettingDecsInput     := nil
  871.    ::lHaveDecimal          := nil
  872.    ::lKeysEnabled          := nil
  873.    ::lKillKeys             := nil
  874.    ::lLBracketOpen         := nil
  875.    ::lLastOpWasImmediate   := nil
  876.    ::lNewCalculation       := nil
  877.    ::lNewInput             := nil
  878.    ::lPercent              := nil
  879.    ::lRBracketClosed       := nil
  880.    ::nAccumStore           := nil
  881.    ::nAccumulator          := nil
  882.    ::nAction               := nil
  883.    ::nBMP                  := nil
  884.    ::nConvertRate          := nil
  885.    ::nDE                   := nil
  886.    ::nDP                   := nil
  887.    ::nDecs                 := nil
  888.    ::nDisplay              := nil
  889.    ::nImmediateValue       := nil
  890.    ::nIntermediate         := nil
  891.    ::nMemVal               := nil
  892.    ::nOpCount              := nil
  893.    ::nOperation            := nil
  894.    ::nPE                   := nil
  895.    ::nStoredOpNbr          := nil
  896.    ::nStoredValue          := nil
  897.    ::nSymbol               := nil
  898.    ::nValueStore           := nil
  899.    ::oBrackets             := nil
  900.    ::oClipBoard            := nil
  901.    ::oDecSet2              := nil
  902.    ::oDisplay              := nil
  903.    ::oKeyTrap              := nil
  904.    ::oMask                 := nil
  905.    ::oMemStore             := nil
  906.    ::oOpenUp               := nil
  907.    ::oOperText             := nil
  908.    ::oPBCA                 := nil
  909.    ::oPBCE                 := nil
  910.    ::oPBClose              := nil
  911.    ::oPBDtoE               := nil
  912.    ::oPBDtoP               := nil
  913.    ::oPBExit               := nil
  914.    ::oPBFactoral           := nil
  915.    ::oPBForeignTo          := nil
  916.    ::oPBHelp               := nil
  917.    ::oPBInfo               := nil
  918.    ::oPBLbracket           := nil
  919.    ::oPBLocalTo            := nil
  920.    ::oPBMC                 := nil
  921.    ::oPBPi                 := nil
  922.    ::oPBPlus               := nil
  923.    ::oPBPtoE               := nil
  924.    ::oPBRbracket           := nil
  925.    ::oPBRecall             := nil
  926.    ::oPB_0                 := nil
  927.    ::oPB_1                 := nil
  928.    ::oPB_2                 := nil
  929.    ::oPB_3                 := nil
  930.    ::oPB_4                 := nil
  931.    ::oPB_5                 := nil
  932.    ::oPB_6                 := nil
  933.    ::oPB_7                 := nil
  934.    ::oPB_8                 := nil
  935.    ::oPB_9                 := nil
  936.    ::oPBbspace             := nil
  937.    ::oPBcopy               := nil
  938.    ::oPBdivide             := nil
  939.    ::oPBequals             := nil
  940.    ::oPBmemadd             := nil
  941.    ::oPBmemsub             := nil
  942.    ::oPBminus              := nil
  943.    ::oPBmultiply           := nil
  944.    ::oPBnegate             := nil
  945.    ::oPBnthPwr             := nil
  946.    ::oPBnthRoot            := nil
  947.    ::oPBpaste              := nil
  948.    ::oPBpercent            := nil
  949.    ::oPBpoint              := nil
  950.    ::oPBrecip              := nil
  951.    ::oPBsetDec             := nil
  952.    ::oPBsetRate            := nil
  953.    ::oPBspace              := nil
  954.    ::oPBsqroot             := nil
  955.    ::oPBsquare             := nil
  956.    ::oSetDecMsg            := nil
  957.    ::oSymbol               := nil
  958.    ::oValAccum             := nil
  959.    ::oValInput             := nil
  960.    ::oValInter             := nil
  961.    ::oXchgRate             := nil
  962.  
  963.    ::XbpDialog:destroy()
  964.  
  965. RETURN nil
  966. #endif        // define _BUSCALC_
  967. *
  968. *                     END METHOD _BUSCALC:destroy()
  969. ******************************************************************************
  970.  
  971. ******************************************************************************
  972. *                         CLASS BusiCalc
  973. *
  974. * Derived from the implementation-level class.
  975. * Instance variables in _BUSCALC class.
  976. ******************************************************************************
  977. CLASS BusiCalc FROM _BUSCALC
  978.    EXPORTED:
  979.       METHOD init
  980.       METHOD create
  981.       METHOD destroy
  982. ENDCLASS
  983. *                     END CLASS BusiCalc
  984. ******************************************************************************
  985.  
  986. ******************************************************************************
  987. * Initialize           BusiCalc:init()
  988. ******************************************************************************
  989. METHOD BusiCalc:init( oParent, oOwner, aPos, aSize, aPP, lVisible )
  990.  
  991.    * Execute method of the super class
  992.    ::_BUSCALC:init( oParent, oOwner, aPos, aSize, aPP, lVisible )
  993.  
  994. RETURN self
  995. *                    END  BusiCalc:init()
  996. ******************************************************************************
  997.  
  998. ******************************************************************************
  999. * Request Resources   BusiCalc:create()
  1000. ******************************************************************************
  1001. METHOD BusiCalc:create( oParent, oOwner, aPos, aSize, aPP, lVisible )
  1002.  
  1003.    * Execute method of the super class
  1004.    ::_BUSCALC:create( oParent, oOwner, aPos, aSize, aPP, lVisible )
  1005.  
  1006. RETURN self
  1007. *                   END BusiCalc:create()
  1008. ******************************************************************************
  1009.  
  1010.  
  1011. ******************************************************************************
  1012. * Release Resources      BusiCalc:destroy()
  1013. ******************************************************************************
  1014. METHOD BusiCalc:destroy()
  1015.  
  1016.    * Execute method of the super class
  1017.    ::_BUSCALC:destroy()
  1018.  
  1019. RETURN nil
  1020. *                   END BusiCalc:destroy()
  1021. ******************************************************************************
  1022. *
  1023. *                            END BUSCALCCLS.PRG
  1024. ******************************************************************************
  1025.