On Fri, 2011-10-14 at 13:49 +0200, Kjell Ahlstedt wrote: > tor 2011-10-13 klockan 19:50 +0100 skrev lecas malecas: > > Hey, > > > > Events propagate to its parents, until you stop it or it reaches the top. > > I don't remember where this is said in the documentation, but I've > > seen this behaviour in other places (for example with html/javascript > > in the web)... > > > > Yes I know that it needs more work, but I'm not used to writing this > > kind of stuff.. > > Where are the formatting rules explained? > > I don't know. I also wonder. Does anyone know? > > There is a GNU coding standard at http://www.gnu.org/prep/standards/, > but gtkmm code is not formatted as described there. I think gtk+ and the > other C modules use that standard. > Look at some of the other example programs in the gtkmm tutorial. Not > all of them are perfect, but most of them are very good.
From the C++ resources link of live.gnome.org/gtkmm page there is a coding style guide that leads to the following page: http://www.possibility.com/Cpp/CppCodingStandard.html I'm sure there are differences as to how code is formatted in gtkmm, etc. However, it also has pretty okay suggestions as to how code may be formatted. I generally take these as suggestions and follow the coding style that already exists in gtkmm, etc. > > A few rules: > > if (a < b) > a++; // Indented two spaces > else > { // Brace not indented > b++; > func1(a, b); > } > > Don't insert tab characters in the source code. (I don't think you have, > so just keep not doing it.) > > This is my personal opinion, rather than a rule: > return !isOk(); > is much better than > if (isOK() == true) > return false; > else > return true; > > I know that you're not the only one that disagrees with me. > > gtkmm-tutorial-in.xml is a DocBook file. You can find everything about > DocBook at http://www.docbook.org/, but I don't think you'll have to > read it. Just copy and paste in the gtkmm-tutorial-in.xml file. I've > used a simple text editor (gedit) when I've modified that file. There > are probably better tools for that task, but gedit is good enough for > me. > > > > Ohh, didn't know HBox was deprecated... I'll use Grid then. > > > > > > Yes, I can try to do some of that, but there's some stuff (like the > > rules, etc..) that I'm not familiar with. > > I can help you, when it's getting too difficult, or too time-consuming. > > > > Well, I think it would have to be a new chapter, since its a new topic. > > > > Ok, I'll add to bugzilla when I update it. > > When you have filed your bug in Bugzilla, please post a short message to > gtkmm-list. > > Kjell > > > _______________________________________________ > gtkmm-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/gtkmm-list -- José _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
