some gtk2 code

Miscellaneous Forums/Linux Discussion/some gtk2 code

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Thanks again Brucey for the update - I've just been on a power-boat course for the weekend so I've only just got a chance to visit BlitzBasic.com.

The updates to GTKMaxGUI are brilliant - they have made Max'd GUI from completely unusable to relatively stable.

I've made a small donation to you so get a beer from me for all your hard work. (Sent to @removed@ .)

A bug I noticed to do with "mnemonic functionality" for menus, which is that it breaks when the menu becomes checked...

Framework BaH.GTKMaxGUI

Global wndMain:TGadget = CreateWindow("Test Window",100,100,400,300,Null,15)

	Global mnuContainer:TGadget = WindowMenu(wndMain)
	
	Global mnuFileRoot:TGadget = CreateMenu("&File",0,mnuContainer)
		Global mnuFileChecked:TGadget = CreateMenu("&Ampersand Broken on Checked",0,mnuFileRoot)
		
CheckMenu(mnuFileChecked)

UpdateWindowMenu(wndMain)

Repeat

	Select WaitEvent()
	
		Case EVENT_WINDOWCLOSE;End
		
	EndSelect

Forever


Also, you know the PANEL_GROUP flag for CreatePanel, according to the docs:

PANEL_GROUP: Panel is drawn with a titled etched border.

In GTK, it seems that panels don't have a title above them, just the box.

Framework BaH.GTKMaxGUI
'Framework BRL.FLTKMaxGUI

Global wndMain:TGadget = CreateWindow("Test Window",100,100,500,400,Null,15)

	Global gadPanel:TGadget = CreatePanel(10,40,400,300,wndMain,PANEL_GROUP,"This Should Appear As A Title For The Panel")
	
Repeat

	Select WaitEvent()
	
		Case EVENT_WINDOWCLOSE;End
		
	EndSelect

Forever



Thanks


Seb