On Thu, 2006-04-06 at 20:57 +0200, Andreas Kotowicz wrote:

> this is a general case question. I made myself familiar with gtk+ and
> created a few useful (and less useful) programs. I quickly began to
> realize that I do reuse some code very often. So I thought about
> abstraction and creation of objects and classes which could then be
> easily reused. so here's my question: does it make sense to create a
> class/object which only creates the main window. this object will then
> make a call to a class which creates the UI inside the window. then I
> might have different "main-window-objects" (like in evolution where you
> have a mail/calendar/task window inside the main window) which should
> get created by the UI class as requested by the user and put between the
> menu and status bars. of course the window class would create a default
> object first so the main window wouldn't be empty. 
> is this kind of abstraction useful? or would I just break a fly on the
> wheel? 
> 
> I tried to study different code (gedit, eog, evolution) but I can't
> actually see a clear strategy on this issue. I'm welcome for any
> suggestions / enlightenment.
> 
> cheers,
> Andreas
> 

Just a response.

The effort you project saving is analogous to that saved using GLADE2 or
GNOME for development.  Both the tool (glade) and the added library
(gnome) provide the same type of repetitive saving.  I would suggest
using gnome, or continuing as you are; if you don't care for generators
like glade.  "The official GNOME2 developer's guide" is the best GTK+
and GNOME programming guide I've seen so far.  Especially, if your
planning to create your own GTK widgets to package feature/functions you
use often. 

James,
(Not an Expert..., but fairly experienced)

> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to