File: u_st.sru
Size: 3279
Date: Mon, 07 Apr 2008 21:31:02 +0200
$PBExportHeader$u_st.sru
$PBExportComments$Base StaticText Object
forward
global type u_st from statictext
end type
end forward

global type u_st from statictext
integer width = 343
integer height = 52
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
long textcolor = 33554432
long backcolor = 67108864
string text = "none"
boolean focusrectangle = false
event ke_paint pbm_paint
event ke_constructor ( )
event ke_mousemove pbm_mousemove
end type
global u_st u_st

type variables
Public:
Boolean #UseThemeBorderColor
Boolean #Transparent
//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
Boolean #Tooltip
String #TooltipText
Boolean #BalloonTooltip
icon #TooltipIcon = none!
string #TooltipTitle
Private:
str_resize istr_resize
Boolean ib_painting
Long il_originalcolor
end variables
forward prototypes
public function str_resize of_getresizeattrib ()
public subroutine of_settransparent (readonly boolean ab_transparent)
end prototypes

event ke_paint;IF #Transparent THEN
   IF NOT IsValid (This) THEN Return 0
   IF ib_painting THEN Return 0
   
   ib_painting    = TRUE
   this.Visible   = FALSE
   
   DoPosts()
   
   this.Visible   = TRUE
   ib_painting    = FALSE
   
   Return 0
END IF
end event

event ke_constructor();il_originalcolor = this.BackColor

IF #UseThemeBorderColor THEN
   n_svc_mgr lnv_svc
   n_svc_theme lnv_t
   
   lnv_svc.of_LoadSvc(lnv_t, CSvc.THEME)
   
   this.BorderColor = lnv_t.of_getbordercolor(lnv_svc)
END IF

this.of_settransparent(#Transparent)
end event

event ke_mousemove;IF #Tooltip AND #BalloonTooltip THEN
   parent.DYNAMIC EVENT ke_balloonnotify(#TooltipIcon, #TooltipTitle)
END IF
end event

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_settransparent (readonly boolean ab_transparent);#Transparent = ab_transparent

IF #Transparent THEN
   this.BackColor = 2^29
ELSE
   this.BackColor = il_originalcolor
END IF
end subroutine

on u_st.create
end on

on u_st.destroy
end on