Use DFAllEnt.pkg
Use cCJStandardCommandBarSystem.pkg

String gsProjectName
String gsProgrammname
String gsVerionsNr
Move "KURANT Project"   to gsProjectName
Move "The Hammer"       to gsProgrammname
Move "4.0"              to gsVerionsNr

Define DFCLASSREFAPP for 1

#Replace CURRENT$WORKSPACE   "Hammer"
Use cApplicationEx.pkg

Object oApplication is a cApplicationEx
    Set piCmdLineSupport    To True                 // Use it for CommandLine Parameters.
    Set psCompany to gsProjectName
    Set psProduct to gsProgrammname
    Set psVersion to gsVerionsNr

    Procedure OnCreate
        Send DoOpenWorkspace (CURRENT$WORKSPACE)
    End_Procedure

    Procedure OpenTH3DB Integer iFileNum
        Open iFileNum
    End_Procedure
    Procedure CloseTH3DB Integer iFileNum
        Close iFileNum
    End_Procedure
End_Object

Object oToolTipController is a cToolTipController
    Move Self to ghoToolTipController
End_Object

Use oEditContextMenu.pkg
Use oDEOEditContextMenu17.pkg

Object oMain is a Panel
    Set Label To "VDF Class Reference"
    Set Location to 4 3
    Set Size to 300 450
    Set Icon to "applications-science-2.ico"

    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 oViewMenu is a cCJMenuItem
                Set peControlType to xtpControlPopup
                Set psCaption to "Tools"
                Set psToolTip to "Tools"
                Set psDescription to "VDF Classes Tools"

                Object oDefineMenuItem is a cCJMenuItem
                    Set psCaption to "&Classes and properties"
                    Set psTooltip to "DataFlex Classes and Properties List"
                    Set psShortcut to "Ctrl+1"

                    Procedure OnExecute Variant vCommandBarControl
                        Handle hoClient
                        Get Client_Id to hoClient
                        Send Activate_Classes_and_properties of hoClient
                    End_Procedure
                End_Object

                Object oEditMenuItem is a cCJMenuItem
                    Set psCaption to "&Edit Class List"
                    Set psTooltip to "Edit Class List"
                    Set psShortcut to "Ctrl+2"

                    Procedure OnExecute Variant vCommandBarControl
                        Handle hoClient
                        Get Client_Id to hoClient
                        Send Activate_Edit_Class_List of hoClient
                    End_Procedure
                End_Object

                Object oExplorerMenuItem is a cCJMenuItem
                    Set psCaption to "&Class Explorer"
                    Set psTooltip to "Class Explorer"
                    Set psShortcut to "Ctrl+3"

                    Procedure OnExecute Variant vCommandBarControl
                        Handle hoClient
                        Get Client_Id to hoClient
                        Send Activate_Class_Explorer of hoClient
                    End_Procedure
                End_Object

                Object oExitMenu is a cCJExitMenuItem
                    Set pbControlBeginGroup to True
                End_Object

            End_Object

            Object oHelpMenu is a cCJMenuItem
                Set peControlType to xtpControlPopup
                Set psCaption to "&Help"
                Object oAboutMenuItem is a cCJAboutMenuItem
                End_Object

            End_Object

        End_Object

        Object oFindToolBar is a cCJToolbar
            Set psTitle to "�����8 ���᪠"

            Object oFindFirstTool is a cCJFindFirstMenuItem
            End_Object

            Object oFindPreviousTool is a cCJFindPreviousMenuItem
            End_Object

            Object oFindMenuTool is a cCJFindMenuItem
            End_Object

            Object oFindNextTool is a cCJFindNextMenuItem
            End_Object

            Object oFindLastTool is a cCJFindLastMenuItem
            End_Object

            Object oPromptToolItem is a cCJPromptMenuItem
                Set pbControlBeginGroup to True
            End_Object

        End_Object

        Object oFileToolBar is a cCJToolbar
            Set psTitle to "�����8 ����� ����ds"

            Object oClearToolItem is a cCJClearMenuItem
                Set peControlStyle to xtpButtonIconAndCaption
            End_Object

            Object oClearAllToolItem2 is a cCJClearAllMenuItem
                Set peControlStyle to xtpButtonIconAndCaption
            End_Object

            Object oSaveToolItem is a cCJSaveMenuItem
                Set peControlStyle to xtpButtonIconAndCaption
                Set pbControlBeginGroup to True
            End_Object

            Object oDeleteToolItem is a cCJDeleteMenuItem
                Set peControlStyle to xtpButtonIconAndCaption
            End_Object

        End_Object

        Object oEditToolBar is a cCJToolbar
            Set psTitle to "�����8 a����G�a�����n"

            Object oCutToolbarItem is a cCJCutMenuItem
            End_Object

            Object oCopyToolbarItem is a cCJCopyMenuItem
            End_Object

            Object oPasteToolbarItem is a cCJPasteMenuItem
            End_Object

            Object oDeleteEditToolbarItem is a cCJDeleteEditMenuItem
                Set pbControlBeginGroup to True
            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

        //  Include all views
        Use Classes_and_properties.vw
        Use Edit_Class_List.vw
        Use Class_Explorer.vw

        Procedure Activate_About
            Send DoAbout "VDF Class Reference" "" "(C) 2017, KURANT Project" "by Sergey V. Natarov" ""
        End_Procedure

    End_Object

    On_Key Key_Ctrl+Key_1 Send Activate_Classes_and_properties to oClientArea
    On_Key Key_Ctrl+Key_2 Send Activate_Edit_Class_List to oClientArea
    On_Key Key_Ctrl+Key_3 Send Activate_Class_Explorer to oClientArea

End_Object

Start_UI
