Página 1 de 1

include de include

Enviado: 06 Out 2020 10:40
por JoséQuintas

Código: Selecionar todos

   #xcommand DECLARE WINDOW <w> ;
   =>;
   #xtranslate <w> . \<p:Name,Handle,Type,Index,Title,Height,Width,ClientHeight,ClientWidth,Col,Row,NotifyIcon,NotifyToolTip,FocusedControl,Cursor,BackColor,MinHeight,MinWidth,MaxHeight,MaxWidth,TitleBar,SysMenu,Sizable,MaxButton,MinButton,Closable,Visible,Enabled,Topmost,HelpButton,Cargo,Object\> => GetProperty ( <(w)>, \<"p"\> ) ;;
   #xtranslate <w> . \<p:Name,Title,Height,Width,Col,Row,NotifyIcon,NotifyToolTip,FocusedControl,Cursor,BackColor,MinHeight,MinWidth,MaxHeight,MaxWidth,TitleBar,SysMenu,Sizable,MaxButton,MinButton,Closable,Visible,Enabled,Topmost,HelpButton,Cargo\> := \<n\> => SetProperty ( <(w)>, \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<p:OnInit,OnRelease,OnInterActiveClose,OnGotFocus,OnLostFocus,OnNotifyClick,OnMouseClick,OnMouseDrag,OnMouseMove,OnMove,OnSize,OnMaximize,OnMinimize,OnPaint,OnRestore,OnDropFiles\> => GetProperty ( <(w)>, \<"p"\> ) ;;
   #xtranslate <w> . \<p:OnInit,OnRelease,OnInterActiveClose,OnGotFocus,OnLostFocus,OnNotifyClick,OnMouseClick,OnMouseDrag,OnMouseMove,OnMove,OnSize,OnMaximize,OnMinimize,OnPaint,OnRestore,OnDropFiles\> := \<n\> => SetProperty ( <(w)>, \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<p:AlphaBlendTransparent,BackColorTransparent> := \<n\> => SetProperty ( <"w">, \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<p:Activate,Center,Redraw,Release,Maximize,Minimize,Restore,Show,Hide,SetFocus,Print\> \[()\] => DoMethod ( <(w)>, \<"p"\> ) ;;
   #xtranslate <w> . \<p:SaveAs\> (\<a\>) => DoMethod ( <(w)> , "SaveAs", \<a\> ) ;;
   #xtranslate <w> . \<c\> . \<p:SaveAs\> (\<a\>) => DoMethod ( <(w)> , \<(c)\> , "SaveAs", \<a\> ) ;;
   #xtranslate <w> . \<c\> . \<p:Value,Name,Handle,Type,Index,ClientHeight,ClientWidth,Address,BackColor,FontColor,Picture,Icon,HBitmap,ToolTip,FontName,FontSize,FontBold,FontUnderline,FontItalic,FontStrikeOut,Caption,Row,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Cargo,Tabstop,Object,XObject,CheckBoxEnabled,PaintDoubleBuffer,HeaderDragDrop,DisplayValue,InfoTip,ColumnCOUNT\> => GetProperty ( <(w)>, \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<c\> . \<p:Value,Name,Address,BackColor,BackgroundColor,FontColor,Picture,Icon,HBitmap,ToolTip,FontName,FontSize,FontBold,FontUnderline,FontItalic,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Cargo,Tabstop,CheckBoxEnabled,PaintDoubleBuffer,HeaderDragDrop,InfoTip\> := \<n\> => SetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<c\> . \<p:ListWidth,Position,CaretPos,ForeColor,AllowAppend,AllowDelete,AllowEdit,InputItems,DisplayItems,FormatString,Indent,Linecolor,ItemHeight,ValidMessage,AutoFont,RichValue,CueBanner,Alignment,CaseConvert,Transparent,RootValue,FirstItemValue,GradientFill,GradientOver,Interval,Once,Increment,OnListDisplay,OnDropDown,OnListClose,OnCloseUp,ImageWidth,ImageHeight\> => GetProperty ( <(w)>, \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<c\> . \<p:ListWidth,Position,CaretPos,ForeColor,AllowAppend,AllowDelete,AllowEdit,Blink,InputItems,DisplayItems,FormatString,Indent,Linecolor,ItemHeight,ValidMessage,AutoFont,RichValue,CueBanner,Alignment,CaseConvert,Transparent,ColumnWidthLimits,GradientFill,GradientOver,Interval,Once,Increment,OnListDisplay,OnDropDown,OnListClose,OnCloseUp,ImageWidth,ImageHeight\> := \<n\> => SetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<c\> . \<p:Caption,Header,ColumnHeader,Image,Item,Icon,ToolTip,Width,ColumnWidth,Enabled,RichValue,HeaderImage,IsTrueNode,NodeFlag,IsExpand,CheckboxItem,ColumnDISPLAYPOSITION\> (\<arg\>) => GetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<arg\> ) ;;
   #xtranslate <w> . \<c\> . \<p:ColumnCONTROL,ColumnDYNAMICBACKCOLOR,ColumnDYNAMICFORECOLOR,ColumnJUSTIFY,ColumnVALID,ColumnWHEN,ColumnVALIDMESSAGE,ColumnONHEADCLICK\> (\<n\>) => GetProperty ( <"w">, \<"c"\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<c\> . \<p:ColumnCONTROL,ColumnDYNAMICBACKCOLOR,ColumnDYNAMICFORECOLOR,ColumnJUSTIFY,ColumnVALID,ColumnWHEN,ColumnVALIDMESSAGE,ColumnONHEADCLICK\> (\<n\>) := \<arg\> => SetProperty ( <"w">, \<"c"\> , \<"p"\> , \<n\>, \<arg\> ) ;;
   #xtranslate <w> . \<c\> . \<p:GroupEnabled\> => GetProperty ( <(w)>, \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<c\> . \<p:GroupEnabled\> := \<n\> => SetProperty ( <(w)>, \<(c)\>, \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<c\> . \<p:GroupDeleteAll\> \[()\]  => Domethod ( <(w)>, \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<c\> . \<p:GroupDelete,GroupAdd,GroupExpand,GroupCollapsed,GroupDeleteAllItems\> (\<a1\>) => Domethod ( <(w)>, \<(c)\> , \<"p"\> , \<a1\> ) ;;
   #xtranslate <w> . \<c\> . \<p:GroupAdd> (\<a1\> , \<a2\>) => Domethod ( <(w)>, \<(c)\> , \<"p"\> , \<a1\> , \<a2\> ) ;;
   #xtranslate <w> . \<c\> . \<p:GroupInfo,GroupItemID,GroupGetAllItemIndex,GroupExist,Cargo\> (\<n1\>) => GetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<n1\> );;
   #xtranslate <w> . \<c\> . \<p:GroupInfo,GroupItemID,GroupCheckBoxAllItems,Cargo\> (\<n1\>) := \<arg\> => SetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<n1\>, \<arg\> ) ;;
   #xtranslate <w> . \<c\> . \<p:Velocity\> := \<n\> => SetProperty ( <(w)>, \<(c)\> , "Velocity" , \<n\> ) ;;
   #xtranslate <w> . \<c\> . \<p:Caption,Header,ColumnHeader,Image,Item,Icon,ToolTip,Width,ColumnWidth,Enabled,RichValue,CheckboxItem,ColumnDISPLAYPOSITION\> (\<arg\>) := \<n\> => SetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<arg\> , \<n\> ) ;;
   #xtranslate <w> . \<c\> . \<p:Cell\> (\<arg1\> , \<arg2\>) => GetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<arg1\> , \<arg2\> ) ;;
   #xtranslate <w> . \<c\> . \<p:Cell\> (\<arg1\> , \<arg2\>) := \<n\> => SetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<arg1\> , \<arg2\> , \<n\> ) ;;
   #xtranslate <w> . \<c\> . \<p:HeaderImage\> (\<arg1\>) := \<arg2\> => SetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<arg1\> , \<arg2\> ) ;;
   #xtranslate <w> . \<c\> . \<p:HeaderImage\> (\<arg1\>) := {\<arg2\> , \<arg3\>} => SetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<arg1\> , \<arg2\> , \<arg3\> ) ;;
   #xtranslate <w> . \<c\> . \<p:EnableUpdate,DisableUpdate,Redraw,Refresh,SetFocus,DeleteAllItems,Release,Show,Save,Hide,Play,Stop,Close,Pause,Eject,OpenDialog,Resume,Action,OnClick,OnGotFocus,OnLostFocus,OnChange,OnDblClick,OnEnter,ColumnsAutoFit,ColumnsAutoFitH\> \[()\] => Domethod ( <(w)>, \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<c\> . \<p:AddItem,DeleteItem,Open,DeletePage,DeleteColumn,Expand,Collapse,Seek,SetArray,ColumnAutoFit,ColumnAutoFitH\> (\<a\>) => Domethod ( <(w)>, \<(c)\> , \<"p"\> , \<a\> ) ;;
   #xtranslate <w> . \<c\> . \<p:AddItem,AddPage,Expand,Collapse\> (\<a1\> , \<a2\>) => Domethod ( <(w)>, \<(c)\> , \<"p"\> , \<a1\> , \<a2\> ) ;;
   #xtranslate <w> . \<c\> . \<p:AddItem,AddPage\> (\<a1\> , \<a2\> , \<a3\> ) => Domethod ( <(w)>, \<(c)\> , \<"p"\> , \<a1\> , \<a2\> , \<a3\> ) ;;
   #xtranslate <w> . \<c\> . \<p:AddItem,AddColumn,AddControl,AddPage\> (\<a1\> , \<a2\> , \<a3\> , \<a4\> ) => Domethod ( <(w)>, \<(c)\> , \<"p"\> , \<a1\> , \<a2\> , \<a3\> , \<a4\> ) ;;
   #xtranslate <w> . \<c\> . \<p:ReadOnly,DisableEdit,Options,Spacing,WorkArea,Length\> => GetProperty ( <(w)>, \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<c\> . \<p:ReadOnly,DisableEdit,Options,Spacing,Speed,Volume,Zoom,Action,OnClick,OnGotFocus,OnLostFocus,OnChange,OnDblClick,OnEnter\> := \<n\> => SetProperty ( <(w)>, \<(c)\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<x\> . \<c\> . \<p:Caption,ToolTip,Picture,Enabled,Value\> => GetProperty ( <(w)> , \<"x"\> , \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<x\> . \<c\> . \<p:Caption,ToolTip,Picture,PictureIndex,Action,Enabled,Value\> := \<n\> => SetProperty ( <(w)> , \<"x"\> , \<(c)\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:Value,Name,Address,BackColor,FontColor,Picture,ToolTip,FontName,FontSize,FontBold,FontItalic,FontUnderline,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Cargo\> => GetProperty ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:Value,Name,Address,BackColor,BackgroundColor,FontColor,Picture,ToolTip,FontName,FontSize,FontBold,FontItalic,FontUnderline,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Cargo\> := \<n\> => SetProperty ( <(w)> , \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:ListWidth,Position,CaretPos,ForeColor,RichValue\> => GetProperty ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:ListWidth,Position,CaretPos,ForeColor,RichValue\> := \<n\> => SetProperty ( <(w)> , \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:Caption,Header,Item,Icon,RichValue,CheckboxItem\> (\<arg\>) => GetProperty ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<arg\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:Caption,Header,Item,Icon,RichValue,CheckboxItem\> (\<arg\>) := \<n\> => SetProperty ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<arg\> , \<n\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:Refresh,SetFocus,DeleteAllItems,Release,Show,Save,Hide,Play,Stop,Close,Pause,Eject,OpenDialog,Resume,Action,OnClick,OnGotFocus,OnLostFocus,OnChange,OnDblClick,OnEnter\> \[()\] => Domethod ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:AddItem,DeleteItem,Open,DeletePage,DeleteColumn,Expand,Collapse,Seek\> (\<a\>) => Domethod ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<a\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:AddItem,AddPage\> (\<a1\> , \<a2\>) => Domethod ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<a1\> , \<a2\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:AddItem,AddPage\> (\<a1\> , \<a2\> , \<a3\> ) => Domethod ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<a1\> , \<a2\> , \<a3\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:AddItem,AddColumn,AddControl,AddPage\> (\<a1\> , \<a2\> , \<a3\> , \<a4\> ) => Domethod ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<a1\> , \<a2\> , \<a3\> , \<a4\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:Length,Options,Spacing\> => GetProperty ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:ReadOnly,DisableEdit,Options,Spacing,Speed,Volume,Zoom\> := \<n\> => SetProperty ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:Cell\> (\<arg1\> , \<arg2\>) => GetProperty ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<arg1\> , \<arg2\> ) ;;
   #xtranslate <w> . \<x\> (\<k\>) . \<c\> . \<p:Cell\> (\<arg1\> , \<arg2\>) := \<n\> => SetProperty ( <(w)>, \<"x"\> , \<k\> , \<(c)\> , \<"p"\> , \<arg1\> , \<arg2\> , \<n\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:Value,Name,Address,BackColor,FontColor,Picture,ToolTip,FontName,FontSize,FontBold,FontItalic,FontUnderline,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Position,CaretPos,ForeColor,AllowEdit,Object,InputItems,DisplayItems,Cargo\> => GetProperty ( <(w)>, "SplitBox" , \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:Value,Name,Address,BackColor,FontColor,Picture,ToolTip,FontName,FontSize,FontBold,FontItalic,FontUnderline,FontStrikeOut,Caption,Row,DisplayValue,Col,Width,Height,Visible,Enabled,Checked,ItemCount,RangeMin,RangeMax,Position,CaretPos,ForeColor,AllowEdit,Blink,InputItems,DisplayItems,Cargo\> := \<n\> => SetProperty ( <(w)>, "SplitBox" , \<(c)\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:AllowAppend,AllowDelete,DisableEdit,ReadOnly\> => GetProperty ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:AllowAppend,AllowDelete,DisableEdit,ReadOnly\> := \<n\> => SetProperty ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:Caption,Header,Item,Icon,HeaderImages,CheckboxItem\> (\<arg\>) => GetProperty ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> , \<arg\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:Caption,Header,Item,Icon,HeaderImages,CheckboxItem\> (\<arg\>) := \<n\> => SetProperty ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> , \<arg\> , \<n\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:Cell\> (\<arg1\> , \<arg2\>) => GetProperty ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> , \<arg1\> , \<arg2\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:Cell\> (\<arg1\> , \<arg2\>) := \<n\> => SetProperty ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> , \<arg1\> , \<arg2\> , \<n\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:Refresh,SetFocus,DeleteAllItems,Release,Show,Save,Hide,Play,Stop,Close,Pause,Eject,OpenDialog,Resume,Action,OnClick,OnGotFocus,OnLostFocus,OnChange,OnDblClick,OnEnter\> \[()\] => Domethod ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:AddItem,DeleteItem,Open,DeletePage,DeleteColumn,Expand,Collapse,Seek\> (\<a\>) => Domethod ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> , \<a\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:AddItem,AddPage\> (\<a1\> , \<a2\>) => Domethod ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> , \<a1\> , \<a2\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:AddItem,AddPage\> (\<a1\> , \<a2\> , \<a3\> ) => Domethod ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> , \<a1\> , \<a2\> , \<a3\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:AddItem,AddColumn,AddControl,AddPage\> (\<a1\> , \<a2\> , \<a3\> , \<a4\> ) => Domethod ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> , \<a1\> , \<a2\> , \<a3\> , \<a4\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:Name,Length,CueBanner,Alignment,CaseConvert,Transparent\> => GetProperty ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . SplitBox . \<c\> . \<p:ReadOnly,DisableEdit,Speed,Volume,Zoom,CueBanner,Alignment,CaseConvert,Transparent\> := \<n\> => SetProperty ( <(w)>, "SplitBox", \<(c)\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w> . SplitBox . \<x\> . \<c\> . \<p:Caption,Enabled,Value\> => GetProperty ( <(w)> , "SplitBox" , \<"x"\> , \<(c)\> , \<"p"\> ) ;;
   #xtranslate <w> . SplitBox . \<x\> . \<c\> . \<p:Caption,Enabled,Value\> := \<n\> => SetProperty ( <(w)> , "SplitBox", \<"x"\> , \<(c)\> , \<"p"\> , \<n\> ) ;;
   ;;   // RichEditEx
   #xtranslate <w>. \<c\> . \<p:FontName,FontSize,FontBold,FontItalic,FontUnderline,FontStrikeOut,FontColor,FontBackColor,FontScript,Link\>          => GetProperty ( <"w">, \<"c"\> , \<"p"\> ) ;;
   #xtranslate <w>. \<c\> . \<p:FontName,FontSize,FontBold,FontItalic,FontUnderline,FontStrikeOut,FontColor,FontBackColor,FontScript,Link\> := \<n\> => SetProperty ( <"w">, \<"c"\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w>. \<c\> . \<p:RTFTextMode,AutoURLDetect,Zoom,SelectRange,CaretPos,Value,GetSelectText,GetTextLength,ViewRect\> => GetProperty ( <"w">, \<"c"\> , \<"p"\> ) ;;
   #xtranslate <w>. \<c\> . \<p:RTFTextMode,AutoURLDetect,Zoom,SelectRange,CaretPos,Value,ViewRect\> := \<n\>      => SetProperty ( <"w">, \<"c"\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w>. \<c\> . \<p:BackGroundColor\> := \<n\> => SetProperty ( <"w">, \<"c"\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w>. \<c\> . \<p:SelectAll,UnSelectAll\> \[()\] => DoMethod ( <"w">, \<"c"\> , \<"p"\> ) ;;
   #xtranslate <w>. \<c\> . \<p:AddText,AddTextAndSelect\> (\<arg\>) := \<n\> => SetProperty ( <"w">, \<"c"\> , \<"p"\> , \<arg\> , \<n\> ) ;;
   #xtranslate <w>. \<c\> . \<p:ParaAlignment, ParaNumbering, ParaNumberingStyle, ParaNumberingStart, ParaOffset, ParaLineSpacing, ParaIndent\>          => GetProperty ( <"w">, \<"c"\> , \<"p"\> ) ;;
   #xtranslate <w>. \<c\> . \<p:ParaAlignment, ParaNumbering, ParaNumberingStyle, ParaNumberingStart, ParaOffset, ParaLineSpacing, ParaIndent\> := \<n\> => SetProperty ( <"w">, \<"c"\> , \<"p"\> , \<n\> ) ;;
   #xtranslate <w>. \<c\> . \<p:LoadFile,SaveFile\> (\<arg1\>,\<arg2\>,\<arg3\>) => DoMethod ( <"w">, \<"c"\> , \<"p"\> , \<arg1\> , \<arg2\>, \<arg3\> ) ;;
   #xtranslate <w>. \<c\> . \<p:RTFLoadFile,RTFSaveFile\> (\<arg1\>,\<arg2\>,\<arg3\>) => DoMethod ( <"w">, \<"c"\> , \<"p"\> , \<arg1\> , \<arg2\>, \<arg3\> ) ;;
   #xtranslate <w>. \<c\> . \<p:RTFLoadFile,RTFSaveFile\> (\<arg1\>,\<arg2\>)          => DoMethod ( <"w">, \<"c"\> , \<"p"\> , \<arg1\> , \<arg2\> ) ;;
   #xtranslate <w>. \<c\> . \<p:CanPaste,CanUndo,CanRedo\> => GetProperty ( <"w">, \<"c"\> , \<"p"\> ) ;;
   #xtranslate <w>. \<c\> . \<p:SelCopy,SelPaste,SelCut,SelClear,Undo,Redo,ClearUndoBuffer\> \[()\] => DoMethod ( <"w">, \<"c"\> , \<"p"\> ) ;;
   #xtranslate <w>. \<c\> . \<p:FindText,ReplaceText,ReplaceAllText\> (\<arg1\>,\<arg2\>,\<arg3\>,\<arg4\>,\<arg5\>) => GetProperty ( <"w">, \<"c"\> , \<"p"\> , \<arg1\> , \<arg2\> , \<arg3\> , \<arg4\> , \<arg5\> ) ;;
   #xtranslate <w>. \<c\> . \<p:GetClickLinkRange,GetClickLinkText\> => GetProperty ( <"w">, \<"c"\> , \<"p"\> ) ;;
   #xtranslate <w>. \<c\> . \<p:GetTextRange,GetPosChar\> (\<arg1\>) => GetProperty ( <"w">, \<"c"\> , \<"p"\> , \<arg1\> ) ;;
   #xtranslate <w>. \<c\> . \<p:RTFPrint\> (\<arg1\>,\<arg2\>,\<arg3\>,\<arg4\>,\<arg5\>,\<arg6\>) => DoMethod ( <"w">, \<"c"\> , \<"p"\> , \<arg1\> , \<arg2\> , \<arg3\> , \<arg4\> , \<arg5\> , \<arg6\> )
Demorei, mas acho que entendi isso.
É um #include de #include.

Tipo... tem lá o

DECLARE frm1

Isso faz entrar o

#xtranslate <w> . \<p:Name,Handle,Type,Index,Title,Height,Width,ClientHeight,ClientWidth,Col,Row,NotifyIcon,NotifyToolTip,FocusedControl,Cursor,BackColor,MinHeight,MinWidth,MaxHeight,MaxWidth,TitleBar,SysMenu,Sizable,MaxButton,MinButton,Closable,Visible,Enabled,Topmost,HelpButton,Cargo,Object\> => GetProperty ( <(w)>, \<"p"\> ) ;;

que vai traduzir NO FONTE:

frm1.Width

pra

GetProperty( frm1, "Width" )

E assim por diante.

É interessante isso.
E seria mais interessante ainda se tivessem usado isso pra se livrar do nome da variável.
Quem sabe não dá?
Seria uma revolução.
Mais fácil mexer em CH do que em fonte.....

Mas de qualquer forma, é um recurso interessante de CH, que eu não tinha pensado.

include de include

Enviado: 07 Out 2020 09:09
por rochinha
Amiguinhos,

Tá completo aí ou só tem o trecho DECLARE Window?

Faz parte do quê? MiniGUI?

include de include

Enviado: 07 Out 2020 09:14
por rochinha
Amiguinhos,

A coisa boa do translate/command/xcommand é a possibilidade de mudar momentaneamente o estilo da programação.

Código: Selecionar todos

#include "fivewin.ch"

#define VBSCRIPT

#ifdef VBSCRIPT

   #translate False => .F.
   #translate True => .T.

   #command ' <*x*> => 
   #command Dim <vars,...> => Local <vars>
   #command Dim <vars> As String => Local <vars> := ""
   #command Dim <vars> As Integer => Local <vars> := 0
   #command Set <!id!> = <exp> => <id> := <exp>
   #command If <cond> Then => IF <cond>
   #command Loop => End

   #translate CreateObject => TOLEAuto():New
   #translate .<!id!> => :<id>
   #translate .<!id!> <vars,...> => :<id>(<vars>)
   #translate end if => Endif
   #translate Not => !
   #translate And => .AND.
   #translate Or => .OR.
   #translate MsgBox <exp>[.<more>] => MessageBox( 0, <exp>[:<more>], "XBScript", 0 )
   #translate Nothing => NIL
   //#translate _ => ;
   #translate & => +   
   #translate Debug.Print => ? 

#endif

FUNCTION MAIN()

   Set xmlHttp = CreateObject("MSXML2.ServerXMLHTTP.6.0")
   Set xmlResult = CreateObject("MSXML2.DomDocument.3.0")
  
   xmlHttp.open "POST","http://www.buscarcep.com.br/?cep=35164049&formato=xml"
', true 
   xmlHttp.Send()
   xmlHttp.waitForResponse 4 
   xmlHttp.waitForResponse 200
  
   xmlResult.loadXML(xmlHttp.ResponseText)
   resultado = xmlResult.selectSingleNode("/webservicecep/retorno/resultado").Text
 
   MsgBox xmlHttp.ResponseText

   if xmlHttp.ResponseText = ""

      if resultado = "-2" then
         MsgBox "CEP inválido"
      end if 

   else

       resultado_txt = xmlResult.selectSingleNode("/webservicecep/retorno/resultado_txt").Text
       uf = xmlResult.SelectNodes("//uf").item(0).Text
       cidade = xmlResult.SelectNodes("//cidade").item(0).Text
       bairro = xmlResult.SelectNodes("//bairro").item(0).Text
       tipo_logradouro = xmlResult.SelectNodes("//tipo_logradouro").item(0).Text
       logradouro = xmlResult.SelectNodes("//logradouro").item(0).Text

       MsgBox logradouro

   end if
 
   set xmlHttp = nothing
   set xmlResult = nothing
    
   RETURN
Quando eu colecionava a revista importada Clipper Advisor encontrei um include que traduzia todos comandos do COBOL. Cara que coisa linda, programar em COLBOL e CLIPPar depois.

include de include

Enviado: 07 Out 2020 09:31
por JoséQuintas
rochinha escreveu:Tá completo aí ou só tem o trecho DECLARE Window?
Faz parte do quê? MiniGUI?
HMG Extended.
É só um pedaço de um ch.

include de include

Enviado: 08 Out 2020 18:33
por sygecom
JoséQuintas escreveu: Demorei, mas acho que entendi isso.
É um #include de #include.
Demorei, demorei e não entendi nada, esse cara que fez esse INCLUDE já está no ano 2050

include de include

Enviado: 08 Out 2020 20:07
por JoséQuintas
Vamos a um pedaço pequeno (difícil...):

Código: Selecionar todos

   #xcommand DECLARE WINDOW <w> ;
   =>;
   #xtranslate <w> . \<p:Name,Handle,Type,Index,Title,Height,Width,ClientHeight,ClientWidth,Col,Row,NotifyIcon,NotifyToolTip,FocusedControl,Cursor,BackColor,MinHeight,MinWidth,MaxHeight,MaxWidth,TitleBar,SysMenu,Sizable,MaxButton,MinButton,Closable,Visible,Enabled,Topmost,HelpButton,Cargo,Object\> => GetProperty ( <(w)>, \<"p"\> ) ;;
Aí no seu fonte tem

DECLARE WINDOW minhoca

O que esse xtranslate faz? ele troca essa declaração por:

Código: Selecionar todos

#xtranslate minhoca.name => GetProperty( minhoca, "Name" )
#xtranslate minhoca.Handle => GetProperty( minhoca, "Handle" )
#xtranslate minhoca.Type -> GetProperty( minhoca, "Type" )
...
A partir daí, ao usar no fonte:

minhoca.name

vai ser traduzido e compilado GetProperty( minhoca, "Name" )

Você cria o fonte como se estivesse usando OOP, mas na prática é o CH que faz a tradução.
É um "tradutor", que cria outro "tradutor" conforme o que encontrar pela frente.
o CH cria outro CH que vale sempre que usar aquele mesmo nome.

É como se tivesse um monte de copiar/colar durante a compilação.... muito doido o troço.

Note que TUDO que está no início do post se refere a uma única linha.
O DECLARE WINDOW minhoca, vai ser substituído por TUDO aquilo.
porrilhões de linhas, e funciona rápido.

include de include

Enviado: 08 Out 2020 20:43
por Claudio Soto
Los #xtranslate se usan para funciones que retornan valores

Los #xcommand para sentencias que no retornan valores

Pare ver el resultado de las sustituciones del pre-procesador compilar con la opción de hb activada para que genere el correspondiente archivo .ppo

El uso del pre-procesador de clipper esta muy bien explicado al inicio del libro de Ramalho Clipper 5.01 "111 funciones"

include de include

Enviado: 08 Out 2020 21:30
por JoséQuintas
Mas nunca pensei em níveis de CH, ou de "substituição da substituição".