Use DFAllEnt.pkg
Use cCJStandardCommandBarSystem.pkg

Object oHtmlHelp is a cHtmlHelp
End_Object

Object oApplication is a cApplication
    Set peHelpType to htHtmlHelp

    Property String psFileName
    Property Integer piScreenOrFile

    Procedure OnCreate
        Handle hoCmdLine
        Integer iNumArgs iArg

        Get phoCommandLine to hoCmdLine
        Get CountOfArgs of hoCmdLine to iNumArgs

        For iArg from 1 to iNumArgs
            If (iArg = 1) Set psFileName to (Argument(hoCmdLine, iArg))
            If (iArg = 2) Set piScreenOrFile to (Argument(hoCmdLine, iArg))
        Loop
    End_Procedure

End_Object

Use oEditContextMenu.pkg
Use oDEOEditContextMenu.pkg

Object oMain is a Panel
    Set Label to "Report Unused Local Variables"
    Set Location to 4 3
    Set Size to 300 450

    Object oCommandBarSystem is a cCJCommandBarSystem
        Set pbTimerUpdate to True

        Procedure OnCreateCommandBars
            Handle hoOptions
            Get OptionsObject to hoOptions
            Forward Send OnCreateCommandBars
        End_Procedure

        Object oMenuBar is a cCJMenuBar

            Object oFileMenu is a cCJMenuItem
                Set peControlType to xtpControlPopup          
                Set psCaption   to "&File"
                Set psDescription to "Quit this application."
                Set psCategory to "Menus"

                Object oExitMenu is a cCJExitMenuItem
                    Set pbControlBeginGroup to True
                End_Object

            End_Object

            Object oViewMenu is a cCJMenuItem
                Set peControlType to xtpControlPopup
                Set psCaption to "&View"
                Set psToolTip to "View"
                Set psDescription to "Available Views"

                Object ooReportUnusedLocalsMenuItem is a cCJMenuItem
                    Set psCaption to "Report Unused Locals"
                    Set psTooltip to "Report Unused Locals"
                
                    Procedure OnExecute Variant vCommandBarControl
                        Handle hoClient
                        Get Client_Id to hoClient
                        Send Activate_oReportUnusedLocals of hoClient
                    End_Procedure
                End_Object
            End_Object
            
            Object oHelpMenu is a cCJMenuItem
                Set peControlType to xtpControlPopup    
                Set psCaption to "&Help"
                Set psDescription to "About this application."
                Set psToolTip to "Help"

                Object oAboutMenuItem is a cCJAboutMenuItem
                End_Object

            End_Object

        End_Object


        Object oStatusBar is a cCJStatusBar

            Object oStatusPane1 is a cCJStatusBarPane
                Set piID to sbpIDIdlePane
                Set pbStyleStretch to True
            End_Object

            Object oStatusPane2 is a cCJStatusBarPane
                Set phoViewPane to Self
                Set pbStyleStretch to True
            End_Object

        End_Object

    End_Object

    Object oClientArea is a ClientArea
        Use StdAbout.pkg
        Use ReportUnusedLocals.vw

        Procedure Activate_About
            Send DoAbout "Search for Unused Variables" "" "Bob Worsley" "10016 NW 4th St" "Plantation, FL 33324" "954-577-8304" "rlworsley@gmail.com" "" "" 
        End_Procedure

    End_Object

End_Object

Send Activate_oReportUnusedLocals of (oClientArea(oMain(Self)))

Start_UI
