|
of_mousemove
|
|
Full name
|
pfc_u_st_splitbar.of_mousemove
|
Access
|
protected
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
protected function integer of_mousemove(unsignedlong,integer,integer)
|
Name
|
Datatype
|
li_cnt
|
Integer
|
li_height
|
Integer
|
li_maxx
|
Integer
|
li_maxy
|
Integer
|
li_minx
|
Integer
|
li_miny
|
Integer
|
li_parentx
|
Integer
|
li_parenty
|
Integer
|
li_pointerx
|
Integer
|
li_pointery
|
Integer
|
li_prevheight
|
Integer
|
li_prevwidth
|
Integer
|
li_prevx
|
Integer
|
li_prevy
|
Integer
|
li_upperbound
|
Integer
|
li_width
|
Integer
|
li_x
|
Integer
|
li_y
|
Integer
|
ls_redraw
|
string
|
protected function integer of_mousemove (unsignedlong aul_flags, integer ai_xpos, integer ai_ypos);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_MouseMove
//
// Access: Public
//
// Arguments:
// aul_flags
// ai_xpos
// ai_ypos
//
// Returns: Integer
// Returns 1 if it succeeds and -1 if an error occurs.
//
// Description: One of the split bars is being moved. Refresh the location
// of the appropriate splitbar(s) and perform redraws if requested.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 6.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996 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_cnt
Integer li_pointerx, li_pointery
Integer li_minx, li_maxx, li_miny, li_maxy
Integer li_prevx
Integer li_prevwidth
Integer li_prevheight
Integer li_prevy
Integer li_upperbound
Integer li_parentx, li_parenty
string ls_redraw
Integer li_x, li_y, li_width, li_height
// Validate required values.
If ii_style < 0 Then
Return -1
End If
// Validate that objects were registered.
If UpperBound(idrg_lefttop) =0 Or UpperBound(idrg_rightbottom) =0 Then
Return -1
End If
// Always keep the Split Bar on top of other objects.
this.SetPosition(ToTop!)
// Store the Begin Movement information.
If ii_prevpositionx = UNITIALIZED or ii_prevpositiony = UNITIALIZED Then
ii_prevpositionx = This.X
ii_prevpositiony = This.Y
End If
// Store the previous placement information.
li_prevx = this.X
li_prevwidth = this.Width
li_prevy = this.Y
li_prevheight = this.Height
// Get the new position.
If IsValid(iuo_parent) Then
li_pointerx = iuo_parent.PointerX()
li_pointery = iuo_parent.PointerY()
ElseIf IsValid(itab_parent) Then
li_pointerx = itab_parent.PointerX()
li_pointery = itab_parent.PointerY()
ElseIf IsValid(iw_parent) Then
li_pointerx = iw_parent.PointerX()
li_pointery = iw_parent.PointerY()
Else
Return -1
End If
// Calculate the Extreme points the split bars can be moved.
If ii_style = HORIZONTAL Then
li_miny = of_GetExtremePoint(TOPMOST)
li_maxy = of_GetExtremePoint(BOTTOMMOST)
If li_pointery < li_miny Then
li_pointery = li_miny
ElseIf li_pointery > li_maxy Then
li_pointery = li_maxy
End If
ElseIf ii_style = VERTICAL Then
li_minx = of_GetExtremePoint(LEFTMOST)
li_maxx = of_GetExtremePoint(RIGHTMOST)
If li_pointerx < li_minx Then
li_pointerx = li_minx
ElseIf li_pointerx > li_maxx Then
li_pointerx = li_maxx
End If
End If
// Change to the "Moving" color.
this.BackColor = il_barmovecolor
If ii_style = HORIZONTAL Then
// Position bar on its new location.
this.Y = li_pointery
// Refresh the Width of the bar.
this.Height = ii_barwidth
// Perform redraws when appropriate.
If ib_performredraw Then
If (li_prevy <> this.Y) Then
of_Redraw(li_prevx, li_prevwidth, li_prevy, li_prevheight)
End If
End If
ElseIf ii_style = VERTICAL Then
// Position bar on its new location.
this.X = li_pointerx
// Refresh the Width of the bar.
this.Width = ii_barwidth
// Perform redraws when appropriate.
If ib_performredraw Then
If (li_prevx <> this.X) Then
of_Redraw(li_prevx, li_prevwidth, li_prevy, li_prevheight)
End If
End If
End If
Return 1
end function
Name
|
Owner
|
window.pointerx |
window
|
window.pointery |
window
|
dragobject.pointerx |
dragobject
|
dragobject.pointery |
dragobject
|
dragobject.setposition |
dragobject
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.upperbound |
systemfunctions
|
pfc_u_st_splitbar.of_redraw |
pfc_u_st_splitbar
|
pfc_u_st_splitbar.of_getextremepoint |
pfc_u_st_splitbar
|