SDL Forum Index
SDL
Simple DirectMedia Layer Forums
Reply to topic
kiss_sdl - Simple universal GUI widget toolkit for SDL
actsl


Joined: 09 Feb 2016
Posts: 83
Reply with quote
Kiss is a known saying that means "Keep it simple". Different from
other widget toolkits where you are supposed to choose from the existing
widgets the one that fits you the best, in this toolkit, when there is
no widget that satisfies all your needs, modify an existing widget, or
write your own, it is simple to do that. The toolkit was made as simple
as ever possible, to finally solve the problem of an immense complexity
of most of the existing toolkits, which makes it impossible for many
people to even use them. At that it was made universal, many simpler
toolkits don't enable you to do many things that you want, due to their
restricted internal design.

This toolkit uses an original innovative approach for a widget toolkit,
this new approach enabled to make the widget toolkit very simple, and
simpler than widget toolkits previously written. The toolkit is written
in C, but can also be used in C++.

Please see the GitHub project page for more.

GitHub project page https://github.com/actsl/kiss_sdl

The screenshot is smaller than the actual window.

View user's profileSend private message
actsl


Joined: 09 Feb 2016
Posts: 83
Reply with quote
The kiss_sdl widget toolkit is now improved a lot. It now has a window, multiline label, button, select button, vertical scrollbar, horizontal scrollbar, progress bar, entry box, textbox, and a combo box. All calls to external library functions from the widget functions are abstracted to separate source files, kiss_draw.c, kiss_general.c, and kiss_posix.c. By rewriting these functions, the implementation of the general operations can be changed, and different external libraries can be used. It now also works in Visual Studio, it was tested with the Visual Studio Community 2015. The new version 0.8.0 is in GitHub now.

https://github.com/actsl/kiss_sdl

The size of the screenshots below is now exactly how they appear on the screen.




_________________
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl
View user's profileSend private message
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
Reply with quote
Does it also have radio buttons and selection buttons too ?
View user's profileSend private message
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
Reply with quote
Ah yes, the selection (or rather checkbox) is there...
View user's profileSend private message
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
Reply with quote
Just got it all compiled, and it all works fine. However, changing the font to something else (as I would for my program), does show various clipping problems :

[img]https://onedrive.live.com/redir?resid=3422B1BA7F6B8DB1!4539&authkey=!ACRVDEC8ZBzQTvU&v=3&ithint=photo%2cpng[/img]

[img]https://onedrive.live.com/redir?resid=3422B1BA7F6B8DB1!4540&authkey=!ADopt4xBblPHnns&v=3&ithint=photo%2cpng[/img]

I think a clip rectangle will need to be used (if it isn't already).
View user's profileSend private message
actsl


Joined: 09 Feb 2016
Posts: 83
Reply with quote
MrTAToad wrote:
Just got it all compiled, and it all works fine. However, changing the font to something else (as I would for my program), does show various clipping problems :

These were not clipping problems. I just released version 0.8.4 :

https://github.com/actsl/kiss_sdl

I tried it, and the problems that were there on your screenshots, were not there any more.

I also added descent, so the select button is now perfectly aligned with the baseline of the text, at least with that ttf font.

Vertically it seems that there is just not enough room for one more line in your combo box. It only draws a line when it can draw it with full height. Also it only draws a character when it can draw it with full width.

_________________
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl
View user's profileSend private message
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
Reply with quote
Yes, that works better, although with the used font, it does seem that the combo box is getting the display string rather than the actual string, and thus displaying "Data not found" when selecting a city name that isn't completely displayed.

The only other problem is that to close the combo box you have to select something, rather than being able to click elsewhere to close it (and leave the current settings as they are).
View user's profileSend private message
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
Reply with quote
Word wrapping for static text boxes may be needed later on too...
View user's profileSend private message
actsl


Joined: 09 Feb 2016
Posts: 83
Reply with quote
MrTAToad wrote:

> Yes, that works better, although with the used font, it does seem that the combo box is getting the display string rather than the actual string, and thus displaying "Data not found" when selecting a city name that isn't completely displayed.

Yes exactly. This comes from what the entry box is, what you see in it, is what there is, and nothing what you cannot see there.

> The only other problem is that to close the combo box you have to select something, rather than being able to click elsewhere to close it (and leave the current settings as they are).

Yes you can close the combo box without selecting anything, press Enter. Because when the combo box is open, this means that its entry box is open for editing, Enter ends the editing of the entry box, and thus closes the combo box. Closing the entry box by clicking outside of it, causes problems, because when the entry box is a part of a composite widget such as the combo box, it cannot take focus.

> Word wrapping for static text boxes may be needed later on too...

You may implement it in your code if you need it. Text box is not a list box the way it may look like, it is what it is called, a text box. The text editors such as vim have the text internally stored exactly in the same way as in the text box, as an array of pointers to strings. Thus everything can be done there, but this depends on what one may want to do, and there is a huge number of such things.

I think that only the basic things need to be implemented in the widget toolkit. They develop toolkits further and further, making them more and more advanced, trying to implement a standard way of doing things even for more complex applications. But if an application is complex, then there is no problem to implement more complex things in that application, thus it makes no sense to implement more complex things in the toolkit.

_________________
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl
View user's profileSend private message
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
Reply with quote
yes, its a very useful system.
View user's profileSend private message
actsl


Joined: 09 Feb 2016
Posts: 83
Reply with quote
MrTAToad wrote:
yes, its a very useful system.

Thank you, you likely tested it and found that it works faultlessly.

But GitHub views are going down, by an exponential curve, no one is interested.

It is not just another widget toolkit, it is 2287 lines, yet it is universal. Others they say are simple, are over 10 000 lines. Some even say that Qt is simple, they obscure the meaning of simple, as it is in the Simple DirectMedia Layer.

And it is made very easy to change. What else can i do?

_________________
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl
View user's profileSend private message
actsl


Joined: 09 Feb 2016
Posts: 83
Reply with quote
MrTAToad wrote:
yes, its a very useful system.

Thank you, you likely tested it and found that it works faultlessly.

But GitHub views are going down, by an exponential curve, no one is interested.

It is not just another widget toolkit, it is 2287 lines, yet it is universal. Others they say are simple, are over 10 000 lines. Some even say that Qt is simple, they obscure the meaning of simple, as it is in the Simple DirectMedia Layer.

And it is made very easy to change. What else can i do?

_________________
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl
View user's profileSend private message
actsl


Joined: 09 Feb 2016
Posts: 83
Reply with quote
MrTAToad wrote:
yes, its a very useful system.

Thank you, you likely tested it and found that it works faultlessly.

It is not just another widget toolkit, it is 2287 lines, yet it is universal. Others they say are simple, are over 10 000 lines. Some even say that Qt is simple, they obscure the meaning of simple, as it is in the Simple DirectMedia Layer.

And it is made very easy to change. What else can i do?

_________________
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl
View user's profileSend private message
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
Reply with quote
There is not much more to do with it really, aside from making sure that it can be used on systems without keyboards Very Happy

Adding a few simple widgets would be good, namely icons - most others arent really needed.
View user's profileSend private message
actsl


Joined: 09 Feb 2016
Posts: 83
Reply with quote
MrTAToad wrote:
There is not much more to do with it really, aside from making sure that it can be used on systems without keyboards Very Happy

Adding a few simple widgets would be good, namely icons - most others arent really needed.

Means that it is something like a hammer, easy to use, universal, and always works.

Thank you for testing it.

In GitHub there are a bit more views now, but it doesn't go further so fast. The reason being that people are reluctant to use it, because they don't know it. When they use it, then they will see that it's simple, but they cannot know it, without using it. This makes the curve up exponential too. I have seen that it is more like linear, when something is forced on people, it is exponential when people start to use something because of their free will.

The only thing missing now, is any screenshots and such, of using it in any game or application. Someone asked that in another thread, about what GUI to use for SDL2, where it appeared that this is the only widget toolkit now that anyone knowingly could make to work with SDL2. But even if there are others, then they are likely much more complex and not so easily changeable than this one.

Have you used it yet in any application or game of yours, if so, can you maybe see some screenshots? Or if anyone else has used it, nice to see some screenshots too.

Or I will be glad to answer if anyone wants to ask something.

_________________
kiss_sdl - Simple generic GUI widget toolkit for SDL2 https://github.com/actsl/kiss_sdl
View user's profileSend private message
kiss_sdl - Simple universal GUI widget toolkit for SDL
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 6  

  
  
 Reply to topic