Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jgranick committed Aug 31, 2017
1 parent fa8a30f commit 1cb330e
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,40 @@ https://sourceforge.net/projects/tinyfiledialogs/

<pre>
_________
/ \ tiny file dialogs ( cross-platform C C++ )
|tiny file| v2.7.2 [November 23, 2016] zlib licence
/ \ tiny file dialogs ( cross-platform C C++ )
|tiny file| v2.9.3 [July 12, 2017] zlib licence
| dialogs | InputBox PasswordBox MessageBox ColorPicker
\____ ___/ OpenFileDialog SaveFileDialog SelectFolderDialog
\| Unicode UTF-8 (and also MBCS UTF-16 for windows)
Native dialog library for
WINDOWS MAC OSX GTK+ QT CONSOLE
\____ ___/ OpenFileDialog SaveFileDialog SelectFolderDialog
\| ASCII UTF-8 (and also MBCS UTF-16 for windows)
Native dialog library for WINDOWS MAC OSX GTK+ QT CONSOLE

SSH supported via automatic switch to console mode or X11 forwarding

tested with C & C++ compilers on
Visual Studio MinGW OSX LINUX FREEBSD ILLUMOS SOLARIS MINIX RASPBIAN
Visual Studio MinGW OSX LINUX FREEBSD OPENBSD ILLUMOS SOLARIS MINIX RASPBIAN
using
Gnome Kde Mate Cinnamon Unity Lxde Lxqt Xfce Enlightenment
WindowMaker IceWm Cde Jds OpenBox Awesome
Gnome Kde Mate Cinnamon Unity Lxde Lxqt Xfce Enlightenment
WindowMaker IceWm Cde Jds OpenBox Awesome Jwm

bindings for LUA and C# dll
included in LWJGL(java), rust, Allegrobasic

http://tinyfiledialogs.sourceforge.net
git://git.code.sf.net/p/tinyfiledialogs/code
_________________________________________________________________________
| |
| CONTACT me directly via the email address at the top of the header file |
|_________________________________________________________________________|

if you absolutely want them, the windows only wchar_t prototypes are in the header file

int tinyfd_messageBox (
char const * const aTitle , // ""
char const * const aMessage , // "" may contain \n \t
char const * const aDialogType , // "ok" "okcancel" "yesno"
char const * const aDialogType , // "ok" "okcancel" "yesno" "yesnocancel"
char const * const aIconType , // "info" "warning" "error" "question"
int const aDefaultButton ) ; // 0 for cancel/no , 1 for ok/yes
// returns 0 for cancel/no , 1 for ok/yes
int const aDefaultButton ) ;
// 0 for cancel/no , 1 for ok/yes , 2 for no in yesnocancel

char const * tinyfd_inputBox (
char const * const aTitle , // ""
Expand Down Expand Up @@ -75,25 +81,26 @@ char const * tinyfd_colorChooser(

- This is not for android nor ios.
- The code is pure C, perfectly compatible with C++.
- the windows utf-16 prototypes are in the header file
- the windows only wchar_t (utf-16) prototypes are in the header file
- windows is fully supported from XP to 10 (maybe even older versions)
- C# via dll, see example file
- C# & LUA via dll, see files in the folder EXTRAS
- OSX supported from 10.4 to 10.12 (maybe even older versions)
- Avoid using " and ' in titles and messages.
- There's one file filter only, it may contain several patterns.
- If no filter description is provided,
the list of patterns will become the description.
- char const * filterPatterns[3] = { "*.obj" , "*.stl" , "*.dxf" } ;
- On windows link against Comdlg32.lib and Ole32.lib
(on windows the no linking claim is a lie)
This linking is not compulsary for console mode (see header file).
- On unix: it tries command line calls, so no such need.
- On unix you need applescript, zenity, matedialog, kdialog, Xdialog,
- On unix: it tries command line calls, so no such need (NO LINKING).
- On unix you need applescript, zenity, matedialog, qarma, kdialog, Xdialog,
python2/tkinter or dialog (will open a terminal if running without console).
- One of those is already included on most (if not all) desktops.
- In the absence of those it will use gdialog, gxmessage or whiptail
with a textinputbox.
- If nothing is found, it switches to basic console input,
it opens a console if needed.
it opens a console if needed (requires xterm + bash).
- Use windows separators on windows and unix separators on unix.
- String memory is preallocated statically for all the returned values.
- File and path names are tested before return, they are valid.
Expand Down Expand Up @@ -154,10 +161,9 @@ int main()

if ( lWillBeGraphicMode && ! tinyfd_forceConsole )
{
tinyfd_forceConsole = tinyfd_messageBox("Hello World",
"force dialogs into console mode?\
\n\t(it is better if dialog is installed)",
"yesno", "question", 0);
tinyfd_forceConsole = ! tinyfd_messageBox("Hello World",
"graphic dialogs [yes] / console mode [no]?",
"yesno", "question", 1);
}

lTmp = tinyfd_inputBox(
Expand Down

0 comments on commit 1cb330e

Please sign in to comment.