File: pfc_m_oc.srm
Size: 9043
Date: Sat, 08 May 2021 23:34:22 +0200
$PBExportHeader$pfc_m_oc.srm
$PBExportComments$PFC Ole Control menu class
forward
global type pfc_m_oc from menu
end type
type m_object from menu within pfc_m_oc
end type
type m_edit from menu within m_object
end type
type m_open from menu within m_object
end type
type m_dash11 from menu within m_object
end type
type m_cut from menu within m_object
end type
type m_copy from menu within m_object
end type
type m_paste from menu within m_object
end type
type m_object from menu within pfc_m_oc
m_edit m_edit
m_open m_open
m_dash11 m_dash11
m_cut m_cut
m_copy m_copy
m_paste m_paste
end type
global type pfc_m_oc from menu
m_object m_object
end type
end forward

global type pfc_m_oc from menu
m_object m_object
event type boolean pfc_isobsolete ( )
end type
global pfc_m_oc pfc_m_oc

type variables
Protected:
boolean     ib_IsObsolete
olecontrol  ioc_parent
end variables

forward prototypes
public function integer of_setparent (olecontrol aoc_parent)
end prototypes

event type boolean pfc_isobsolete();return ib_isobsolete
end event

public function integer of_setparent (olecontrol aoc_parent);//////////////////////////////////////////////////////////////////////////////
//
// Function:  of_SetParent
//
// Access:  public
//
// Arguments:
// aoc_parent   parent object of the menu
//
// Returns:  integer
//  1 = success
// -1 = failure, parent reference is not valid
//
// Description:  Sets the parent object of this menu
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
/*
 * Open Source PowerBuilder Foundation Class Libraries
 *
 * Copyright (c) 2004-2017, All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted in accordance with the MIT License

 *
 * https://opensource.org/licenses/MIT
 *
 * ====================================================================
 *
 * 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 https://github.com/OpenSourcePFCLibraries
*/
//
//////////////////////////////////////////////////////////////////////////////

integer  li_rc = 1

if IsValid (aoc_parent) then
   ioc_parent = aoc_parent
else
   li_rc = -1
end if

return li_rc
end function

on pfc_m_oc.create
pfc_m_oc=this
call super::create
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_object=create m_object
this.Item[UpperBound(this.Item)+1]=this.m_object
end on

on pfc_m_oc.destroy
call super::destroy
destroy(this.m_object)
end on

type m_object from menu within pfc_m_oc
m_edit m_edit
m_open m_open
m_dash11 m_dash11
m_cut m_cut
m_copy m_copy
m_paste m_paste
end type

on m_object.create
call super::create
this.text = "Object"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
this.m_edit=create m_edit
this.m_open=create m_open
this.m_dash11=create m_dash11
this.m_cut=create m_cut
this.m_copy=create m_copy
this.m_paste=create m_paste
this.Item[UpperBound(this.Item)+1]=this.m_edit
this.Item[UpperBound(this.Item)+1]=this.m_open
this.Item[UpperBound(this.Item)+1]=this.m_dash11
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
end on

on m_object.destroy
call super::destroy
destroy(this.m_edit)
destroy(this.m_open)
destroy(this.m_dash11)
destroy(this.m_cut)
destroy(this.m_copy)
destroy(this.m_paste)
end on

type m_edit from menu within m_object
end type

on m_edit.create
call super::create
this.text = "&Edit"
this.microhelp = "Activates the object"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

event clicked;ioc_parent.dynamic event pfc_editobject()
end event

on m_edit.destroy
call super::destroy
end on

type m_open from menu within m_object
end type

on m_open.create
call super::create
this.text = "&Open"
this.microhelp = "Activates the object"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

event clicked;ioc_parent.dynamic event pfc_openobject()
end event

on m_open.destroy
call super::destroy
end on

type m_dash11 from menu within m_object
end type

on m_dash11.create
call super::create
this.text = "-"
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

on m_dash11.destroy
call super::destroy
end on

type m_cut from menu within m_object
end type

on m_cut.create
call super::create
this.text = "C&ut"
this.microhelp = "Moves the selection to the Clipboard"
this.shifttoright = true
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

event clicked;ioc_parent.dynamic event pfc_cut()
end event

on m_cut.destroy
call super::destroy
end on

type m_copy from menu within m_object
end type

on m_copy.create
call super::create
this.text = "&Copy"
this.microhelp = "Copies the selection to the Clipboard"
this.shifttoright = true
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

event clicked;ioc_parent.dynamic event pfc_copy()
end event

on m_copy.destroy
call super::destroy
end on

type m_paste from menu within m_object
end type

on m_paste.create
call super::create
this.text = "&Paste"
this.microhelp = "Inserts the Clipboard contents at the insertion point"
this.shifttoright = true
this.menutextcolor = 134217735
this.menubackcolor = 134217732
this.menuhighlightcolor = 134217741
this.textsize = 8
this.weight = 400
this.facename = "Tahoma"
this.titlebackcolor = 134217730
this.bitmapbackcolor = 12632256
this.menubitmaps = true
this.titlegradient = true
this.toolbartextcolor = 134217746
this.toolbarbackcolor = 67108864
this.toolbarhighlightcolor = 134217741
this.toolbargradient = true
this.bitmapgradient = true
end on

event clicked;ioc_parent.dynamic event pfc_paste()
end event

on m_paste.destroy
call super::destroy
end on