// Use NewHelp.utl // Internal help system Use Base.nui // Item_Property command, Various macros (FOR_EX...), cArray, cSet and cStack classes (No User Interface) Use Spec0007.utl // Display modal text (DoDisplayText) Use Spec0012.utl // Read image to string (sTextDfFromImage function) desktop_section object oNewStringSpecialFormatter is a cArray NO_IMAGE object oSecondPass is a cArray NO_IMAGE procedure Add_Line string lsLine set value item (item_count(self)) to lsLine end_procedure procedure Parse2 integer liMargin local integer liMax liItm liAtPos liLineCount liLine lhParent local string lsLine lsValue lsPreFix send delete_data move (parent(self)) to lhParent get item_count of lhParent to liMax decrement liMax for liItm from 0 to liMax get value of lhParent item liItm to lsLine move (pos("@",lsLine)) to liAtPos if liAtPos begin move (left(lsLine,liAtPos-1)) to lsPreFix move (replace(lsPreFix,lsLine,"")) to lsLine move (replace("@",lsLine,"")) to lsLine get Text_Format.sii lsLine (liMargin-liAtPos+1) DFTRUE to liLineCount send Add_Line (lsPreFix+" "+Text_FormattedLine.i(0)) for liLine from 1 to (liLineCount-1) send Add_Line (repeat(" ",liAtPos)+Text_FormattedLine.i(liLine)) loop end else begin get Text_Format.sii lsLine liMargin DFTRUE to liLineCount send Add_Line (Text_FormattedText()) end loop end_procedure function sTextValue returns string local integer liItm liMax local string lsLine lsValue lsLF lsRval move (character(10)) to lsLF get item_count to liMax decrement liMax move "" to lsRval for liItm from 0 to liMax get value item liItm to lsLine if (liItm<>liMax) move (lsRval+lsLine+lsLF) to lsRval else move (lsRval+lsLine) to lsRval loop function_return lsRval end_function end_object procedure Add_Line string lsLine set value item (item_count(self)) to lsLine end_procedure procedure Parse1 string lsValue local integer liPos liLen local string lsLF lsChar lsLine send delete_data move (character(10)) to lsLF move (length(lsValue)) to liLen move "" to lsLine for liPos from 1 to liLen move (mid(lsValue,1,liPos)) to lsChar if (lsChar=lsLF) begin send Add_Line lsLine move "" to lsLine end else move (lsLine+lsChar) to lsLine loop if lsLine ne "" send Add_Line lsLine end_procedure procedure Parse2 integer liMargin send Parse2 to (oSecondPass(self)) liMargin end_procedure function sTextValue returns string function_return (sTextValue(oSecondPass(self))) end_function end_object procedure Text_NewHelpSetEditObjectValueFormat global integer lhEdit string lsValue local integer liRMargin liLineCount send Parse1 to (oNewStringSpecialFormatter(self)) lsValue get right_margin of lhEdit to liRMargin send Parse2 to (oNewStringSpecialFormatter(self)) (liRMargin-1) send Text_SetEditObjectValue lhEdit (sTextValue(oNewStringSpecialFormatter(self))) end_procedure /DisplayHelpTextWide.hdr ÉÍ___________________________________________________________________ÍÍÍÍÍÍÍÍ» º º º º º º º º º º º º º º º º º º º º º º º º º º º º º º º º º º º º º º /DisplayHelpTextWide.Btn º ____________ º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ /* object oNewHelpDisplayHelpTextWide is a app.ModalClient DisplayHelpTextWide.Hdr set window_color item 0 to 2 set location to 2 1 absolute //on_key kuser send ToggleDisplayObject object oEdt is an Edit set location to 2 2 relative set size to 17 74 set read_only_state to true end_object object oBtn is a app.Button DisplayHelpTextWide.Btn set location to 20 0 relative item_list on_item t.btn.close send cancel end_item_list end_object procedure display.ss string title# string text# local integer grb# set value item 0 to (title#+"ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ") send Text_NewHelpSetEditObjectValueFormat (oEdt(self)) text# ui_accept self to grb# end_procedure end_object // oDisplayHelpTextWide object oNewHelpImageIds is a cArray NO_IMAGE // If not zero this object will be used for displaying the help text; property integer piDisplayHelpTextObject public 0 property string psHelpDialogHeader public "" end_object end_desktop_section procedure set piHelpImage for desktop integer liImage set value of (oNewHelpImageIds(self)) item self to liImage end_procedure procedure set piHelpDisplayObject integer lhObject set piDisplayHelpTextObject of (oNewHelpImageIds(self)) to lhObject end_procedure function piHelpDisplayObject returns integer local integer lhObject get piDisplayHelpTextObject of (oNewHelpImageIds(self)) to lhObject function_return lhObject end_function function piHelpImage for desktop returns integer local integer lhObj lhArray local integer liImage move self to lhObj move (oNewHelpImageIds(self)) to lhArray move 0 to liImage while liImage eq 0 get value of lhArray item lhObj to liImage ifnot liImage begin if lhObj gt DESKTOP move (parent(lhObj)) to lhObj else move -1 to liImage end end function_return liImage end_function procedure DisplayNewHelp for desktop local integer liImage lhDisplayObject local string lsText get piDisplayHelpTextObject of (oNewHelpImageIds(self)) to lhDisplayObject get piHelpImage to liImage if (liImage>0) begin get sTextFromDfImage liImage to lsText if lhDisplayObject send display.ss to lhDisplayObject "Help text" lsText else send DoDisplayText "Help text" lsText end else send obs "No help available" end_procedure set piHelpDisplayObject to (oNewHelpDisplayHelpTextWide(self)) on_key khelp send DisplayNewHelp // ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ // ³ General Keys Links Print ³ // ³Generelt Taster Links Udskriv³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ³ ³ // ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ