Need resources on implmenting CUSTOM GUI (from scratch)

Get answers to all your basic programming questions. No Ogre questions, please!
amlee
Gnoblar
Posts: 12
Joined: Tue Mar 08, 2011 11:36 am

Need resources on implmenting CUSTOM GUI (from scratch)

Post by amlee »

I need tutorials/books/articles or any resource on designing & implementing custom gui possible discussing how to implement clipping & styling. Discussion on Architecture of GUI. Any help would be good.

I will looking into CeGUI and other Ogre3d GUI's but more help would be good.
User avatar
kulik
Gremlin
Posts: 183
Joined: Sun May 01, 2005 2:00 pm
x 23

Re: Need resources on implmenting CUSTOM GUI (from scratch)

Post by kulik »

Any particular reasons why you would design a GUI from scratch when there are many options you can use and get things going?

Even if all the GUIs suck, contributing to them to fix issues is a much better option in almost all cases.
mpreisler on IRC | CEGUI team member, CEGUI Unified Editor developer, OISB founder
User avatar
skyforger
Halfling
Posts: 49
Joined: Tue Apr 13, 2010 10:23 am
Location: Transylvania
x 5

Re: Need resources on implmenting CUSTOM GUI (from scratch)

Post by skyforger »

kulik wrote:Any particular reasons why you would design a GUI from scratch when there are many options you can use and get things going?
If I had a dollar every time I heard a question being answered like this I could afford some fancy winter vacation. The most obvious answer to that is didactic exercise ( university project? ). You learn a lot more if you implement something from scratch rather than using it. Even if it's just a fraction of a fully fledged library. And judging by his question this is very possibly the case. Please keep that in mind before asking people why they would build anything from scratch.

As for an answer, I don't know any specialised resources ( books ) on the subject. If you find any good ones, please post back here.
The closest thing I can recommend is the Design Patterns book by the "Gang of Four". Also, fiddling around CEGUI's source code and wiki can help a lot ( or any other open source library, though CEGUI is pretty mature and somewhat well documented ).
If you want to make an apple pie from scratch, you must first create the universe. ~Carl Sagan
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Re: Need resources on implmenting CUSTOM GUI (from scratch)

Post by syedhs »

Probably look at simpler Gui solution would get you started much faster eg Gorilla.
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
User avatar
kulik
Gremlin
Posts: 183
Joined: Sun May 01, 2005 2:00 pm
x 23

Re: Need resources on implmenting CUSTOM GUI (from scratch)

Post by kulik »

skyforger wrote: If I had a dollar every time I heard a question being answered like this I could afford some fancy winter vacation. The most obvious answer to that is didactic exercise ( university project? ). You learn a lot more if you implement something from scratch rather than using it. Even if it's just a fraction of a fully fledged library. And judging by his question this is very possibly the case. Please keep that in mind before asking people why they would build anything from scratch.
If I had a dollar every time someone suffered from the NIH syndrome I could afford way more...

Also, you learn way more by participating: team work, coding standards, proper version control, navigating existing code (this is a big one). Others who are already experienced give you advice and tell you what you are doing wrong (faster reinforcement).

Believe it or not, there are students doing useful work at university too. And learning skills while doing that. It makes me cringe to see so many wasted manhours when as yet another student implements yet another eshop or other low-hanging-fruit project... Just to get a passing grade...

Do you seriously think you learn more by implementing yet another widget library that nobody will use or implementing a new feature for CEGUI, MyGUI, Gorilla or such? With an existing userbase and active developers?
mpreisler on IRC | CEGUI team member, CEGUI Unified Editor developer, OISB founder
User avatar
skyforger
Halfling
Posts: 49
Joined: Tue Apr 13, 2010 10:23 am
Location: Transylvania
x 5

Re: Need resources on implmenting CUSTOM GUI (from scratch)

Post by skyforger »

kulik wrote:Do you seriously think you learn more by implementing yet another widget library that nobody will use or implementing a new feature for CEGUI, MyGUI, Gorilla or such? With an existing userbase and active developers?
How do you expect someone that has no clue over how UIs work behind the scenes implement a new feature for an existing huge library? How do you expect someone that doesn't know how the interface is drawn to the screen, or someone who has no idea about design patterns implement new widgets? You don't have to write another full widget library. Even writing a single widget ( button ) that responds to input and follows a simple hierarchy might be enough for you to understand how it works and start learning an existing library.

When you want to build something from scratch, there are a lot of questions you ask yourself. How will I know which widget received the input ( event propagation ). How will I draw it on the screen? Text rendering? How will I handle text input? Drag and drop? Movable windows? Themes?

Do you seriously expect someone who doesn't know anything about the inner workings of an UI system contribute to CEGUI? Not to mention contribution requires following the standards of the library, which means you have to be disciplined and experienced. I'm not saying everyone should build their own everything. I'm saying when you have no clue as to how something works, you don't start learning by jumping in and contributing to a mature library.

He didn't say he wants to build his own library because it was cooler, better, faster or whatever. He simply asked for learning material, and you send him off to contribute and fix issues.
kulik wrote:If I had a dollar every time someone suffered from the NIH syndrome I could afford way more...
If you're referring to the "Not Invented Here" syndrome, I fail to see the connection between what I've tried to explain and the wikipedia definition.
If you want to make an apple pie from scratch, you must first create the universe. ~Carl Sagan
User avatar
kulik
Gremlin
Posts: 183
Joined: Sun May 01, 2005 2:00 pm
x 23

Re: Need resources on implmenting CUSTOM GUI (from scratch)

Post by kulik »

skyforger wrote: How do you expect someone that has no clue over how UIs work behind the scenes implement a new feature for an existing huge library? How do you expect someone that doesn't know how the interface is drawn to the screen, or someone who has no idea about design patterns implement new widgets? You don't have to write another full widget library. Even writing a single widget ( button ) that responds to input and follows a simple hierarchy might be enough for you to understand how it works and start learning an existing library.
I agree with you on that. Although it certainly is possible to just read the code and docs but of course you have to have some code navigation skills already for this to work.
amlee wrote: ... how to implement clipping & styling. Discussion on Architecture of GUI.
This suggests he is trying something elaborate, right?
skyforger wrote: Not to mention contribution requires following the standards of the library, which means you have to be disciplined and experienced.
Every time you are going to code something more complex than a hello world app you will have to follow standards and be disciplined. Making sure you use 4 spaces for indents and camelcase for class names and so on isn't so hard, is it? The fact that the library requires that is actually good, it makes you realise that it's worth it in the long run. You don't have to be experienced to contribute IMO, we take contributions from people who consider themselves beginners or hobbyists.
skyforger wrote: I'm saying when you have no clue as to how something works, you don't start learning by jumping in and contributing to a mature library.
I do that and plenty of people do that too :-) It works quite well, believe me...

Also, this is a necessity. I would have write tons of tech from scratch to even perform my job... When I have no clue how something works, I look at the source code.

Anyways, I am not going to reply to this further since it would probably drag forever. Believe what you want! :lol: Just tryin' to help..
mpreisler on IRC | CEGUI team member, CEGUI Unified Editor developer, OISB founder
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Re: Need resources on implmenting CUSTOM GUI (from scratch)

Post by syedhs »

I agree that if he is a student and subsequently, is advised by his lecturer to do low level programming in order to understand the whole concept of 3d programming. A good programmer should always do some level of low level programming if he has the spare time - because the 'ahaa' moment (when you begin to understand 'everything') can only come by doing that kind of exercises. Even John Carmack has this to say 'Low level programming is good for your soul' - programmer's soul that is.. :mrgreen: How true..
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me
iblues1976
Gnome
Posts: 379
Joined: Fri Sep 16, 2011 4:54 pm
x 10

Re: Need resources on implmenting CUSTOM GUI (from scratch)

Post by iblues1976 »

@amlee
While creating a GUI involves many aspects of Computer Science, there may be a few sources that can help you. It really depends what you are working on or your target is... It also depends how much time do you have to read and code.
Tutorials on the web, I guess you can search or someone else can provide.

I can give you some books to read. Don't choose all of them, as it may be too much reading :)

While, some people have access to books like this in hard copy, I have also heard that people find them in soft copies (e-book,pdf...) whatever that works for you and that is legal.

Some good books in Computer Graphics that may be helpful are

1) Computer Graphics principle & practice by Foley
Other graphics books for sure you to read (a bit at least) are OpenGL SuperBible, Interactive Computer Graphics by angel. I also like Computer Graphics though OpenGL by Guha. Also Graphics Gems.

2) You may want to read about Fitt's Law and HCI in general. It may be a good idea to browse some book in designing user interfaces, face3, Human Computer Interaction by abowd, and Interaction Design. You may have to see which one best fit what you are looking for.
Here you can read more about Fitt's law http://www.yorku.ca/mack/
as far as input, Bill Buxton has a good paper in scholar.google.com

3) Also the books by David H. Eberly. While more for game engines, may have some important concepts.

It really depends what you are looking for. I hope this helps.

finally, while a bit irrelevant by today's standard, there is this guy that has been working on a new gui for the Atari 8 bit family. He has actually found some good information and you may want to read his posts : http://www.atariage.com/forums/topic/15 ... ari-8-bit/ from atariage