help




-----Original Message-----
From: gtk-app-devel-list-request gnome org
[mailto:gtk-app-devel-list-request gnome org]
Sent: Monday, April 23, 2001 6:05 PM
To: gtk-app-devel-list gnome org
Subject: gtk-app-devel-list digest, Vol 1 #429 - 2 msgs


Send gtk-app-devel-list mailing list submissions to
        gtk-app-devel-list gnome org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
or, via email, send a message with subject or body 'help' to
        gtk-app-devel-list-request gnome org

You can reach the person managing the list at
        gtk-app-devel-list-admin gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gtk-app-devel-list digest..."


Today's Topics:

  1. Re: ctree and clist widget with row with multiple line. (Havoc
Pennington)
  2. Re: GdkGC question (JParker coinstar com)

--__--__--

Message: 1
To: Philippe Roy <ph_roy toutdoux org>
Cc: gnome-devel-list gnome org,
Jin Chen <gtk-app-devel-list gnome org>
Subject: Re: ctree and clist widget with row with multiple line.
<20010404021459 G23719 localhost evc net>
From: Havoc Pennington <hp redhat com>
Date: 23 Apr 2001 11:27:47 -0400


Philippe Roy <ph_roy toutdoux org> writes:

I saw the clist animation at RedHat Labs's web site of the futur gtk
version, nice.

But, Is row with multiple lines is planned ?


You can write custom cell renderers in any case to make it work. I'm
not sure what you mean by multiple lines, the below URL doesn't quite
work.
 
See :


http://www.sapdesignguild.org/index.asp?b=/construction/implementation/MiniS
G/Index.htm&t=/construction/implementation/implementation_topnav.asp

For my dev (toutdoux), this point is very important.


I would strongly suggest that you try using the GtkTreeView in a test
program now, and see if it meets your needs and mail gtk-devel-list
with observations ASAP. If you wait a month or two, it will be too
late to get any changes into GTK 2.

Havoc


--__--__--

Message: 2
To: Tom Aziz <tomazi caramail com>
Cc: gtk-app-devel-list gnome org, gtk-app-devel-list-admin gnome org
Subject: Re: GdkGC question
From: JParker coinstar com
Date: Mon, 23 Apr 2001 08:41:22 -0700

This is a multipart message in MIME format.
--=_alternative 00567AB888256A37_=
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

G'Day !

Harlow has some really exellent examples of how to do this in his book.=20
You can download example code from the attached web site.  Look for the=20
example system monitor.

http://www.newriders.com/books/title.cfm?isbn=3D0735700214

cheers,
Jim Parker

Sailboat racing is not a matter of life and death ....  It is far more=20
important than that !!!




Tom Aziz <tomazi caramail com>
Sent by: gtk-app-devel-list-admin gnome org
04/21/01 10:18 AM

=20
        To:     gtk-app-devel-list gnome org
        cc:=20
        Subject:        GdkGC question

I don't succed to draw lines of different colors (and=20
style).
I need some help but it seems that nobody uses GDK drawing=20
features, and that there is no tutorial about this. It's=20
very sad because I want to use GDK for this, but if I can't=20
I will have to use another lib or another programming=20
langage with more documentation.

Maybe the problem is that I didn't really understand what a=20
GC is, and how it must be used.=20

Here is what I do :

--- global variables ---
static GdkGC *lines1=5FGC =3D NULL;
static GdkColor *color1 =3D NULL;

static GdkGC *lines2=5FGC =3D NULL;
static GdkColor *color2 =3D NULL;
-----------------------

--- main() ---
 gtk=5Fsignal=5Fconnect(GTK=5FOBJECT(MainDrawingArea),=20
"configure=5Fevent",
 GTK=5FSIGNAL=5FFUNC(drawing=5Finit), NULL);
--------------

--- drawing=5Finit ---
void
drawing=5Finit(GtkWidget *widget, gpointer data)
{
 lines1=5FGC =3D gdk=5Fgc=5Fnew(widget->window);
 lines2=5FGC =3D gdk=5Fgc=5Fnew(widget->window);

 color1 =3D g=5Fnew(GdkColor, 1);
 color1->red =3D (gushort)(65535 * 1.00);
 color1->green =3D (gushort)(65535 * 0.50);
 color1->blue =3D (gushort)(65535 * 0.50);

 gdk=5Fgc=5Fset=5Fforeground(lines1=5FGC, color1);
/* same with color2 and lines2 */
}
--------------------


when an event (click) occurs, I use this function to draw=20
the line :
--- gdk=5Fdraw=5Fline ---
 gdk=5Fdraw=5Fline(pixmap, lines1=5FGC,
 x1, y1,
 x2, y2);
/* or lines2 */
---------------------

The problem is : no matter what color I choose in=20
drawing=5Finit, I get only the black
color. All of the code is in the same file.

How to draw lines of different colors ?=20
How to draw lines of different styles ?

Thanks for any help
Tomazi

=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F
Bo=EEte aux lettres - Caramail - http://www.caramail.com




--=_alternative 00567AB888256A37_=
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


<br><font size=3D2 face=3D"sans-serif">G'Day !</font>
<br>
<br><font size=3D2 face=3D"sans-serif">Harlow has some really exellent exam=
ples of how to do this in his book. &nbsp;You can download example code fro=
m the attached web site. &nbsp;Look for the example system monitor.</font>
<br>
<br><font size=3D2 face=3D"sans-serif">http://www.newriders.com/books/title=
.cfm?isbn=3D0735700214<br>
<br>
cheers,<br>
Jim Parker<br>
<br>
Sailboat racing is not a matter of life and death .... &nbsp;It is far more=
 important than that !!!</font>
<br>
<br>
<br>
<table width=3D100%>
<tr valign=3Dtop>
<td>
<td><font size=3D1 face=3D"sans-serif"><b>Tom Aziz &lt;tomazi caramail com&=
gt;</b></font>
<br><font size=3D1 face=3D"sans-serif">Sent by: gtk-app-devel-list-admin gn=
ome.org</font>
<p><font size=3D1 face=3D"sans-serif">04/21/01 10:18 AM</font>
<br>
<td><font size=3D1 face=3D"Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbs=
p; &nbsp; &nbsp; &nbsp;gtk-app-devel-list gnome org</font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbs=
p; &nbsp; &nbsp; &nbsp;</font>
<br><font size=3D1 face=3D"sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:=
 &nbsp; &nbsp; &nbsp; &nbsp;GdkGC question</font></table>
<br>
<br><font size=3D2 face=3D"Courier New">I don't succed to draw lines of dif=
ferent colors (and <br>
style).<br>
I need some help but it seems that nobody uses GDK drawing <br>
features, and that there is no tutorial about this. It's <br>
very sad because I want to use GDK for this, but if I can't <br>
I will have to use another lib or another programming <br>
langage with more documentation.<br>
<br>
Maybe the problem is that I didn't really understand what a <br>
GC is, and how it must be used. <br>
<br>
Here is what I do :<br>
<br>
--- global variables ---<br>
static GdkGC *lines1=5FGC =3D NULL;<br>
static GdkColor *color1 =3D NULL;<br>
<br>
static GdkGC *lines2=5FGC =3D NULL;<br>
static GdkColor *color2 =3D NULL;<br>
-----------------------<br>
<br>
--- main() ---<br>
 gtk=5Fsignal=5Fconnect(GTK=5FOBJECT(MainDrawingArea), <br>
&quot;configure=5Fevent&quot;,<br>
 GTK=5FSIGNAL=5FFUNC(drawing=5Finit), NULL);<br>
--------------<br>
<br>
--- drawing=5Finit ---<br>
void<br>
drawing=5Finit(GtkWidget *widget, gpointer data)<br>
{<br>
 lines1=5FGC =3D gdk=5Fgc=5Fnew(widget-&gt;window);<br>
 lines2=5FGC =3D gdk=5Fgc=5Fnew(widget-&gt;window);<br>
<br>
 color1 =3D g=5Fnew(GdkColor, 1);<br>
 color1-&gt;red =3D (gushort)(65535 * 1.00);<br>
 color1-&gt;green =3D (gushort)(65535 * 0.50);<br>
 color1-&gt;blue =3D (gushort)(65535 * 0.50);<br>
<br>
 gdk=5Fgc=5Fset=5Fforeground(lines1=5FGC, color1);<br>
/* same with color2 and lines2 */<br>
}<br>
--------------------<br>
<br>
<br>
when an event (click) occurs, I use this function to draw <br>
the line :<br>
--- gdk=5Fdraw=5Fline ---<br>
 gdk=5Fdraw=5Fline(pixmap, lines1=5FGC,<br>
 x1, y1,<br>
 x2, y2);<br>
/* or lines2 */<br>
---------------------<br>
<br>
The problem is : no matter what color I choose in <br>
drawing=5Finit, I get only the black<br>
color. All of the code is in the same file.<br>
<br>
How to draw lines of different colors ? <br>
How to draw lines of different styles ?<br>
<br>
Thanks for any help<br>
Tomazi<br>
<br>
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F<br>
Bo=EEte aux lettres - Caramail - http://www.caramail.com<br>
<br>
</font>
<br>
<br>
--=_alternative 00567AB888256A37_=--



--__--__--

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


End of gtk-app-devel-list
Digest_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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