/* ---------------------------------------------------------------------------- tutorial.mnu A basic menu, written for: The dBASE Plus Tutorial: Developing An Application January, 2017, Ken Mayer Permission is granted to use this in your own applications, with the caveat that credit be given appropriately. ---------------------------------------------------------------------------- */ ** END HEADER -- do not remove this line // // Generated on 01/13/2017 // parameter formObj new TUTORIALMENU(formObj, "root") class TUTORIALMENU(formObj, name) of MENUBAR(formObj, name) this.FILE = new MENU(this) with (this.FILE) text = "&File" endwith this.FILE.OPEN = new MENU(this.FILE) with (this.FILE.OPEN) text = "&Open" endwith this.FILE.OPEN.CUSTOMERS = new MENU(this.FILE.OPEN) with (this.FILE.OPEN.CUSTOMERS) text = "Customers" endwith this.FILE.OPEN.INVENTORY = new MENU(this.FILE.OPEN) with (this.FILE.OPEN.INVENTORY) text = "Inventory" endwith this.FILE.OPEN.SUPPLIER = new MENU(this.FILE.OPEN) with (this.FILE.OPEN.SUPPLIER) text = "Supplier" endwith this.FILE.OPEN.INVOICES = new MENU(this.FILE.OPEN) with (this.FILE.OPEN.INVOICES) text = "Invoices" endwith this.FILE.OPEN.LOOKUPS = new MENU(this.FILE.OPEN) with (this.FILE.OPEN.LOOKUPS) text = "Lookups" endwith this.FILE.OPEN.LOOKUPS.STATE = new MENU(this.FILE.OPEN.LOOKUPS) with (this.FILE.OPEN.LOOKUPS.STATE) text = "State" endwith this.FILE.OPEN.LOOKUPS.COUNTRY = new MENU(this.FILE.OPEN.LOOKUPS) with (this.FILE.OPEN.LOOKUPS.COUNTRY) text = "Country" endwith this.FILE.CLOSE = new MENU(this.FILE) with (this.FILE.CLOSE) onClick = class::CLOSE_ONCLICK text = "&Close" endwith this.FILE.SEPARATOR1 = new MENU(this.FILE) with (this.FILE.SEPARATOR1) text = "" separator = true endwith this.FILE.EXIT = new MENU(this.FILE) with (this.FILE.EXIT) onClick = class::EXIT_ONCLICK text = "E&xit" endwith this.REPORTS = new MENU(this) with (this.REPORTS) text = "&Reports" endwith this.REPORTS.SUPPLIER = new MENU(this.REPORTS) with (this.REPORTS.SUPPLIER) text = "Supplier Information" endwith this.REPORTS.INVENTORY = new MENU(this.REPORTS) with (this.REPORTS.INVENTORY) text = "Inventory Summary" endwith this.REPORTS.STATEMENTS = new MENU(this.REPORTS) with (this.REPORTS.STATEMENTS) text = "Customer Statements" endwith this.REPORTS.SEPARATOR2 = new MENU(this.REPORTS) with (this.REPORTS.SEPARATOR2) text = "" separator = true endwith this.REPORTS.LABELS = new MENU(this.REPORTS) with (this.REPORTS.LABELS) text = "Customer Address Labels" endwith this.WINDOW = new MENU(this) with (this.WINDOW) text = "&Window" endwith this.WINDOW.MENU10 = new MENU(this.WINDOW) with (this.WINDOW.MENU10) text = "&Cascade" windowMenuItem = 1 // Cascade endwith this.WINDOW.MENU9 = new MENU(this.WINDOW) with (this.WINDOW.MENU9) text = "Tile &Vertically" windowMenuItem = 3 // Tile Vertically endwith this.WINDOW.MENU8 = new MENU(this.WINDOW) with (this.WINDOW.MENU8) text = "&Tile Horizontally" windowMenuItem = 2 // Tile Horizontally endwith this.WINDOW.MENU7 = new MENU(this.WINDOW) with (this.WINDOW.MENU7) text = "Arrange &Icons" windowMenuItem = 4 // Arrange Icons endwith this.WINDOW.CLOSEALL = new MENU(this.WINDOW) with (this.WINDOW.CLOSEALL) onClick = {; close forms} text = "Close &All" windowMenuItem = 5 // Close All endwith this.HELP = new MENU(this) with (this.HELP) text = "&Help" endwith this.HELP.ABOUT = new MENU(this.HELP) with (this.HELP.ABOUT) text = "&About Tutorial" endwith this.windowMenu = this.window function CLOSE_onClick() // close current form if there is one if type( "_app.framewin.currentForm" ) == "O" _app.framewin.currentForm.close() else msgbox( "The currently active form cannot be closed "+; "with this option.","Can't do it!", 64 ) endif return function EXIT_onClick() return( _app.framewin.app.close() ) function OpenForm( oForm ) // set the top/left properties so the form isn't // *right* on top of the current one ... if type( "_app.framewin.currentForm" ) == "O" oForm.top := _app.framewin.currentForm.top + 40 oForm.left := _app.framewin.currentForm.left + 40 else oForm.top := 0 oForm.left := 10 endif oForm.open() oForm.setFocus() return endclass