SDL-widgets, a GUI toolkit (not for games)

Hello,

There are several GUI toolkits available on top of SDL, and I wanted to add
one more. Its name is SDL-widgets, and it is not targeting games but normal
applications. In the past I made a toolkit using Xlib, employing it for some
rather complicated applications, so I know more or less what works and what not.
Bare Xlib is totally different from SDL however, still I could create
a simple and extendable implementation and API, that I want to make available
for everyone interested. It is yet a first start, version 0.1. It is developed
under Ubuntu Linux, and I have no idea about portability to other platforms.
You can get it here:

http://members.chello.nl/w.boeke/SDL-widgets/index.html

As a demo project there is also an audio application aiming to create some sounds
and some fun. My email address is in the README file.

Wouter Boeke

Very nice demo. I’ve been disappointed by most of the GUI toolkits for the following reasons:

  • Some were too big in functionalities
  • Some were not well documented, and yet seemed interesting
  • Some did not compile at all :frowning:

I’m looking forward to seeing a lightweight, well documented and portable GUI toolkit for SDL … maybe SDL-widgets ? :slight_smile:

Just a remark on the Hello World example:
In the callbacks, you make reference to “top_win” and “but”, but how do you know that the event comes from that particular object ? Isn’t there something missing in the arguments of the callbacks ? (or maybe I’ve read too fast the doc :))

Cheers and thanks for your work

Julien

— En date de?: Ven 31.10.08, W.Boeke <w.boeke at chello.nl> a ?crit?:de: W.Boeke <w.boeke at chello.nl>
Objet: [SDL] SDL-widgets, a GUI toolkit (not for games)
?: sdl at lists.libsdl.org
Date: Vendredi 31 Octobre 2008, 10h16

Hello,

There are several GUI toolkits available on top of SDL, and I wanted to add
one more. Its name is SDL-widgets, and it is not targeting games but normal
applications. In the past I made a toolkit using Xlib, employing it for some
rather complicated applications, so I know more or less what works and what
not.
Bare Xlib is totally different from SDL however, still I could create
a simple and extendable implementation and API, that I want to make available
for everyone interested. It is yet a first start, version 0.1. It is developed
under Ubuntu Linux, and I have no idea about portability to other platforms.
You can get it here:

http://members.chello.nl/w.boeke/SDL-widgets/index.html

As a demo project there is also an audio application aiming to create some
sounds
and some fun. My email address is in the README file.

Wouter Boeke


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Julien wrote:

Just a remark on the Hello World example:
In the callbacks, you make reference to “top_win” and “but”, but how do you know that the event
comes from that particular object ? Isn’t there something missing in the arguments of the
callbacks ? (or maybe I’ve read too fast the doc :))

Code that works cannot have something missing … Probably you found out already, or your
knowledge of C++ is somewhat rusty! Anyhow, e.g. if statement
but=new Button(top_win,Rect(5,10,60,0),“catch me!”,button_cmd);
is executed, then a new widget is created, that, if clicked, calls function button_cmd.
There is only one such function, and this does what it should do: manipulate ‘but’.

If there are many Buttons in an application, they still can share one callback function:
RTFM (read the fucking manual)!

Wouter

Well, it was a nice test to see if a simple example was quickly understandable.

It is not a good manner to answer to a future user to say that his knowledges are rusty, although I hope I should take it in an humoristic fashion. Avoiding “fucking” and its derivative would be nicer too, for every reader of the mailing list.

Bear in mind that not all programmers have the same way to solve a problem, mainly event management can be implemented in various ways. That’s why I asked you that question. In Java for instance, when a callback is triggered, it receives the source object as a parameter.

You made an interesting prototype. People is ready to give advice and tips here. Except if you are of those people who think that what they do is always the best, and that no feedback is necessary (any good project need critics and feedbacks. Most of the other projects are given up because of the lack of communication).

By the way, can you tell my where you explain about shared callbacks?

Cheers
Julien

— En date de?: Ven 31.10.08, W.Boeke <w.boeke at chello.nl> a ?crit?:de: W.Boeke <w.boeke at chello.nl>
Objet: Re: [SDL] Re : SDL-widgets, a GUI toolkit (not for games)
?: sdl at lists.libsdl.org
Date: Vendredi 31 Octobre 2008, 13h40

Julien wrote:

Just a remark on the Hello World example:
In the callbacks, you make reference to “top_win” and
"but", but how do you know that the event
comes from that particular object ? Isn’t there something missing in
the arguments of the
callbacks ? (or maybe I’ve read too fast the doc :))

Code that works cannot have something missing … Probably you found out
already, or your
knowledge of C++ is somewhat rusty! Anyhow, e.g. if statement
but=new Button(top_win,Rect(5,10,60,0),“catch me!”,button_cmd);
is executed, then a new widget is created, that, if clicked, calls function
button_cmd.
There is only one such function, and this does what it should do: manipulate
’but’.

If there are many Buttons in an application, they still can share one callback
function:
RTFM (read the fucking manual)!

Wouter


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

It is not a good manner to answer to a future user to say that his knowledges are
rusty, although I hope I should take it in an humoristic fashion. Avoiding "fucking"
and its derivative would be nicer too, for every reader of the mailing list.

Bear in mind that not all programmers have the same way to solve a problem, mainly
event management can be implemented in various ways. That’s why I asked you that
question. In Java for instance, when a callback is triggered, it receives the source
object as a parameter.

Hi Julien,

I did not want to offend you at all! Maybe the problem is that I live in Holland,
and it seems that the rest of the world does not like our sense of humor. By the way,
RTFM is a standard message, originating from the rude world of engineers, and the F
is in no way meant personal!

By the way, can you tell my where you explain about shared callbacks?

In the manual, chapter ‘The widget classes’, item WinBase -> Id. For an example
look at line 905 in make-waves.cpp:

void checkbox_cmd(Id id,bool value) {
switch (id.id1) {

Wouter

Yeah, a friend from Hungary was using the F-word in sweet whisperings to my 1-year old… Funny, I guess, but disturbing. It’s not polite English to ever use it.

Jonny D----------------------------------------

Date: Fri, 31 Oct 2008 14:48:45 +0100
From: w.boeke at chello.nl
To: sdl at lists.libsdl.org
Subject: Re: [SDL] Re : SDL-widgets, a GUI toolkit (not for games)

It is not a good manner to answer to a future user to say that his knowledges are
rusty, although I hope I should take it in an humoristic fashion. Avoiding "fucking"
and its derivative would be nicer too, for every reader of the mailing list.

Bear in mind that not all programmers have the same way to solve a problem, mainly
event management can be implemented in various ways. That’s why I asked you that
question. In Java for instance, when a callback is triggered, it receives the source
object as a parameter.

Hi Julien,

I did not want to offend you at all! Maybe the problem is that I live in Holland,
and it seems that the rest of the world does not like our sense of humor. By the way,
RTFM is a standard message, originating from the rude world of engineers, and the F
is in no way meant personal!

By the way, can you tell my where you explain about shared callbacks?

In the manual, chapter ‘The widget classes’, item WinBase -> Id. For an example
look at line 905 in make-waves.cpp:

void checkbox_cmd(Id id,bool value) {
switch (id.id1) {

Wouter


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Store, manage and share up to 5GB with Windows Live SkyDrive.
http://skydrive.live.com/welcome.aspx?provision=1?ocid=TXT_TAGLM_WL_skydrive_102008

Jonathan Dearborn <grimfang4 hotmail.com> writes:

Yeah, a friend from Hungary was using the F-word in sweet whisperings to my 1-
year old… Funny, I guess, but> disturbing. It’s not polite English to ever use it.

Jonny D


Date: Fri, 31 Oct 2008 14:48:45 +0100
From: w.boeke chello.nl
To: sdl lists.libsdl.org
Subject: Re: [SDL] Re : SDL-widgets, a GUI toolkit (not for games)

It is not a good manner to answer to a future user to say that his
knowledges are

rusty, although I hope I should take it in an humoristic fashion.
Avoiding “fucking”

and its derivative would be nicer too, for every reader of the mailing
list.

Bear in mind that not all programmers have the same way to solve a
problem, mainly

event management can be implemented in various ways. That’s why I asked
you that

question. In Java for instance, when a callback is triggered, it receives
the source

object as a parameter.

Hi Julien,

I did not want to offend you at all! Maybe the problem is that I live in
Holland,

and it seems that the rest of the world does not like our sense of humor.
By the way,

RTFM is a standard message, originating from the rude world of engineers,
and the F

is in no way meant personal!

By the way, can you tell my where you explain about shared callbacks?

In the manual, chapter ‘The widget classes’, item WinBase -> Id. For an
example

look at line 905 in make-waves.cpp:

void checkbox_cmd(Id id,bool value) {
switch (id.id1) {

Wouter


SDL mailing list
SDL lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Store, manage and share up to 5GB with Windows Live SkyDrive.
http://skydrive.live.com/welcome.aspx?provision=1?
ocid=TXT_TAGLM_WL_skydrive_102008

I also started writing a GUI library in C++ for SDL quite some time ago. I was
planning to use it for my games or for normal applications. I still have the
source but I’ve never actually used it, if you’re interested, I can send you
the source code.

Creature

I also started writing a GUI library in C++ for SDL quite some time ago. I was
planning to use it for my games or for normal applications. I still have the
source but I’ve never actually used it, if you’re interested, I can send you
the source code.

Hi Creature,

That would be nice, I’m a curious person.
My email is: w dot boeke at chello dot nl

Wouter

W.Boeke <w.boeke chello.nl> writes:

I also started writing a GUI library in C++ for SDL quite some time ago. I
was

planning to use it for my games or for normal applications. I still have
the

source but I’ve never actually used it, if you’re interested, I can send
you

the source code.

Hi Creature,

That would be nice, I’m a curious person.
My email is: w dot boeke at chello dot nl

Wouter

I’ve sent the UIX package to you, let me know what you think ;-).

Creature

I’ve sent the UIX package to you, let me know what you think ;-).

Creature

It’s difficult to know what I think. There was no makefile, no documentation,
no test suite … I got the impression that it was only the beginning of
something big. Maybe I missed something, I saw a file Tester.vcproj so probably
you are working in a Microsoft environment, where I know nothing about.

In the source code (in UIX/Library/trunk/Source/UIXdev) I could not find the
part that was responsible for putting all widgets together in some sort of
hierarchy. A lot of getters and setters of class variables, conforming to the
official object-oriented design style but serving no real purpose. Why didn’t
you finish the project? One small demo so somebody could see something moving
on the screen?

If in the source code there is something that might be interesting for me
or for anybody else then maybe you could notify this?

Regards,
Wouter

W.Boeke <w.boeke chello.nl> writes:

I’ve sent the UIX package to you, let me know what you think .

Creature

It’s difficult to know what I think. There was no makefile, no documentation,
no test suite … I got the impression that it was only the beginning of
something big. Maybe I missed something, I saw a file Tester.vcproj so
probably
you are working in a Microsoft environment, where I know nothing about.

In the source code (in UIX/Library/trunk/Source/UIXdev) I could not find the
part that was responsible for putting all widgets together in some sort of
hierarchy. A lot of getters and setters of class variables, conforming to the
official object-oriented design style but serving no real purpose. Why didn’t
you finish the project? One small demo so somebody could see something moving
on the screen?

If in the source code there is something that might be interesting for me
or for anybody else then maybe you could notify this?

Regards,
Wouter

Yes, I used the Visual C++ IDE (it was back in the times I had never used
another compiler such as MinGW before). It was also made when there was alot of
fus about whether getters and setters were a must or not (now I know better
concerning these things). All the controls eventually inherit from the control
class in Control.h if I remember correctly and they use callback events if
there is anything to call back about ;-).

I believe I have a demo somewhere. If I can still find it, I’ll try and upload
it asap.

Creature

Hi,

I want to know your GUI library is based on Windows MFC or not.
I wants to develop a media-player but blocked by the AV display.
Can you do me a favour?
Thanks.

Regards,
Eric

2008/11/8 Creature > W.Boeke <w.boeke chello.nl> writes:

I also started writing a GUI library in C++ for SDL quite some time
ago. I
was

planning to use it for my games or for normal applications. I still
have
the

source but I’ve never actually used it, if you’re interested, I can
send
you

the source code.

Hi Creature,

That would be nice, I’m a curious person.
My email is: w dot boeke at chello dot nl

Wouter

I’ve sent the UIX package to you, let me know what you think ;-).

Creature


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Eric wrote:

I want to know your GUI library is based on Windows MFC or not.
I wants to develop a media-player but blocked by the AV display.
Can you do me a favour?
Thanks.

SDL-widgets only depends on the SDL libraries. Regarding portability
questions I don’t know more then you supposing you did read the
documentation on the SDL site.

Cheers,
Wouter

Thanks for your reply.
In fact I already queried many docs in the SDL site about how to port.
It seems difficult to find related information.

Regards,
Eric

2008/11/16 W.Boeke <w.boeke at chello.nl>> Eric wrote:

I want to know your GUI library is based on Windows MFC or not.
I wants to develop a media-player but blocked by the AV display.
Can you do me a favour?
Thanks.

SDL-widgets only depends on the SDL libraries. Regarding portability
questions I don’t know more then you supposing you did read the
documentation on the SDL site.

Cheers,
Wouter


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org