of_redraw


pfcmain.pbl   >   pfc_u_st_splitbar   >   of_redraw   

Full name pfc_u_st_splitbar.of_redraw
Access protected
Extend of integer
Return value integer
Prototype protected function integer of_redraw(integer,integer,integer,integer)

Name Datatype
No Data

Name Datatype
li_cnt Integer

protected function integer of_redraw (integer ai_prevx, integer ai_prevwidth, integer ai_prevy, integer ai_prevheight);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_Redraw
//
//	Access:  		protected
//
//	Arguments:		
//	 ai_prevx 		The bar previous X location.
//	 ai_prevwidth 	The bar previous Width.
//	 ai_prevy 		The bar previous Y location.
//	 ai_prevheight The bar previous Height.
//
//	Returns:  		Integer
//						1 if it succeeds and -1 if an error occurs.
//
//	Description:	Perform a Redraw on those object which may be still showing
//						the bar on its previous position.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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

// Validate required values.
If ii_style <0 or ii_barwidth <0 Then 
	Return -1
End If

If ii_style = HORIZONTAL Then
	// Redraw the objects above the Horizontal Split Bar.
	For li_cnt = 1 to ii_lefttopbound
		If IsValid(idrg_lefttop[li_cnt]) Then
			If (ai_prevy >= idrg_lefttop[li_cnt].Y Or &
				 ai_prevy + ai_prevheight >= idrg_lefttop[li_cnt].Y) And &
				ai_prevy < idrg_lefttop[li_cnt].Y + idrg_lefttop[li_cnt].Height Then				
				idrg_lefttop[li_cnt].SetRedraw(True)
			End If
		End If
	Next

	// Redraw the objects below the Horizontal Split Bar.
	For li_cnt = 1 to ii_rightbottombound
		If IsValid(idrg_rightbottom[li_cnt]) Then
			If (ai_prevy >= idrg_rightbottom[li_cnt].Y Or & 
				 ai_prevy + ai_prevheight >= idrg_rightbottom[li_cnt].Y ) And &
				ai_prevy < idrg_rightbottom[li_cnt].Y + idrg_rightbottom[li_cnt].Height Then				
				idrg_rightbottom[li_cnt].SetRedraw(True)
			End If
		End If
	Next		
ElseIf ii_style = VERTICAL Then
	
	// Redraw the objects left of the Vertical Split Bar.				
	For li_cnt = 1 to ii_lefttopbound
		If IsValid(idrg_lefttop[li_cnt]) Then
			If (ai_prevx >= idrg_lefttop[li_cnt].X Or & 
				 ai_prevx + ai_prevwidth >= idrg_lefttop[li_cnt].X) And &
				ai_prevx < idrg_lefttop[li_cnt].X + idrg_lefttop[li_cnt].Width Then				
				idrg_lefttop[li_cnt].SetRedraw(True)
			End If
		End If
	Next

	// Redraw the objects right of the Vertical Split Bar.				
	For li_cnt = 1 to ii_rightbottombound
		If IsValid(idrg_rightbottom[li_cnt]) Then
			If (ai_prevx >= idrg_rightbottom[li_cnt].X Or & 
				 ai_prevx + ai_prevwidth >= idrg_rightbottom[li_cnt].X) And &
				ai_prevx < idrg_rightbottom[li_cnt].X + idrg_rightbottom[li_cnt].Width Then				
				idrg_rightbottom[li_cnt].SetRedraw(True)
			End If
		End If
	Next		
End If

Return 1
end function

     
Name Owner
pfc_u_st_splitbar.of_mousemove pfc_u_st_splitbar

     
Name Owner
dragobject.setredraw dragobject
systemfunctions.isvalid systemfunctions

     
Full name
No Data

     
Name Scope
No Data