File: pfc_m_master.srm
Size: 56056
Date: Tue, 22 Jan 2008 23:31:37 +0100
$PBExportHeader$pfc_m_master.srm
$PBExportComments$PFC Master menu class
forward
global type pfc_m_master from menu
end type
type m_file from menu within pfc_m_master
end type
type m_new from menu within m_file
end type
type m_open from menu within m_file
end type
type m_close from menu within m_file
end type
type m_dash11 from menu within m_file
end type
type m_save from menu within m_file
end type
type m_saveas from menu within m_file
end type
type m_dash12 from menu within m_file
end type
type m_print from menu within m_file
end type
type m_printpreview from menu within m_file
end type
type m_pagesetup from menu within m_file
end type
type m_printimmediate from menu within m_file
end type
type m_dash13 from menu within m_file
end type
type m_delete from menu within m_file
end type
type m_properties from menu within m_file
end type
type m_dash14 from menu within m_file
end type
type m_exit from menu within m_file
end type
type m_pfcmrudash1 from menu within m_file
end type
type m_pfcmru1 from menu within m_file
end type
type m_pfcmru2 from menu within m_file
end type
type m_pfcmru3 from menu within m_file
end type
type m_pfcmru4 from menu within m_file
end type
type m_pfcmru5 from menu within m_file
end type
type m_file from menu within pfc_m_master
m_new m_new
m_open m_open
m_close m_close
m_dash11 m_dash11
m_save m_save
m_saveas m_saveas
m_dash12 m_dash12
m_print m_print
m_printpreview m_printpreview
m_pagesetup m_pagesetup
m_printimmediate m_printimmediate
m_dash13 m_dash13
m_delete m_delete
m_properties m_properties
m_dash14 m_dash14
m_exit m_exit
m_pfcmrudash1 m_pfcmrudash1
m_pfcmru1 m_pfcmru1
m_pfcmru2 m_pfcmru2
m_pfcmru3 m_pfcmru3
m_pfcmru4 m_pfcmru4
m_pfcmru5 m_pfcmru5
end type
type m_edit from menu within pfc_m_master
end type
type m_undo from menu within m_edit
end type
type m_dash21 from menu within m_edit
end type
type m_cut from menu within m_edit
end type
type m_copy from menu within m_edit
end type
type m_paste from menu within m_edit
end type
type m_pastespecial from menu within m_edit
end type
type m_clear from menu within m_edit
end type
type m_dash22 from menu within m_edit
end type
type m_selectall from menu within m_edit
end type
type m_dash23 from menu within m_edit
end type
type m_find from menu within m_edit
end type
type m_replace from menu within m_edit
end type
type m_dash24 from menu within m_edit
end type
type m_updatelinks from menu within m_edit
end type
type m_object1 from menu within m_edit
end type
type m_edit1 from menu within m_object1
end type
type m_open1 from menu within m_object1
end type
type m_object1 from menu within m_edit
m_edit1 m_edit1
m_open1 m_open1
end type
type m_edit from menu within pfc_m_master
m_undo m_undo
m_dash21 m_dash21
m_cut m_cut
m_copy m_copy
m_paste m_paste
m_pastespecial m_pastespecial
m_clear m_clear
m_dash22 m_dash22
m_selectall m_selectall
m_dash23 m_dash23
m_find m_find
m_replace m_replace
m_dash24 m_dash24
m_updatelinks m_updatelinks
m_object1 m_object1
end type
type m_view from menu within pfc_m_master
end type
type m_ruler from menu within m_view
end type
type m_dash31 from menu within m_view
end type
type m_largeicon from menu within m_view
end type
type m_smallicons from menu within m_view
end type
type m_list from menu within m_view
end type
type m_details from menu within m_view
end type
type m_dash32 from menu within m_view
end type
type m_arrangeicons from menu within m_view
end type
type m_by1 from menu within m_arrangeicons
end type
type m_dash33 from menu within m_arrangeicons
end type
type m_autoarrange from menu within m_arrangeicons
end type
type m_arrangeicons from menu within m_view
m_by1 m_by1
m_dash33 m_dash33
m_autoarrange m_autoarrange
end type
type m_dash34 from menu within m_view
end type
type m_first from menu within m_view
end type
type m_priorpage from menu within m_view
end type
type m_nextpage from menu within m_view
end type
type m_lastpage from menu within m_view
end type
type m_dash35 from menu within m_view
end type
type m_sort from menu within m_view
end type
type m_filter from menu within m_view
end type
type m_dash36 from menu within m_view
end type
type m_zoom from menu within m_view
end type
type m_view from menu within pfc_m_master
m_ruler m_ruler
m_dash31 m_dash31
m_largeicon m_largeicon
m_smallicons m_smallicons
m_list m_list
m_details m_details
m_dash32 m_dash32
m_arrangeicons m_arrangeicons
m_dash34 m_dash34
m_first m_first
m_priorpage m_priorpage
m_nextpage m_nextpage
m_lastpage m_lastpage
m_dash35 m_dash35
m_sort m_sort
m_filter m_filter
m_dash36 m_dash36
m_zoom m_zoom
end type
type m_insert from menu within pfc_m_master
end type
type m_insertfile from menu within m_insert
end type
type m_picture from menu within m_insert
end type
type m_dash41 from menu within m_insert
end type
type m_object from menu within m_insert
end type
type m_insert from menu within pfc_m_master
m_insertfile m_insertfile
m_picture m_picture
m_dash41 m_dash41
m_object m_object
end type
type m_tools from menu within pfc_m_master
end type
type m_toolbars from menu within m_tools
end type
type m_tools from menu within pfc_m_master
m_toolbars m_toolbars
end type
type m_window from menu within pfc_m_master
end type
type m_cascade from menu within m_window
end type
type m_tilehorizontal from menu within m_window
end type
type m_tilevertical from menu within m_window
end type
type m_layer from menu within m_window
end type
type m_dash51 from menu within m_window
end type
type m_minimizeall from menu within m_window
end type
type m_undoarrange from menu within m_window
end type
type m_window from menu within pfc_m_master
m_cascade m_cascade
m_tilehorizontal m_tilehorizontal
m_tilevertical m_tilevertical
m_layer m_layer
m_dash51 m_dash51
m_minimizeall m_minimizeall
m_undoarrange m_undoarrange
end type
type m_help from menu within pfc_m_master
end type
type m_helptopics from menu within m_help
end type
type m_dash61 from menu within m_help
end type
type m_about from menu within m_help
end type
type m_help from menu within pfc_m_master
m_helptopics m_helptopics
m_dash61 m_dash61
m_about m_about
end type
global type pfc_m_master from menu
m_file m_file
m_edit m_edit
m_view m_view
m_insert m_insert
m_tools m_tools
m_window m_window
m_help m_help
end type
end forward

global type pfc_m_master from menu
m_file m_file
m_edit m_edit
m_view m_view
m_insert m_insert
m_tools m_tools
m_window m_window
m_help m_help
end type
global pfc_m_master pfc_m_master

forward prototypes
public function integer of_sendmessage (string as_message)
end prototypes

public function integer of_sendmessage (string as_message);//////////////////////////////////////////////////////////////////////////////
//
// Function:  of_SendMessage
//
// Access:  public
//
// Arguments:     
// as_message  message (event notification) to be sent
//
// Returns:  integer
//  1 = Message successfully sent
// -1 = message could not be sent (use debug object for more info)
//
// Description:
// Sends a specified message (event notification) to a receiving window 
// through the pfc_messagerouter event.
//
// Sequence:
// If application is MDI:
// 1) Active MDI sheet pfc_messagerouter event.
// 2) MDI Frame Window pfc_messagerouter event.
//
// Application is SWI:
// 1) ParentWindow pfc_messagerouter event.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0   Initial version
// 6.0   Function now calls of_sendMessage on n_cst_menu to consolidate code
//
//////////////////////////////////////////////////////////////////////////////
//
/*
 * Open Source PowerBuilder Foundation Class Libraries
 *
 * Copyright (c) 2004-2005, All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted in accordance with the GNU Lesser General
 * Public License Version 2.1, February 1999
 *
 * http://www.gnu.org/copyleft/lesser.html
 *
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals and was originally based on software copyright (c) 
 * 1996-2004 Sybase, Inc. http://www.sybase.com.  For more
 * information on the Open Source PowerBuilder Foundation Class
 * Libraries see http://pfc.codexchange.sybase.com
*/
//
//////////////////////////////////////////////////////////////////////////////

n_cst_menu     lnv_menu

return lnv_menu.of_sendMessage (this, as_message)
end function

on pfc_m_master.create
pfc_m_master=this
call super::create
this.m_file=create m_file
this.m_edit=create m_edit
this.m_view=create m_view
this.m_insert=create m_insert
this.m_tools=create m_tools
this.m_window=create m_window
this.m_help=create m_help
this.Item[UpperBound(this.Item)+1]=this.m_file
this.Item[UpperBound(this.Item)+1]=this.m_edit
this.Item[UpperBound(this.Item)+1]=this.m_view
this.Item[UpperBound(this.Item)+1]=this.m_insert
this.Item[UpperBound(this.Item)+1]=this.m_tools
this.Item[UpperBound(this.Item)+1]=this.m_window
this.Item[UpperBound(this.Item)+1]=this.m_help
end on

on pfc_m_master.destroy
call super::destroy
destroy(this.m_file)
destroy(this.m_edit)
destroy(this.m_view)
destroy(this.m_insert)
destroy(this.m_tools)
destroy(this.m_window)
destroy(this.m_help)
end on

type m_file from menu within pfc_m_master
m_new m_new
m_open m_open
m_close m_close
m_dash11 m_dash11
m_save m_save
m_saveas m_saveas
m_dash12 m_dash12
m_print m_print
m_printpreview m_printpreview
m_pagesetup m_pagesetup
m_printimmediate m_printimmediate
m_dash13 m_dash13
m_delete m_delete
m_properties m_properties
m_dash14 m_dash14
m_exit m_exit
m_pfcmrudash1 m_pfcmrudash1
m_pfcmru1 m_pfcmru1
m_pfcmru2 m_pfcmru2
m_pfcmru3 m_pfcmru3
m_pfcmru4 m_pfcmru4
m_pfcmru5 m_pfcmru5
end type

on m_file.create
call super::create
this.text = "&File"
this.mergeoption = filemenu!
this.m_new=create m_new
this.m_open=create m_open
this.m_close=create m_close
this.m_dash11=create m_dash11
this.m_save=create m_save
this.m_saveas=create m_saveas
this.m_dash12=create m_dash12
this.m_print=create m_print
this.m_printpreview=create m_printpreview
this.m_pagesetup=create m_pagesetup
this.m_printimmediate=create m_printimmediate
this.m_dash13=create m_dash13
this.m_delete=create m_delete
this.m_properties=create m_properties
this.m_dash14=create m_dash14
this.m_exit=create m_exit
this.m_pfcmrudash1=create m_pfcmrudash1
this.m_pfcmru1=create m_pfcmru1
this.m_pfcmru2=create m_pfcmru2
this.m_pfcmru3=create m_pfcmru3
this.m_pfcmru4=create m_pfcmru4
this.m_pfcmru5=create m_pfcmru5
this.Item[UpperBound(this.Item)+1]=this.m_new
this.Item[UpperBound(this.Item)+1]=this.m_open
this.Item[UpperBound(this.Item)+1]=this.m_close
this.Item[UpperBound(this.Item)+1]=this.m_dash11
this.Item[UpperBound(this.Item)+1]=this.m_save
this.Item[UpperBound(this.Item)+1]=this.m_saveas
this.Item[UpperBound(this.Item)+1]=this.m_dash12
this.Item[UpperBound(this.Item)+1]=this.m_print
this.Item[UpperBound(this.Item)+1]=this.m_printpreview
this.Item[UpperBound(this.Item)+1]=this.m_pagesetup
this.Item[UpperBound(this.Item)+1]=this.m_printimmediate
this.Item[UpperBound(this.Item)+1]=this.m_dash13
this.Item[UpperBound(this.Item)+1]=this.m_delete
this.Item[UpperBound(this.Item)+1]=this.m_properties
this.Item[UpperBound(this.Item)+1]=this.m_dash14
this.Item[UpperBound(this.Item)+1]=this.m_exit
this.Item[UpperBound(this.Item)+1]=this.m_pfcmrudash1
this.Item[UpperBound(this.Item)+1]=this.m_pfcmru1
this.Item[UpperBound(this.Item)+1]=this.m_pfcmru2
this.Item[UpperBound(this.Item)+1]=this.m_pfcmru3
this.Item[UpperBound(this.Item)+1]=this.m_pfcmru4
this.Item[UpperBound(this.Item)+1]=this.m_pfcmru5
end on

on m_file.destroy
call super::destroy
destroy(this.m_new)
destroy(this.m_open)
destroy(this.m_close)
destroy(this.m_dash11)
destroy(this.m_save)
destroy(this.m_saveas)
destroy(this.m_dash12)
destroy(this.m_print)
destroy(this.m_printpreview)
destroy(this.m_pagesetup)
destroy(this.m_printimmediate)
destroy(this.m_dash13)
destroy(this.m_delete)
destroy(this.m_properties)
destroy(this.m_dash14)
destroy(this.m_exit)
destroy(this.m_pfcmrudash1)
destroy(this.m_pfcmru1)
destroy(this.m_pfcmru2)
destroy(this.m_pfcmru3)
destroy(this.m_pfcmru4)
destroy(this.m_pfcmru5)
end on

type m_new from menu within m_file
end type

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_new")
end event

on m_new.create
call super::create
this.text = "&New"
this.microhelp = "New"
this.toolbaritemname = "ScriptNo!"
this.toolbaritemtext = "New"
this.toolbaritemorder = 10
end on

on m_new.destroy
call super::destroy
end on

type m_open from menu within m_file
end type

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_open")
end event

on m_open.create
call super::create
this.text = "&Open"
this.microhelp = "Open"
this.toolbaritemname = "Custom050!"
this.toolbaritemtext = "Open"
this.toolbaritemorder = 15
end on

on m_open.destroy
call super::destroy
end on

type m_close from menu within m_file
end type

on clicked;of_SendMessage ("pfc_close")
end on

on m_close.create
call super::create
this.text = "&Close"
this.microhelp = "Close"
this.toolbaritemvisible = false
this.toolbaritemname = "Custom039!"
this.toolbaritemtext = "Close"
this.toolbaritemorder = 20
end on

on m_close.destroy
call super::destroy
end on

type m_dash11 from menu within m_file
end type

on m_dash11.create
call super::create
this.text = "-"
end on

on m_dash11.destroy
call super::destroy
end on

type m_save from menu within m_file
end type

on clicked;of_SendMessage ("pfc_save")
end on

on m_save.create
call super::create
this.text = "&Save~tCtrl+S"
this.shortcut = 339
this.microhelp = "Save"
this.toolbaritemname = "Save!"
this.toolbaritemtext = "Save"
this.toolbaritemorder = 25
end on

on m_save.destroy
call super::destroy
end on

type m_saveas from menu within m_file
end type

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_saveas")
end event

on m_saveas.create
call super::create
this.text = "Save &As..."
this.microhelp = "Save As"
this.toolbaritemvisible = false
this.toolbaritemname = "SaveAs!"
this.toolbaritemtext = "Save As"
this.toolbaritemorder = 30
end on

on m_saveas.destroy
call super::destroy
end on

type m_dash12 from menu within m_file
end type

on m_dash12.create
call super::create
this.text = "-"
end on

on m_dash12.destroy
call super::destroy
end on

type m_print from menu within m_file
end type

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_print")
end event

on m_print.create
call super::create
this.text = "&Print...~tCtrl+P"
this.shortcut = 336
this.microhelp = "Prints the item"
end on

on m_print.destroy
call super::destroy
end on

type m_printpreview from menu within m_file
end type

on clicked;of_SendMessage ("pfc_printpreview")
end on

on m_printpreview.create
call super::create
this.text = "Print Pre&view"
this.microhelp = "View pages as they will be printed"
this.toolbaritemname = "EditDataFreeform!"
this.toolbaritemtext = "Print Preview"
this.toolbaritemorder = 40
end on

on m_printpreview.destroy
call super::destroy
end on

type m_pagesetup from menu within m_file
end type

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_pagesetup")
end event

on m_pagesetup.create
call super::create
this.text = "Page Set&up..."
this.microhelp = "Changes page layout settings"
end on

on m_pagesetup.destroy
call super::destroy
end on

type m_printimmediate from menu within m_file
end type

event clicked;of_SendMessage ("pfc_printimmediate")
end event

on m_printimmediate.create
call super::create
this.visible = false
this.text = "Print Immediate"
this.microhelp = "Prints the item"
this.toolbaritemname = "Print!"
this.toolbaritemtext = "Print"
this.toolbaritemorder = 35
this.toolbaritemspace = 2
end on

on m_printimmediate.destroy
call super::destroy
end on

type m_dash13 from menu within m_file
end type

on m_dash13.create
call super::create
this.visible = false
this.text = "-"
end on

on m_dash13.destroy
call super::destroy
end on

type m_delete from menu within m_file
end type

on m_delete.create
call super::create
this.visible = false
this.text = "&Delete~tCtrl+D"
this.enabled = false
this.shortcut = 324
this.microhelp = "Deletes the item"
this.toolbaritemvisible = false
this.toolbaritemname = "Custom009!"
this.toolbaritemtext = "Delete"
this.toolbaritemorder = 60
this.toolbaritemspace = 2
this.shifttoright = true
end on

on m_delete.destroy
call super::destroy
end on

type m_properties from menu within m_file
end type

on m_properties.create
call super::create
this.visible = false
this.text = "P&roperties"
this.enabled = false
this.microhelp = "Displays or changes properties of the item"
this.toolbaritemvisible = false
this.toolbaritemname = "Properties!"
this.toolbaritemtext = "Properties"
this.toolbaritemorder = 65
this.shifttoright = true
end on

on m_properties.destroy
call super::destroy
end on

type m_dash14 from menu within m_file
end type

on m_dash14.create
call super::create
this.text = "-"
this.shifttoright = true
end on

on m_dash14.destroy
call super::destroy
end on

type m_exit from menu within m_file
end type

event clicked;gnv_app.event pfc_exit()
end event

on m_exit.create
call super::create
this.text = "E&xit"
this.microhelp = "Quits the application"
this.toolbaritemvisible = false
this.toolbaritemname = "Exit!"
this.toolbaritemtext = "Exit"
this.toolbaritemorder = 9999
this.toolbaritemspace = 2
this.shifttoright = true
this.menuitemtype = menuitemtypeexit!
end on

on m_exit.destroy
call super::destroy
end on

type m_pfcmrudash1 from menu within m_file
end type

on m_pfcmrudash1.create
call super::create
this.visible = false
this.text = "-"
this.shifttoright = true
end on

on m_pfcmrudash1.destroy
call super::destroy
end on

type m_pfcmru1 from menu within m_file
end type

event clicked;//////////////////////////////////////////////////////////////////////////////
//
// Event:      Clicked
//
// Arguments:  None
//
// Returns:    None
//
// Description:
// Send menu item text from menu to event on window
//
//////////////////////////////////////////////////////////////////////////////
// 
// Revision History
//
// Version
// 6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
/*
 * Open Source PowerBuilder Foundation Class Libraries
 *
 * Copyright (c) 2004-2005, All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted in accordance with the GNU Lesser General
 * Public License Version 2.1, February 1999
 *
 * http://www.gnu.org/copyleft/lesser.html
 *
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals and was originally based on software copyright (c) 
 * 1996-2004 Sybase, Inc. http://www.sybase.com.  For more
 * information on the Open Source PowerBuilder Foundation Class
 * Libraries see http://pfc.codexchange.sybase.com
*/
//
//////////////////////////////////////////////////////////////////////////////

message.stringparm = this.text
of_sendmessage("pfc_mruclicked")

end event

on m_pfcmru1.create
call super::create
this.visible = false
this.text = "pfcmru1"
this.shifttoright = true
end on

on m_pfcmru1.destroy
call super::destroy
end on

type m_pfcmru2 from menu within m_file
end type

event clicked;//////////////////////////////////////////////////////////////////////////////
//
// Event:      Clicked
//
// Arguments:  None
//
// Returns:    None
//
// Description:
// Send menu item text from menu to event on window
//
//////////////////////////////////////////////////////////////////////////////
// 
// Revision History
//
// Version
// 6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
/*
 * Open Source PowerBuilder Foundation Class Libraries
 *
 * Copyright (c) 2004-2005, All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted in accordance with the GNU Lesser General
 * Public License Version 2.1, February 1999
 *
 * http://www.gnu.org/copyleft/lesser.html
 *
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals and was originally based on software copyright (c) 
 * 1996-2004 Sybase, Inc. http://www.sybase.com.  For more
 * information on the Open Source PowerBuilder Foundation Class
 * Libraries see http://pfc.codexchange.sybase.com
*/
//
//////////////////////////////////////////////////////////////////////////////

message.stringparm = this.text
of_sendmessage("pfc_mruclicked")

end event

on m_pfcmru2.create
call super::create
this.visible = false
this.text = "pfcmru2"
this.shifttoright = true
end on

on m_pfcmru2.destroy
call super::destroy
end on

type m_pfcmru3 from menu within m_file
end type

event clicked;//////////////////////////////////////////////////////////////////////////////
//
// Event:      Clicked
//
// Arguments:  None
//
// Returns:    None
//
// Description:
// Send menu item text from menu to event on window
//
//////////////////////////////////////////////////////////////////////////////
// 
// Revision History
//
// Version
// 6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
/*
 * Open Source PowerBuilder Foundation Class Libraries
 *
 * Copyright (c) 2004-2005, All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted in accordance with the GNU Lesser General
 * Public License Version 2.1, February 1999
 *
 * http://www.gnu.org/copyleft/lesser.html
 *
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals and was originally based on software copyright (c) 
 * 1996-2004 Sybase, Inc. http://www.sybase.com.  For more
 * information on the Open Source PowerBuilder Foundation Class
 * Libraries see http://pfc.codexchange.sybase.com
*/
//
//////////////////////////////////////////////////////////////////////////////

message.stringparm = this.text
of_sendmessage("pfc_mruclicked")

end event

on m_pfcmru3.create
call super::create
this.visible = false
this.text = "pfcmru3"
this.shifttoright = true
end on

on m_pfcmru3.destroy
call super::destroy
end on

type m_pfcmru4 from menu within m_file
end type

event clicked;//////////////////////////////////////////////////////////////////////////////
//
// Event:      Clicked
//
// Arguments:  None
//
// Returns:    None
//
// Description:
// Send menu item text from menu to event on window
//
//////////////////////////////////////////////////////////////////////////////
// 
// Revision History
//
// Version
// 6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
/*
 * Open Source PowerBuilder Foundation Class Libraries
 *
 * Copyright (c) 2004-2005, All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted in accordance with the GNU Lesser General
 * Public License Version 2.1, February 1999
 *
 * http://www.gnu.org/copyleft/lesser.html
 *
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals and was originally based on software copyright (c) 
 * 1996-2004 Sybase, Inc. http://www.sybase.com.  For more
 * information on the Open Source PowerBuilder Foundation Class
 * Libraries see http://pfc.codexchange.sybase.com
*/
//
//////////////////////////////////////////////////////////////////////////////

message.stringparm = this.text
of_sendmessage("pfc_mruclicked")

end event

on m_pfcmru4.create
call super::create
this.visible = false
this.text = "pfcmru4"
this.shifttoright = true
end on

on m_pfcmru4.destroy
call super::destroy
end on

type m_pfcmru5 from menu within m_file
end type

event clicked;//////////////////////////////////////////////////////////////////////////////
//
// Event:      Clicked
//
// Arguments:  None
//
// Returns:    None
//
// Description:
// Send menu item text from menu to event on window
//
//////////////////////////////////////////////////////////////////////////////
// 
// Revision History
//
// Version
// 6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
/*
 * Open Source PowerBuilder Foundation Class Libraries
 *
 * Copyright (c) 2004-2005, All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted in accordance with the GNU Lesser General
 * Public License Version 2.1, February 1999
 *
 * http://www.gnu.org/copyleft/lesser.html
 *
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals and was originally based on software copyright (c) 
 * 1996-2004 Sybase, Inc. http://www.sybase.com.  For more
 * information on the Open Source PowerBuilder Foundation Class
 * Libraries see http://pfc.codexchange.sybase.com
*/
//
//////////////////////////////////////////////////////////////////////////////

message.stringparm = this.text
of_sendmessage("pfc_mruclicked")

end event

on m_pfcmru5.create
call super::create
this.visible = false
this.text = "pfcmru5"
this.shifttoright = true
end on

on m_pfcmru5.destroy
call super::destroy
end on

type m_edit from menu within pfc_m_master
m_undo m_undo
m_dash21 m_dash21
m_cut m_cut
m_copy m_copy
m_paste m_paste
m_pastespecial m_pastespecial
m_clear m_clear
m_dash22 m_dash22
m_selectall m_selectall
m_dash23 m_dash23
m_find m_find
m_replace m_replace
m_dash24 m_dash24
m_updatelinks m_updatelinks
m_object1 m_object1
end type

on m_edit.create
call super::create
this.text = "&Edit"
this.m_undo=create m_undo
this.m_dash21=create m_dash21
this.m_cut=create m_cut
this.m_copy=create m_copy
this.m_paste=create m_paste
this.m_pastespecial=create m_pastespecial
this.m_clear=create m_clear
this.m_dash22=create m_dash22
this.m_selectall=create m_selectall
this.m_dash23=create m_dash23
this.m_find=create m_find
this.m_replace=create m_replace
this.m_dash24=create m_dash24
this.m_updatelinks=create m_updatelinks
this.m_object1=create m_object1
this.Item[UpperBound(this.Item)+1]=this.m_undo
this.Item[UpperBound(this.Item)+1]=this.m_dash21
this.Item[UpperBound(this.Item)+1]=this.m_cut
this.Item[UpperBound(this.Item)+1]=this.m_copy
this.Item[UpperBound(this.Item)+1]=this.m_paste
this.Item[UpperBound(this.Item)+1]=this.m_pastespecial
this.Item[UpperBound(this.Item)+1]=this.m_clear
this.Item[UpperBound(this.Item)+1]=this.m_dash22
this.Item[UpperBound(this.Item)+1]=this.m_selectall
this.Item[UpperBound(this.Item)+1]=this.m_dash23
this.Item[UpperBound(this.Item)+1]=this.m_find
this.Item[UpperBound(this.Item)+1]=this.m_replace
this.Item[UpperBound(this.Item)+1]=this.m_dash24
this.Item[UpperBound(this.Item)+1]=this.m_updatelinks
this.Item[UpperBound(this.Item)+1]=this.m_object1
end on

on m_edit.destroy
call super::destroy
destroy(this.m_undo)
destroy(this.m_dash21)
destroy(this.m_cut)
destroy(this.m_copy)
destroy(this.m_paste)
destroy(this.m_pastespecial)
destroy(this.m_clear)
destroy(this.m_dash22)
destroy(this.m_selectall)
destroy(this.m_dash23)
destroy(this.m_find)
destroy(this.m_replace)
destroy(this.m_dash24)
destroy(this.m_updatelinks)
destroy(this.m_object1)
end on

type m_undo from menu within m_edit
end type

on clicked;of_SendMessage ("pfc_undo")
end on

on m_undo.create
call super::create
this.text = "&Undo~tCtrl+Z"
this.shortcut = 346
this.microhelp = "Reverses last action"
this.toolbaritemname = "Undo!"
this.toolbaritemtext = "Undo"
this.toolbaritemorder = 95
this.toolbaritemspace = 2
end on

on m_undo.destroy
call super::destroy
end on

type m_dash21 from menu within m_edit
end type

on m_dash21.create
call super::create
this.text = "-"
end on

on m_dash21.destroy
call super::destroy
end on

type m_cut from menu within m_edit
end type

on clicked;of_SendMessage ("pfc_cut")
end on

on m_cut.create
call super::create
this.text = "Cu&t~tCtrl+X"
this.shortcut = 344
this.microhelp = "Moves the selection to the Clipboard"
this.toolbaritemname = "Cut!"
this.toolbaritemtext = "Cut"
this.toolbaritemorder = 70
this.toolbaritemspace = 2
end on

on m_cut.destroy
call super::destroy
end on

type m_copy from menu within m_edit
end type

on clicked;of_SendMessage ("pfc_copy")
end on

on m_copy.create
call super::create
this.text = "&Copy~tCtrl+C"
this.shortcut = 323
this.microhelp = "Copies the selection to the Clipboard"
this.toolbaritemname = "Copy!"
this.toolbaritemtext = "Copy"
this.toolbaritemorder = 75
end on

on m_copy.destroy
call super::destroy
end on

type m_paste from menu within m_edit
end type

on clicked;of_SendMessage ("pfc_paste")
end on

on m_paste.create
call super::create
this.text = "&Paste~tCtrl+V"
this.shortcut = 342
this.microhelp = "Inserts Clipboard contents at current insertion point"
this.toolbaritemname = "Paste!"
this.toolbaritemtext = "Paste"
this.toolbaritemorder = 80
end on

on m_paste.destroy
call super::destroy
end on

type m_pastespecial from menu within m_edit
end type

on clicked;of_SendMessage ("pfc_pastespecial")
end on

on m_pastespecial.create
call super::create
this.text = "Paste &Special..."
this.microhelp = "Inserts the clipboard contents as a link, object, or other format"
end on

on m_pastespecial.destroy
call super::destroy
end on

type m_clear from menu within m_edit
end type

on clicked;of_SendMessage ("pfc_clear")
end on

on m_clear.create
call super::create
this.text = "Cle&ar"
this.microhelp = "Removes the selection"
this.toolbaritemvisible = false
this.toolbaritemname = "Clear!"
this.toolbaritemtext = "Clear"
this.toolbaritemorder = 85
end on

on m_clear.destroy
call super::destroy
end on

type m_dash22 from menu within m_edit
end type

on m_dash22.create
call super::create
this.text = "-"
end on

on m_dash22.destroy
call super::destroy
end on

type m_selectall from menu within m_edit
end type

on clicked;of_SendMessage ("pfc_selectall")
end on

on m_selectall.create
call super::create
this.text = "Select A&ll~tCtrl+A"
this.shortcut = 321
this.microhelp = "Selects all items or information"
this.toolbaritemvisible = false
this.toolbaritemname = "SelectAll!"
this.toolbaritemtext = "Select All"
this.toolbaritemorder = 90
end on

on m_selectall.destroy
call super::destroy
end on

type m_dash23 from menu within m_edit
end type

on m_dash23.create
call super::create
this.text = "-"
end on

on m_dash23.destroy
call super::destroy
end on

type m_find from menu within m_edit
end type

on m_find.create
call super::create
this.text = "&Find...~tCtrl+F"
this.shortcut = 326
this.microhelp = "Finds the specified text"
this.toolbaritemname = "Find!"
this.toolbaritemtext = "Find"
this.toolbaritemorder = 100
this.toolbaritemspace = 2
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_finddlg")
end event

on m_find.destroy
call super::destroy
end on

type m_replace from menu within m_edit
end type

on m_replace.create
call super::create
this.text = "&Replace...~tCtrl+H"
this.shortcut = 328
this.microhelp = "Replaces specific text with different text"
this.toolbaritemname = "Replace!"
this.toolbaritemtext = "Replace"
this.toolbaritemorder = 105
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_replacedlg")
end event

on m_replace.destroy
call super::destroy
end on

type m_dash24 from menu within m_edit
end type

on m_dash24.create
call super::create
this.text = "-"
end on

on m_dash24.destroy
call super::destroy
end on

type m_updatelinks from menu within m_edit
end type

on m_updatelinks.create
call super::create
this.text = "Update Lin&ks"
this.microhelp = "Allows links to be updated"
this.shifttoright = true
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_updatelinks")
end event

on m_updatelinks.destroy
call super::destroy
end on

type m_object1 from menu within m_edit
m_edit1 m_edit1
m_open1 m_open1
end type

on m_object1.create
call super::create
this.text = "&Object"
this.microhelp = "Contains commands for activating an object"
this.shifttoright = true
this.m_edit1=create m_edit1
this.m_open1=create m_open1
this.Item[UpperBound(this.Item)+1]=this.m_edit1
this.Item[UpperBound(this.Item)+1]=this.m_open1
end on

on m_object1.destroy
call super::destroy
destroy(this.m_edit1)
destroy(this.m_open1)
end on

type m_edit1 from menu within m_object1
end type

on m_edit1.create
call super::create
this.text = "&Edit"
this.microhelp = "Activates selected object"
end on

on m_edit1.destroy
call super::destroy
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_editobject")
end event

type m_open1 from menu within m_object1
end type

on m_open1.create
call super::create
this.text = "&Open"
this.microhelp = "Activates selected object"
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_openobject")
end event

on m_open1.destroy
call super::destroy
end on

type m_view from menu within pfc_m_master
m_ruler m_ruler
m_dash31 m_dash31
m_largeicon m_largeicon
m_smallicons m_smallicons
m_list m_list
m_details m_details
m_dash32 m_dash32
m_arrangeicons m_arrangeicons
m_dash34 m_dash34
m_first m_first
m_priorpage m_priorpage
m_nextpage m_nextpage
m_lastpage m_lastpage
m_dash35 m_dash35
m_sort m_sort
m_filter m_filter
m_dash36 m_dash36
m_zoom m_zoom
end type

on m_view.create
call super::create
this.text = "&View"
this.m_ruler=create m_ruler
this.m_dash31=create m_dash31
this.m_largeicon=create m_largeicon
this.m_smallicons=create m_smallicons
this.m_list=create m_list
this.m_details=create m_details
this.m_dash32=create m_dash32
this.m_arrangeicons=create m_arrangeicons
this.m_dash34=create m_dash34
this.m_first=create m_first
this.m_priorpage=create m_priorpage
this.m_nextpage=create m_nextpage
this.m_lastpage=create m_lastpage
this.m_dash35=create m_dash35
this.m_sort=create m_sort
this.m_filter=create m_filter
this.m_dash36=create m_dash36
this.m_zoom=create m_zoom
this.Item[UpperBound(this.Item)+1]=this.m_ruler
this.Item[UpperBound(this.Item)+1]=this.m_dash31
this.Item[UpperBound(this.Item)+1]=this.m_largeicon
this.Item[UpperBound(this.Item)+1]=this.m_smallicons
this.Item[UpperBound(this.Item)+1]=this.m_list
this.Item[UpperBound(this.Item)+1]=this.m_details
this.Item[UpperBound(this.Item)+1]=this.m_dash32
this.Item[UpperBound(this.Item)+1]=this.m_arrangeicons
this.Item[UpperBound(this.Item)+1]=this.m_dash34
this.Item[UpperBound(this.Item)+1]=this.m_first
this.Item[UpperBound(this.Item)+1]=this.m_priorpage
this.Item[UpperBound(this.Item)+1]=this.m_nextpage
this.Item[UpperBound(this.Item)+1]=this.m_lastpage
this.Item[UpperBound(this.Item)+1]=this.m_dash35
this.Item[UpperBound(this.Item)+1]=this.m_sort
this.Item[UpperBound(this.Item)+1]=this.m_filter
this.Item[UpperBound(this.Item)+1]=this.m_dash36
this.Item[UpperBound(this.Item)+1]=this.m_zoom
end on

on m_view.destroy
call super::destroy
destroy(this.m_ruler)
destroy(this.m_dash31)
destroy(this.m_largeicon)
destroy(this.m_smallicons)
destroy(this.m_list)
destroy(this.m_details)
destroy(this.m_dash32)
destroy(this.m_arrangeicons)
destroy(this.m_dash34)
destroy(this.m_first)
destroy(this.m_priorpage)
destroy(this.m_nextpage)
destroy(this.m_lastpage)
destroy(this.m_dash35)
destroy(this.m_sort)
destroy(this.m_filter)
destroy(this.m_dash36)
destroy(this.m_zoom)
end on

type m_ruler from menu within m_view
end type

event clicked;of_SendMessage ("pfc_ruler")
end event

on m_ruler.create
call super::create
this.text = "&Ruler"
this.microhelp = "Shows or hides the ruler"
this.shifttoright = true
end on

on m_ruler.destroy
call super::destroy
end on

type m_dash31 from menu within m_view
end type

on m_dash31.create
call super::create
this.text = "-"
this.shifttoright = true
end on

on m_dash31.destroy
call super::destroy
end on

type m_largeicon from menu within m_view
end type

on m_largeicon.create
call super::create
this.visible = false
this.text = "Lar&ge Icons"
this.enabled = false
this.microhelp = "Displays items by using large icons"
this.toolbaritemvisible = false
this.toolbaritemname = "Custom097!"
this.toolbaritemtext = "Large Icons"
this.toolbaritemorder = 145
this.toolbaritemspace = 2
this.shifttoright = true
end on

on m_largeicon.destroy
call super::destroy
end on

type m_smallicons from menu within m_view
end type

on m_smallicons.create
call super::create
this.visible = false
this.text = "S&mall Icons"
this.enabled = false
this.microhelp = "Displays items by using small icons"
this.toolbaritemvisible = false
this.toolbaritemname = "Custom098!"
this.toolbaritemtext = "Small Icons"
this.toolbaritemorder = 150
this.shifttoright = true
end on

on m_smallicons.destroy
call super::destroy
end on

type m_list from menu within m_view
end type

on m_list.create
call super::create
this.visible = false
this.text = "&List"
this.enabled = false
this.microhelp = "Displays items in a list"
this.toolbaritemvisible = false
this.toolbaritemname = "Custom099!"
this.toolbaritemtext = "List"
this.toolbaritemorder = 155
this.shifttoright = true
end on

on m_list.destroy
call super::destroy
end on

type m_details from menu within m_view
end type

on m_details.create
call super::create
this.visible = false
this.text = "&Details"
this.enabled = false
this.microhelp = "Displays information about each item"
this.toolbaritemvisible = false
this.toolbaritemname = "Custom100!"
this.toolbaritemtext = "Details"
this.toolbaritemorder = 160
this.shifttoright = true
end on

on m_details.destroy
call super::destroy
end on

type m_dash32 from menu within m_view
end type

on m_dash32.create
call super::create
this.visible = false
this.text = "-"
this.shifttoright = true
end on

on m_dash32.destroy
call super::destroy
end on

type m_arrangeicons from menu within m_view
m_by1 m_by1
m_dash33 m_dash33
m_autoarrange m_autoarrange
end type

on m_arrangeicons.create
call super::create
this.visible = false
this.text = "Arrange &Icons"
this.enabled = false
this.microhelp = "Contains commands for arranging items"
this.shifttoright = true
this.m_by1=create m_by1
this.m_dash33=create m_dash33
this.m_autoarrange=create m_autoarrange
this.Item[UpperBound(this.Item)+1]=this.m_by1
this.Item[UpperBound(this.Item)+1]=this.m_dash33
this.Item[UpperBound(this.Item)+1]=this.m_autoarrange
end on

on m_arrangeicons.destroy
call super::destroy
destroy(this.m_by1)
destroy(this.m_dash33)
destroy(this.m_autoarrange)
end on

type m_by1 from menu within m_arrangeicons
end type

on m_by1.create
call super::create
this.text = "by"
this.microhelp = "Arrange by"
end on

on m_by1.destroy
call super::destroy
end on

type m_dash33 from menu within m_arrangeicons
end type

on m_dash33.create
call super::create
this.text = "-"
this.shifttoright = true
end on

on m_dash33.destroy
call super::destroy
end on

type m_autoarrange from menu within m_arrangeicons
end type

on m_autoarrange.create
call super::create
this.text = "&Auto Arrange"
this.microhelp = "Arranges the icons automatically"
this.shifttoright = true
end on

on m_autoarrange.destroy
call super::destroy
end on

type m_dash34 from menu within m_view
end type

on m_dash34.create
call super::create
this.visible = false
this.text = "-"
this.shifttoright = true
end on

on m_dash34.destroy
call super::destroy
end on

type m_first from menu within m_view
end type

event clicked;of_SendMessage ("pfc_firstpage")
end event

on m_first.create
call super::create
this.text = "&First"
this.microhelp = "First"
this.toolbaritemvisible = false
this.toolbaritemname = "VCRFirst!"
this.toolbaritemtext = "First"
this.toolbaritemorder = 165
this.toolbaritemspace = 2
this.shifttoright = true
end on

on m_first.destroy
call super::destroy
end on

type m_priorpage from menu within m_view
end type

event clicked;of_SendMessage ("pfc_previouspage")
end event

on m_priorpage.create
call super::create
this.text = "&Prior"
this.microhelp = "Prior"
this.toolbaritemvisible = false
this.toolbaritemname = "VCRPrior!"
this.toolbaritemtext = "Prior"
this.toolbaritemorder = 170
this.shifttoright = true
end on

on m_priorpage.destroy
call super::destroy
end on

type m_nextpage from menu within m_view
end type

event clicked;of_SendMessage ("pfc_nextpage")
end event

on m_nextpage.create
call super::create
this.text = "&Next"
this.microhelp = "Next"
this.toolbaritemvisible = false
this.toolbaritemname = "VCRNext!"
this.toolbaritemtext = "Next"
this.toolbaritemorder = 175
this.shifttoright = true
end on

on m_nextpage.destroy
call super::destroy
end on

type m_lastpage from menu within m_view
end type

event clicked;of_SendMessage ("pfc_lastpage")
end event

on m_lastpage.create
call super::create
this.text = "L&ast"
this.microhelp = "Last"
this.toolbaritemvisible = false
this.toolbaritemname = "VCRLast!"
this.toolbaritemtext = "Last"
this.toolbaritemorder = 180
this.shifttoright = true
end on

on m_lastpage.destroy
call super::destroy
end on

type m_dash35 from menu within m_view
end type

on m_dash35.create
call super::create
this.text = "-"
this.shifttoright = true
end on

on m_dash35.destroy
call super::destroy
end on

type m_sort from menu within m_view
end type

on m_sort.create
call super::create
this.text = "&Sort..."
this.microhelp = "Sorts items"
this.toolbaritemtext = "Sort"
this.shifttoright = true
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_sortdlg")
end event

on m_sort.destroy
call super::destroy
end on

type m_filter from menu within m_view
end type

on m_filter.create
call super::create
this.text = "Fil&ter..."
this.microhelp = "Filters items"
this.toolbaritemtext = "Filter"
this.shifttoright = true
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_filterdlg")
end event

on m_filter.destroy
call super::destroy
end on

type m_dash36 from menu within m_view
end type

on m_dash36.create
call super::create
this.text = "-"
this.shifttoright = true
end on

on m_dash36.destroy
call super::destroy
end on

type m_zoom from menu within m_view
end type

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_zoom")
end event

on m_zoom.create
call super::create
this.text = "&Zoom..."
this.microhelp = "Scales the display of the print preview"
this.shifttoright = true
end on

on m_zoom.destroy
call super::destroy
end on

type m_insert from menu within pfc_m_master
m_insertfile m_insertfile
m_picture m_picture
m_dash41 m_dash41
m_object m_object
end type

on m_insert.create
call super::create
this.text = "&Insert"
this.m_insertfile=create m_insertfile
this.m_picture=create m_picture
this.m_dash41=create m_dash41
this.m_object=create m_object
this.Item[UpperBound(this.Item)+1]=this.m_insertfile
this.Item[UpperBound(this.Item)+1]=this.m_picture
this.Item[UpperBound(this.Item)+1]=this.m_dash41
this.Item[UpperBound(this.Item)+1]=this.m_object
end on

on m_insert.destroy
call super::destroy
destroy(this.m_insertfile)
destroy(this.m_picture)
destroy(this.m_dash41)
destroy(this.m_object)
end on

type m_insertfile from menu within m_insert
end type

on m_insertfile.create
call super::create
this.text = "&File..."
this.microhelp = "Inserts the text of another file"
this.shifttoright = true
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_insertfile")
end event

on m_insertfile.destroy
call super::destroy
end on

type m_picture from menu within m_insert
end type

on m_picture.create
call super::create
this.text = "&Picture..."
this.microhelp = "Inserts a picture from a graphics file"
this.shifttoright = true
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_insertpicture")
end event

on m_picture.destroy
call super::destroy
end on

type m_dash41 from menu within m_insert
end type

on m_dash41.create
call super::create
this.text = "-"
this.shifttoright = true
end on

on m_dash41.destroy
call super::destroy
end on

type m_object from menu within m_insert
end type

on m_object.create
call super::create
this.text = "&Object..."
this.microhelp = "Inserts an object"
this.shifttoright = true
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_insertobject")
end event

on m_object.destroy
call super::destroy
end on

type m_tools from menu within pfc_m_master
m_toolbars m_toolbars
end type

on m_tools.create
call super::create
this.text = "&Tools"
this.m_toolbars=create m_toolbars
this.Item[UpperBound(this.Item)+1]=this.m_toolbars
end on

on m_tools.destroy
call super::destroy
destroy(this.m_toolbars)
end on

type m_toolbars from menu within m_tools
end type

on m_toolbars.create
call super::create
this.text = "&Customize Toolbars..."
this.microhelp = "Arranges toolbar buttons"
this.shifttoright = true
end on

event clicked;SetPointer (hourglass!)
of_SendMessage ("pfc_toolbars")
end event

on m_toolbars.destroy
call super::destroy
end on

type m_window from menu within pfc_m_master
m_cascade m_cascade
m_tilehorizontal m_tilehorizontal
m_tilevertical m_tilevertical
m_layer m_layer
m_dash51 m_dash51
m_minimizeall m_minimizeall
m_undoarrange m_undoarrange
end type

on m_window.create
call super::create
this.text = "&Window"
this.shifttoright = true
this.mergeoption = windowmenu!
this.m_cascade=create m_cascade
this.m_tilehorizontal=create m_tilehorizontal
this.m_tilevertical=create m_tilevertical
this.m_layer=create m_layer
this.m_dash51=create m_dash51
this.m_minimizeall=create m_minimizeall
this.m_undoarrange=create m_undoarrange
this.Item[UpperBound(this.Item)+1]=this.m_cascade
this.Item[UpperBound(this.Item)+1]=this.m_tilehorizontal
this.Item[UpperBound(this.Item)+1]=this.m_tilevertical
this.Item[UpperBound(this.Item)+1]=this.m_layer
this.Item[UpperBound(this.Item)+1]=this.m_dash51
this.Item[UpperBound(this.Item)+1]=this.m_minimizeall
this.Item[UpperBound(this.Item)+1]=this.m_undoarrange
end on

on m_window.destroy
call super::destroy
destroy(this.m_cascade)
destroy(this.m_tilehorizontal)
destroy(this.m_tilevertical)
destroy(this.m_layer)
destroy(this.m_dash51)
destroy(this.m_minimizeall)
destroy(this.m_undoarrange)
end on

event selected;//////////////////////////////////////////////////////////////////////////////
//
// Event:  selected
//
// Description:
// Enables menu items based on sheet manager service
//
//////////////////////////////////////////////////////////////////////////////
// 
// Revision History
//
// Version
// 5.0   Initial version
// 6.0.01   Remove logic to disable menu items after windows have been minimized 
//
//////////////////////////////////////////////////////////////////////////////
//
/*
 * Open Source PowerBuilder Foundation Class Libraries
 *
 * Copyright (c) 2004-2005, All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted in accordance with the GNU Lesser General
 * Public License Version 2.1, February 1999
 *
 * http://www.gnu.org/copyleft/lesser.html
 *
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals and was originally based on software copyright (c) 
 * 1996-2004 Sybase, Inc. http://www.sybase.com.  For more
 * information on the Open Source PowerBuilder Foundation Class
 * Libraries see http://pfc.codexchange.sybase.com
*/
//
//////////////////////////////////////////////////////////////////////////////

any            la_rc
boolean        lb_normal
integer        li_rc
integer        li_sheetcount
integer        li_cnt = 1
arrangetypes   le_arrange
n_cst_menu     lnv_menu
window         lw_obj
window         lw_sheet[]
w_frame        lw_frame

// Get frame window
li_rc = lnv_menu.of_GetMDIFrame (this, lw_obj)
if li_rc < 0 then
   return
end if

// Determine if frame is a PFC frame descendant
la_rc = lw_obj.dynamic event pfc_descendant()
if IsNull (la_rc) then
   return
end if
lw_frame = lw_obj

// If sheetmanager service is enabled, allow for undo and minimize capabilities
if IsValid (lw_frame.inv_sheetmanager) then

   // First determine if there are any nonminimized sheets open
   li_sheetcount = lw_frame.inv_sheetmanager.of_GetSheets (lw_sheet)
   do while li_cnt <= li_sheetcount and not lb_normal
      if lw_sheet[li_cnt].windowstate <> minimized! then
         lb_normal = true
      end if
      li_cnt++
   loop

   this.m_undoarrange.enabled = true
   this.m_minimizeall.enabled = lb_normal
   this.m_cascade.enabled = lb_normal
   this.m_layer.enabled = lb_normal
   this.m_tilehorizontal.enabled = lb_normal
   this.m_tilevertical.enabled = lb_normal

   // Get current arrange state of windows and set undo text
   le_arrange = lw_frame.inv_sheetmanager.of_GetCurrentState()
   choose case le_arrange
      case tile!
         this.m_undoarrange.text = "&Undo Tile Vertical"
         this.m_undoarrange.microhelp = "Undoes vertical tile arrangement of windows"
      case tilehorizontal!
         this.m_undoarrange.text = "&Undo Tile Horizontal"
         this.m_undoarrange.microhelp = "Undoes horizontal tile arrangement of windows"
      case cascade!
         this.m_undoarrange.text = "&Undo Cascade"
         this.m_undoarrange.microhelp = "Undoes cascaded arrangement of windows"
      case layer!
         this.m_undoarrange.text = "&Undo Layer"
         this.m_undoarrange.microhelp = "Undoes layered arrangement of windows"
      case icons!
         this.m_undoarrange.text = "&Undo Minimize All"
         this.m_undoarrange.microhelp = "Undoes minimization of windows"
      case else
         this.m_undoarrange.enabled = false
         this.m_undoarrange.text = "&Undo"
         this.m_undoarrange.microhelp = "Undo"
   end choose
else
   this.m_minimizeall.enabled = false
   this.m_undoarrange.enabled = false
end if

end event

type m_cascade from menu within m_window
end type

on m_cascade.create
call super::create
this.text = "&Cascade"
this.microhelp = "Cascade windows so that each title bar is visible"
this.toolbaritemvisible = false
this.toolbaritemname = "Cascade!"
this.toolbaritemtext = "Cascade"
this.toolbaritemorder = 220
this.toolbaritemspace = 2
end on

event clicked;of_SendMessage ("pfc_cascade")
end event

on m_cascade.destroy
call super::destroy
end on

type m_tilehorizontal from menu within m_window
end type

on m_tilehorizontal.create
call super::create
this.text = "Tile &Horizontal"
this.microhelp = "Tile windows horizontally so that none are overlapping"
this.toolbaritemvisible = false
this.toolbaritemname = "Horizontal!"
this.toolbaritemtext = "Tile Horizontal"
this.toolbaritemorder = 225
end on

event clicked;of_SendMessage ("pfc_tilehorizontal")
end event

on m_tilehorizontal.destroy
call super::destroy
end on

type m_tilevertical from menu within m_window
end type

on m_tilevertical.create
call super::create
this.text = "Tile &Vertical"
this.microhelp = "Tile windows vertically so that none are overlapping"
this.toolbaritemvisible = false
this.toolbaritemname = "Tile!"
this.toolbaritemtext = "Tile Vertical"
this.toolbaritemorder = 230
end on

event clicked;of_SendMessage ("pfc_tilevertical")
end event

on m_tilevertical.destroy
call super::destroy
end on

type m_layer from menu within m_window
end type

on m_layer.create
call super::create
this.text = "&Layer"
this.microhelp = "Layer windows so that each one completely covers the one below it"
this.toolbaritemvisible = false
this.toolbaritemname = "Layer!"
this.toolbaritemtext = "Layer"
this.toolbaritemorder = 235
end on

event clicked;of_SendMessage ("pfc_layer")
end event

on m_layer.destroy
call super::destroy
end on

type m_dash51 from menu within m_window
end type

on m_dash51.create
call super::create
this.text = "-"
end on

on m_dash51.destroy
call super::destroy
end on

type m_minimizeall from menu within m_window
end type

on m_minimizeall.create
call super::create
this.text = "&Minimize All Windows"
this.microhelp = "Minimizes all windows"
end on

event clicked;of_SendMessage ("pfc_minimizeall")
end event

on m_minimizeall.destroy
call super::destroy
end on

type m_undoarrange from menu within m_window
end type

on m_undoarrange.create
call super::create
this.text = "&Undo"
this.microhelp = "Undo"
end on

event clicked;of_SendMessage ("pfc_undoarrange")
end event

on m_undoarrange.destroy
call super::destroy
end on

type m_help from menu within pfc_m_master
m_helptopics m_helptopics
m_dash61 m_dash61
m_about m_about
end type

on m_help.create
call super::create
this.text = "&Help"
this.shifttoright = true
this.m_helptopics=create m_helptopics
this.m_dash61=create m_dash61
this.m_about=create m_about
this.Item[UpperBound(this.Item)+1]=this.m_helptopics
this.Item[UpperBound(this.Item)+1]=this.m_dash61
this.Item[UpperBound(this.Item)+1]=this.m_about
end on

on m_help.destroy
call super::destroy
destroy(this.m_helptopics)
destroy(this.m_dash61)
destroy(this.m_about)
end on

type m_helptopics from menu within m_help
end type

on clicked;of_SendMessage ("pfc_help")
end on

on m_helptopics.create
call super::create
this.text = "&Help Topics"
this.microhelp = "Displays help topics"
this.toolbaritemvisible = false
this.toolbaritemname = "Custom101!"
this.toolbaritemtext = "Help Topics"
this.toolbaritemorder = 255
this.toolbaritemspace = 2
end on

on m_helptopics.destroy
call super::destroy
end on

type m_dash61 from menu within m_help
end type

on m_dash61.create
call super::create
this.text = "-"
this.shifttoright = true
end on

on m_dash61.destroy
call super::destroy
end on

type m_about from menu within m_help
end type

event clicked;SetPointer (hourglass!)
gnv_app.of_about()

end event

on m_about.create
call super::create
this.text = "&About"
this.microhelp = "Displays program information"
this.shifttoright = true
this.menuitemtype = menuitemtypeabout!
end on

on m_about.destroy
call super::destroy
end on

  • menu pfc_m_master(srm)
    • menu m_file
      • menu m_new
      • menu m_open
      • menu m_close
      • menu m_dash11
      • menu m_save
      • menu m_saveas
      • menu m_dash12
      • menu m_print
      • menu m_printpreview
      • menu m_pagesetup
      • menu m_printimmediate
      • menu m_dash13
      • menu m_delete
      • menu m_properties
      • menu m_dash14
      • menu m_exit
      • menu m_pfcmrudash1
      • menu m_pfcmru1
      • menu m_pfcmru2
      • menu m_pfcmru3
      • menu m_pfcmru4
      • menu m_pfcmru5
    • menu m_edit
      • menu m_undo
      • menu m_dash21
      • menu m_cut
      • menu m_copy
      • menu m_paste
      • menu m_pastespecial
      • menu m_clear
      • menu m_dash22
      • menu m_selectall
      • menu m_dash23
      • menu m_find
      • menu m_replace
      • menu m_dash24
      • menu m_updatelinks
      • menu m_object1
    • menu m_view
      • menu m_ruler
      • menu m_dash31
      • menu m_largeicon
      • menu m_smallicons
      • menu m_list
      • menu m_details
      • menu m_dash32
      • menu m_arrangeicons
        • menu m_by1
        • menu m_dash33
        • menu m_autoarrange
      • menu m_dash34
      • menu m_first
      • menu m_priorpage
      • menu m_nextpage
      • menu m_lastpage
      • menu m_dash35
      • menu m_sort
      • menu m_filter
      • menu m_dash36
      • menu m_zoom
    • menu m_insert
    • menu m_tools
    • menu m_window
    • menu m_help
      • menu m_helptopics
      • menu m_dash61
      • menu m_about