CodeSnippets: GridLayout

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

razr
Just popping in
Just popping in
Posts: 2
Joined: Wed Jun 27, 2007 15:54

CodeSnippets: GridLayout

Postby razr » Fri Jun 29, 2007 10:42

I've wikied a layout manager for CEGUI >= 0.5

Feel free to discuss this article here.

User avatar
ldb
Quite a regular
Quite a regular
Posts: 54
Joined: Sat Mar 24, 2007 13:39
Location: Bloomington, IL
Contact:

Re: CodeSnippets: GridLayout

Postby ldb » Fri Jun 29, 2007 11:03

razr wrote:I've wikied a layout manager for CEGUI >= 0.5[

Feel free to discuss this article here.


i havent tried it yet, but oh boy do i intend to. this is just what the doctor ordered.
No matter where you go, there you are.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Fri Jun 29, 2007 11:38

oh this is great ! I loved QT for having this and hated MFC for not having this :)

It would be even more great if these could be specified within the .layout files, to achieve this you would need to make the GridLayout be a CEGUI custom widget, I think.

Maybe the two files (.cpp/.h) could be uploaded to the CEGUI server, so if noware.info should go down in the future, these great files are still available !

edit:
there should be a link to the article somewhere on the page, so nobody misses it. maybe in the FAQ, create a point "how to lay out my widgets in a grid like for QT/Gtk" ?

User avatar
ldb
Quite a regular
Quite a regular
Posts: 54
Joined: Sat Mar 24, 2007 13:39
Location: Bloomington, IL
Contact:

Postby ldb » Wed Jul 04, 2007 05:34

my suggestion is to create a contrib directory where code such as this could live. similar to how wxWidgets has a contrib directory in their source release.

just a thought.
No matter where you go, there you are.

Oscar.Ken
Just popping in
Just popping in
Posts: 1
Joined: Thu Dec 07, 2006 02:41
Location: China
Contact:

Auto layout with XML config

Postby Oscar.Ken » Fri Jul 20, 2007 09:28

hi, :D I'v implemented an auto layout system:
http://www.cegui.org.uk/wiki/index.php/User:Oscar.Ken

razr
Just popping in
Just popping in
Posts: 2
Joined: Wed Jun 27, 2007 15:54

Postby razr » Tue Jul 31, 2007 16:18

ldb wrote:my suggestion is to create a contrib directory where code such as this could live. similar to how wxWidgets has a contrib directory in their source release.

Good idea! Makes me somewhat proud to see my code there :)

EDIT:
Pompei2 wrote:It would be even more great if these could be specified within the .layout files, to achieve this you would need to make the GridLayout be a CEGUI custom widget, I think.

I've been investigating the code base to see if that's possible and I think it is:
One can create a custom GridLayoutWidget with a property defining the layout of its children. The solution via the property is quite ugly though, because it would take a very long string to define the layout of a more complex window (alternatives welcome ;) ).
By the way, using a widget has got another advantage: it is very easy to create stacked layouts by making a GridLayoutWidget a GridLayoutWidget's child.

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu Aug 02, 2007 12:19

you can upload images at imageshack.us, but they disappear after a time.

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Wed Sep 05, 2007 15:20

Looks nice. I'll let you know once I've tried this. This kind of manager class can be very useful.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 8 guests