|
pfc_propertyapply
|
|
Full name
|
pfc_u_tabpg_dwproperty_srvresize.pfc_propertyapply
|
Access
|
public
|
Extend of
|
|
Return value
|
|
Prototype
|
event pfc_propertyapply()
|
Name
|
Datatype
|
lb_current
|
boolean
|
lb_currscale
|
boolean
|
lb_desired
|
boolean
|
lb_scale
|
boolean
|
li_currmovex
|
integer
|
li_currmovey
|
integer
|
li_currscalex
|
integer
|
li_currscaley
|
integer
|
li_excludecount
|
integer
|
li_index
|
integer
|
li_movex
|
integer
|
li_movey
|
integer
|
li_rc
|
integer
|
li_row
|
integer
|
li_scalex
|
integer
|
li_scaley
|
integer
|
li_stylecurrent
|
integer
|
li_styledesired
|
integer
|
li_upper
|
integer
|
ls_excludecols
|
string[]
|
ls_object
|
string
|
event pfc_propertyapply;call super::pfc_propertyapply;//////////////////////////////////////////////////////////////////////////////
//
// Function: pfc_PropertyApply
//
// Access: Public
//
// Arguments: None
//
// Returns: Integer
// 1 if it succeeds.
// -1 if an error occurs.
//
// Description:
// Apply the requested changes.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.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_movex, li_movey, li_scalex, li_scaley
integer li_currmovex, li_currmovey, li_currscalex, li_currscaley
boolean lb_scale
boolean lb_currscale
integer li_upper
integer li_row
integer li_rc
integer li_stylecurrent, li_styledesired
integer li_index
integer li_excludecount=0
string ls_excludecols[]
string ls_object
boolean lb_current, lb_desired
// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
Return -1
End If
If IsNull(idw_requestor.inv_resize) or Not IsValid(idw_requestor.inv_resize) Then
Return -1
End If
// -- Register or Unregister Columns. --
// Get the number of items in the ListBox.
li_upper = dw_register.RowCount()
For li_row = 1 to li_upper
// Get the column name.
ls_object = dw_register.object.objectname.primary[li_row]
// Is the object selected to be registered?
If dw_register.object.register.primary[li_row] = 'Y' THEN
// Get the registering parameters.
lb_scale = (dw_register.object.method.primary[li_row] = 'S')
If Not lb_scale Then
li_movex = dw_register.object.movex.primary[li_row]
li_movey = dw_register.object.movey.primary[li_row]
li_scalex = dw_register.object.scalex.primary[li_row]
li_scaley = dw_register.object.scaley.primary[li_row]
End If
// Want this current object to be registered.
If Not idw_requestor.inv_resize.of_IsRegistered(ls_object) Then
// If it was not previously registered, simply register it.
If lb_scale Then
li_rc = idw_requestor.inv_resize.of_Register(ls_object, inv_resize.SCALE)
else
li_rc = idw_requestor.inv_resize.of_Register(ls_object, li_movex, li_movey, &
li_scalex, li_scaley)
End If
Else
// The object is currently registered, we may need to change its
// registration behavior.
li_rc = idw_requestor.inv_resize.of_GetRegistered(ls_object, &
lb_currscale, li_currmovex, li_currmovey, li_currscalex, li_currscaley)
If lb_scale = lb_currscale And li_movex = li_currmovex AND &
li_movey = li_currmovey And li_scalex = li_currscalex AND &
li_scaley = li_currscaley Then
// No need to take any further action.
Else
// Unregister it and then register it back with the new behavior.
li_rc = idw_requestor.inv_resize.of_UnRegister(ls_object)
If lb_scale Then
li_rc = idw_requestor.inv_resize.of_Register(ls_object, inv_resize.SCALE)
else
li_rc = idw_requestor.inv_resize.of_Register(ls_object, li_movex, li_movey, &
li_scalex, li_scaley)
End If
End If
End If
Else
// Want this current column to Not be registed.
If idw_requestor.inv_resize.of_IsRegistered(ls_object) Then
li_rc = idw_requestor.inv_resize.of_UnRegister(ls_object)
End If
End If
Next
Return 1
end event