1078 lines
28 KiB
Plaintext
1078 lines
28 KiB
Plaintext
*--------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
|
|
*--------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
*< FOXBIN2PRG: Version="1.21" SourceFile="themedcontrolsbuilders.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
|
|
*
|
|
*
|
|
DEFINE CLASS buttonbuilder AS form
|
|
*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />
|
|
|
|
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
|
|
*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="opgType" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="txtCaption" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="txtImage" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="cmdImage" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="txtToolTipText" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="cmdSaveAndExit" UniqueID="" Timestamp="" />
|
|
|
|
*<DefinedPropArrayMethod>
|
|
*p: sourceobject
|
|
*p: _memberdata && XML Metadata for customizable properties
|
|
*</DefinedPropArrayMethod>
|
|
|
|
*<PropValue>
|
|
AllowOutput = .F.
|
|
AutoCenter = .T.
|
|
BorderStyle = 2
|
|
Caption = "ThemedButton Builder"
|
|
DoCreate = .T.
|
|
Height = 115
|
|
MaxButton = .F.
|
|
MinButton = .F.
|
|
Name = "buttonbuilder"
|
|
sourceobject = .F.
|
|
Width = 368
|
|
WindowType = 1
|
|
_memberdata = <VFPData>
|
|
<memberdata name="sourceobject" type="property" display="SourceObject"/>
|
|
</VFPData>
|
|
*</PropValue>
|
|
|
|
ADD OBJECT 'cmdImage' AS commandbutton WITH ;
|
|
Caption = "...", ;
|
|
FontSize = 8, ;
|
|
Height = 25, ;
|
|
Left = 216, ;
|
|
Name = "cmdImage", ;
|
|
TabIndex = 7, ;
|
|
Top = 58, ;
|
|
Width = 23
|
|
*< END OBJECT: BaseClass="commandbutton" />
|
|
|
|
ADD OBJECT 'cmdSaveAndExit' AS commandbutton WITH ;
|
|
Caption = "Save and Exit", ;
|
|
FontSize = 8, ;
|
|
Height = 25, ;
|
|
Left = 284, ;
|
|
Name = "cmdSaveAndExit", ;
|
|
TabIndex = 10, ;
|
|
Top = 88, ;
|
|
Width = 82
|
|
*< END OBJECT: BaseClass="commandbutton" />
|
|
|
|
ADD OBJECT 'Label1' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Type", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 243, ;
|
|
Name = "Label1", ;
|
|
TabIndex = 8, ;
|
|
Top = 43, ;
|
|
Width = 26
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label2' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Caption", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 2, ;
|
|
Name = "Label2", ;
|
|
TabIndex = 1, ;
|
|
Top = 2, ;
|
|
Width = 38
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label3' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Image (24x24)", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 2, ;
|
|
Name = "Label3", ;
|
|
TabIndex = 5, ;
|
|
Top = 43, ;
|
|
Width = 71
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label4' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "ToolTipText", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 160, ;
|
|
Name = "Label4", ;
|
|
TabIndex = 3, ;
|
|
Top = 2, ;
|
|
Width = 57
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'opgType' AS optiongroup WITH ;
|
|
BackStyle = 0, ;
|
|
BorderStyle = 0, ;
|
|
ButtonCount = 2, ;
|
|
Height = 42, ;
|
|
Left = 243, ;
|
|
Name = "opgType", ;
|
|
TabIndex = 9, ;
|
|
Top = 49, ;
|
|
Value = 0, ;
|
|
Width = 125, ;
|
|
Option1.BackStyle = 0, ;
|
|
Option1.Caption = "Normal", ;
|
|
Option1.FontSize = 8, ;
|
|
Option1.Height = 16, ;
|
|
Option1.Left = 5, ;
|
|
Option1.Name = "Option1", ;
|
|
Option1.Top = 12, ;
|
|
Option1.Value = 0, ;
|
|
Option1.Width = 51, ;
|
|
Option2.Alignment = 2, ;
|
|
Option2.BackStyle = 0, ;
|
|
Option2.Caption = "Hot tracking", ;
|
|
Option2.FontSize = 8, ;
|
|
Option2.Height = 32, ;
|
|
Option2.Left = 65, ;
|
|
Option2.Name = "Option2", ;
|
|
Option2.Top = 5, ;
|
|
Option2.Width = 55, ;
|
|
Option2.WordWrap = .T.
|
|
*< END OBJECT: BaseClass="optiongroup" />
|
|
|
|
ADD OBJECT 'txtCaption' AS textbox WITH ;
|
|
FontSize = 8, ;
|
|
Height = 23, ;
|
|
Left = 2, ;
|
|
Name = "txtCaption", ;
|
|
TabIndex = 2, ;
|
|
Top = 18, ;
|
|
Width = 156
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'txtImage' AS textbox WITH ;
|
|
Enabled = .F., ;
|
|
FontSize = 8, ;
|
|
Height = 23, ;
|
|
Left = 2, ;
|
|
Name = "txtImage", ;
|
|
TabIndex = 6, ;
|
|
Top = 59, ;
|
|
Value = (""), ;
|
|
Width = 213
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'txtToolTipText' AS textbox WITH ;
|
|
FontSize = 8, ;
|
|
Height = 23, ;
|
|
Left = 160, ;
|
|
Name = "txtToolTipText", ;
|
|
TabIndex = 4, ;
|
|
Top = 18, ;
|
|
Width = 206
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
PROCEDURE Init
|
|
Lparameters loObject
|
|
With This
|
|
.SourceObject = loObject
|
|
.txtCaption.Value = Alltrim(.SourceObject.lblCaption.Caption)
|
|
.txtImage.Value = Alltrim(.SourceObject.imgIcon.Picture)
|
|
.txtTooltipText.Value = Alltrim(.SourceObject.shpMouseHandler.ToolTipText)
|
|
.opgType.Value = (.SourceObject.Type + 1)
|
|
Endwith
|
|
ENDPROC
|
|
|
|
PROCEDURE QueryUnload
|
|
Nodefault
|
|
This.Release()
|
|
ENDPROC
|
|
|
|
PROCEDURE cmdImage.Click
|
|
Thisform.txtImage.Value = Getpict()
|
|
ENDPROC
|
|
|
|
PROCEDURE cmdSaveAndExit.Click
|
|
With Thisform
|
|
.SourceObject.lblCaption.Caption = Alltrim(.txtCaption.Value)
|
|
.SourceObject.imgIcon.Picture = Alltrim(.txtImage.Value)
|
|
.SourceObject.shpMouseHandler.ToolTipText = Alltrim(.txtTooltipText.Value)
|
|
.SourceObject.Type = (.opgType.Value - 1)
|
|
Endwith
|
|
Thisform.Release()
|
|
ENDPROC
|
|
|
|
ENDDEFINE
|
|
|
|
DEFINE CLASS explorerbarbuilder AS form
|
|
*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />
|
|
|
|
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
|
|
*< OBJECTDATA: ObjPath="shpProperties" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="txtCaption" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="txtImage" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="cmdImage" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label5" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="opgType" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="opgState" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="cmdAdd" UniqueID="" Timestamp="" />
|
|
|
|
*<DefinedPropArrayMethod>
|
|
*p: sourceobject
|
|
*p: _memberdata && XML Metadata for customizable properties
|
|
*</DefinedPropArrayMethod>
|
|
|
|
*<PropValue>
|
|
AllowOutput = .F.
|
|
AutoCenter = .T.
|
|
BorderStyle = 2
|
|
Caption = "ThemedExplorerBar Builder"
|
|
DoCreate = .T.
|
|
Height = 142
|
|
MaxButton = .F.
|
|
MinButton = .F.
|
|
Name = "explorerbarbuilder"
|
|
sourceobject = .F.
|
|
Width = 375
|
|
WindowType = 1
|
|
_memberdata = <VFPData>
|
|
<memberdata name="sourceobject" type="property" display="SourceObject"/>
|
|
</VFPData>
|
|
*</PropValue>
|
|
|
|
ADD OBJECT 'cmdAdd' AS commandbutton WITH ;
|
|
AutoSize = .T., ;
|
|
Caption = "Add this group to the bar", ;
|
|
FontSize = 8, ;
|
|
Height = 25, ;
|
|
Left = 237, ;
|
|
Name = "cmdAdd", ;
|
|
TabIndex = 11, ;
|
|
Top = 115, ;
|
|
Width = 136
|
|
*< END OBJECT: BaseClass="commandbutton" />
|
|
|
|
ADD OBJECT 'cmdImage' AS commandbutton WITH ;
|
|
Caption = "...", ;
|
|
FontSize = 8, ;
|
|
Height = 25, ;
|
|
Left = 347, ;
|
|
Name = "cmdImage", ;
|
|
TabIndex = 6, ;
|
|
Top = 35, ;
|
|
Width = 23
|
|
*< END OBJECT: BaseClass="commandbutton" />
|
|
|
|
ADD OBJECT 'Label1' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
Caption = " Group properties", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 7, ;
|
|
Name = "Label1", ;
|
|
Style = 3, ;
|
|
TabIndex = 1, ;
|
|
Top = 2, ;
|
|
Width = 87
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label2' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Caption", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 6, ;
|
|
Name = "Label2", ;
|
|
TabIndex = 2, ;
|
|
Top = 20, ;
|
|
Width = 38
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label3' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Image (32x32)", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 164, ;
|
|
Name = "Label3", ;
|
|
TabIndex = 4, ;
|
|
Top = 20, ;
|
|
Width = 71
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label4' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Type", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 6, ;
|
|
Name = "Label4", ;
|
|
TabIndex = 7, ;
|
|
Top = 66, ;
|
|
Width = 26
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label5' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "State", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 164, ;
|
|
Name = "Label5", ;
|
|
TabIndex = 9, ;
|
|
Top = 66, ;
|
|
Width = 27
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'opgState' AS optiongroup WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
BorderStyle = 0, ;
|
|
ButtonCount = 2, ;
|
|
Height = 26, ;
|
|
Left = 164, ;
|
|
Name = "opgState", ;
|
|
TabIndex = 10, ;
|
|
Top = 82, ;
|
|
Value = 1, ;
|
|
Width = 150, ;
|
|
Option1.AutoSize = .T., ;
|
|
Option1.BackStyle = 0, ;
|
|
Option1.Caption = "Expanded", ;
|
|
Option1.FontSize = 8, ;
|
|
Option1.Height = 16, ;
|
|
Option1.Left = 5, ;
|
|
Option1.Name = "Option1", ;
|
|
Option1.Top = 5, ;
|
|
Option1.Value = 1, ;
|
|
Option1.Width = 66, ;
|
|
Option2.AutoSize = .T., ;
|
|
Option2.BackStyle = 0, ;
|
|
Option2.Caption = "Collapsed", ;
|
|
Option2.FontSize = 8, ;
|
|
Option2.Height = 16, ;
|
|
Option2.Left = 80, ;
|
|
Option2.Name = "Option2", ;
|
|
Option2.Top = 5, ;
|
|
Option2.Width = 65
|
|
*< END OBJECT: BaseClass="optiongroup" />
|
|
|
|
ADD OBJECT 'opgType' AS optiongroup WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
BorderStyle = 0, ;
|
|
ButtonCount = 2, ;
|
|
Height = 26, ;
|
|
Left = 6, ;
|
|
Name = "opgType", ;
|
|
TabIndex = 8, ;
|
|
Top = 82, ;
|
|
Value = 1, ;
|
|
Width = 123, ;
|
|
Option1.AutoSize = .T., ;
|
|
Option1.BackStyle = 0, ;
|
|
Option1.Caption = "Normal", ;
|
|
Option1.FontSize = 8, ;
|
|
Option1.Height = 16, ;
|
|
Option1.Left = 5, ;
|
|
Option1.Name = "Option1", ;
|
|
Option1.Top = 5, ;
|
|
Option1.Value = 1, ;
|
|
Option1.Width = 51, ;
|
|
Option2.AutoSize = .T., ;
|
|
Option2.BackStyle = 0, ;
|
|
Option2.Caption = "Special", ;
|
|
Option2.FontSize = 8, ;
|
|
Option2.Height = 16, ;
|
|
Option2.Left = 65, ;
|
|
Option2.Name = "Option2", ;
|
|
Option2.Top = 5, ;
|
|
Option2.Width = 53
|
|
*< END OBJECT: BaseClass="optiongroup" />
|
|
|
|
ADD OBJECT 'shpProperties' AS shape WITH ;
|
|
Height = 102, ;
|
|
Left = 2, ;
|
|
Name = "shpProperties", ;
|
|
Style = 3, ;
|
|
Top = 9, ;
|
|
Width = 371
|
|
*< END OBJECT: BaseClass="shape" />
|
|
|
|
ADD OBJECT 'txtCaption' AS textbox WITH ;
|
|
FontSize = 8, ;
|
|
Height = 23, ;
|
|
Left = 6, ;
|
|
Name = "txtCaption", ;
|
|
TabIndex = 3, ;
|
|
Top = 36, ;
|
|
Width = 156
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'txtImage' AS textbox WITH ;
|
|
Enabled = .F., ;
|
|
FontSize = 8, ;
|
|
Height = 23, ;
|
|
Left = 164, ;
|
|
Name = "txtImage", ;
|
|
TabIndex = 5, ;
|
|
Top = 36, ;
|
|
Width = 182
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
PROCEDURE Init
|
|
Lparameters loObject
|
|
This.SourceObject = loObject
|
|
ENDPROC
|
|
|
|
PROCEDURE QueryUnload
|
|
Nodefault
|
|
This.Release()
|
|
ENDPROC
|
|
|
|
PROCEDURE cmdAdd.Click
|
|
With Thisform
|
|
Local lnTop, loGroup, lnGroup
|
|
*
|
|
m.lnTop = 0
|
|
For Each loGroup In .SourceObject.Controls
|
|
With m.loGroup
|
|
If Not Inlist(Upper(.Name),;
|
|
"IMGBACKGROUND","CTL32_SCROLLBAR")
|
|
m.lnTop = .Top + .Height
|
|
Endif
|
|
Endwith
|
|
Endfor
|
|
m.loGroup = Null
|
|
*
|
|
m.lnGroup = .SourceObject.ControlCount + 1
|
|
.SourceObject.Newobject("ThemedExplorerGroup"+Transform(m.lnGroup - 2),;
|
|
"ThemedExplorerGroup",;
|
|
Addbs(Justpath(Thisform.ClassLibrary)) + "ThemedControls.vcx")
|
|
.SourceObject.Controls(lnGroup).lblTitle.Caption = Alltrim(.txtCaption.Value)
|
|
.SourceObject.Controls(lnGroup).imgPicture.Picture = Alltrim(.txtImage.Value)
|
|
.SourceObject.Controls(lnGroup).Type = (.opgType.Value-1)
|
|
.SourceObject.Controls(lnGroup).State = (.opgState.Value-1)
|
|
.SourceObject.Controls(lnGroup).Left = 4
|
|
.SourceObject.Controls(lnGroup).Top = m.lnTop
|
|
Endwith
|
|
ENDPROC
|
|
|
|
PROCEDURE cmdImage.Click
|
|
Thisform.txtImage.Value = Getpict()
|
|
ENDPROC
|
|
|
|
ENDDEFINE
|
|
|
|
DEFINE CLASS explorergroupbuilder AS form
|
|
*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />
|
|
|
|
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
|
|
*< OBJECTDATA: ObjPath="shpProperties" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label2" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="txtCaption" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label3" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="txtImage" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="cmdImage" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label4" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="Label5" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="opgType" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="opgState" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="cmdSaveAndExit" UniqueID="" Timestamp="" />
|
|
|
|
*<DefinedPropArrayMethod>
|
|
*p: sourceobject
|
|
*p: _memberdata && XML Metadata for customizable properties
|
|
*</DefinedPropArrayMethod>
|
|
|
|
*<PropValue>
|
|
AllowOutput = .F.
|
|
AutoCenter = .T.
|
|
BorderStyle = 2
|
|
Caption = "ThemedExplorerGroup Builder"
|
|
DoCreate = .T.
|
|
Height = 142
|
|
MaxButton = .F.
|
|
MinButton = .F.
|
|
Name = "explorergroupbuilder"
|
|
sourceobject = .F.
|
|
Width = 375
|
|
WindowType = 1
|
|
_memberdata = <VFPData>
|
|
<memberdata name="sourceobject" type="property" display="SourceObject"/>
|
|
</VFPData>
|
|
*</PropValue>
|
|
|
|
ADD OBJECT 'cmdImage' AS commandbutton WITH ;
|
|
Caption = "...", ;
|
|
FontSize = 8, ;
|
|
Height = 25, ;
|
|
Left = 347, ;
|
|
Name = "cmdImage", ;
|
|
TabIndex = 6, ;
|
|
Top = 35, ;
|
|
Width = 23
|
|
*< END OBJECT: BaseClass="commandbutton" />
|
|
|
|
ADD OBJECT 'cmdSaveAndExit' AS commandbutton WITH ;
|
|
AutoSize = .T., ;
|
|
Caption = "Save and Exit", ;
|
|
FontSize = 8, ;
|
|
Height = 25, ;
|
|
Left = 291, ;
|
|
Name = "cmdSaveAndExit", ;
|
|
TabIndex = 11, ;
|
|
Top = 115, ;
|
|
Width = 82
|
|
*< END OBJECT: BaseClass="commandbutton" />
|
|
|
|
ADD OBJECT 'Label1' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
Caption = " Group properties", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 7, ;
|
|
Name = "Label1", ;
|
|
Style = 3, ;
|
|
TabIndex = 1, ;
|
|
Top = 2, ;
|
|
Width = 87
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label2' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Caption", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 6, ;
|
|
Name = "Label2", ;
|
|
TabIndex = 2, ;
|
|
Top = 20, ;
|
|
Width = 38
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label3' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Image (32x32)", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 164, ;
|
|
Name = "Label3", ;
|
|
TabIndex = 4, ;
|
|
Top = 20, ;
|
|
Width = 71
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label4' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Type", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 6, ;
|
|
Name = "Label4", ;
|
|
TabIndex = 7, ;
|
|
Top = 66, ;
|
|
Width = 26
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'Label5' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "State", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 164, ;
|
|
Name = "Label5", ;
|
|
TabIndex = 9, ;
|
|
Top = 66, ;
|
|
Width = 27
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'opgState' AS optiongroup WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
BorderStyle = 0, ;
|
|
ButtonCount = 2, ;
|
|
Height = 26, ;
|
|
Left = 164, ;
|
|
Name = "opgState", ;
|
|
TabIndex = 10, ;
|
|
Top = 82, ;
|
|
Value = 1, ;
|
|
Width = 150, ;
|
|
Option1.AutoSize = .T., ;
|
|
Option1.BackStyle = 0, ;
|
|
Option1.Caption = "Expanded", ;
|
|
Option1.FontSize = 8, ;
|
|
Option1.Height = 16, ;
|
|
Option1.Left = 5, ;
|
|
Option1.Name = "Option1", ;
|
|
Option1.Top = 5, ;
|
|
Option1.Value = 1, ;
|
|
Option1.Width = 66, ;
|
|
Option2.AutoSize = .T., ;
|
|
Option2.BackStyle = 0, ;
|
|
Option2.Caption = "Collapsed", ;
|
|
Option2.FontSize = 8, ;
|
|
Option2.Height = 16, ;
|
|
Option2.Left = 80, ;
|
|
Option2.Name = "Option2", ;
|
|
Option2.Top = 5, ;
|
|
Option2.Width = 65
|
|
*< END OBJECT: BaseClass="optiongroup" />
|
|
|
|
ADD OBJECT 'opgType' AS optiongroup WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
BorderStyle = 0, ;
|
|
ButtonCount = 2, ;
|
|
Height = 26, ;
|
|
Left = 6, ;
|
|
Name = "opgType", ;
|
|
TabIndex = 8, ;
|
|
Top = 82, ;
|
|
Value = 1, ;
|
|
Width = 123, ;
|
|
Option1.AutoSize = .T., ;
|
|
Option1.BackStyle = 0, ;
|
|
Option1.Caption = "Normal", ;
|
|
Option1.FontSize = 8, ;
|
|
Option1.Height = 16, ;
|
|
Option1.Left = 5, ;
|
|
Option1.Name = "Option1", ;
|
|
Option1.Top = 5, ;
|
|
Option1.Value = 1, ;
|
|
Option1.Width = 51, ;
|
|
Option2.AutoSize = .T., ;
|
|
Option2.BackStyle = 0, ;
|
|
Option2.Caption = "Special", ;
|
|
Option2.FontSize = 8, ;
|
|
Option2.Height = 16, ;
|
|
Option2.Left = 65, ;
|
|
Option2.Name = "Option2", ;
|
|
Option2.Top = 5, ;
|
|
Option2.Width = 53
|
|
*< END OBJECT: BaseClass="optiongroup" />
|
|
|
|
ADD OBJECT 'shpProperties' AS shape WITH ;
|
|
Height = 102, ;
|
|
Left = 2, ;
|
|
Name = "shpProperties", ;
|
|
Style = 3, ;
|
|
Top = 9, ;
|
|
Width = 371
|
|
*< END OBJECT: BaseClass="shape" />
|
|
|
|
ADD OBJECT 'txtCaption' AS textbox WITH ;
|
|
FontSize = 8, ;
|
|
Height = 23, ;
|
|
Left = 6, ;
|
|
Name = "txtCaption", ;
|
|
TabIndex = 3, ;
|
|
Top = 36, ;
|
|
Width = 156
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'txtImage' AS textbox WITH ;
|
|
Enabled = .F., ;
|
|
FontSize = 8, ;
|
|
Height = 23, ;
|
|
Left = 164, ;
|
|
Name = "txtImage", ;
|
|
TabIndex = 5, ;
|
|
Top = 36, ;
|
|
Value = (""), ;
|
|
Width = 182
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
PROCEDURE Init
|
|
Lparameters loObject
|
|
This.SourceObject = loObject
|
|
With This
|
|
.txtCaption.Value = Alltrim(.SourceObject.lblTitle.Caption)
|
|
.txtImage.Value = Alltrim(.SourceObject.imgPicture.Picture)
|
|
.opgType.Value = (.SourceObject.Type+1)
|
|
.opgState.Value = (.SourceObject.State+1)
|
|
Endwith
|
|
ENDPROC
|
|
|
|
PROCEDURE QueryUnload
|
|
Nodefault
|
|
This.Release()
|
|
ENDPROC
|
|
|
|
PROCEDURE cmdImage.Click
|
|
Thisform.txtImage.Value = Getpict()
|
|
ENDPROC
|
|
|
|
PROCEDURE cmdSaveAndExit.Click
|
|
With Thisform
|
|
.SourceObject.lblTitle.Caption = Alltrim(.txtCaption.Value)
|
|
.SourceObject.imgPicture.Picture = Alltrim(.txtImage.Value)
|
|
.SourceObject.Type = (.opgType.Value-1)
|
|
.SourceObject.State = (.opgState.Value-1)
|
|
Endwith
|
|
Thisform.Release()
|
|
ENDPROC
|
|
|
|
ENDDEFINE
|
|
|
|
DEFINE CLASS zoomnavbarbuilder AS form
|
|
*< CLASSDATA: Baseclass="form" Timestamp="" Scale="Pixels" Uniqueid="" />
|
|
|
|
*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder
|
|
*< OBJECTDATA: ObjPath="shpButton" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="opgType" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="lblName" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="txtName" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="lblToolTipText" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="txtToolTipText" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="lblImage" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="txtImage" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="cmdGetImage" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="lblButtonProperties" UniqueID="" Timestamp="" />
|
|
*< OBJECTDATA: ObjPath="cmdInsert" UniqueID="" Timestamp="" />
|
|
|
|
*<DefinedPropArrayMethod>
|
|
*m: createreflectedimage
|
|
*m: enabledisablebuttonproperties
|
|
*p: sourceobject
|
|
*p: _memberdata && XML Metadata for customizable properties
|
|
*</DefinedPropArrayMethod>
|
|
|
|
*<PropValue>
|
|
AllowOutput = .F.
|
|
AutoCenter = .T.
|
|
BorderStyle = 2
|
|
Caption = "ThemedZoomNavBar Builder"
|
|
DoCreate = .T.
|
|
Height = 164
|
|
MaxButton = .F.
|
|
MinButton = .F.
|
|
Name = "zoomnavbarbuilder"
|
|
sourceobject = .F.
|
|
Width = 359
|
|
WindowType = 1
|
|
_memberdata = <VFPData>
|
|
<memberdata name="sourceobject" type="property" display="SourceObject"/>
|
|
<memberdata name="enabledisablebuttonproperties" type="method" display="EnableDisableButtonProperties"/>
|
|
<memberdata name="createreflectedimage" type="method" display="CreateReflectedImage"/>
|
|
</VFPData>
|
|
*</PropValue>
|
|
|
|
ADD OBJECT 'cmdGetImage' AS commandbutton WITH ;
|
|
Caption = "...", ;
|
|
Enabled = .F., ;
|
|
FontSize = 8, ;
|
|
Height = 25, ;
|
|
Left = 328, ;
|
|
Name = "cmdGetImage", ;
|
|
TabIndex = 9, ;
|
|
Top = 104, ;
|
|
Width = 25
|
|
*< END OBJECT: BaseClass="commandbutton" />
|
|
|
|
ADD OBJECT 'cmdInsert' AS commandbutton WITH ;
|
|
AutoSize = .T., ;
|
|
Caption = "Insert", ;
|
|
FontSize = 8, ;
|
|
Height = 25, ;
|
|
Left = 314, ;
|
|
Name = "cmdInsert", ;
|
|
TabIndex = 11, ;
|
|
Top = 137, ;
|
|
Width = 43
|
|
*< END OBJECT: BaseClass="commandbutton" />
|
|
|
|
ADD OBJECT 'lblButtonProperties' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Button properties", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 7, ;
|
|
Name = "lblButtonProperties", ;
|
|
Style = 3, ;
|
|
TabIndex = 1, ;
|
|
Top = 5, ;
|
|
Width = 85
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'lblImage' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Image", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 7, ;
|
|
Name = "lblImage", ;
|
|
TabIndex = 7, ;
|
|
Top = 89, ;
|
|
Width = 30
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'lblName' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "Name", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 7, ;
|
|
Name = "lblName", ;
|
|
TabIndex = 3, ;
|
|
Top = 48, ;
|
|
Width = 29
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'lblToolTipText' AS label WITH ;
|
|
AutoSize = .T., ;
|
|
BackStyle = 0, ;
|
|
Caption = "ToolTip/Caption", ;
|
|
FontSize = 8, ;
|
|
Height = 16, ;
|
|
Left = 110, ;
|
|
Name = "lblToolTipText", ;
|
|
TabIndex = 5, ;
|
|
Top = 48, ;
|
|
Width = 75
|
|
*< END OBJECT: BaseClass="label" />
|
|
|
|
ADD OBJECT 'opgType' AS optiongroup WITH ;
|
|
BackStyle = 0, ;
|
|
BorderStyle = 0, ;
|
|
ButtonCount = 3, ;
|
|
Height = 27, ;
|
|
Left = 6, ;
|
|
Name = "opgType", ;
|
|
TabIndex = 2, ;
|
|
Top = 21, ;
|
|
Value = 0, ;
|
|
Width = 347, ;
|
|
Option1.AutoSize = .T., ;
|
|
Option1.BackStyle = 0, ;
|
|
Option1.Caption = "Normal", ;
|
|
Option1.FontSize = 8, ;
|
|
Option1.Height = 16, ;
|
|
Option1.Left = 5, ;
|
|
Option1.Name = "Option1", ;
|
|
Option1.TabIndex = 1, ;
|
|
Option1.Top = 3, ;
|
|
Option1.Value = 0, ;
|
|
Option1.Width = 51, ;
|
|
Option2.AutoSize = .T., ;
|
|
Option2.BackStyle = 0, ;
|
|
Option2.Caption = "Separator", ;
|
|
Option2.FontSize = 8, ;
|
|
Option2.Height = 16, ;
|
|
Option2.Left = 143, ;
|
|
Option2.Name = "Option2", ;
|
|
Option2.TabIndex = 2, ;
|
|
Option2.Top = 3, ;
|
|
Option2.Width = 66, ;
|
|
Option3.AutoSize = .T., ;
|
|
Option3.BackStyle = 0, ;
|
|
Option3.Caption = "Stack", ;
|
|
Option3.FontSize = 8, ;
|
|
Option3.Height = 16, ;
|
|
Option3.Left = 296, ;
|
|
Option3.Name = "Option3", ;
|
|
Option3.TabIndex = 3, ;
|
|
Option3.Top = 3, ;
|
|
Option3.Width = 45
|
|
*< END OBJECT: BaseClass="optiongroup" />
|
|
|
|
ADD OBJECT 'shpButton' AS shape WITH ;
|
|
BackStyle = 0, ;
|
|
Height = 131, ;
|
|
Left = 2, ;
|
|
Name = "shpButton", ;
|
|
Style = 3, ;
|
|
Top = 2, ;
|
|
Width = 355
|
|
*< END OBJECT: BaseClass="shape" />
|
|
|
|
ADD OBJECT 'txtImage' AS textbox WITH ;
|
|
Enabled = .F., ;
|
|
FontSize = 8, ;
|
|
Height = 23, ;
|
|
Left = 7, ;
|
|
Name = "txtImage", ;
|
|
TabIndex = 8, ;
|
|
Top = 105, ;
|
|
Width = 319
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'txtName' AS textbox WITH ;
|
|
Enabled = .F., ;
|
|
FontSize = 8, ;
|
|
Height = 23, ;
|
|
Left = 7, ;
|
|
Name = "txtName", ;
|
|
TabIndex = 4, ;
|
|
Top = 64, ;
|
|
Width = 100
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
ADD OBJECT 'txtToolTipText' AS textbox WITH ;
|
|
Enabled = .F., ;
|
|
FontSize = 8, ;
|
|
Height = 23, ;
|
|
Left = 110, ;
|
|
Name = "txtToolTipText", ;
|
|
TabIndex = 6, ;
|
|
Top = 64, ;
|
|
Width = 243
|
|
*< END OBJECT: BaseClass="textbox" />
|
|
|
|
PROCEDURE createreflectedimage
|
|
Lparameters lcPicture, lcNewPicture
|
|
If Not Vartype(_Screen.System)=="O"
|
|
Do System.App && Init GDIPlusX
|
|
Endif
|
|
Local loBitmap As xfcBitmap, loClrMatrix As xfcColorMatrix
|
|
With _Screen.System.Drawing
|
|
loBitmap = .Bitmap.New(lcPicture)
|
|
loBitmap.RotateFlip(.RotateFlipType.Rotate180FlipX)
|
|
loClrMatrix = .Imaging.ColorMatrix.New()
|
|
loClrMatrix.Matrix33 = 0.3
|
|
Try
|
|
loBitmap.ApplyColorMatrix(loClrMatrix)
|
|
Catch
|
|
Endtry
|
|
loBitmap.Save(lcNewPicture,.Imaging.ImageFormat.Png)
|
|
Endwith
|
|
Store Null To loBitmap, loClrMatrix
|
|
ENDPROC
|
|
|
|
PROCEDURE enabledisablebuttonproperties
|
|
Lparameters liType
|
|
With Thisform
|
|
Local llName, llToolTip, llImage, llClear
|
|
Store .T. To m.llName, m.llToolTip, m.llImage
|
|
Do Case
|
|
Case m.liType==1 && Normal
|
|
.lblToolTipText.Caption = "ToolTip"
|
|
Case m.liType==3 && Stack
|
|
.lblToolTipText.Caption = "Caption"
|
|
Otherwise && Separator
|
|
.lblToolTipText.Caption = "ToolTip/Caption"
|
|
Store .F. To m.llName, m.llToolTip, m.llImage
|
|
Store .T. To llClear
|
|
Endcase
|
|
.txtName.Enabled = m.llName
|
|
.txtToolTipText.Enabled = m.llToolTip
|
|
.cmdGetImage.Enabled = m.llImage
|
|
If llClear
|
|
.txtName.Value = ""
|
|
.txtToolTipText.Value = ""
|
|
Endif
|
|
If llClear Or Not m.llImage
|
|
.txtImage.Value = ""
|
|
Endif
|
|
Endwith
|
|
ENDPROC
|
|
|
|
PROCEDURE Init
|
|
Lparameters loObject
|
|
This.SourceObject = loObject
|
|
*
|
|
If Not Type("_Screen.System")=="O"
|
|
Do (Addbs(_vfp.ActiveProject.HomeDir)+"System.App")
|
|
Endif
|
|
ENDPROC
|
|
|
|
PROCEDURE QueryUnload
|
|
Nodefault
|
|
This.Release()
|
|
ENDPROC
|
|
|
|
PROCEDURE cmdGetImage.Click
|
|
Thisform.txtImage.Value = Getpict()
|
|
ENDPROC
|
|
|
|
PROCEDURE cmdInsert.Click
|
|
Local lcName, lcDescription, lcPicture, lcReflectedPicture, ;
|
|
lcClassLibrary, lcClass, lnLeft, lnControlCount
|
|
With Thisform
|
|
lcName = Alltrim(.txtName.Value)
|
|
lcDescription = Alltrim(.txtToolTipText.Value)
|
|
lcPicture = Alltrim(.txtImage.Value)
|
|
lcClassLibrary = Addbs(Justpath(.ClassLibrary))+"ZoomNavBar.vcx"
|
|
lcClass = Iif(.opgType.Value==2,"SeparatorImage","ZoomImage")
|
|
With .SourceObject
|
|
lnLeft = .cntZoom.ControlCount*48
|
|
lnControlCount = .cntZoom.ControlCount+1
|
|
If Thisform.opgType.Value==2
|
|
lcName = "Separator"+Alltrim(Transform(lnControlCount))
|
|
Endif
|
|
With .cntZoom
|
|
.Width = lnControlCount*48
|
|
.Newobject( lcName,lcClass,lcClassLibrary )
|
|
With .Controls(lnControlCount)
|
|
.Left = lnLeft
|
|
.Top = 48
|
|
If Not Thisform.opgType.Value==2
|
|
.Description = lcDescription
|
|
.ImageID = lnControlCount
|
|
.Picture = lcPicture
|
|
Endif
|
|
Endwith
|
|
Endwith
|
|
*
|
|
With .cntReflected
|
|
.Width = .Parent.cntZoom.Width
|
|
If Thisform.opgType.Value==2
|
|
.Newobject( lcName,lcClass,lcClassLibrary )
|
|
Else
|
|
.Newobject( lcName,"ReflectedImage",lcClassLibrary )
|
|
Endif
|
|
With .Controls(lnControlCount)
|
|
.Left = lnLeft
|
|
If Not Thisform.opgType.Value==2
|
|
lcReflectedPicture = Addbs(Justpath(lcPicture)) + ;
|
|
Juststem(lcPicture) + "_Reflected." + Justext(lcPicture)
|
|
Thisform.CreateReflectedImage(lcPicture,lcReflectedPicture)
|
|
.Picture = lcReflectedPicture
|
|
Endif
|
|
Endwith
|
|
Endwith
|
|
Endwith
|
|
.txtToolTipText.Value = ""
|
|
.txtImage.Value = ""
|
|
With .txtName
|
|
.Value = ""
|
|
.SetFocus()
|
|
Endwith
|
|
Endwith
|
|
ENDPROC
|
|
|
|
PROCEDURE opgType.InteractiveChange
|
|
Thisform.EnableDisableButtonProperties(This.Value)
|
|
ENDPROC
|
|
|
|
PROCEDURE opgType.ProgrammaticChange
|
|
Thisform.EnableDisableButtonProperties(This.Value)
|
|
ENDPROC
|
|
|
|
ENDDEFINE
|