|
of_getalltoolbarindex
|
|
Full name
|
pfc_n_cst_menu.of_getalltoolbarindex
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_getalltoolbarindex(menu,ref integer[])
|
Name
|
Datatype
|
li_cnt
|
integer
|
li_limit
|
integer
|
public function integer of_getalltoolbarindex (menu am_source, ref integer ai_barindex[]);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetAllToolbarIndex
//
// Access: public
//
// Arguments:
// am_source The menu that should be searched.
// ai_barindex[] Array to hold all unique ToolbarItemBarIndex found.
//
// Returns: integer
// The size of the array holding the unique entries found.
// -1 if an error occurs.
//
// Description: Returns an array holding all unique ToolbarItemBarIndex
// found.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
integer li_limit
integer li_cnt
//Check arguments
If Not IsValid(am_source) or IsNull(am_source) Then
Return -1
End If
//Hold in array those ToolbarItemBarIndex that have not been previously
//stored.
if Len (am_source.toolbaritemname) > 0 then
If Not of_IsInArray(ai_barindex, am_source.ToolbarItemBarIndex) Then
ai_barindex[UpperBound(ai_barindex)+1] = am_source.ToolbarItemBarIndex
End If
End If
//Search through the rest of the menu
li_limit = UpperBound (am_source.item)
For li_cnt = 1 to li_limit
of_GetAllToolbarIndex (am_source.item[li_cnt], ai_barindex)
Next
return upperbound(ai_barindex)
end function