Re: writing my own widget or use gtk provided widget?
- From: Tristan Van Berkom <tristan van berkom gmail com>
- To: Kathleen Yang <Qiu-Yuan Yang Sun COM>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: writing my own widget or use gtk provided widget?
- Date: Wed, 28 Jun 2006 22:20:32 -0400
Kathleen Yang wrote:
Hi experts,
My group met a problem when writing our application. We'll implement 5
windows in the application and each window will contain some normal gtk
widgets such as check buttons, textview, buttons, ...
Now, we have two solutions:
1. Implementing each window as a new gtk widget
2. Just coding like a normal gtk program, adding handlers and setting
attibuts to the gtk provided widgets
For the first solution, we can encapsulate some private data into the
widget. So, it makes the program with clear structure. But we're
concerning it may introduce more test work on the widget implementation
itself, such as class init, get type funcs, registeration funcs, etc.
Do you have suggestions on it? With what scenarios should programmer
write her/his own widgets and what scenarios shouldn't?
I think that programmer should write thier own widgets when
a widget that serves a specific purpose is called for, for instance;
a keypad widget or a GtkVScale that responds nicely on a touchscreen.
I think you should use libglade... and the gtk builder in future versions
to build your ui from an xml description, it will drasticly reduce your
program's
complexity and as an added advantage; it will allow you to change your UI
without recompiling your code. You're own invented widgets can also be
loaded by libglade... and easily plugged into glade3 or gazpacho designers.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]