https://tinyfiledialogs.sourceforge.net

Hi,

I am the author of tinyfiledialogs a cross-platform C C++ library (windows, Mac, Unix) which offers many modal dialogs and popup notifications (both for graphic and console modes). It aims to be extremely easy to use. There is no init, no main loop, and no external dependencies. It is used by hundreds projects on GitHub.

The following github call returns almost 15000 files (you need to be logged on github)

https://github.com/search?q=tinyfd+OR+tinyfiledialogs&type=code


With the latest version v3.14, I've just released the bindings for R.

I've been pointed to the documentation link on how to write a package,
but it would really help if someone who knows what to do could direct me.

Thanks in advance

Guillaume Vareille


    # first load the included library (it could easily be compiled on the target machine)
    dyn.load("tinyfiledialogsLinux64.so")

    # then load the included R interface
    tinyfd_openFileDialog <- function(aTitle, aDefaultPathAndFile , aNumOfFilterPatterns,                 aFilterPatterns, aSingleFilterDescription , aAllowMultipleSelects)
    {
      result <- .C("tfd_openFileDialog",
            charToRaw(aTitle),
            lOpenFile = aDefaultPathAndFile ,
            as.integer(aNumOfFilterPatterns) ,
            aFilterPatterns ,
            charToRaw(aSingleFilterDescription) ,
            as.integer(aAllowMultipleSelects) )

      if ( result$lOpenFile == "NULL" ) return()
      else return(result$lOpenFile)
    }

    # now, you can call the dialog
    lFilename <- tinyfd_openFileDialog( "a title" , "/Users/bardos/Documents/" , 1 , c ("*.txt","*.jpg") , "some files" , 0 )

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to