File: u_vpb.sru
Size: 3139
Date: Mon, 07 Apr 2008 21:31:03 +0200
$PBExportHeader$u_vpb.sru
$PBExportComments$Base VerticalProgressBar Object
forward
global type u_vpb from vprogressbar
end type
end forward

global type u_vpb from vprogressbar
integer width = 78
integer height = 544
unsignedinteger maxposition = 100
unsignedinteger position = 50
integer setstep = 10
end type
global u_vpb u_vpb

type variables
Public:
//Size Order
Long #SizeOrder
//Anchoring
Boolean #AnchorTop
Boolean #AnchorLeft
Boolean #AnchorRight
Boolean #AnchorBottom
//Docking
Boolean #Dock
//Dock Padding
Long #DockType, #DockPadTop, #DockPadLeft, #DockPadRight, #DockPadBottom
//Dock control reference
String #Dock_Control_Top, #Dock_Control_Left, #Dock_Control_Right, #Dock_Control_Bottom
Private:
str_resize istr_resize
CONSTANT long PBS_SMOOTH = 1
CONSTANT long PBS_MARQUEE = 8
CONSTANT long PBM_SETBARCOLOR = 1024 + 9
CONSTANT long PBM_SETBACKCOLOR = 8192 + 1
CONSTANT long PBM_SETMARQUEE = 1024 + 10
end variables
forward prototypes
public function str_resize of_getresizeattrib ()
public subroutine of_setmarquee (boolean ab_set)
public subroutine of_setbarcolor (long al_color)
public subroutine of_setbackcolor (long al_color)
end prototypes

public function str_resize of_getresizeattrib ();istr_resize.Control = this
istr_resize.ControlName = ClassName(this)
istr_resize.SizeOrder = #SizeOrder
istr_resize.SizeOrder = #SizeOrder
istr_resize.Dock = #Dock
istr_resize.DockType = #DockType
istr_resize.DockPadTop = #DockPadTop
istr_resize.DockPadLeft = #DockPadLeft
istr_resize.DockPadRight = #DockPadRight
istr_resize.DockPadBottom = #DockPadBottom
istr_resize.AnchorTop = #AnchorTop
istr_resize.AnchorLeft = #AnchorLeft
istr_resize.AnchorRight = #Anchorright
istr_resize.AnchorBottom = #Anchorbottom
istr_resize.reftop = #Dock_Control_top
istr_resize.refleft = #Dock_Control_left
istr_resize.refright = #Dock_Control_right
istr_resize.refbottom = #Dock_Control_bottom
istr_resize.bounds.left = X
istr_resize.bounds.top = Y
istr_resize.bounds.right = width
istr_resize.bounds.bottom = height

RETURN istr_resize
end function

public subroutine of_setmarquee (boolean ab_set);n_svc_mgr lnv_svc
n_svc_system lnv_sys
n_svc_win32 lnv_w
n_svc_bit lnv_b
ulong ll

lnv_svc.of_LoadSvc(lnv_sys, CSvc.SYS)

IF NOT lnv_sys.of_IsXP() THEN RETURN

lnv_svc.of_LoadSvc(lnv_w, CSvc.WIN32)
lnv_svc.of_LoadSvc(lnv_b, CSvc.BIT)

ll = lnv_w.GetWindowlong(Handle(this), CWin32.GWL_STYLE)

IF ab_set THEN
   ll = lnv_b.of_BitWiseOR({ll, PBS_MARQUEE})
   lnv_w.SetWindowLong(Handle(this), CWin32.GWL_STYLE, ll)
   Send(Handle(this), PBM_SETMARQUEE, 1, 0)
ELSE
   IF SmoothScroll THEN
      ll = lnv_b.of_BitWiseOR({ll, PBS_SMOOTH})
   END IF
   lnv_w.SetWindowLong(Handle(this), CWin32.GWL_STYLE, ll)
   Send(Handle(this), PBM_SETMARQUEE, 0, 0)
END IF
end subroutine

public subroutine of_setbarcolor (long al_color);Send(Handle(this), PBM_SETBARCOLOR, 0, al_color)
end subroutine

public subroutine of_setbackcolor (long al_color);Send(Handle(this), PBM_SETBACKCOLOR, 0, al_color)
end subroutine

on u_vpb.create
end on

on u_vpb.destroy
end on