IPeople Blog

Utility report (MAGIC NUI Workstation only) for displaying all available NPR Icons

Written by Gary | May 16, 2022 5:00:00 AM

Users can attach "Icons" from the NPR.ICON dictionary to "Desktop" style menus for the NUI Workstation. 

These are the steps for creating a report that displays all of the bitmaps (from NPR.BMP) that are connected to icons:

  1. Create a report with Report DPM NPR.ICON with the following Report Title:
    "_%NPR.ICON.zcus.report.M.review("")_"
    You will need to replace 'report' with the name of your report.
  2. File and translate your report.
  3. Create a macro called 'review' with the following code:
    IF{/DONE;
       1^/DONE^/Z.SCHED.LOG^/R.FRAGMENT,
       @Not(@.gui) @W.err("This report should be run from the NUI Workstation only!");
       @SETUP,
       @GET.TEMP.LIST,
       @DISPLAY,
       @CLEAN.UP},
    END;

    DISPLAY
    ""^CNT^NUM^DONE,
    DO{+(/TEMP[CNT],filename)^CNT&@Not(DONE) @DISPLAY.ICON}

    DISPLAY.ICON
    @Mouse.pointer(@Z.mouse.ptr.hour.glass),
    IF{@Add(1,NUM)\15=0 84;NUM\15-1*6}^COL,
    NUM-1/15*3^ROW,
    TITLE_"\"_filename^FILE,
    @Pos(ROW,COL)^#,
    @Button.create(11,10,5,100,50,0,FILE)^/ICON.HANDLE[CNT],
    CNT^/HANDLE.MAP[/ICON.HANDLE[CNT]],
    @Button.tooltip(/ICON.HANDLE[CNT],"Please click here for info on bitmap "_filename),
    IF{NUM=105!@Not(+/TEMP[CNT]) @Mouse.pointer(@Z.mouse.ptr.std.arrow),
                                 @REMOVE.BUTTONS}

    REMOVE.BUTTONS
    %Z.init.build.folders("T")^TBF,
    @Pos(23,20)^#,
    @Button.create(11,10,5,100,50,0,TBF_"\"_"left arrow.bmp")^PREV,
    @Button.tooltip(PREV,"Previous set of bitmaps"),
    @Pos(23,40)^#,
    @Button.create(11,10,5,100,50,0,TBF_"\"_"exit.bmp")^EXIT,
    @Button.tooltip(EXIT,"Exit"),
    @Pos(23,60)^#,
    @Button.create(11,10,5,100,50,0,TBF_"\"_"right arrow.bmp")^NEXT,
    @Button.tooltip(NEXT,"Next set of bitmaps"),
    IF{@Not(+/TEMP[CNT]) @Button.disable(NEXT)},
    IF{@Not(-/TEMP[CNT-104]) @Button.disable(PREV)},
    DO