Menu Interface

The constructor function returns an object that is used by the OpenClient to control the menu. This interface object must have the following functions:

destroy

 

 

Purpose

Remove the menu from the environment and free up any resources used by the object instance. This function has no parameters and no return value.

Parameters

This function has no parameters.

Remarks

Return value:

This function has no return value.

Example

 

 

setMenu

 

 

Purpose

Sets the menu.

Parameters

menuObject is an object containing the menu structure (see below for full details of this object).

Remarks

Return value:

This function has no return value.

Example

 

setProperty

 

 

Purpose

Sets a property.

Parameters

name is the property name.

Value is the property value.

Remarks

Return value:

This function has no return value.

Example

 

Show

 

 

Purpose

Shows the menu. This function has no parameters and no return value.

Parameters

This function has no parameters

Remarks

Return value:

This function has no return value.

Example

 

Hide

 

 

Purpose

Hides the menu. This function has no parameters and no return value.

Parameters

This function has no parameters.

Remarks

Return value:

This function has no return value.

Example

 

Menu Structure

The menuObject passed as a parameter in the setMenu function is a collection of Menu objects each of which has properties.

menuObject

 

 

Purpose

When passed as a parameter in the setMenu function, menuObject is a collection of menu objects with properties.

Parameters

name is the menu name.

title is the menu title.

actionId is the menu action ID.

children is an array of child menu objects.

Remarks

 

Example

menuObject = {

name: ‘topmenu’,
title: ‘’,
actionId: ‘’,
children: [

{name: ‘menu1’,
title: ‘File’,
actionId: ‘100’,
children: [

{name: ‘action11’,
title: ‘New’,
actionId: ‘101’,
children: []},

{name: ‘action12’,
title: ‘Open’,
actionId: ‘102’,
children: []},

{name: ‘action13’,
title: ‘Close’,
actionId: ‘103’,
children: []}

]},

{name: ‘menu2’,
title: ‘Edit’,
actionId: ‘200’,
children: [

{name: ‘action21’,
title: ‘Cut’,
actionId: ‘201’,
children: []},

{name: ‘action22’,
title: ‘Copy’,
actionId: ‘202’,
children: []},

{name: ‘action23’,
title: ‘Paste’,
actionId: ‘203’,
children: []}

]}

]

}

 

Comment on this topic

Topic ID: 800067

 
 
 

Table of Contents

Index

Glossary

-Search-

Back