//TH-Header //***************************************************************************************** // Copyright (c) 2003 KURANT Project // All rights reserved. // // $FileName : E:\Program Files\Hammer\AppSrc\Database.Inc // $ProjectName : The Hammer v1.5 // $Authors : Michael Kurz, Sergey V. Natarov // $Created : 31.01.2003 21:48 // $Type : OptionWare // // Contents: // // TheHammer Main Menu Database pulldown menu // //***************************************************************************************** //TH-RevisionStart //TH-RevisionEnd DFCreate_Menu "&Database" DatabasePopupMenu Is A PopupMenu On_Item " Database Editor..." Send LaunchDBBUtility Set Status_Help To "Run Database Editor, specified in the system options" On_Item " Database Viewer..." Send LaunchDBEUtility Set Status_Help To "Run Database Viewer, specified in the system options" On_Item " Database Compare..." Send LaunchDBCUtility Set Status_Help To "Run Database Compare Utility, specified in the system options" On_Item " Database Update..." Send LaunchDBUUtility Set Status_Help To "Run Database Update Utility, specified in the system options" On_Item "" Send none On_Item " Report Writer..." Send LaunchRPTUtility Set Status_Help To "Run Report Writer, specified in the system options" On_Item "" Send none Property Integer piSelectedCustMenuItem Public -1 Property Integer piStartDynamicItems Public (Item_Count(Self)) Procedure DoCustmenuExecute Integer lici liint String sString Get piSelectedCustMenuItem To lici Open CustMenu Clear CustMenu Move "DATABASE" To Custmenu.Menu For liint From 0 To (lici-piStartDynamicItems(Self)) Find Gt Custmenu by Index.1 End Move (RTrim(custmenu.instruction)) To sString Send LaunchUtility To (Focus(Self)) sString "" End_Procedure Procedure onInitMenu Integer iC hoID iFlag Integer hoCA // oClientArea // ** SVN Utilities support Set Shadow_State Item 0 To (psDbbPath(ghoEditorProperties)="") Set Shadow_State Item 1 To (psDbePath(ghoEditorProperties)="") Set Shadow_State Item 2 To (psDbcPath(ghoEditorProperties)="") Set Shadow_State Item 3 To (psDbuPath(ghoEditorProperties)="") Set Shadow_State Item 5 To (psRptPath(ghoEditorProperties)="") // Move (oClientArea(Self)) To hoCA Move (Focus(Desktop)) To hoID If hoID Move (isFileWindow(hoCA,hoID)) To iFlag Else Move 0 To iFlag While (Item_Count(Self)) Gt (piStartDynamicItems(Self)) Send Delete_Item (piStartDynamicItems(Self)) End Integer iCount Move 0 To iCount Open CustMenu Clear CustMenu Move "DATABASE" To Custmenu.Menu Repeat Find Gt Custmenu by Index.1 [found] Indicate found as Custmenu.Menu Eq "DATABASE" If (found) Begin If (Trim(custmenu.description) <> "") Begin Send Add_Item msg_DoCustMenuExecute (" "+RTrim(custmenu.description)) Set Aux_Value Item (Item_Count(Self)-1) To Self Increment iCount End Else On_Item "" Send msg_None // A separator End // found Until [Finderr] If (iCount>0) Send Add_Item msg_none "" Send Add_Item msg_Activate_oDatabaseMenuView " &Customize Items..." Clear CustMenu End_Procedure Procedure change_menu Integer Item# Integer obj Integer iFlags Delegate Send change_menu Item# obj iFlags Send OnChange Set piSelectedCustMenuItem To Item# End_Procedure End_Pull_down