-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsftoolbar.vc2
84 lines (68 loc) · 3.33 KB
/
sftoolbar.vc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (ES) AUTOGENERADO - ¡¡ATENCIÓN!! - ¡¡NO PENSADO PARA EJECUTAR!! USAR SOLAMENTE PARA INTEGRAR CAMBIOS Y ALMACENAR CON HERRAMIENTAS SCM!!
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.20" SourceFile="sftoolbar.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS sftoolbarbutton AS commandbutton
*< CLASSDATA: Baseclass="commandbutton" Timestamp="" Scale="Pixels" Uniqueid="" />
*<DefinedPropArrayMethod>
*m: execute && Called from Click to perform the action for this button if oImplementation isn't an object
*m: oimplementation_assign
*m: setenabled && Sets the Enabled property to the match the implementation object's
*m: setvisible && Sets the Visible property to the match the implementation object's
*p: oimplementation && A reference to an implementation object
*p: _memberdata && XML Metadata for customizable properties
*</DefinedPropArrayMethod>
*<PropValue>
Caption = ""
Height = 24
Name = "sftoolbarbutton"
oimplementation = .NULL.
Width = 24
_memberdata = <VFPData>
<memberdata name="oimplementation" type="property" display="oImplementation"/>
<memberdata name="oimplementation_assign" type="method" display="oImplementation_Assign"/>
<memberdata name="execute" type="method" display="Execute"/>
<memberdata name="setenabled" type="method" display="SetEnabled"/>
<memberdata name="setvisible" type="method" display="SetVisible"/>
</VFPData>
*</PropValue>
PROCEDURE Click
if vartype(This.oImplementation) = 'O'
This.oImplementation.Execute()
else
This.Execute()
endif vartype(This.oImplementation) = 'O'
ENDPROC
PROCEDURE Destroy
* Unbind from and nuke our implementation object.
if vartype(This.oImplementation) = 'O'
unbindevents(This.oImplementation)
This.oImplementation = .NULL.
endif vartype(This.oImplementation) = 'O'
ENDPROC
PROCEDURE execute && Called from Click to perform the action for this button if oImplementation isn't an object
ENDPROC
PROCEDURE oimplementation_assign
* Set a reference to an implementation object and bind to changes to its
* lVisible and lEnabled properties.
lparameters toObject
if vartype(toObject) = 'O'
This.oImplementation = toObject
bindevent(This.oImplementation, 'lVisible', This, 'SetVisible', 1)
bindevent(This.oImplementation, 'lEnabled', This, 'SetEnabled', 1)
endif vartype(toObject) = 'O'
ENDPROC
PROCEDURE setenabled && Sets the Enabled property to the match the implementation object's
if vartype(This.oImplementation) = 'O'
This.Enabled = This.oImplementation.lEnabled
endif vartype(This.oImplementation) = 'O'
ENDPROC
PROCEDURE setvisible && Sets the Visible property to the match the implementation object's
if vartype(This.oImplementation) = 'O'
This.Visible = This.oImplementation.lVisible
endif vartype(This.oImplementation) = 'O'
ENDPROC
ENDDEFINE