*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="pr_htmledit.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS _cbo AS combobox 
 	*< CLASSDATA: Baseclass="combobox" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<DefinedPropArrayMethod>
		*p: cpropertyname
		*p: _memberdata
	*</DefinedPropArrayMethod>

	*<PropValue>
		Height = 23
		Name = "_cbo"
		Style = 2
		TabStop = .F.
		Width = 100
		_memberdata = <VFPData>
			<memberdata name="foomethod" type="method"     display="fooMethod"     favorites="True"/>
			<memberdata name="_cbo" type="property" display="_cbo" favorites="True"/>
			<memberdata name="_memberdata" type="property" display="_MemberData" favorites="True"/>
			<memberdata name="baseclass" type="property" display="BaseClasS" favorites="True"/>
			<memberdata name="error" type="method" display="eRRor" favorites="True"/>
		</VFPData>
	*</PropValue>

ENDDEFINE

DEFINE CLASS cbutton AS commandbutton 
 	*< CLASSDATA: Baseclass="commandbutton" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<DefinedPropArrayMethod>
		*p: cpropertyname
		*p: _memberdata		&& XML Metadata for customizable properties
	*</DefinedPropArrayMethod>

	*<PropValue>
		Caption = "C"
		cpropertyname = 
		FontName = "Wingdings"
		FontSize = 10
		Height = 23
		Name = "cbutton"
		SpecialEffect = 2
		TabStop = .F.
		Width = 23
		_memberdata = <VFPData>
			<memberdata name="cpropertyname" display="cPropertyName"/>
		</VFPData>
	*</PropValue>
	
	PROCEDURE Click
		IF NOT EMPTY(This.cPropertyName)
			This.Parent.Toggle(This.cPropertyName)
		ENDIF 
	ENDPROC

ENDDEFINE

DEFINE CLASS cfontname AS _cbo OF "pr_htmledit.vcx" 
 	*< CLASSDATA: Baseclass="combobox" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<PropValue>
		cpropertyname = FontName
		Height = 23
		Name = "cfontname"
		Width = 177
	*</PropValue>
	
	PROCEDURE Init
		This.AddProperty("aNames[1]","")
		=AFONT(This.aNames)
		This.RowSource = "This.aNames"
		This.RowSourceType = 5 
		This.Value = "Arial"
	ENDPROC

ENDDEFINE

DEFINE CLASS cfontsize AS _cbo OF "pr_htmledit.vcx" 
 	*< CLASSDATA: Baseclass="combobox" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<DefinedPropArrayMethod>
		*m: update
	*</DefinedPropArrayMethod>

	*<PropValue>
		Alignment = 1
		cpropertyname = FontSize
		Name = "cfontsize"
		Value = 1
		Width = 45
	*</PropValue>
	
	PROCEDURE Init
		This.AddItem("8")
		This.AddItem("10")
		This.AddItem("12")
		This.AddItem("14")
		This.AddItem("18")
		This.AddItem("24")
		This.AddItem("36")
		
	ENDPROC

	PROCEDURE update
	ENDPROC

ENDDEFINE

DEFINE CLASS chtmleditor AS container 
 	*< CLASSDATA: Baseclass="container" Timestamp="" Scale="Pixels" Uniqueid="" />

	*-- OBJECTDATA items order determines ZOrder / El orden de los items OBJECTDATA determina el ZOrder 
	*< OBJECTDATA: ObjPath="oIE" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgBold" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgItalic" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgUnderline" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgLeft" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgCenter" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgRight" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="btnForeColor" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="btnBackColor" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmbFontName" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmbFontSize" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgIncrease" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgDecrease" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgBullet" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgNumbers" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdHyperlink" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdPicture" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="Label1" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgJustify" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdOpen" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdSave" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdNew" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdCut" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdCopy" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdPaste" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdUndo" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="cmdRedo" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgLine" UniqueID="" Timestamp="" />
	*< OBJECTDATA: ObjPath="tgClean" UniqueID="" Timestamp="" />

	*<DefinedPropArrayMethod>
		*m: activatecommands
		*m: toggle
		*m: togglestatus
		*p: ltoggleupdate
		*p: _memberdata		&& XML Metadata for customizable properties
	*</DefinedPropArrayMethod>

	*<PropValue>
		BackStyle = 0
		BorderWidth = 0
		Height = 324
		ltoggleupdate = .T.
		Name = "chtmleditor"
		Width = 633
		_memberdata = <VFPData>
			<memberdata name="foomethod" type="method" display="fooMethod" favorites="True"/>
			<memberdata name="chtmleditor" type="property" display="chtmleditor" favorites="True"/>
			<memberdata name="_memberdata" type="property" display="_MemberData" favorites="True"/>
			<memberdata name="baseclass" type="property" display="BaseClasS" favorites="True"/>
			<memberdata name="error" type="method" display="eRRor" favorites="True"/>
			<memberdata name="ltoggleupdate" display="lToggleUpdate"/>
		</VFPData>
	*</PropValue>

	ADD OBJECT 'btnBackColor' AS cbutton WITH ;
		Caption = "", ;
		ForeColor = 0,0,255, ;
		Left = 341, ;
		Name = "btnBackColor", ;
		Picture = images\pr_fontback.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Background color", ;
		Top = 24
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'btnForeColor' AS cbutton WITH ;
		Caption = "", ;
		ForeColor = 0,0,255, ;
		Left = 317, ;
		Name = "btnForeColor", ;
		Picture = images\pr_textcolor.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Cor do Texto", ;
		Top = 24
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmbFontName' AS cfontname WITH ;
		Height = 23, ;
		Left = 0, ;
		Name = "cmbFontName", ;
		ToolTipText = "Font name", ;
		Top = 24, ;
		Width = 127
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="combobox" />

	ADD OBJECT 'cmbFontSize' AS cfontsize WITH ;
		Height = 23, ;
		Left = 129, ;
		Name = "cmbFontSize", ;
		ToolTipText = "Font size", ;
		Top = 24, ;
		Width = 54
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="combobox" />

	ADD OBJECT 'cmdCopy' AS cbutton WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = Copy, ;
		FontName = "Wingdings", ;
		Left = 107, ;
		Name = "cmdCopy", ;
		Picture = images\pr_copy.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Copy", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmdCut' AS cbutton WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = Cut, ;
		FontName = "Wingdings", ;
		Left = 83, ;
		Name = "cmdCut", ;
		Picture = images\pr_cut.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Cut", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmdHyperlink' AS cbutton WITH ;
		Caption = "", ;
		Left = 451, ;
		Name = "cmdHyperlink", ;
		Picture = images\pr_hyperlink.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Create a hyperlink", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmdNew' AS cbutton WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Enabled = .T., ;
		FontName = "Wingdings", ;
		Left = 50, ;
		Name = "cmdNew", ;
		Picture = images\pr_new.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "New...", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmdOpen' AS cbutton WITH ;
		Alignment = 0, ;
		Caption = "", ;
		Enabled = .T., ;
		FontName = "Wingdings", ;
		Left = 2, ;
		Name = "cmdOpen", ;
		Picture = images\pr_open.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Open HTML file...", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmdPaste' AS cbutton WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = Paste, ;
		FontName = "Wingdings", ;
		Left = 131, ;
		Name = "cmdPaste", ;
		Picture = images\pr_paste.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Paste", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmdPicture' AS cbutton WITH ;
		Caption = "", ;
		Left = 474, ;
		Name = "cmdPicture", ;
		Picture = images\pr_getimage.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Insert picture", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmdRedo' AS cbutton WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = Redo, ;
		Left = 183, ;
		Name = "cmdRedo", ;
		Picture = images\pr_redo.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Redo", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmdSave' AS cbutton WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = SaveAs, ;
		Enabled = .T., ;
		FontName = "Wingdings", ;
		Left = 26, ;
		Name = "cmdSave", ;
		Picture = images\pr_save.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Save as HTML...", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'cmdUndo' AS cbutton WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = Undo, ;
		FontName = "Wingdings", ;
		Left = 159, ;
		Name = "cmdUndo", ;
		Picture = images\pr_undo.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Undo", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'Label1' AS label WITH ;
		Alignment = 2, ;
		AutoSize = .F., ;
		BorderStyle = 1, ;
		Caption = "More...", ;
		Height = 19, ;
		Left = 374, ;
		Name = "Label1", ;
		Top = 27, ;
		Width = 44
		*< END OBJECT: BaseClass="label" />

	ADD OBJECT 'oIE' AS cie WITH ;
		Height = 100, ;
		Left = 0, ;
		Name = "oIE", ;
		Top = 48, ;
		Width = 100, ;
		_memberdata = <VFPData>
			<memberdata name="foomethod" type="method"     display="fooMethod"     favorites="True"/>
			<memberdata name="oIE" type="property" display="oIE" favorites="True"/>
			<memberdata name="_memberdata" type="property" display="_MemberData" favorites="True"/>
			<memberdata name="baseclass" type="property" display="BaseClasS" favorites="True"/>
			<memberdata name="error" type="method" display="eRRor" favorites="True"/>
		</VFPData>
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="olecontrol" OLEObject="c:\windows\system32\ieframe.dll" Value="0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/////v////7////+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1IAbwBvAHQAIABFAG4AdAByAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAUA//////////8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAk8YnBp8sBAwAAAEABAAAAAAAAAwBPAGwAZQBPAGIAagBlAGMAdABEAGEAdABhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAgEDAAAAAgAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArAAAAAAAAAADAEEAYwBjAGUAcwBzAE8AYgBqAFMAaQB0AGUARABhAHQAYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJgACAP///////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAA4AAAAAAAAAAMAQwBoAGEAbgBnAGUAZABQAHIAbwBwAHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAIA////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAQAAAAAAAAAAwAAAP7////+////BAAAAP7///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9h+VaICjTQEalrAMBP1wWiTAAAAFYKAABWCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAOAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAA4NBXAHM1zxGuaQgAKy4SYggAAAAAAAAATAAAAAEUAgAAAAAAwAAAAAAAAEaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFQALgAxAFwAUwB5AHMAdABlAG0AMwAyADsAQwA6AFwAVwBJAE4ATgBUAC4AMQBcAHMAeQBzAHQAZQBtADsAQwA6AFwAVwBJAE4ATgBUAC4AMQA7AEMAOgBcAFcASQBOAE4AVAAuADEAXABzAHkAcwB0AGUAbQAzADIAOwBDADoAXABXAEkATgBOAFQALgAxADsAQwA6AFwAVwBJAE4ATgBUAC4AMQBcAFMAeQBzAHQAZQBtADMAMgBcAFcAYgBlAA==" />

	ADD OBJECT 'tgBold' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "B", ;
		cpropertyname = Bold, ;
		FontBold = .T., ;
		FontName = "Arial", ;
		Left = 216, ;
		Name = "tgBold", ;
		SpecialEffect = 2, ;
		ToolTipText = "Bold", ;
		Top = 24
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />

	ADD OBJECT 'tgBullet' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = InsertUnOrderedList, ;
		Left = 317, ;
		Name = "tgBullet", ;
		Picture = images\pr_listdot.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Formatting bullets", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />

	ADD OBJECT 'tgCenter' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = JustifyCenter, ;
		Left = 240, ;
		Name = "tgCenter", ;
		Picture = images\pr_align_center.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Center", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />

	ADD OBJECT 'tgClean' AS cbutton WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = RemoveFormat, ;
		Left = 428, ;
		Name = "tgClean", ;
		Picture = images\pr_clean.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Remove formatting", ;
		Top = 24
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'tgDecrease' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = Outdent, ;
		Left = 372, ;
		Name = "tgDecrease", ;
		Picture = images\pr_textmoveleft.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Decrease indentation", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />

	ADD OBJECT 'tgIncrease' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = Indent, ;
		Left = 398, ;
		Name = "tgIncrease", ;
		Picture = images\pr_textmoveright.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Increase indentation", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />

	ADD OBJECT 'tgItalic' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "I", ;
		cpropertyname = Italic, ;
		FontItalic = .T., ;
		FontName = "Arial", ;
		Left = 240, ;
		Name = "tgItalic", ;
		SpecialEffect = 2, ;
		ToolTipText = "Italic", ;
		Top = 24
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />

	ADD OBJECT 'tgJustify' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = JustifyFull, ;
		Left = 288, ;
		Name = "tgJustify", ;
		Picture = images\pr_align_justify.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Justify", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />

	ADD OBJECT 'tgLeft' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = JustifyLeft, ;
		Left = 216, ;
		Name = "tgLeft", ;
		Picture = images\pr_align_left.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Align left", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />

	ADD OBJECT 'tgLine' AS cbutton WITH ;
		Alignment = 2, ;
		Caption = "--", ;
		cpropertyname = InsertHorizontalRule, ;
		FontName = "Arial", ;
		Left = 428, ;
		Name = "tgLine", ;
		SpecialEffect = 2, ;
		ToolTipText = "Insert horizontal line", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="commandbutton" />

	ADD OBJECT 'tgNumbers' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = InsertOrderedList, ;
		Left = 341, ;
		Name = "tgNumbers", ;
		Picture = images\pr_listnumber.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Formatting numbers", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />

	ADD OBJECT 'tgRight' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "", ;
		cpropertyname = JustifyRight, ;
		Left = 264, ;
		Name = "tgRight", ;
		Picture = images\pr_align_right.bmp, ;
		SpecialEffect = 2, ;
		ToolTipText = "Align right", ;
		Top = 0
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />

	ADD OBJECT 'tgUnderline' AS ctoggle WITH ;
		Alignment = 0, ;
		Caption = "U", ;
		cpropertyname = Underline, ;
		FontName = "Arial", ;
		FontUnderline = .T., ;
		Left = 264, ;
		Name = "tgUnderline", ;
		SpecialEffect = 2, ;
		ToolTipText = "Underline", ;
		Top = 24
		*< END OBJECT: ClassLib="pr_htmledit.vcx" BaseClass="checkbox" />
	
	PROCEDURE activatecommands
		LOCAL oToggle
		FOR EACH oToggle IN This.Objects
		   IF UPPER(oToggle.Class) = "CTOGGLE"
		      This.oIE.Document.queryCommandEnabled(oToggle.cPropertyName)
		*      oToggle.Refresh()
		   ENDIF
		NEXT
		
	ENDPROC

	PROCEDURE Init
		This.Resize()
		
	ENDPROC

	PROCEDURE Resize
		This.width=this.parent.width
		This.height=this.parent.height - 72
		*!*	*this.top=0
		*!*	*this.left=0
		This.oIE.Width  = This.Width - 2
		This.oIE.Height = This.Height - 60
		
	ENDPROC

	PROCEDURE RightClick
		MESSAGEBOX(This.oIE.Document.Body.OuterHTML)
		
	ENDPROC

	PROCEDURE toggle
		LPARAMETERS tcPropertyName
		IF "JUSTIFY" $ UPPER(tcPropertyName)
		   IF This.oIE.Document.queryCommandValue(tcPropertyName)
		      tcPropertyName = "JustifyNone"
		   ENDIF
		ENDIF
		This.oIE.Document.execCommand(tcPropertyName)
		This.oIE.SetFocus()
		
	ENDPROC

	PROCEDURE togglestatus
		IF This.lToggleUpdate 
		
			LOCAL oToggle
			IF NOT EMPTY(This.oIE.LocationURL)
			FOR EACH oToggle IN This.Objects
			   IF UPPER(oToggle.Class) = "CTOGGLE"
			      oToggle.Value = This.oIE.Document.QueryCommandValue(oToggle.cPropertyName)
			*      oToggle.Refresh()
			   ENDIF
			   IF UPPER(oToggle.ParentClass) = "_CBO"
			      oToggle.Value = This.oIE.Document.queryCommandValue(oToggle.cPropertyName)
			   ENDIF
			NEXT
			ENDIF
		ENDIF 
	ENDPROC

	PROCEDURE btnBackColor.Click
		LOCAL lnColor, lcColor
		lnColor = GETCOLOR()
		IF lnColor > -1
		   lcColor = RIGHT(TRANSFORM(lnColor,"@0"),6)
		   lcColor = RIGHT(lcColor, 2)+ SUBSTR(lcColor,3,2)+ LEFT(lcColor,2)
		   This.Parent.oIE.Document.execCommand("BackColor",.F.,lcColor)
		ENDIF
		RETURN
		
		
		* Not used any more
		* This converted the whole document BackColor instead of the current selection
		LOCAL lnColor, lcColor
		lnColor = GETCOLOR()
		IF lnColor > -1
		   lcColor = RIGHT(TRANSFORM(lnColor,"@0"),6)
		   lcColor = RIGHT(lcColor, 2)+ SUBSTR(lcColor,3,2)+ LEFT(lcColor,2)
		   This.Parent.oIE.Document.bgColor = lcColor
		ENDIF
		
		
		
	ENDPROC

	PROCEDURE btnForeColor.Click
		LOCAL lnColor, lcColor
		lnColor = GETCOLOR()
		IF lnColor > -1
		   lcColor = RIGHT(TRANSFORM(lnColor,"@0"),6)
		   lcColor = RIGHT(lcColor, 2)+ SUBSTR(lcColor,3,2)+ LEFT(lcColor,2)
		   This.Parent.oIE.Document.execCommand("ForeColor",.F.,lcColor)
		ENDIF
		
		
		
	ENDPROC

	PROCEDURE cmbFontName.InteractiveChange
		This.Parent.oIE.Document.execCommand("FontName",.F.,This.DisplayValue)
		
	ENDPROC

	PROCEDURE cmbFontSize.InteractiveChange
		This.Parent.oIE.Document.execCommand("FontSize",.F.,This.Value)
		
	ENDPROC

	PROCEDURE cmdHyperlink.Click
		This.Parent.oIE.Document.execCommand("CreateLink", .T.)
	ENDPROC

	PROCEDURE cmdNew.Click
		WITH this.Parent.OiE
			.navigate("about:blank")
			DO WHILE (.busy) OR (.ReadyState != 4)
				DOEVENTS
			ENDDO
		ENDWITH
		this.Parent.refresh
		
	ENDPROC

	PROCEDURE cmdOpen.Click
		NODEFAULT
		LOCAL lcFile
		lcFile=GETFILE("htm*")
		IF !EMPTY(lcFile)
			WITH this.Parent.oIE
				.Navigate(lcFile)
				DO WHILE .ReadyState != 4
					DOEVENTS
				ENDDO
				.Document.Body.contentEditable = .T.
				.Refresh()
				.SetFocus()
			ENDWITH
		ENDIF
		
		
		
	ENDPROC

	PROCEDURE cmdPicture.Click
		This.Parent.oIE.Document.execCommand("InsertImage",.T.)
	ENDPROC

	PROCEDURE Label1.Click
		define popup pop1 shortcut
		define bar 1 of pop1 prompt "Inner"
		define bar 2 of pop1 prompt "Outer"
		define bar 3 of pop1 prompt "Importar texto de arquivo TXT"
		define bar 4 of pop1 prompt "Copiar HTML"
		define bar 5 of pop1 prompt "Copiar Texto"
		private oThis
		oThis = This.Parent
		on selection bar 1 of pop1 MESSAGEBOX(oThis.oIE.Document.Body.InnerHTML)
		on selection bar 2 of pop1 MESSAGEBOX(oThis.oIE.Document.Body.OuterHTML)
		on selection bar 3 of pop1 oThis.oIE.Document.Body.innerHTML = GETFILE("txt")
		on selection bar 4 of pop1 _ClipText = oThis.oIE.Document.Body.innerHTML
		on selection bar 5 of pop1 _ClipText = oThis.oIE.Document.Body.innerTEXT
		
		activate popup pop1 AT MROW(),MCOL()
	ENDPROC

	PROCEDURE oIE.CommandStateChange
		*** ActiveX Control Event ***
		LPARAMETERS command, enable
		This.Parent.ToggleStatus()
		DODEFAULT(command, enable)
		
	ENDPROC

	PROCEDURE oIE.DownloadComplete
		*** ActiveX Control Event ***
		DODEFAULT()
		This.Parent.Activatecommands()
		
	ENDPROC

ENDDEFINE

DEFINE CLASS cie AS olecontrol 
 	*< CLASSDATA: Baseclass="olecontrol" Timestamp="" Scale="Pixels" Uniqueid="" Nombre="cie" Parent="" ObjName="cie" OLEObject="C:\WINNT\System32\shdocvw.dll" Value="0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAEAAAAgAAAAEAAAD+////AAAAAAAAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/////v////7////+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1IAbwBvAHQAIABFAG4AdAByAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWAAUA//////////8BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD+grtq8ccBAwAAAEABAAAAAAAAAwBPAGwAZQBPAGIAagBlAGMAdABEAGEAdABhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB4AAgEDAAAAAgAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArAAAAAAAAAADAEEAYwBjAGUAcwBzAE8AYgBqAFMAaQB0AGUARABhAHQAYQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJgACAP///////////////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAA4AAAAAAAAAAMAQwBoAGEAbgBnAGUAZABQAHIAbwBwAHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAIA////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAQAAAAAAAAAAwAAAP7////+////BAAAAP7///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9h+VaICjTQEalrAMBP1wWiTAAAAFYKAABWCgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATAAAAAAAAAAAAAAAOAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABuACAANQAuAAEAAIAoAFMAUAAyACkACQB7ADUAOABEAEEAOABEADgARgAtADkARAA2AEEALQAxADAAMQBCAC0AQQBGAEMAMAABAAAA4NBXAHM1zxGuaQgAKy4SYggAAAAAAAAATAAAAAEUAgAAAAAAwAAAAAAAAEaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAA7AC4AOwBDADoAXABXAEkATgBOAFQALgAxAFwAUwB5AHMAdABlAG0AMwAyADsAQwA6AFwAVwBJAE4ATgBUAC4AMQBcAHMAeQBzAHQAZQBtADsAQwA6AFwAVwBJAE4ATgBUAC4AMQA7AEMAOgBcAFcASQBOAE4AVAAuADEAXABzAHkAcwB0AGUAbQAzADIAOwBDADoAXABXAEkATgBOAFQALgAxADsAQwA6AFwAVwBJAE4ATgBUAC4AMQBcAFMAeQBzAHQAZQBtADMAMgBcAFcAYgBlAA==" />

	*<DefinedPropArrayMethod>
		*p: lfirstrefresh
		*p: _memberdata		&& XML Metadata for customizable properties
	*</DefinedPropArrayMethod>

	*<PropValue>
		Height = 100
		lfirstrefresh = .T.
		Name = "cie"
		Width = 100
		_memberdata = <VFPData>
			<memberdata name="foomethod" type="method"     display="fooMethod"     favorites="True"/>
			<memberdata name="cie" type="property" display="cie" favorites="True"/>
			<memberdata name="_memberdata" type="property" display="_MemberData" favorites="True"/>
			<memberdata name="baseclass" type="property" display="BaseClasS" favorites="True"/>
			<memberdata name="error" type="method" display="eRRor" favorites="True"/>
		</VFPData>
	*</PropValue>
	
	PROCEDURE DownloadComplete
		*** ActiveX Control Event ***
		* Set the edit mode on
		*THIS.Document.designMode = "On"  && This gives a different context menu
		This.Document.Body.contentEditable = .T.  && This is a good context menu
		
	ENDPROC

	PROCEDURE Init
		* Navigate to a blank page
		
		*This.Navigate2("About:Blank")
		* Prevent an OLE error, and wait until the object
		* gets the blank page open before showing or accessing
		
		LOCAL lnLoadTimeout
		lnLoadTimeout = 3       && seconds
		WITH This.OBJECT
		    .Navigate("about:blank")
		    * Wait for load completion
		    lnStartSeconds = SECONDS()
		    DO WHILE .ReadyState <> 4 ;
		            AND (SECONDS()-lnStartSeconds <= lnLoadTimeout )
		        DOEVENTS
		    ENDDO
		ENDWITH
		
	ENDPROC

	PROCEDURE Refresh
		*** ActiveX Control Method ***
		
		IF This.lFirstRefresh
		   NODEFAULT
		   This.lFirstRefresh = .F.
		   This.Document.Body.contentEditable = .T.
		ENDIF
		
	ENDPROC

ENDDEFINE

DEFINE CLASS ctoggle AS checkbox 
 	*< CLASSDATA: Baseclass="checkbox" Timestamp="" Scale="Pixels" Uniqueid="" />

	*<DefinedPropArrayMethod>
		*p: cpropertyname		&& The name of the property this command will toggle
	*</DefinedPropArrayMethod>

	*<PropValue>
		Alignment = 0
		Caption = "C"
		FontName = "Wingdings"
		FontSize = 12
		Height = 23
		Name = "ctoggle"
		Style = 1
		TabStop = .F.
		Value = .F.
		Width = 23
	*</PropValue>
	
	PROCEDURE Click
		This.Parent.Toggle(This.cPropertyName)
		
	ENDPROC

	PROCEDURE DblClick
		NODEFAULT 
	ENDPROC

	PROCEDURE RightClick
		NODEFAULT 
	ENDPROC

ENDDEFINE
