public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Port to GTK+ and GNOME
@ 2002-12-03 12:17 Fernando Nasser
  2002-12-03 13:02 ` Ian Roxborough
  2002-12-16 13:22 ` Mo DeJong
  0 siblings, 2 replies; 8+ messages in thread
From: Fernando Nasser @ 2002-12-03 12:17 UTC (permalink / raw)
  To: 'insight@sources.redhat.com', Jim Ingham

Dear Insight developers and friends,

With the increasing acceptance of GTK+ and GNOME in many *ix systems, 
Insight may have to follow the pack and become more consistent with the 
GNOME look-and-feel and somehow migrate to use GTK+ in some form.

There are currently 3 different possible approaches:

1) Use gnocl (loosely modeled after TK)
2) Use tcl-gtk (just wraps GTK, or any other GObject based library)
3) add a GTK+ port to TK itself

All of these approaches have their merits and there are trade-offs among 
them.  I wonder if some of you haven't given any thoughts already to 
this and perhaps, have used any of these packages mentioned in 1 and 2, 
know the developers, what the prospects are etc. (these projects are 
still to release -- all they have are betas at the moment).

A GTK port of TK (as we currently have the Win32 and "Unix" variants) 
would make automatically all Tcl/Tk programs to use GTK (and some GNOME 
widgets like the file chooser).  But I wonder how much of the 
look-and-feel of GNOME would we get, as it would be still Tk on top 
(probably more of the look than the feel).

There is also the problem of implementation --  there is no clear API 
interface between these Tk layers. The process was not documented either 
(done by Sun, ages ago).  The magic seems to be done by changing the Tk 
callbacks to some windows or unix specific functions in the windows or 
unix subdirectories (only one of the two is configured) but there is 
little common ground between what was done for one and the other.  It 
will probably require a very good TK internals knowledge.


Things that we must discuss, besides the maintainability issues related 
to using one of the packages 1 and 2, are the effort required to 
complete the task.  We don't have many developer hours to do this as we 
all seem to be very busy with our other affairs.

We will probably want to coordinate with other Tcl?Tk open source 
projects (like Source Navigator, Red Hat Database Administrator etc.) so 
that we do not waste efforts going in opposite directions.


Please take some time to think about this and speak your minds.  The 
future of Insight may depend on this.


Regards to all,
Fernando



-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Port to GTK+ and GNOME
  2002-12-03 12:17 Port to GTK+ and GNOME Fernando Nasser
@ 2002-12-03 13:02 ` Ian Roxborough
  2002-12-03 15:22   ` Fernando Nasser
  2002-12-16 13:22 ` Mo DeJong
  1 sibling, 1 reply; 8+ messages in thread
From: Ian Roxborough @ 2002-12-03 13:02 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: insight


Hi Fernando,

I've looked at this problem a couple of times in the past.

tcl-gtk is an interesting project, I wrote a small test program to
see if it was worth using that for Source Navigator, but I felt that
I was loosing much of the benefits of tcl/tk and what should have
been a short program ended up being kind of long.  I've not used
tcl-gtk for a few years, so this might not still be an issue.
However, I feel the work involved in this would be similar to
writing the application.

The solution I was really interested in trying to implement was to
add some sort of generic themeability to Tk, such that it would be
able understand GTK or Qt themes.  I actually got some parts working
and there where a couple of screen shots of SN running the AquaX
theme.  BLT has gone part of the way to providing some of functionality
needed, in particular the tiled widgets that allow bitmap backgrounds
on buttons, listboxes and other things.  Using BLT a writing a bitmap scaling
fuction so you can use scaled bitmap buttons should get you most of
the way there.  Of course not all themes are bitmaps so you might
want to use a theme engine to convert them to bitmaps as needed.

I noticed a couple of ambiguities between the GTK and TK, but they where
minor things, like some widgets not having a boarder or not have a
disabled state.  I don't believe there is anything that would give too
much of a problem.

Ian.

On Tue, 03 Dec 2002 15:27:53 -0500
Fernando Nasser <fnasser@redhat.com> wrote:

> Dear Insight developers and friends,
> 
> With the increasing acceptance of GTK+ and GNOME in many *ix systems, 
> Insight may have to follow the pack and become more consistent with
> the GNOME look-and-feel and somehow migrate to use GTK+ in some form.
> 
> There are currently 3 different possible approaches:
> 
> 1) Use gnocl (loosely modeled after TK)
> 2) Use tcl-gtk (just wraps GTK, or any other GObject based library)
> 3) add a GTK+ port to TK itself
> 
> All of these approaches have their merits and there are trade-offs
> among them.  I wonder if some of you haven't given any thoughts
> already to this and perhaps, have used any of these packages mentioned
> in 1 and 2, know the developers, what the prospects are etc. (these
> projects are still to release -- all they have are betas at the
> moment).
> 
> A GTK port of TK (as we currently have the Win32 and "Unix" variants) 
> would make automatically all Tcl/Tk programs to use GTK (and some
> GNOME widgets like the file chooser).  But I wonder how much of the 
> look-and-feel of GNOME would we get, as it would be still Tk on top 
> (probably more of the look than the feel).
> 
> There is also the problem of implementation --  there is no clear API 
> interface between these Tk layers. The process was not documented
> either (done by Sun, ages ago).  The magic seems to be done by
> changing the Tk callbacks to some windows or unix specific functions
> in the windows or unix subdirectories (only one of the two is
> configured) but there is little common ground between what was done
> for one and the other.  It will probably require a very good TK
> internals knowledge.
> 
> 
> Things that we must discuss, besides the maintainability issues
> related to using one of the packages 1 and 2, are the effort required
> to complete the task.  We don't have many developer hours to do this
> as we all seem to be very busy with our other affairs.
> 
> We will probably want to coordinate with other Tcl?Tk open source 
> projects (like Source Navigator, Red Hat Database Administrator etc.)
> so that we do not waste efforts going in opposite directions.
> 
> 
> Please take some time to think about this and speak your minds.  The 
> future of Insight may depend on this.
> 
> 
> Regards to all,
> Fernando
> 
> 
> 
> -- 
> Fernando Nasser
> Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario   M4P 2C9
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Port to GTK+ and GNOME
  2002-12-03 13:02 ` Ian Roxborough
@ 2002-12-03 15:22   ` Fernando Nasser
  2002-12-03 16:06     ` Ian Roxborough
  0 siblings, 1 reply; 8+ messages in thread
From: Fernando Nasser @ 2002-12-03 15:22 UTC (permalink / raw)
  To: Ian Roxborough; +Cc: insight

Ian Roxborough wrote:
> Hi Fernando,
> 
> I've looked at this problem a couple of times in the past.
> 
> tcl-gtk is an interesting project, I wrote a small test program to
> see if it was worth using that for Source Navigator, but I felt that
> I was loosing much of the benefits of tcl/tk and what should have
> been a short program ended up being kind of long.  I've not used
> tcl-gtk for a few years, so this might not still be an issue.
> However, I feel the work involved in this would be similar to
> writing the application.
> 

Yes, the programming model is too different.

Have you looked at gnocl?  It tries to keep the Tk model as much as 
possible.  This could make the porting easier...



> The solution I was really interested in trying to implement was to
> add some sort of generic themeability to Tk, such that it would be
> able understand GTK or Qt themes.  I actually got some parts working
> and there where a couple of screen shots of SN running the AquaX
> theme.  BLT has gone part of the way to providing some of functionality
> needed, in particular the tiled widgets that allow bitmap backgrounds
> on buttons, listboxes and other things.  Using BLT a writing a bitmap scaling
> fuction so you can use scaled bitmap buttons should get you most of
> the way there.  Of course not all themes are bitmaps so you might
> want to use a theme engine to convert them to bitmaps as needed.
> 

That is an interesting idea (at least for the "look" side of things). 
Have you looked into Tk_Theme (by George Staplin)?  It has a 
theme::frame and theme::label widgets.

Where are the SNav screen shots?  I would love to see them...

> I noticed a couple of ambiguities between the GTK and TK, but they where
> minor things, like some widgets not having a boarder or not have a
> disabled state.  I don't believe there is anything that would give too
> much of a problem.
> 

Probably less of a problem than trying to get the Windows look like was 
done in the past ;-)



Thanks for you comments Ian.  Please if you can keep an eye on this 
thread I would really appreciate.

Best regards,
Fernando



-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Port to GTK+ and GNOME
  2002-12-03 15:22   ` Fernando Nasser
@ 2002-12-03 16:06     ` Ian Roxborough
  0 siblings, 0 replies; 8+ messages in thread
From: Ian Roxborough @ 2002-12-03 16:06 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: insight


gnocl does look syntactically nicer than tcl-gtk.  It would
be nice to have Tk wrapper commands that would for GTK, so
you get GTK without having to change a line of code, just 
import the gtk-tk wrapper at start up.

The SN screenshots probably got deleted when my {cygnus,redhat}.com/~irox
account got deleted.  It looked ok, only the custom listbox/tree
thing and the scrollbars where not themed, buttons looked a little
weird, but the nice part was I had only changed 12 lines of code
to get it working for the whole application.

The GTK 'feel' is probably going to be a little harder to obtain
than the look.  For the most part if you've got the look then
few people could tell the difference, this is probably because Tk
and GTK have some influence from grand daddy of UNIX GUI
toolkits, Motif.  But it is possible for themes to tweak the
'feel', also some themes require a different theme engine,
so just getting the look is probably not going to cut it.

As much as I don't like to say it, I'm not all that sure Tcl is
the right language for writing a GTK application.

Ian.

On Tue, 03 Dec 2002 18:32:29 -0500
Fernando Nasser <fnasser@redhat.com> wrote:

> Ian Roxborough wrote:
> > Hi Fernando,
> > 
> > I've looked at this problem a couple of times in the past.
> > 
> > tcl-gtk is an interesting project, I wrote a small test program to
> > see if it was worth using that for Source Navigator, but I felt that
> > I was loosing much of the benefits of tcl/tk and what should have
> > been a short program ended up being kind of long.  I've not used
> > tcl-gtk for a few years, so this might not still be an issue.
> > However, I feel the work involved in this would be similar to
> > writing the application.
> > 
> 
> Yes, the programming model is too different.
> 
> Have you looked at gnocl?  It tries to keep the Tk model as much as 
> possible.  This could make the porting easier...
> 
> 
> 
> > The solution I was really interested in trying to implement was to
> > add some sort of generic themeability to Tk, such that it would be
> > able understand GTK or Qt themes.  I actually got some parts working
> > and there where a couple of screen shots of SN running the AquaX
> > theme.  BLT has gone part of the way to providing some of functionality
> > needed, in particular the tiled widgets that allow bitmap backgrounds
> > on buttons, listboxes and other things.  Using BLT a writing a bitmap scaling
> > fuction so you can use scaled bitmap buttons should get you most of
> > the way there.  Of course not all themes are bitmaps so you might
> > want to use a theme engine to convert them to bitmaps as needed.
> > 
> 
> That is an interesting idea (at least for the "look" side of things). 
> Have you looked into Tk_Theme (by George Staplin)?  It has a 
> theme::frame and theme::label widgets.
> 
> Where are the SNav screen shots?  I would love to see them...
> 
> > I noticed a couple of ambiguities between the GTK and TK, but they where
> > minor things, like some widgets not having a boarder or not have a
> > disabled state.  I don't believe there is anything that would give too
> > much of a problem.
> > 
> 
> Probably less of a problem than trying to get the Windows look like was 
> done in the past ;-)
> 
> 
> 
> Thanks for you comments Ian.  Please if you can keep an eye on this 
> thread I would really appreciate.
> 
> Best regards,
> Fernando
> 
> 
> 
> -- 
> Fernando Nasser
> Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario   M4P 2C9
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Port to GTK+ and GNOME
  2002-12-03 12:17 Port to GTK+ and GNOME Fernando Nasser
  2002-12-03 13:02 ` Ian Roxborough
@ 2002-12-16 13:22 ` Mo DeJong
  2002-12-16 18:22   ` Fernando Nasser
  2002-12-17 14:19   ` Fernando Nasser
  1 sibling, 2 replies; 8+ messages in thread
From: Mo DeJong @ 2002-12-16 13:22 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: insight, jingham

On Tue, 03 Dec 2002 15:27:53 -0500
Fernando Nasser <fnasser@redhat.com> wrote:

> Dear Insight developers and friends,
> 
> With the increasing acceptance of GTK+ and GNOME in many *ix systems, 
> Insight may have to follow the pack and become more consistent with the 
> GNOME look-and-feel and somehow migrate to use GTK+ in some form.
> 
> There are currently 3 different possible approaches:
> 
> 1) Use gnocl (loosely modeled after TK)
> 2) Use tcl-gtk (just wraps GTK, or any other GObject based library)
> 3) add a GTK+ port to TK itself

If you are really interested in option #3, you might want to take a look
at Tcl tip 48. The code to implement this tip was accepted into Tk 8.4,
so if you are considering option #3 you might want to take a look at it.

http://www.tcl.tk/cgi-bin/tct/tip/48.html

Mo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Port to GTK+ and GNOME
  2002-12-16 13:22 ` Mo DeJong
@ 2002-12-16 18:22   ` Fernando Nasser
  2002-12-17 14:19   ` Fernando Nasser
  1 sibling, 0 replies; 8+ messages in thread
From: Fernando Nasser @ 2002-12-16 18:22 UTC (permalink / raw)
  To: Mo DeJong; +Cc: insight, jingham

Mo DeJong wrote:
> On Tue, 03 Dec 2002 15:27:53 -0500
> Fernando Nasser <fnasser@redhat.com> wrote:
> 
> 
>>Dear Insight developers and friends,
>>
>>With the increasing acceptance of GTK+ and GNOME in many *ix systems, 
>>Insight may have to follow the pack and become more consistent with the 
>>GNOME look-and-feel and somehow migrate to use GTK+ in some form.
>>
>>There are currently 3 different possible approaches:
>>
>>1) Use gnocl (loosely modeled after TK)
>>2) Use tcl-gtk (just wraps GTK, or any other GObject based library)
>>3) add a GTK+ port to TK itself
> 
> 
> If you are really interested in option #3, you might want to take a look
> at Tcl tip 48. The code to implement this tip was accepted into Tk 8.4,
> so if you are considering option #3 you might want to take a look at it.
> 
> http://www.tcl.tk/cgi-bin/tct/tip/48.html
> 

Thank you very much for the reference Mo.  I will most certainly be 
investigating this.

Best regards,
Fernando



-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Port to GTK+ and GNOME
  2002-12-16 13:22 ` Mo DeJong
  2002-12-16 18:22   ` Fernando Nasser
@ 2002-12-17 14:19   ` Fernando Nasser
  2002-12-19  0:55     ` Mo DeJong
  1 sibling, 1 reply; 8+ messages in thread
From: Fernando Nasser @ 2002-12-17 14:19 UTC (permalink / raw)
  To: Mo DeJong; +Cc: insight, jingham

Hi Mo,

It is nice to have the Styling support on 8..  I agree that that is the way to 
handle these style differences, not the way it was done before.

But I could find no reference to any effort of updating the widgets to use the 
styling support.

If there was at least one implementation (the widgets to the Tk default style, 
for instance), it would be a question of witting a style engine (a sizable task 
per se) for GNOME (or KDE or whatever). But the way it stands one would have 
first to convert the existing widgets.  And I could find no effort in progress, 
so it means start from scratch.

Do you guys know of someone who may already be looking into this widget conversion?

Fernando

Mo DeJong wrote:> On Tue, 03 Dec 2002 15:27:53 -0500
> Fernando Nasser <fnasser@redhat.com> wrote:
> 
> 
>>Dear Insight developers and friends,
>>
>>With the increasing acceptance of GTK+ and GNOME in many *ix systems, 
>>Insight may have to follow the pack and become more consistent with the 
>>GNOME look-and-feel and somehow migrate to use GTK+ in some form.
>>
>>There are currently 3 different possible approaches:
>>
>>1) Use gnocl (loosely modeled after TK)
>>2) Use tcl-gtk (just wraps GTK, or any other GObject based library)
>>3) add a GTK+ port to TK itself
> 
> 
> If you are really interested in option #3, you might want to take a look
> at Tcl tip 48. The code to implement this tip was accepted into Tk 8.4,
> so if you are considering option #3 you might want to take a look at it.
> 
> http://www.tcl.tk/cgi-bin/tct/tip/48.html
> 
> Mo
> 



-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Port to GTK+ and GNOME
  2002-12-17 14:19   ` Fernando Nasser
@ 2002-12-19  0:55     ` Mo DeJong
  0 siblings, 0 replies; 8+ messages in thread
From: Mo DeJong @ 2002-12-19  0:55 UTC (permalink / raw)
  To: insight

On Tue, 17 Dec 2002 17:19:31 -0500
Fernando Nasser <fnasser@redhat.com> wrote:

...

> But the way it stands one would have 
> first to convert the existing widgets.  And I could find no effort in progress, 
> so it means start from scratch.
> 
> Do you guys know of someone who may already be looking into this widget conversion?
> 
> Fernando

Sorry, I don't have anything to add on that front. I know there was an example
"square" widget included in the TIP refs, but I don't know that anyone is working
on converting existing widgets over to use this new style option. I assume that
widgets will gradually get converted over time as people need the new feature
or have some time to implement it. Heck, not all the Tk widgets have
been converted to use the Tcl_Obj interfaces yet, let alone these new styles.

Mo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-12-19  8:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-03 12:17 Port to GTK+ and GNOME Fernando Nasser
2002-12-03 13:02 ` Ian Roxborough
2002-12-03 15:22   ` Fernando Nasser
2002-12-03 16:06     ` Ian Roxborough
2002-12-16 13:22 ` Mo DeJong
2002-12-16 18:22   ` Fernando Nasser
2002-12-17 14:19   ` Fernando Nasser
2002-12-19  0:55     ` Mo DeJong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).