Re: Modularization
- From: Stefan Kost <ensonic hora-obscura de>
- To: MEA-MikeFriedrichs <mfriedrichs machanalysis com>
- Cc: "GTK.App.Devel.List" <gtk-app-devel-list gnome org>
- Subject: Re: Modularization
- Date: Mon, 15 Aug 2005 19:34:33 +0200
Hi Mike,
MEA-MikeFriedrichs wrote:
List,
Accidentally hit the send button too soon.
I'm beginning to learn and use GTK+.
Here is the steps that I believe are needed to build an GTK+ application:
1. Initialize the library.
2. Create widgets and set attributes.
3. Register callback routines.
4. Define widget hierarchy.
5. Show widgets.
6. Process signals and events.
7. Quitting
I can see an application becoming very large in one module. So I
would like to break the program into modules, where each module can be
managed and compiled independently and finally link all the modules
together. But I don't see any divisions because of inter dependency
where separate modules can be applied. Is this true or am I missing
something?
Any recommendations on a modular approach to coding an GTK application?
What I do is to use object orientation. In my app I have a menu-bar, a
toolbar and notbook with pages and a status-bar. I just derive from the
gtk-components and add my stuff in there. This means my window as a
vbox, where I instead of a GtkToolbar just insert a MyToolbar object.
The definition of the MyToolbar class has its own c and h file and
already adds all toolbuttons.
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]