Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - _fileselfunc file selection callback function type http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _FILESELFUNC        File selection callback function type
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   proc _FILESELFUNC ptr
   param value uint nTop, ;
         value uint nLeft, ;
         value uint nBottom, ;
         value uint nRight, ;
         const char cDir

 Arguments
   nTop is the top row of the file list display.
   nLeft is the leftmost column of the file list display.
   nBottom is the bottom row of the file list display.
   nRight is the rightmost column of the file list display.
   cDir is the current directory as a character string.

 Return
   None.

 Description
   The _FILESELFUNC function type is used to declare a pointer to a
   procedure with application-dependant functionality. The function
   type is used in conjunction with the fileselect() function to
   display a frame and/or the current directory during file selection.

 Example
   #define EXAMPLE_TYPE
   #include example.hdr

   proc FSFunc static
   param value uint nTop, ;
         value uint nLeft, ;
         value uint nBottom, ;
         value uint nRight, ;
         const char cDir
   box3d( nTop - 4, nLeft - 3, nBottom + 2, nRight + 3, ;
      B3D_SINGLE + B3D_FRAME + B3D_SHADOW + B3D_HEADER, ;
      1, WHITE_WHITE )
   dispcolor( nTop - 4, nLeft - 2, "| Select a file |", WHITE_WHITE )
   dispcolor( nTop - 2, nLeft, cDir, WHITE_RED )
   endproc
   
   proc Test_FILESELFUNC
   vardef
      char cFile
   enddef
   __syscolor[ CLR_STD ] := BLUE_WHITE
   __syscolor[ CLR_ENHCD ] := BLACK_YELLOW
   ? fileselect( "*.*", .t., .t., &FSFunc )
   __syscolor[ CLR_STD ] := BLACK_LIGHT_GREY
   endproc

   proc main
   Test_FILESELFUNC()
   endproc

See Also: fileselect()

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