TinyDialog a simple Windows and Linux user interface.

Post your FreeBASIC tips and tricks here. Please don’t post your code without including an explanation.
jdebord
Posts: 521
Joined: May 27, 2005 6:20
Location: Limoges, France
Contact:

Re: TinyDialog a simple Windows and Linux user interface.

Postby jdebord » Jan 04, 2018 8:01

JohnK wrote:Btw, if you didn't read the gui thread, don't bother. I still think FLTK and this lib are the best choice for FB.


I agree with this. I will stick to FLTK, no matter which library is added to FB.
Munair
Posts: 836
Joined: Oct 19, 2017 15:00
Location: 't Zand, NL
Contact:

Re: TinyDialog a simple Windows and Linux user interface.

Postby Munair » Jan 04, 2018 9:24

FLTK is C++ based and therfore not the best match for FreeBASIC. Moreover, its cross-platform capability is poor. While Windows users may get fair results, on Linux it uses X11 thereby completely bypassing the default desktop and theme.

So from a Windows perspective it may be a OK choice, but from a Linux perspective, it's a poor choice. Windows doesn't have/need a fallback theme so you'll never know the difference. But to make a fair comparison, if FLTK were to bypass the Windows API (if it were possible) your interface would look like old Windows 3.1, which would be crappy next to the modern day API. This is the effect FLTK has on Linux. Not a good choice IMHO.
badidea
Posts: 1619
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: TinyDialog a simple Windows and Linux user interface.

Postby badidea » Jan 04, 2018 20:47

I think 'we' linux-users are used odd looking GUI's. FLTK at least looks more 'neutral' (no weird colors) then Java applications. Screenshot warning (Java stuff left, FLTK right) : Image
But maybe I just like dull grey GUIs and don't care much about theme-ing. Never bothered changing MATE's the default desktop background as well.
padawan
Posts: 10
Joined: Jan 10, 2019 13:41

won't compile *cry*

Postby padawan » Jan 10, 2019 13:58

This looks extremely helpfull and usage seems pretty easy to understand. I would love to test it in some smaller projects. The Test01.exe works fine, but unfortunately I don´t manage to compile the "Test01.bas". The compiler throws errors. Looks like compatibility issues, but I don´t really understand it in detail. Maybe somebody has an idea how to solve the problem. Or is TinyDialog simply not compatible with the 64 bit Version of FreeBasic?

I use the compiler FreeBASIC-1.05.0-win64 in Windows 10. I tried compilation both on the command line and with FBIde. I logged the error message from the command line in a text file. It says:

Code: Select all

Test01.c: In function '_ZN10TINYDIALOG8GETCOLOREu7INTEGER':
Test01.c:360:93: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int64 * {aka long long int *}' [-Wformat=]
  sscanf( *(uint8**)((uint8*)*(void***)((uint8*)THIS$1 + 144ll) + (INDEX$1 << 3ll)), (uint8*)"%d %d %d", &R$1, &G$1, &B$1 );
                                                                                             ^
Test01.c:360:93: warning: format '%d' expects argument of type 'int *', but argument 4 has type 'int64 * {aka long long int *}' [-Wformat=]
Test01.c:360:93: warning: format '%d' expects argument of type 'int *', but argument 5 has type 'int64 * {aka long long int *}' [-Wformat=]
Test01.c: In function '_ZN10TINYDIALOG14ADDCOLORBUTTONER8FBSTRINGu8UINTEGERS1_':
Test01.c:1055:29: warning: format '%d' expects argument of type 'int', but argument 3 has type 'int64 {aka long long int}' [-Wformat=]
  sprintf( PVALUE$1, (uint8*)"%d %d %d", B$1, G$1, R$1 );
                             ^
Test01.c:1055:29: warning: format '%d' expects argument of type 'int', but argument 4 has type 'int64 {aka long long int}' [-Wformat=]
Test01.c:1055:29: warning: format '%d' expects argument of type 'int', but argument 5 has type 'int64 {aka long long int}' [-Wformat=]
C:\Users\padawan\tools\FreeBASIC-1.05.0-win64\bin\win64\ld.exe: skipping incompatible ./libTinyDialog.dll.a when searching for -lTinyDialog
C:\Users\padawan\tools\FreeBASIC-1.05.0-win64\bin\win64\ld.exe: skipping incompatible ./TinyDialog.dll when searching for -lTinyDialog
C:\Users\padawan\tools\FreeBASIC-1.05.0-win64\bin\win64\ld.exe: skipping incompatible ./libTinyDialog.dll.a when searching for -lTinyDialog
C:\Users\padawan\tools\FreeBASIC-1.05.0-win64\bin\win64\ld.exe: skipping incompatible ./TinyDialog.dll when searching for -lTinyDialog
C:\Users\padawan\tools\FreeBASIC-1.05.0-win64\bin\win64\ld.exe: cannot find -lTinyDialog
D.J.Peters
Posts: 7852
Joined: May 28, 2005 3:28

Re: TinyDialog a simple Windows and Linux user interface.

Postby D.J.Peters » Jan 10, 2019 22:03

It's from "Dec 12, 2012" the time where FreeBASIC was a 32-bit code emitter only !

But you can give fltk-c a try instead.
viewtopic.php?f=14&t=24547

Joshy
padawan
Posts: 10
Joined: Jan 10, 2019 13:41

Re: TinyDialog a simple Windows and Linux user interface.

Postby padawan » Jan 10, 2019 23:34

Ah, well, I got the point... it compiles fine when I use the 32 bit version of the FreeBasic compiler.
Lost Zergling
Posts: 259
Joined: Dec 02, 2011 22:51
Location: France

Re: TinyDialog a simple Windows and Linux user interface.

Postby Lost Zergling » Jan 11, 2019 2:33

You may use fbc64 for main application, save default values in a file, use Chain to transfert control to a 32 bit interface program dedicated to Tiny Dialog which is loading file and saving new values, then exiting the 32 bit program interface. As chain resume control to 64 bits application, just load the file and assign new values to variables. This is not very complicated to implement so you can keep TinyDialog's advantages for your 64 bits applications till your OS is remaining 32 bits compliant as well. Note : In some specific cases a very small lag can sometimes be detected.
padawan
Posts: 10
Joined: Jan 10, 2019 13:41

Re: TinyDialog a simple Windows and Linux user interface.

Postby padawan » Jan 11, 2019 11:12

A creative idea, I like it :-) is "chain" a certain tool or function, or do you just mean the detour via a text file?
D.J.Peters
Posts: 7852
Joined: May 28, 2005 3:28

Re: TinyDialog a simple Windows and Linux user interface.

Postby D.J.Peters » Jan 11, 2019 11:14

padawan wrote:is "chain" a certain tool or function, or do you just mean the detour via a text file?

/wiki/KeyPgChain

Joshy
padawan
Posts: 10
Joined: Jan 10, 2019 13:41

Re: TinyDialog a simple Windows and Linux user interface.

Postby padawan » Jan 11, 2019 11:24

Wow... that is a cool concept. Thank you very much for the hints!
Lost Zergling
Posts: 259
Joined: Dec 02, 2011 22:51
Location: France

Re: TinyDialog a simple Windows and Linux user interface.

Postby Lost Zergling » Jan 17, 2019 11:01

@padawan. Please pardon me. Where are you from ? France ? welcome have a look to "my" LZLE project if you are looking for "easy" lists as well ! :-)

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 1 guest