A script-enabled browser is required for this page to function properly.

Menu Item Object Functions

This section describes the functions of the Oracle Forms Open API Menu Item object.

d2fmnicr_Create( d2fctx *pd2fctx, d2fob *parent, d2fmni **ppd2fmni, text *name );

This function creates a menu item. You specify a pointer to the context in pd2fctx, a pointer to the parent of the new menu item object in parent, a handle for the function to store the newly-created object in ppd2fmni, and the name of the new object in name.

This function returns D2FS_SUCCESS if it is able to create a new menu item in ppd2fmni.

d2fmnide_Destroy( d2fctx *pd2fctx, d2fmni *pd2fmni );

This function destroys the specified menu item. You specify a pointer to the context in pd2fctx and a pointer to the menu item you want to destroy in pd2fmni.

d2fmnidu_Duplicate( d2fctx *pd2fctx, d2fob *new_parent, d2mni *pd2fmni_src, d2fmni **ppd2fmni_dst, text *new_name );

This function duplicates the specified menu item. You specify a pointer to the context in pd2fctx, a pointer to the new parent in new_parent, a pointer to the menu item source in pd2fmni_src, , a handle for the function to store the destination in ppd2fmni_dst, and a pointer for the name of the new menu item (new_name).

This function returns D2FS_SUCCESS if it is able duplicate the specified menu item and place it at the ppd2fmni_dst location.

d2fmnico_CompileObj( d2fctx *pd2fctx, d2fmni *pd2fmni );

This function compiles all of the PL/SQL code associated with the specified menu item. You specify a pointer to the context in pd2fctx and a pointer to the object you want to compile in pd2fmni.

For example, you might use this function to compile all of the trigger objects attached to a menu item.

d2fmnild_Load( d2fctx *pd2fctx, d2fmni **ppd2fmni, text *menuname, boolean db );

This function loads the specified menu item. You specify the context (pd2fctx), a handle to a pointer for the function to use to store the menu item (ppd2fmni), the name of the menu item (menuname), and a boolean flag (db) to indicate if the menu item is in a database.

If you set db to TRUE, the Forms API searches for the specified menu item in the database. Note that this assumes that you have connected to some database. You must call d2fctx_Connect() before you load a form module from a database.

d2fmniar_AddRole( d2fctx *pd2fctx, d2fmni *pd2fmni, number index, text *role_name );

This function adds a security "role" to the specified menu item. You specify a pointer to the context in pd2fctx, a pointer to the menu item in pd2fmni, the index into the role list where the Forms API will store this role in index, and the name of the role to be added to the list in role_name. This function also uses a 1 based index rather than a Zero based index; e.g the range of valid values is from 1 to D2FP_ROLE_COUNT.

The "AddRole", "RemoveRole", and "GetRole" functions enable you to specify which security roles have access to a particular menu item.

Note that there is a Forms API property called D2FB_ROLE_COUNT that you can use to retrieve the count of all roles for a specific menu item.

Note that if you do not specify the menu module roles at the module level, you won’t have access to them at the menu item level.

d2fmnirr_RemoveRole( d2fctx *pd2fctx, d2fmni *pd2fmni, number index );

This function removes the specified security "role" from the specified menu item. You specify a pointer to the context in pd2fctx, a pointer to the menu module in pd2fmni, and the index into the role list where the Forms API will remove this role in index. This function also uses a 1 based index rather than a Zero based index; e.g the range of valid values is from 1 to D2FP_ROLE_COUNT.

The "AddRole", "RemoveRole", and "GetRole" functions enable you to specify which security roles have access to a particular menu item.

Note that there is a Forms API property called D2FB_ROLE_COUNT that you can use to retrieve the count of all roles for a specific menu item.

Note that if you do not specify the menu module roles at the module level, you won’t have access to them at the menu item level.

d2fmnigr_GetRole( d2fctx *pd2fctx, pd2fmni *pd2fmni, number index, text **role_name );

This function retrieves the specified security role from a menu item. You specify a pointer to the context in pd2fctx, a pointer to the menu module in pd2fmni, the index into the role list which the Forms API uses to retrieve this role in index, and a handle for the function to store the name of the role in role_name. This function also uses a 1 based index rather than a Zero based index; e.g the range of valid values is from 1 to D2FP_ROLE_COUNT.

The "AddRole", "RemoveRole", and "GetRole" functions enable you to specify which security roles have access to a particular menu item.

Note that there is a Forms API property called D2FB_ROLE_COUNT that you can use to retrieve the count of all roles for a specific menu item.

Note that if you do not specify the menu module roles at the module level, you won’t have access to them at the menu item level.

d2fmnigb_GetBoolProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum, boolean *pprp );

This function retrieves a property of type boolean for the specified menu item. You specify a pointer to the context in pd2fctx, the menu item in pd2fmni, the property number in pnum, and a pointer to pprp, to store the boolean value.

This function returns D2FS_SUCCESS if it stores the value of the boolean property in pprp.

d2fmnign_GetNumProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum, number *pprp );

This function retrieves a property of type number (an actual scalar constant) for the specified menu item. You specify a pointer to the context in pd2fctx, the menu item in pd2fmni, the property number in pnum, and a pointer to pprp, to store the numeric value.

This function returns D2FS_SUCCESS if it stores the value of the number property in pprp.

d2fmnigt_GetTextProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum, text **pprp );

This function retrieves a property of type text for the specified menu item. You specify a pointer to the context in pd2fctx, the menu item in pd2fmni, the property number in pnum, and a handle to an array of characters in pprp for the function to store the text property value.

This function returns D2FS_SUCCESS if it fills the supplied array with a copy of the text property value for the specified menu item in pprp.

Note that the client is responsible for freeing the text returned by this function.

d2fmnigo_GetObjectProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum, dvoid **pprp );

This function retrieves a property of type object of the specified menu item. You specify a pointer to the context in pd2fctx, the menu item in pd2fmni, a property number in pnum, and a handle to pprp, for the function to store the object property value.

This function returns D2FS_SUCCESS if it stores a handle to the desired object property in pprp.

d2fmnigp_GetBlobProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum, dvoid **pprp );

This function retrieves the value from the client-specified handle. You specify a pointer to the context in pd2fctx, a pointer to the menu item object in pd2fmni, a property number in pnum, and a handle to pprp, for the function to provide access to the client-specified value.

This function returns D2FS_SUCCESS if it stores a handle to the desired client-specified property in pprp.

d2fmnisb_SetBoolProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum, boolean prp );

This function sets the value of the specified menu item boolean property. You specify a pointer to the context in pd2fctx, the menu item in pd2fmni, the property number in pnum, and the boolean value in prp.

This function returns D2FS_SUCCESS if it sets the boolean property with the value you specify in prp.

d2fmnisn_SetNumProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum, number prp );

This function sets the value of the specified menu item number property. You specify a pointer to the context in pd2fctx, the menu item in pd2fmni, the property number in pnum, and the number value in prp.

This function returns D2FS_SUCCESS if it sets the number property with the value you specify in prp.

d2fmnist_SetTextProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum, text *prp );

This function sets the value of the specified menu item text property. You specify a pointer to the context in pd2fctx, the menu item in pd2fmni, the property number in pnum, and a handle to the text value in prp.

This function returns D2FS_SUCCESS if it sets the specified text property with the value stored in prp.

d2fmniso_SetObjectProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum, dvoid *prp );

This function sets the object of the specified menu item property. You specify a pointer to the context in pd2fctx, the menu item in pd2fmni, a property number in pnum, and a handle to the object property in prp.

This function returns D2FS_SUCCESS if it sets the specified object property with the value stored in prp.

d2fmnisp_SetBlobProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum, dvoid *prp );

This function sets the client-specified handle. You specify a pointer to the context in pd2fctx, a pointer to the menu item object in pd2fmni, a property number in pnum, and a pointer to the client-specified value in prp.

This function returns D2FS_SUCCESS if it sets the client-specified handle with the value stored in prp.

d2fmnihp_HasProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum );

This function queries the specified menu item for the specified property. You specify a pointer to the context in pd2fctx, the menu item in pd2fmni, and a property number in pnum.

If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the object has the specified property; otherwise, the function can return a number of possible return values, depending on the circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.

d2fmniip_InheritProp( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum );

This function enables the specified menu item to inherit the specified property. You specify a pointer to the context in pd2fctx, a pointer to the menu item object in pd2fmni, and the property number in pnum.

If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the object has been modified to inherit the specified property; otherwise, the function can return a number of possible return values, depending on the specific circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.

d2fmniii_IspropInherited( d2fctx *pd2fctx, d2fmni *pd2fmni, ub2 pnum );

This function verifies that the specified object’s property is inherited, as is, from its parent object. You specify a pointer to the context in pd2fctx, a pointer to the menu item object in pd2fmni, and the property number in pnum.

If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the property is inherited from the specified object’s parent; otherwise, the function can return a number of possible return values, depending on the specific circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.

d2fmmisc_SubClass( d2fctx *pd2fctx, d2fmmi *pd2fmmi, d2fob *parent, boolean keep_path);

This function returns D2FS_SUCCESS if the specified menu item (pd2fmmi) becomes a subclass of the specified parent (parent). You specify a pointer to the context in pd2fctx, a pointer to the menu item in pd2fmni, a pointer to the parent object in parent, and a boolean flag to save the path to the parent object in keep_path.

Note that the Forms API uses the boolean keep_path argument to save the actual path information. It is recommended that you do not set keep_path to TRUE since this information may be lost if you move to another machine. If keep_path is set to TRUE, the Forms API saves the actual path in the .fmb file. Therefore, the next time the form is loaded, depending on how the environment variable Forms 4.5 or 5.0 path is defined, the Forms API searches for the parent form in one of the specified directories defined by the environment variable.

d2fmmiis_IsSubclassed ( d2fctx *pd2fctx, d2fmmi *pd2fmni );

This function verifies that the specified object is a subclass of another object. You specify a pointer to the context in pd2fctx and a pointer to the menu object in pd2fmnu.

If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the specified object is a subclass of another object; otherwise, the function can return a number of possible return values, depending on the specific circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.


Creating modules using the Open API

Modifying modules using the Open API

About Open API header files

Menu item object macros

Menu item object API properties

Menu item object