gui, g_objects and abstraction



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




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]