GUI library for Windows \ Linux (window9)

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
SARG
Posts: 1755
Joined: May 27, 2005 7:15
Location: FRANCE

Re: GUI library for Windows \ Linux (window9)

Post by SARG »

Some lines are missing in keywords.hhk.
Maybe you use an old version as get/set focus are 'new' keywords.

I have added what is needed : https://users.freebasic-portal.de/sarg/keywords.hhk

Edit : I forgot, index in Chm file is now ok.
Edit bis : the Chm file, https://users.freebasic-portal.de/sarg/Window9_help.chm
RNBW
Posts: 267
Joined: Apr 11, 2015 11:06
Location: UK

Re: GUI library for Windows \ Linux (window9)

Post by RNBW »

SARG wrote: Aug 26, 2022 16:17 Some lines are missing in keywords.hhk.
Maybe you use an old version as get/set focus are 'new' keywords.

I have added what is needed : https://users.freebasic-portal.de/sarg/keywords.hhk

Edit : I forgot, index in Chm file is now ok.
Edit bis : the Chm file, https://users.freebasic-portal.de/sarg/Window9_help.chm
Could you possibly give me a link to the version of the Windows Html Help Compiler that you use. There are so many locations to download and they all say version 1.3, but yours is obviously more up to date.
SARG
Posts: 1755
Joined: May 27, 2005 7:15
Location: FRANCE

Re: GUI library for Windows \ Linux (window9)

Post by SARG »

I could but not sure it solves the problem.

The missing lines are in a file genarated by HelpNDoc as there are these lines at the beggining of keywords.hhk :

Code: Select all

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
	<meta name="generator" content="HelpNDoc Professional Edition 8.0.0.187">
</head>

<body>
So I have added by hand what was necessary for get/set focus.

My version is 4.74. Anyway tell me and I'll give a link to download.
RNBW
Posts: 267
Joined: Apr 11, 2015 11:06
Location: UK

Re: GUI library for Windows \ Linux (window9)

Post by RNBW »

@SARG
I could but not sure it solves the problem.

The missing lines are in a file genarated by HelpNDoc as there are these lines at the beggining of keywords.hhk :

Code: Select all

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta name="generator" content="HelpNDoc Professional Edition 8.0.0.187">
</head>

<body>

So I have added by hand what was necessary for get/set focus.

My version is 4.74. Anyway tell me and I'll give a link to download.
I've had a look at the files that HelpNDoc generate. It doesn't generate a Keywords.hhk file. Instead it generates a Keywords.json file. I've done a search on the .json file and GETFOCUS and SETFOCUS are missing. The version of the Windows HTML Help Compiler (HHW Workshop) has been obtained from a link in the HelpNDoc program. The Windows HTML Help Compiler is an essential part of HelpNDoc and it uses it to do the final compilation of a.CHM file. I shall take up this matter with them to see if they can help.

In the meantime, yes I would appreciate a link to the version you use to have a play and see how it differs from mine.
SARG
Posts: 1755
Joined: May 27, 2005 7:15
Location: FRANCE

Re: GUI library for Windows \ Linux (window9)

Post by SARG »

RNBW
Posts: 267
Joined: Apr 11, 2015 11:06
Location: UK

Re: GUI library for Windows \ Linux (window9)

Post by RNBW »

SARG wrote: Aug 27, 2022 15:08 The link to the installer : https://users.freebasic-portal.de/sarg/htmlhelp.exe
Thanks for the link. I'll download it and see what happens.

In the meantime, I've sent off a query to HelpNDoc, but I don't expect a response until Monday at the earliest.
RNBW
Posts: 267
Joined: Apr 11, 2015 11:06
Location: UK

Re: GUI library for Windows \ Linux (window9)

Post by RNBW »

RNBW wrote: Aug 27, 2022 16:12
SARG wrote: Aug 27, 2022 15:08 The link to the installer : https://users.freebasic-portal.de/sarg/htmlhelp.exe
Thanks for the link. I'll download it and see what happens.

In the meantime, I've sent off a query to HelpNDoc, but I don't expect a response until Monday at the earliest.
I've had a response from HelpNDoc.
It turns out I wasn't using the Editor correctly. I had been confused because when I compiled the file it generated an Index. However, this was not the way to do it. What I should have done was add a keyword for a topic (or a keyword within the text) as it was initially produced. This then generates correctly the Index list. Fortunately, I was able to add the two missing topics into the Index list in the Editor and then compile it. The file in this link should include the previously missing topics in the Index list https://www.dropbox.com/s/twarsdvz7ezvn ... 9.chm?dl=0.
Sorry for the mess-up. But it's something else I've learnt.
SARG
Posts: 1755
Joined: May 27, 2005 7:15
Location: FRANCE

Re: GUI library for Windows \ Linux (window9)

Post by SARG »

Always good to know what is the reason for an issue. :D

Not sure but it seems that the chm file generated with my version of HTML compiler is smaller than with your version (about 500ko).
Could you check ?
RNBW
Posts: 267
Joined: Apr 11, 2015 11:06
Location: UK

Re: GUI library for Windows \ Linux (window9)

Post by RNBW »

SARG wrote: Aug 30, 2022 13:33 Always good to know what is the reason for an issue. :D

Not sure but it seems that the chm file generated with my version of HTML compiler is smaller than with your version (about 500ko).
Could you check ?
I won't have time for a few days. It is probably because you have done a straight compile using the Microsoft HTML Help Compiler. HelpNDoc has probably got some overheads on top of that.
demosthenesk
Posts: 237
Joined: Jul 15, 2021 7:23
Location: Greece
Contact:

Re: GUI library for Windows \ Linux (window9)

Post by demosthenesk »

hello,

i test windows9 lib in Debian 13 Trixie testing with no success.

1) in windows9.bi at line 583 i change it to
#inclib "webkitgtk-6.0"
from
#inclib "webkitgtk-1.0"

2) i compiled a project example with success,
but when i run it from console nothing happens...
it is executed but i get nothing, no error, no window

this is the code i tried

Code: Select all

#include Once "windows9/window9.bi"

Function Messbox(sCaption As String , sText As String , flag As Long  = MB_OK , ParentWin As Hwnd = 0)	As Long Export
	
	Dim Box As HWND
	
	If flag = MB_OK Then
	
		Box = gtk_message_dialog_new(Cast(Any Ptr,ParentWin), GTK_DIALOG_MODAL, _
		GTK_MESSAGE_INFO, GTK_BUTTONS_OK, g_locale_to_utf8(sText,Len(sText) ,0,0,0) )

	Elseif 	flag = MB_YESNO Then

		Box = gtk_message_dialog_new(Cast(Any Ptr,ParentWin), GTK_DIALOG_MODAL, _
		GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, g_locale_to_utf8(sText,Len(sText) ,0,0,0) )
		
	Elseif flag = MB_YESNOCANCEL Then
	
		Box = gtk_message_dialog_new(Cast(Any Ptr,ParentWin), GTK_DIALOG_MODAL, _
		GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, g_locale_to_utf8(sText,Len(sText) ,0,0,0) )	

		gtk_dialog_add_buttons(GTK_DIALOG(Box),_
			       GTK_STOCK_YES,_
			       GTK_RESPONSE_YES,_
			       GTK_STOCK_NO,_
			       GTK_RESPONSE_NO,_
			       GTK_STOCK_CANCEL,_
			       GTK_RESPONSE_CANCEL,_
			       NULL)
		
		gtk_dialog_set_default_response (GTK_DIALOG(Box),GTK_RESPONSE_YES)

	Endif
	
	gtk_window_set_title(GTK_WINDOW(Box), g_locale_to_utf8(sCaption,Len(sCaption),0,0,0))
	
	Dim As gint result  = gtk_dialog_run(GTK_DIALOG(Box))
	
	If flag = MB_YESNO Orelse flag = MB_YESNOCANCEL Then
	
		If result = GTK_RESPONSE_NO Then 
	
			Messbox = IDNO
			
		Elseif 	result = GTK_RESPONSE_YES Then 
		
			Messbox = IDYES
			
		Else
		
			Messbox = IDCANCEL

		Endif
		
	Else
	
		Messbox = IDOK

	Endif
	
	gtk_widget_destroy(Box) 
	
End Function
demosthenesk
Posts: 237
Joined: Jul 15, 2021 7:23
Location: Greece
Contact:

Re: GUI library for Windows \ Linux (window9)

Post by demosthenesk »

i made another test with success this time

Code: Select all

#include Once "windows9/window9.bi"

MessBox("Message may not be used ","Error") 
all are fine, no problem
demosthenesk
Posts: 237
Joined: Jul 15, 2021 7:23
Location: Greece
Contact:

Re: GUI library for Windows \ Linux (window9)

Post by demosthenesk »

one issue only...

The width of MessageBox is very short and the title is not been shown...

Image
demosthenesk
Posts: 237
Joined: Jul 15, 2021 7:23
Location: Greece
Contact:

Re: GUI library for Windows \ Linux (window9)

Post by demosthenesk »

demosthenesk wrote: Aug 06, 2023 9:59 hello,

i test windows9 lib in Debian 13 Trixie testing with no success.

1) in windows9.bi at line 583 i change it to
#inclib "webkitgtk-6.0"
from
#inclib "webkitgtk-1.0"

2) i compiled a project example with success,
but when i run it from console nothing happens...
it is executed but i get nothing, no error, no window

this is the code i tried

Code: Select all

#include Once "windows9/window9.bi"

Function Messbox(sCaption As String , sText As String , flag As Long  = MB_OK , ParentWin As Hwnd = 0)	As Long Export
	
	Dim Box As HWND
	
	If flag = MB_OK Then
	
		Box = gtk_message_dialog_new(Cast(Any Ptr,ParentWin), GTK_DIALOG_MODAL, _
		GTK_MESSAGE_INFO, GTK_BUTTONS_OK, g_locale_to_utf8(sText,Len(sText) ,0,0,0) )

	Elseif 	flag = MB_YESNO Then

		Box = gtk_message_dialog_new(Cast(Any Ptr,ParentWin), GTK_DIALOG_MODAL, _
		GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, g_locale_to_utf8(sText,Len(sText) ,0,0,0) )
		
	Elseif flag = MB_YESNOCANCEL Then
	
		Box = gtk_message_dialog_new(Cast(Any Ptr,ParentWin), GTK_DIALOG_MODAL, _
		GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, g_locale_to_utf8(sText,Len(sText) ,0,0,0) )	

		gtk_dialog_add_buttons(GTK_DIALOG(Box),_
			       GTK_STOCK_YES,_
			       GTK_RESPONSE_YES,_
			       GTK_STOCK_NO,_
			       GTK_RESPONSE_NO,_
			       GTK_STOCK_CANCEL,_
			       GTK_RESPONSE_CANCEL,_
			       NULL)
		
		gtk_dialog_set_default_response (GTK_DIALOG(Box),GTK_RESPONSE_YES)

	Endif
	
	gtk_window_set_title(GTK_WINDOW(Box), g_locale_to_utf8(sCaption,Len(sCaption),0,0,0))
	
	Dim As gint result  = gtk_dialog_run(GTK_DIALOG(Box))
	
	If flag = MB_YESNO Orelse flag = MB_YESNOCANCEL Then
	
		If result = GTK_RESPONSE_NO Then 
	
			Messbox = IDNO
			
		Elseif 	result = GTK_RESPONSE_YES Then 
		
			Messbox = IDYES
			
		Else
		
			Messbox = IDCANCEL

		Endif
		
	Else
	
		Messbox = IDOK

	Endif
	
	gtk_widget_destroy(Box) 
	
End Function
ahhh...this is the src code for MessageBox of windows9....
sorry my mistake...
VANYA
Posts: 1834
Joined: Oct 24, 2010 15:16
Location: Ярославль
Contact:

Re: GUI library for Windows \ Linux (window9)

Post by VANYA »

demosthenesk wrote: Aug 06, 2023 9:59 hello,

i test windows9 lib in Debian 13 Trixie testing with no success.

1) in windows9.bi at line 583 i change it to
#inclib "webkitgtk-6.0"
from
#inclib "webkitgtk-1.0"
Hi!

For GTK2, only webkitgtk-1.0 should be used (this is the latest version for GTK2)
For GTK3, whatever library (libwebkit2gtk-3.0 , libwebkit2gtk-4.0 , ...) you have on your system should be used.
Important! For GTK3, uncomment the #define __USE_GTK3__ line and use the appropriate binary library libwindow9.a for GTK3.
demosthenesk
Posts: 237
Joined: Jul 15, 2021 7:23
Location: Greece
Contact:

Re: GUI library for Windows \ Linux (window9)

Post by demosthenesk »

VANYA wrote: Aug 06, 2023 13:06
demosthenesk wrote: Aug 06, 2023 9:59 hello,

i test windows9 lib in Debian 13 Trixie testing with no success.

1) in windows9.bi at line 583 i change it to
#inclib "webkitgtk-6.0"
from
#inclib "webkitgtk-1.0"
Hi!

For GTK2, only webkitgtk-1.0 should be used (this is the latest version for GTK2)
For GTK3, whatever library (libwebkit2gtk-3.0 , libwebkit2gtk-4.0 , ...) you have on your system should be used.
Important! For GTK3, uncomment the #define __USE_GTK3__ line and use the appropriate binary library libwindow9.a for GTK3.
in my distro Debian 13 i have gtk2, gtk3, gtk4 but for gtk2 there is no webkitgtk-1.0 available
Post Reply