Linux Lib: a messagerequester replacement using GTK

Vous avez développé un logiciel en PureBasic et vous souhaitez le faire connaitre ?
walker
Messages : 2
Inscription : ven. 30/juin/2006 23:19

Linux Lib: a messagerequester replacement using GTK

Message par walker »

Maybe not a real replacement but a good additional command (imo)
and a small demo to use with TailBite...
Simple usage:

Code : Tout sélectionner

MsgBox("My message text",#GTK_MESSAGE_ERROR,#GTK_BUTTONS_OK,"","")
as type you can use:

Code : Tout sélectionner

#GTK_MESSAGE_ERROR
#GTK_MESSAGE_INFO
#GTK_MESSAGE_QUESTION
#GTK_MESSAGE_WARNING
as buttons you can use

Code : Tout sélectionner

#GTK_BUTTONS_OK
#GTK_BUTTONS_CLOSE
#GTK_BUTTONS_OK_CANCEL
#GTK_BUTTONS_YES_NO
#GTK_BUTTONS_NONE
#GTK_BUTTONS_CANCEL
the two last parameters can be used to substitute a variable within the Messagetext. The variable to be substituted is %s (the first occurance of %s will be replaced by the first text, the second one by the second text)

example:

Code : Tout sélectionner

MsgBox("My %s message text %s",#GTK_MESSAGE_ERROR,#GTK_BUTTONS_OK,"first","is not long")
the link to the lib:
http://home.arcor.de/x-linux/pure/msgbox/msg_box_lib

and the source:
http://home.arcor.de/x-linux/pure/msgbox/msg_box_lib.pb

A warning: if you use this command before one window was opened you must use gtk_init_(0,0) befor you can use this command otherwise the gtk_init_() stuff will be done automatically when opening a window

A thing you can't change is the titel of the Message (this is determined by the message type) BUT you'll have the little image like on Windows and the variable substitution 8)

As always... comments, suggestions are apreciated..
Image
Avatar de l’utilisateur
Crystal Noir
Messages : 892
Inscription : mar. 27/janv./2004 10:07

Message par Crystal Noir »

interesting, but i have some pbs with linux version, I have a linker error when I want to launch some simple graphical examples (like move a sprite) (SDL error and linker error) :(

I try to make this linux version work :( (v3.94)

use vmware 5 +mandriva 2006 (not 2007)
meganet
Messages : 317
Inscription : jeu. 20/janv./2005 22:00

En français pleas!

Message par meganet »

Et en français ça donne quoi? Moi comprend pas grand chose en anglais etpuis on est sur le forum français non?
Backup
Messages : 14526
Inscription : lun. 26/avr./2004 0:40

Re: En français pleas!

Message par Backup »

meganet a écrit :Et en français ça donne quoi? Moi comprend pas grand chose en anglais et puis on est sur le forum français non?
oui surtout que si on s'amuse a écrire Français sur leur Forum
y en a toujours un pour raller :lol:
Répondre