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>wlimit() window function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WLIMIT()                                                   Window Function
 Purpose..: Limit window activity to a rectangle
-------------------------------------------------------------------------------
 Syntax...: wLimit( <uWin>, [<nTR>], [<nLC>], ;
                            [<nBR>], [<nRC>] ) --> lSuccess

 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.

            [<nTR>]  = top row. The default is zero.
            [<nLC>]  = left column. The default is zero.
            [<nBR>]  = bottom row. The default is maxrow().
            [<nRC>]  = right column. The default is maxcol().


 Remark...: With the function, you can limit the window activity
            to the rectangle defined by the above corners. Hence, you
            can define a smaller area than the screen to limit how
            much or where a window can be resized, where it can be
            zoomed or the extent it can be moved.

            The function can be used whether the window is active or not.

 Returns..: lSuccess is TRUE if successful.

 Source...: WLIMIT.PRG
-------------------------------------------------------------------------------
 Example..: . The example uses wNew() to create a back drop
              composed of the chr(176). Then another called "Sun"
              which appears in the upper left quadrant of the screen.
              However, it is limited in movement to that quadrant. That
              way you can have a window open and active but you know that
              it will not cover anything in the other three quadrants.

            wNew     ( "DOS",,,,, "W+/N*" )
            wFrame   ( "DOS", "#########" )
            wHowClose( "DOS", B_VBLIND( 100 ) )

            wNew     ( "Sun", 1, 3, 7, 17, cSUN, WS_CUA )
            wTitle   ( "Sun", " Sun Box ", "W+/B" )
            wFrame   ( "Sun", B_THICK, "GR+/B" )
            wHowOpen ( "Sun", B_EXPLODEDN( 60 ) )
            wHowClose( "Sun", B_IMPLODEUP( 60 ) )
            wShadow  ( "Sun", B_SHADOW() )
            wLimit   ( "Sun", 0, 0, 12, 40 )

            wOpen( "DOS" )
            ...
            wOpen( "Sun" )

See Also: wZoom() wReSize() wMove()

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