Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>viewnew() event function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  VIEWNEW()                                                   Event Function
 Purpose..: Create a view window to display text
-------------------------------------------------------------------------------
 Syntax...: viewNew( <uWin>, <uTxt>[, <cClr>[, <cChar>]] ) --> aLook

 Arguments: [<uWin>] = the string identifier of the window
                       OR the reference to the window structure
                       returned as an array by wNew() or wArray().
                       If not passed, the function will operate on
                       the window in focus.

            <uTxt>   = window text to be displayed. You can pick
                       one of the following formats:
                       - ASCII file (the function will open it),
                       - single dimension array (each element
                         will be treated as a line number),
                       - delimited string, say, "One/Two/Three",
                         will be three lines non-wrapped where
                         / is your delimiter.

            [<cClr>] = colors to be used for the scroll bars. The
                       default is window color. The string sequence
                       is:
                       - standard position is for the bar,
                       - enhanced position is for the controls,
                       - unselected position is for the thumb.
                       For example, <cClr> would be "W+/B, B/W, W+/W".
                       The string format is that used for sbClrSpec().

            [<cChar>]= parsing or delimiting character for
                       the character string.

 Returns..: aLook is an array used to set up the characteristics
            for the display of <uTxt>. It includes such details as the
            row and column, the number of lines of text, colors, scroll
            bar details and the text. If the text is not like that
            described for <uTxt>, the array is returned empty.

 Remark...: It is recommended (in the strongest terms) that you
            use windows with a WS_CUA style with the function.

            The function displays the initial page of the text (if it
            is one of the three types) along with the scroll bars,
            if the window is active and has not been minimized to an icon.

 Source...: WVIEW.PRG
-------------------------------------------------------------------------------
 Example..: . The example stashes the returned array of
              viewNew() in the cargo slots of two windows for
              future viewing.

        if isFile( "READ.ME" )
          wOpen( "ShoRead" )
          wCargoPut( "ShoRead", "V_DATA", viewNew( "ShoRead", "READ.ME" ) )
        endif

        if isFile( "HERES.HOW" )
          wOpen( "ShoHow" )
          wCargoPut( "ShoHow", "V_DATA", viewNew( "ShoHow", "HERES.HOW" ) )
        endif

See Also: wView() viewUpdate() viewClose() viewStabilize()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson