TabControl design

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Sinbad
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Wed Jan 12, 2005 12:06
Location: Guernsey, Channel Islands
Contact:

TabControl design

Postby Sinbad » Thu Aug 12, 2004 23:38

For info, the tab control is working now, accepting nested content as tabs and flipping between them nicely. The one remaining problem I have is that my tabs at the top don't quite change appearance properly all the time. They start off ok, and overlap each other properly (around the edges like the standard tab control) but when you select other tabs and go back, it seems to get the overlapping edge decision wrong and it starts to look wrong.

I'm getting the feeling this is to do with what CE mentioned earlier, that when moving windows to the front, they are removed and re-added, which is probably screwing up my calculation of whats 'to the left' or 'to the right' of the selected tab. I may have to rethink this.

Anyway, hopefully I can get the last bit nailed tomorrow. This experience has given me even more respect for CE, since not only is the code nice to work with, but he's done a lot more (and more complex) widgets in far less time. This has taken a bit longer than I intended but I've learned a lot :)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

TabControl design

Postby CrazyEddie » Fri Aug 13, 2004 08:45

...The one remaining problem I have is that my tabs at the top don't quite change appearance properly all the time...

I'm getting the feeling this is to do with what CE mentioned earlier, that when moving windows to the front, they are removed and re-added, which is probably screwing up my calculation of whats 'to the left' or 'to the right' of the selected tab. I may have to rethink this.


Depending upon how you have gone about this, you could be correct.

The sequence of child windows added to a parent is not stable, and can change for various reasons, but mainly concerning z-order; the order of the windows in the child list determines the z-order of the windows on-screen, and is also used for mouse hit-testing and so on.

So, if you're inspecting the order of the buttons within the child list, then this can definately cause issues. One alternative suggestion is to give each button a sequence number when they are created, and use this to determine the relative sequence of the buttons. Of course, you may already have taken this approach, in which case (obviously) the issue is something else :)

CE.

User avatar
Sinbad
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Wed Jan 12, 2005 12:06
Location: Guernsey, Channel Islands
Contact:

TabControl design

Postby Sinbad » Fri Aug 13, 2004 15:53

Yep, thats what I figured, and I intend to add a separate indexing system this evening.

User avatar
Sinbad
Not too shy to talk
Not too shy to talk
Posts: 35
Joined: Wed Jan 12, 2005 12:06
Location: Guernsey, Channel Islands
Contact:

TabControl design

Postby Sinbad » Fri Aug 13, 2004 23:42

The tab control has been submitted as a patch :D
http://sourceforge.net/tracker/index.ph ... tid=605424

Here's a shot:
Image

I did my best to follow the conventions of the rest of CEGui; I'm sure CE himself would have put in lots more bells and whistles (show off ;)) and configurable options, but my main concern was to get this done. Feel free to steroid-enhance it later :)

User avatar
spannerman
Home away from home
Home away from home
Posts: 330
Joined: Wed Jan 12, 2005 12:06

TabControl design

Postby spannerman » Sat Aug 14, 2004 00:15

Cool! Looks the part. Thanks for releasing this Sinbad :)

squawk!! *Vulture swoops in to nick free lunch*

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

TabControl design

Postby CrazyEddie » Sat Aug 14, 2004 06:37

Looks very good indeed :) Thanks for submitting the patch.

I'll endeavour to get this into CVS over the weekend. This is one thing I can take off the list of things to do for the second batch of widgets :D


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests