about the GtkMarshaller..................

2002-07-03 Thread 黃慶 Kason Huang
Title: about the GtkMarshaller..






Hi :


anyone can tell  me  what are the GtkCallbackMarshal and GtkSignalMarshaller ?

and what are their function?


Thanks a lot !


kason





RE: Upgrading from gtk 1.2 to 2.0

2002-07-02 Thread ?? Kason Huang

Hi :

how are you !

it is real? Gtk 1.2 and Gtk 2.0 are not compatible ?

why are them uncompatible?

thanks for help.

kason


-Original Message-
From: Peter Snyder [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 29, 2002 3:31 AM
To: Chris Schadl
Cc: [EMAIL PROTECTED]
Subject: Re: Upgrading from gtk 1.2 to 2.0


Gtk1.2 programs will not link against gtk2.0.  They are not compatible.

Pete
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about two problems of signal

2002-07-02 Thread 黃慶 Kason Huang
Title: about two problems  of  signal






Hi all:


1. i meet a problem about GtkSignalMarshaller .


    i don't know why gtk need the Marshaller. 


    or  you can tell me what is the function of the Marshaller in the processing  

    of  emitting  a signal to the widget.


2. if someone knows the detail processing of the gtk_signal_real_emit() API 

  and can you tell me how gtk use the API to emit a signal to a widget ?


thanks in advance!


kason






FW: Do not upgrade!

2002-06-26 Thread 黃慶 Kason Huang



> >  Last year I upgraded from Girlfriend 7.0 to Wife 1.0 and noticed
> >  that the new program began unexpected child processing that took
> >  up a lot of space and valuable resources. No mention of this
> >  phenomenon was included in the product brochure. In addition, Wife
> >  1.0 installs itself into all other programs and launches during
> >  system initialization, where it monitors all other system
> >  activity.
> >
> >  Applications such as Poker Night 10.3, Drunken Boys Night 2.5 and
> >  Saturday Football 5.0 no longer run, crashing the system whenever
> >  selected. I cannot seem to keep Wife 1.0 in the background while
> >  attempting to run some of my other favorite applications. I am
> >  thinking about going back to Girlfriend 7.0, but the uninstall
> >  does not work on this program.
> >
> >  Can you help me, please!!! Thanks, Joe
> >
> >  Dear Joe:
> >
> >  This is a very common problem men complain about but is mostly due
> >  to a primary misconception. Many people upgrade from Girlfriend
> >  7.0 to Wife 1.0 with the idea that Wife 1.0 is merely a UTILITIES
> >  & ENTERTAINMENT program. Wife 1.0 is an OPERATING SYSTEM and
> >  designed by its creator to run everything. It is unlikely you
> >  would be able to purge Wife 1.0 and still convert back to
> >  Girlfriend 7.0. Hidden operating files within your system would
> >  cause Girlfriend 7.0 to emulate Wife 1.0 so nothing is gained.
> >
> >  It is impossible to uninstall, delete, or purge the program files
> >  from the system once installed. You cannot go back to Girlfriend
> >  7.0 because Wife 1.0 is not designed to do this. Some have tried
> >  to install Girlfriend 8.0 or Wife 2.0 but end up with more
> >  problems than the original system. Look in your manual under
> >  "Warnings/Alimony/Child Support." I recommend you keep Wife 1.0
> >  and just deal with the situation.
> >
> >  Having Wife 1.0 installed myself, I might also suggest you read
> >  the entire section regarding General Partnership Faults (GPFs).
> >  You must assume all responsibility for faults and problems that
> >  might occur, regardless of their cause. The best course of action
> >  will be to enter the command C:\APOLOGIZE.
> >
> >  In any case avoid excessive use of the Esc key because ultimately
> >  you will have to give the APOLOGIZE command before the operating
> >  system will return to normal. The system will run smoothly as long
> >  as you take the blame for all the GPFs. Wife 1.0 is a great
> >  program, but very high maintenance. Consider buying additional
> >  software to improve the performance of Wife 1.0. I recommend
> >  Flowers 2.1 and Chocolates 5.0.
> >
> >  Do not under any circumstances, install Secretary With Short Skirt
> >  3.3. This is not a supported application for Wife 1.0 and is
> >  likely to cause irreversible damage to the operating system.
> >
> >  Best of luck. Tech Support.
> >
> >
> >-
> >Ninety-nine percent of the failures come from people who have the
> >habit of making excuses. -- George Washington Carver (1864-1943),
American
> >botanist, agricultural chemist, inventor, educator
> >-
>
>




___
OneMailer.com - Check your email anytime, anywhere
5 In 1 Card Reader (CF,SM,MMC,SD,Micro Drive) For USD35.00!
Purchase online at http://www.ethelon.net/product_51card_reader.php

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



(no subject)

2002-06-21 Thread 黃慶 Kason Huang






Hi all:


now i am looking inside the gtk+-1.2.10 signal system.


but i have a confused problem on the signal system.


i find there is a Function called  " void gtk_main_do_event (GdkEvent *event)"

the function does  with a lot of things on signal message map.

and i know gtk_main() can block main thread untile call gtk_main_quit() function.

so i think the gtk_main_do_event() function should be called by gtk_main() function.

but i find the gtk_main_do_event() function is being called by gtk_init(),not by gtk_main().


i expected to find a process in gtk_main() function like following,but not find. 

oppositly , i find the process is in the gtk_init() function.

switch(event->type)

{

  GtkWidget *parent;

  case GDK_NOTHING:

   signal_num = -1;

   break;

  case GDK_BUTTON_PRESS:

  signal_num = BUTTON_PRESS_EVENT;

  break;

  case GDK_BUTTON_RELEASE:

 ..

 ..

 

 ..  

}


it's my problem .


anyone is doing the same thing as me or know the answer?

maybe we could talk about it.

please help me.

Thanks a lot for your help!


Have a nice day!


kason





RE: about the difference between gtk+-1.2.10 and gtk+-2.0

2002-06-12 Thread 黃慶 Kason Huang

Hi Olaf:
i found a site :
http://freshmeat.net/releases/44817/

maybe the site is better about the difference.

if you find more,please tell me.

Have a nice day,guy ! 

kason

-Original Message-
From: Olaf Leidinger [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 6:31 PM
To: ¶À¼y Kason Huang
Cc: GTK-List
Subject: Re: about the difference between gtk+-1.2.10 and gtk+-2.0


about the difference between gtk+-1.2.10 and gtk+-2.0Hi!

Here's something you might be interrested in.
http://developer.gnome.org/dotplan/porting/

ciao,

Olaf


From: ¶À¼y Kason Huang
To: [EMAIL PROTECTED]
Cc: Gtk users
Sent: Wednesday, June 12, 2002 7:19 AM
Subject: about the difference between gtk+-1.2.10 and gtk+-2.0


Hi guys:
Have a nice day.
could you tell me what the difference between gtk+-1.2.10 and gtk+-2.0 have?
and where i could the detail document about the difference?
could you help me?
Thanks for your help!
kason

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about the difference between gtk+-1.2.10 and gtk+-2.0

2002-06-11 Thread 黃慶 Kason Huang
Title: about the difference between gtk+-1.2.10 and gtk+-2.0






Hi guys:


Have a nice day.

could you tell me what the difference between gtk+-1.2.10 and gtk+-2.0 have?

and where i could the detail document about the difference?


could you help me?


Thanks for your help!


kason





RE: (no subject)

2002-06-10 Thread 黃慶 Kason Huang

First thank you for your impatience. Yesterday I found out that I
didn't actually get the file "Makefile",
because the command "./configure" ran incorrectly. So I have downloaded
glib-2.0.3 and then install it successfully. 
But when I configure pango-1.01, it suggests me to install glib-2.0.0 or
above. The error information says that I should 
either set LD_LIBRARY_path enviroment variable or modify the file
"/etc/ld.so.conf".  I just don't know what to do!
Please help me out !

Thank you very much!
Your truely friend!
-Original Message-
From: Olaf Leidinger [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 5:23 PM
To: 黃慶 Kason Huang
Cc: GTK Postliste
Subject: Re: (no subject)


Am Mon, 2002-06-10 um 05.25 schrieb 黃慶 Kason Huang:
 I have got the sources of gtk+-1.2, and then, After I used
the shell script command "./configure",
I have got the file "Makefile". But when I run command "make", I
find that it doesn't run correctly!
The command "make"  exits immediately after echoing a little few
lines of information. Could you please
hell me out? 
Thank you very much!
Your truely friend!
Hello!

Well, what does your make say??? Could you send us these few lines,
please?

Cya,

Olaf


‚Ù%ŠËfj)bž  b²Ø-’X¬¶è™ê+‚m§ÿæj)`ž‰ž¢¸?™¨¥™©ÿ–+-Šwèþd–+-


(no subject)

2002-06-10 Thread 黃慶 Kason Huang






    I just download the gtk+-2.0.3, and after running command "./configure", 

I get the file "Makefile". Now, I try to run "make" , but the command exits immediately with 

just a line of words. The following is detail:


 make: *** %?!<%2%C%H$,;XDj$5$l$F$*$i$:!"makefCf;_!#8+$D$+$j$^$;$S.


I just can't understand what the above means. Could you please explain me why?

I am much anxious!

    

            Thank you very much!

            your truely friend!





(no subject)

2002-06-09 Thread 黃慶 Kason Huang






 I have got the sources of gtk+-1.2, and then, After I used the shell script command "./configure",

I have got the file "Makefile". But when I run command "make", I find that it doesn't run correctly!

The command "make"  exits immediately after echoing a little few lines of information. Could you please

hell me out? 

    Thank you very much!

    Your truely friend!





about Install gtk

2002-06-04 Thread 黃慶 Kason Huang
Title: about Install gtk






hello:

could anyone tell me how to Install gtk package?

i have a gtk+-1.2.10 source package,and i saw the INSTALL file in the package,

it say that you only need run ./configure under the gtk+-1.2.10 directory.

but when i run ./configure file,the result is with a error "can not find the file or directory".

i don't know why?

anyone tell me?


thanks in advance.

kason





FW: about destruct class object?

2002-04-03 Thread 黃慶 Kason Huang

hi John:
now i am thinking gtk advanced technique.
if gtk is encapsulated with C++,i could rewrite some virtual function of a class.
in gtk lib,i know the widget class is equal to the v-table in C++.
now my problem is like following:
when i useing gtk_button_new(),i could create a rectangle 3D button.
however i want  to create a ellipse 3D button,how to do that?
for that purpose, i watch the source code of gtk lib,i find the draw button function
is gtk_button_draw();and gtk_button_draw-->gtk_button_paint--->gtk_paint_box
i want to rewrite the gtk_paint_box to create a ellipse 3D button, how to do that? or 
having 
another way to create a ellipse 3D button.

thanks you very much!
my OICQ:95898816
kason



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 02, 2002 7:37 PM
To: ¶À¼y Kason Huang
Cc: [EMAIL PROTECTED]
Subject: Re: about destruct class object?


¶À¼y Kason Huang wrote:
> hi:
> after i create a gtkbutton(useing gtk_button_new()),when i want to
destruct the gtkbutton,
> whether i need call gtk_widget_destroy(button) in my destruct function of
CGtkButton class encapsulated by myself.

Hi Kason, if you subclass a button, you don't need to destroy the button
yourself, just call the superclass destroy function. At the end of your
_destroy(), have something like:

  if (GTK_OBJECT_CLASS (parent_class)->destroy)
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);

John



== 
Aelbert Cuyp 13 February - 12 May 2002 

For information and tickets: 
http://www.nationalgallery.org.uk/exhibitions/cuyp/
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



RE: Gtk: How can they share a widget?

2002-04-03 Thread 黃慶 Kason Huang

hi john:
why not try to  put a vbox or hbox in the window, then add GtkTable and GtkFixed in 
the box?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 7:01 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Gtk: How can they share a widget?


[EMAIL PROTECTED] wrote:
> I was working on resizing and repositioning of image drawing widgets.
> Unfortunately, I have errors and I do not know how to solve it.
> I put a part of my code on the bottom.

Hi,

A GtkWindow can only hold one widget, and a widget can only be inside
one container. You are trying to add both the GtkTable and the GtkFixed
to the window, and you are trying to add each GtkButton to the table,
but also to the fixed.

I suggest you get rid of the table and just use fixed. Have your widgets
like this:

window
  fixed
button
  drawing area
button
  drawing area
... etc

John



== 
Aelbert Cuyp 13 February - 12 May 2002 

For information and tickets: 
http://www.nationalgallery.org.uk/exhibitions/cuyp/
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about destruct class object?

2002-04-01 Thread 黃慶 Kason Huang

hi:
after i create a gtkbutton(useing gtk_button_new()),when i want to destruct the 
gtkbutton,
whether i need call gtk_widget_destroy(button) in my destruct function of CGtkButton 
class encapsulated by myself.

thanks a lot!
kason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about control signal and event.........

2002-04-01 Thread 黃慶 Kason Huang

hi:
i am doing a project.in that i must contrast the mouse clicked signal with key pressed 
event.
i doing a testing code. like  following:

#include 


GtkWidget *xpm_label_box( GtkWidget *parent,
  gchar *xpm_filename,
  gchar *label_text )
{
GtkWidget *box1;
GtkWidget *label;
GtkWidget *pixmapwid;
GdkPixmap *pixmap;
GdkBitmap *mask;
GtkStyle *style;

box1 = gtk_hbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (box1), 2);

style = gtk_widget_get_style(parent);

pixmap = gdk_pixmap_create_from_xpm (parent->window, &mask,
 &style->bg[GTK_STATE_NORMAL],
 xpm_filename);
pixmapwid = gtk_pixmap_new (pixmap, mask);

label = gtk_label_new (label_text);

gtk_box_pack_start (GTK_BOX (box1),
pixmapwid, FALSE, FALSE, 3);

gtk_box_pack_start (GTK_BOX (box1), label, FALSE, FALSE, 3);

gtk_widget_show(pixmapwid);
gtk_widget_show(label);

return(box1);
}

void clickedcallback( GtkWidget *widget, gpointer   data )
{
g_print ("clicked signal happened\n");
}

void buttonpresscallback( GtkWidget *widget,GdkEvent *event, gpointer data)
{
  g_print ("button_press_event happened\n");
}

void buttonreleasecallback( GtkWidget *widget,GdkEvent *event, gpointer data)
{
  g_print ("button_release_event happened\n");
}

int main( int   argc, char *argv[] )
{
GtkWidget *window;
GtkWidget *button;
GtkWidget *box1;

gtk_init (&argc, &argv);

window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Pixmap'd Buttons!");
gtk_signal_connect (GTK_OBJECT (window), "destroy",
GTK_SIGNAL_FUNC (gtk_exit), NULL);
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (gtk_exit), NULL);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
gtk_widget_realize(window);

/*  the following is the key code i tested, how to call back a function by 
button_press_event, but not by mouse clicked.
*   the result is that  mouse clicked will turn to happen button_press_event at 
same time. how to happen 
*   clicked signal not happen button_press_event.
   */
button = gtk_button_new ();
gtk_signal_connect (GTK_OBJECT (button),"clicked",
GTK_SIGNAL_FUNC (clickedcallback), (gpointer) "cool button");
gtk_signal_connect (GTK_OBJECT (button),"button_press_event",
GTK_SIGNAL_FUNC (buttonpresscallback), NULL);
   gtk_signal_connect (GTK_OBJECT (button),"button_release_event",
GTK_SIGNAL_FUNC (buttonreleasecallback), NULL);

box1 = xpm_label_box(window, "info.xpm", "cool button");
gtk_widget_show(box1);
gtk_container_add (GTK_CONTAINER (button), box1);
gtk_widget_show(button);
gtk_container_add (GTK_CONTAINER (window), button);
gtk_widget_show (window);

gtk_main ();
return(0);
}

my problem is writen in the code by note,maybe i should to trace gdkevent .someone 
could help me.
thanks a lot!
kason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about GtkText...

2002-03-30 Thread 黃慶 Kason Huang

hello:
how are you!
could someone help me? i want to know the maximum length of text that i input the 
GtkText Widget. 
have a nice day!
kason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



FW: How convert a xpixel to rgb ?

2002-03-28 Thread 黃慶 Kason Huang

You could try GIMP,that is good.
kason

-Original Message-
From: GONZALOMZ [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 28, 2002 10:01 PM
To: [EMAIL PROTECTED]
Subject: How convert a xpixel to rgb ?


How convert a xpixel to rgb ?.
Thanks.

--
Gonzalo Montesdeoca Zamora
 Santa Brigida
   Canarias
--


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



FW:

2002-03-17 Thread 黃慶 Kason Huang
Title: FW: 






hello all:

    my friend asks me a question,but i couldn't work it out.

    someone could help me.

    thanks a lot.

kason

 -Original Message-

From:   ©ö¤å¬P Alex Yi  

Sent:   Monday, March 18, 2002 9:10 AM

To: ¶À¼y Kason Huang

Subject:    

 

    When programming on Linux, I use the following codes 


system("ps -Algrep \"processname\" >> tempfilename");


to store the process information into a temporary file. But now, 

I have to store the process  information into a character buffer, 

and I just don't know where is the way!!! Could you please be kind enough

to help me out.





___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


RE: Sockets

2002-03-13 Thread 黃慶 Kason Huang

maybe you need to use glibc library.it is more base than xlib. 

-Original Message-
From: Chris Nystrom [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 14, 2002 1:38 AM
To: Paul Davis
Cc: Nicolas web; [EMAIL PROTECTED]
Subject: Re: Sockets 


On Tue, 12 Mar 2002, Paul Davis wrote:

> GTK is a toolkit for creating graphical user interfaces. It has
> nothing to do with sockets or other IPC mechanisms, though it has some
> builtin support to make integrating I/O handling a little simpler. I
> think you need to look at another library that is focussed on this
> area, not GTK.

He might run into problems when trying to integrate the socket IO with
the gtk_main function that never returns. He needs to become familiar
with monitoring the IO (14.2 in the tutorial, I think), or how to avoid
using the gtk-main function.

Chris


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about gtk signal?

2002-03-10 Thread 黃慶 Kason Huang

hi:
i want to know about the gtk signal system.
after i use the gtk function 
gtk_signal_connect(GtkWidget*,gchar*,GtkSignalFunc,gpointer),
i want to know the message route and what happened on the route.
and if i want to create a new widget,how to set a new signal for the widget?

thanks a lot
kason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about ellipse button?

2002-03-10 Thread 黃慶 Kason Huang

hi:
i want to creat a ellipse button
but i don't find having a gtk function which could create a ellipse button.
have someone do the same thing,and please help me?
Thank you very much.
kason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about run X server on microsoft windows?

2002-03-10 Thread 黃慶 Kason Huang

hello,guys:
how are you,could anyone give me some package for i want to
run x server on microsoft windows(i know that having a X OnNet tool).anyone could help 
me?
by the way, don't forget the install tutorial.

Thanks in advance.
kason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



FW: about g

2002-03-10 Thread 黃慶 Kason Huang

> hello ,guys:
>   now i have a trouble problem ,could anyone help me?
>   The following callback function expected to select item in CList when you 
>press down key on keyboard.I want to select the item by circulation,this means goto 
>the first item in the fist page when pressed the down key on the last item in the 
>second page.

I wrote the result of the fuction in the code by translation.   
> >
> > 
> >  void selection( GtkWidget *widget,GdkEventKey *event,gpointer data)
> > {
> >  if(selectRow<11&&selectRow >= 0 && event->keyval == GDK_Down)
> > {
> > selectRow = selectRow +1;
> >  gtk_clist_select_row(GTK_CLIST(widget),selectRow,0);
> > }
> > else if(selectRow = 11 && event->keyval == GDK_Down)
> > {   
> > {
> > GtkAdjustment *scrolladjust;
> > GtkWidget *scrolled_window;
> > scrolled_window = (GtkWidget*)data;
> > gtk_clist_unselect_row(GTK_CLIST(widget),selectRow,0);
> > 
> > //now at  the second page ,  I want to scroll window to the 
>first page and select the  first item in  the first page
>   // the result is select the  first item ,system automaticlly 
>added a spotting frame on the 12th item  and window at  the second page,user couldn't 
>see the first selected item.
> > selectRow =0;   
> > printf("selectrow %d\n",selectRow);
> > scrolladjust 
>=gtk_scrolled_window_get_vadjustment(scrolled_window);
> >
> > gtk_adjustment_set_value(scrolladjust,0.0);
> > 
>gtk_scrolled_window_set_vadjustment(scrolled_window,scrolladjust);//
> > gtk_clist_select_row(GTK_CLIST(widget),selectRow,0);
> > }
> > }   

--
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about GdkEventFocus and ...........?

2002-02-25 Thread 黃慶 Kason Huang

hello,
anyone could tell me two member variables of meaning in struct GdkEventFocus of gtk 
source code.
source code as following:
struct _GdkEventFocus
{
   GdkEventType type;
   GdkWindow *window;
   gint8 send_event;  --->what meaning?
   gint16 in;   -->what meaning?
}

why i want to ask that question.
for i want to control the buttons focus move with keyboard (not by mouse) in a 
gtktable not by the default done .
anyone find that you couldn't move Parallelly the buttons focus in two tables ,and you 
move buttons focus with  up-down-left-right key in one table sometime not as you 
expected.

the following code is the problem about the buttons focus move in one table,you can 
test it with up-down-left-right key then see the focus is at the button as you 
expected.

/*file  ProblemInOneTable.c  */
#include 

gint delete_event( GtkWidget *widget, GdkEvent  *event,gpointer   data )
{
gtk_main_quit ();
return(FALSE);
}

int main( int   argc,char *argv[] )
{
GtkWidget *window;
GtkWidget *table;
GtkWidget *button1,*button2,*button3,*button4,*button5,*button6,*button7,*button8;
  
gtk_init (&argc, &argv);

window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Table");
gtk_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (delete_event), NULL);
gtk_container_set_border_width (GTK_CONTAINER (window), 20);

table = gtk_table_new (4,4, TRUE);
gtk_container_add (GTK_CONTAINER (window), table);

button1 = gtk_button_new_with_label ("button 1");
gtk_table_attach_defaults (GTK_TABLE(table), button1, 0, 1, 0, 1);
gtk_widget_show (button1);

button2 = gtk_button_new_with_label ("button 2");---focus moves 
with down key not as expected?
 gtk_table_attach_defaults (GTK_TABLE(table), button2, 1, 2, 0,1);
gtk_widget_show (button2);

button3 = gtk_button_new_with_label ("button 3");
 gtk_table_attach_defaults (GTK_TABLE(table), button3, 2, 3, 0, 1);
gtk_widget_show (button3);

button4 = gtk_button_new_with_label ("button 4");--focus moves 
with down key not as expected?
 gtk_table_attach_defaults (GTK_TABLE(table), button4, 3, 4, 0,1);
gtk_widget_show (button4);

button5 = gtk_button_new_with_label ("button 5");
 gtk_table_attach_defaults (GTK_TABLE(table), button5, 0, 1, 1, 2);
gtk_widget_show (button5);

button6 = gtk_button_new_with_label ("button 6");
  gtk_table_attach_defaults (GTK_TABLE(table), button6, 1, 4, 1, 2);
gtk_widget_show (button6);

button7 = gtk_button_new_with_label ("button 7");
gtk_table_attach_defaults (GTK_TABLE(table), button7, 0,2,2, 3);
gtk_widget_show (button7);

button8 = gtk_button_new_with_label ("button 8");
gtk_table_attach_defaults (GTK_TABLE(table), button8, 2, 4, 2, 3);
gtk_widget_show (button8);

   gtk_widget_show_all(window);
   gtk_main();
   return 0;
}


someone knows this problem?
Thanks in advance!
kason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about curses programming?

2002-02-25 Thread 黃慶 Kason Huang

hello:
it 's not gtk problem.
anyone know Curses programming? how to create Makefile,how to make?
like the following code how to do?

/* File: helloworld.c */

#include 

int main(int argc, char *argv[])
{

initscr();


box(stdscr, ACS_VLINE, ACS_HLINE);


mvaddstr(11, 30, "Hello World!");

refresh();

getch();

endwin();

return 0;
}

Thanks for you help.
kason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



RE: how to align a label in GtkTable

2002-02-25 Thread 黃慶 Kason Huang

hi:
you could try gtk_label_set_justify(GtkLabel *label,GtkJustification jtype);
typedef enum
{
  GTK_JUSTIFY_LEFT,
  GTK_JUSTIFY_RIGHT,
  GTK_JUSTIFY_CENTER,
  GTK_JUSTIFY_FILL
} GtkJustification;

for example:
gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);

-Original Message-
From: Marco Lettere [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 5:31 PM
To: [EMAIL PROTECTED]
Subject: how to align a label in GtkTable



hello,

I always get a label attached in a GtkTable to be centered in its cell.
How do I get it to be left aligned? is it possible using only
gtk_table_*() or gtk_label_*() functions?
thanx,
M.

  _
|  _ \  ___ ___  _ __| |
| | | |/ __/ _ \| '__|  _|
| |_| | (_| (_) | |  | |___
|/ \___\___/|_|  |_|


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



FW: About the focus move in table?

2002-02-25 Thread 黃慶 Kason Huang


-Original Message-
From: ¶À¼y Kason Huang 
Sent: Saturday, February 23, 2002 9:01 AM
To: [EMAIL PROTECTED]
Subject: About the focus move in table?


hi guys: 
anyone could tell how to change the focus in three tables(there is a lot of buttons in 
each table) with keyboard. 
and I find that  the buttons focus in one table couldn't be changed smoothly.for 
example,when you press left key on keyboard,you expect the focus will move to the left 
button,however the focus maybe move to the a button on the bottom of the table.
a table's layout like tablelayout.doc  picture:(24 buttons in one table)  
when focus in 14 button,i press down key on keyboard.i expect the focus will move to 
the 20 button,the result is the focus moves to the15 button or other button,not 20 
button.the same thing is happen to the 18,20 button.do anyone knows how to handle with 
the problem? or how to control the focus in a table?
Thanks in advance! 
kason 



tablelayout.doc
Description: tablelayout.doc


About the focus move in table?

2002-02-22 Thread 黃慶 Kason Huang
Title: About the focus move in table?






hi guys:

anyone could tell how to change the focus in three tables(there is a lot of buttons in each table) with keyboard.

and I find that  the buttons focus in one table couldn't be changed smoothly.for example,when you press left key on keyboard,you expect the focus will move to the left button,however the focus maybe move to the a button on the bottom of the table.

a table's layout like following picture:(24 buttons in one table)






when focus in 14 button,i press down key on keyboard.i expect the focus will move to the 20 button,the result is the focus moves to the15 button or other button,not 20 button.the same thing is happen to the 18,20 button.do anyone knows how to handle with the problem? or how to control the focus in a table?

Thanks in advance!

kason 







ole0.bmp
Description: ole0.bmp


SOS about gtk xim?

2002-02-04 Thread 黃慶 Kason Huang
Title: SOS about gtk xim?






hi all:

  I have a problem about gtk xim. Now I start a program with xim by handmake way, then I can start kinput2; but if I start it using a shell, I can't start kinput2. I don't know why? please help me! 

Thanks a lot!

kason




___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


RE: [INIMSS] How can I change the text of a button.

2002-02-04 Thread 黃慶 Kason Huang

hi Dino:
 you can try gtk_label_set_text();and you must add the label to the button container.
eg:
gtk_label_set_text(GTK_LABEL(m_pLabel),m_LabelText);
if any question about it ,you could ask me.
kason

-Original Message-
From: Dino Cherian K [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 7:14 PM
To: gtk-list; gtk-app-devel
Subject: [INIMSS] How can I change the text of a button.


Hi

Any body please help me in finding a way to change the text of a
GtkButton.

Thanks
Dino CK

_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about how to create a function named of gtk_button_ellipse_new_with_label()?

2002-02-03 Thread 黃慶 Kason Huang
Title: about how to create a function named of gtk_button_ellipse_new_with_label()?






hello:

could anyone tell me the inheritence of the gtk.

if i want to create a function named gtk_button_ellipse_new_with_label(),how to do that?

for gtk is writed with c not c++,in c++ you could incapsuate a ellipsebutton class by rewriting the virtual function in the button class 

could any know?

Thanks in advance.

kason




___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


how to change focus problem in two tables?

2002-01-31 Thread 黃慶 Kason Huang
Title: how to change focus problem in  two tables?






hello:

do anyone tell me how to change focus of buttons in two GtkTable with "up down left right"key on the condition of no mouse supporting.if a easy way?

i find i could change focus in one table,not happened in two tables.


eg:buttons in two tables

__

|  |   |

|  |   |

|___|_ |

|  |   |    table_a

|  |   |

|  |   |

|___|_ |

|  |   |

|  |   |

|__ | _ |


 
focus with keyboard control


__

|  |   |   

|___|_ |   

|  |   |  

|  |   |   

|  |   |   table_b

|___|_ |    

|  |   | 

|  |   |  

|___| _|    






ole0.bmp
Description: ole0.bmp


ole1.bmp
Description: ole1.bmp


RE: GtkEntry color Background

2002-01-30 Thread ?? Kason Huang

hi pernas:
maybe you could use gtk_widget_set_style();
you could do following:
void
on_button1_clicked(GtkButton   *button,  gpointer   user_data)
{
  GtkStyle *style;
  GtkStyle *oldstyle;
  GdkColor color;
  GdkColor color2;

  color.red=65535;
  color.blue=0;
  color.green=0;
  color.red=0;
  color.blue=65535;
  color.green=0;

  oldstyle = gtk_widget_get_default_style();
  style = gtk_style_copy(oldstyle);
  style->bg[GTK_STATE_NORMAL] =color;
  style->bg[GTK_STATE_ACTIVE] =color2;  
  gtk_widget_set_style(button,style);
}

i do that to set a button's background color in a my own button class .
try to do that.
Good a day.
kason

-Original Message-
From: Isaac Pernas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 8:57 PM
To: [EMAIL PROTECTED]
Subject: GtkEntry color Background



Hola.
Estoy intentando cambiar el fondo d un GtkEntry pero por más que lo
intento no me deja. Nosé que estoy haciendo mal. La versión de mis
librerías Gtk es la 1.2.
I'm trying to change de background color for my GtkEntry but i can´t.
I don't know what i'm doing wrong. I have de Gtk+ 1.2 version.
This funcxtion changes the color of the background when youn click the
button.

void
on_button1_clicked (GtkButton   *button,
gpointer user_data)
{
  GtkRcStyle *rc_style;
  GdkColor color;
  GdkColor color2;

  color.red=65535;
  color.blue=0;
  color.green=0;
  gdk_color_parse("#CC",&color2);
  rc_style=gtk_rc_style_new();
  rc_style->fg[GTK_STATE_NORMAL]=color;
  rc_style->bg[GTK_STATE_NORMAL]=color2;
  rc_style->base[GTK_STATE_NORMAL]=color2;
  rc_style->text[GTK_STATE_SELECTED]=color;
  rc_style->color_flags[GTK_STATE_NORMAL]|=GTK_RC_FG;
  rc_style->color_flags[GTK_STATE_NORMAL]|=GTK_RC_BG;
  rc_style->color_flags[GTK_STATE_NORMAL]|=GTK_RC_BASE;
  rc_style->color_flags[GTK_STATE_SELECTED]|=GTK_RC_TEXT;
 //gtk_widget_modify_style(GTK_WIDGET(GTK_BIN(button)->child),rc_style);
  gtk_widget_modify_style(GTK_WIDGET(user_data),rc_style);
  gtk_rc_style_unref(rc_style);
  g_print("cambiado el estado\n");
}

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



RE: XtWindow in gtk?

2002-01-26 Thread 黃慶 Kason Huang

hello :
Thanks for your help.and thanks for everyone helped me.
now I have incapsulated my CGtkButton class.

for getting window ID,you could try GDK_WINDOW_XDISPLAY(GTK_WIDGET(window)->window);
before you do that,you should #include and gtk_widget_realize(window);
then ok!

Having a good day!
kason

-Original Message-
From: Vahid Zahiri [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 27, 2002 2:40 PM
To: [EMAIL PROTECTED]
Subject: XtWindow in gtk?



 Hi all

 What can i use instead of "XtWindow" function in gtk?
 I need get window ID (integer number).

 how can i get it in Gtk?

 thanks in advance
 
 Vahid Zahiri

__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about XPM problem?

2002-01-23 Thread 黃慶 Kason Huang

hello:
how are you?
anyone know  in the  line "13  13  5  2  7  7" ,"2" "7" and "7"  what meaning?

/* XPM */
static char * roundb_xpm[] = {
/* width height ncolors cpp [x_hot y_hot] */
"13 13 5 2 7 7",
/* colors */
"  s none   m none  c none",
". s topShadowColor m white c lightblue",
"X s iconColor1 m black c black",
"o s bottomShadowColor m black c #646464646464",
"O s selectColor m white c red",
/* pixels */
"  ",
"  . . .   ",
"  . . X X X o o   ",
". X X X X X X X o ",
". X X X X X X X o ",
"  . X X X X O X X X X o   ",
"  . X X X O O O X X X o   ",
"  . X X X X O X X X X o   ",
". X X X X X X X o ",
". X X X X X X X o ",
"  o o X X X o o   ",
"  o o o   ",
"  "
}; 


ps: could someone tell me where could I find a detail story about XPM.

Thanks in advance.
kason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



RE: about button's problem......

2002-01-22 Thread 黃慶 Kason Huang

hi John:
Thanks for your help!
before i received your mail,i was thinking in the gtk source codes how to do with the 
problem.
maybe i could get help from the source codes.
I find in the gtk source code gtk_button_class_init() calls  
gtk_signal_new("enter"..); 
did  someone  know the gtk source codes how to handle with the problem?

Thanks in advance.
kason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 22, 2002 6:55 PM
To: ¶À¼y Kason Huang
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: about button's problem..


¶À¼y Kason Huang wrote:

> now i want to do:my condition is being no  mouse,the only terminal
controlling  tool is  the keyboard.(i am doing a STB project.). when a
button get focus(with keyboard) , setting  the button's  background to be a
color. then when the button lost focus,setting the button's background to be
another color.i do the following.
> i rewrite the testing code,but it's still not working like i expected.



Hi Kason, the best way to do this is to set the name of the widget and
then use .gtkrc to set a colour.

here's a program that does what you want:

--
#include 

void
set_name (GtkWidget * widget, const char *name)
{
  gtk_widget_set_name (widget, name);
  if (GTK_IS_CONTAINER (widget))
gtk_container_foreach (GTK_CONTAINER (widget),
   (GtkCallback) set_name, (char *) name);
}


static gboolean
set_name_cb (GtkWidget * widget, GdkEvent * event, gpointer client)
{
  set_name (widget, (const char *) client);

  return TRUE;
}

int
main (int argc, char *argv[])
{
  GtkWidget *window;
  GtkWidget *vbox;
  GtkWidget *button;

  gtk_init (&argc, &argv);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);

  vbox = gtk_vbox_new (FALSE, 0);
  gtk_container_add (GTK_CONTAINER (window), vbox);

  button = gtk_button_new_with_label ("foo");
  gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
  gtk_signal_connect (GTK_OBJECT (button), "focus_in_event",
  GTK_SIGNAL_FUNC (set_name_cb), "focussed_widget");
  gtk_signal_connect (GTK_OBJECT (button), "focus_out_event",
  GTK_SIGNAL_FUNC (set_name_cb), "default");

  button = gtk_button_new_with_label ("bar");
  gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
  gtk_signal_connect (GTK_OBJECT (button), "focus_in_event",
  GTK_SIGNAL_FUNC (set_name_cb), "focussed_widget");
  gtk_signal_connect (GTK_OBJECT (button), "focus_out_event",
  GTK_SIGNAL_FUNC (set_name_cb), "default");

  gtk_widget_show_all (window);

  gtk_main ();

  return 0;
}
-

You need to make a file called .gtkrc in your home directory, and add
this to the end:

-
style "focussed_style" = "default"
{
bg[NORMAL] = { 0.1, 0.7, 0.6 }
bg[PRELIGHT] = { 0.2, 0.8, 0.7 }
bg[ACTIVE] = { 0.1, 0.7, 0.6 }
bg[SELECTED] = { 0.1, 0.7, 0.6 }
bg[INSENSITIVE] = { 0, 0.4, 0.3 }
}

widget "*focussed_widget" style "focussed_style"
--

John



== 
Coming soon: 
Aelbert Cuyp 13 February - 12 May 2002 

For information and tickets: 
http://www.nationalgallery.org.uk
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about button's problem......

2002-01-21 Thread 黃慶 Kason Huang

hi,hello:
Thanks for your helps.
now i want to do:my condition is being no  mouse,the only terminal controlling  tool 
is  the keyboard.(i am doing a STB project.). when a button get focus(with keyboard) , 
setting  the button's  background to be a color. then when the button lost 
focus,setting the button's background to be another color.i do the following.
i rewrite the testing code,but it's still not working like i expected.


#include
#include

#define WIDTH 30
#define Height 20

/* drawing a colorful rectangle on the button,the button will look like with a 
colorful background*/
void DrawColorRectOnButton(GtkWidget *object,gpointer data)
{
  static GdkColormap *colormap = NULL;
  static GdkGC *gc = NULL;
  GdkColor color;
  GtkWidget *widget = GTK_WIDGET(data);
  gint x = 0;
  gint y=0;
  gint width = 30; //the rectangle's width,height equal to the button's 
width,height
  gint height = 20;   
  
  if(NULL == colormap)
  {
 colormap = gdk_color_get_system();
 gc = gdk_gc_new(widget->window);
  }

  color.red  = 61696;
  color.green = 52736;
  color.blue  = 45312;
  gdk_color_alloc(colormap,&color);

  gdk_gc_set_foreground(gc,&color);
  
  gdk_draw_rectangle(widget->window,gc,TRUE,x,y,width,height);

}

int main(int argc,char *argv[])
{
  GtkWidget *window;
  GttkWidget *button1;
  GtkWidget *area1;
  GtkWidget *button2;
  GtkWidget *area2;
  GtkWidget *vbox;

  gtk_init(&argc,&argv);
  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_signal_connect(GTK_OBJECT(window),"destroy",GTK_SIGNAL_FUNC(gtk_exit),NULL);

  vbox = gtk_vbox_new(TRUE,2);
  gtk_container_add(GTK_CONTAINER(window),vbox);
 
  button1= gtk_button_new_with_label("1");
  gtk_widget_set_usize(button1,WIDTH,HEIGHT);
  gtk_box_pack_start(GTK_BOX(vbox),button1,TRUE,FALSE,0);
  gtk_window_set_focus(GTK_WINDOW(window),button1);
  area1 = gtk_drawing_area_new();
  gtk_widget_set_usize(area1,WIDTH,HEIGHT);
  
gtk_signal_connect(GTK_OBJECT(button1),"focus_in_event",GTK_SIGNAL_FUNC(DrawColorRectButton),area1);
  
   button2= gtk_button_new_with_label("2");
  gtk_widget_set_usize(button2,WIDTH,HEIGHT);
  gtk_box_pack_start(GTK_BOX(vbox),button2,TRUE,FALSE,0);
  gtk_window_set_focus(GTK_WINDOW(window),button2);
  area2 = gtk_drawing_area_new();
  gtk_widget_set_usize(area2,WIDTH,HEIGHT);
  
gtk_signal_connect(GTK_OBJECT(button2),"focus_in_event",GTK_SIGNAL_FUNC(DrawColorRectButton),area2);

  gtk_widget_show(area1);
  gtk_widget_show(area2);
  gtk_widget_show(button1);
  gtk_widget_show(button2);
  gtk_widget_show(vbox);
  gtk_widget_show(window);

  gtk_main();
  return 1;
}
PS: i don't know how to set a button's background  color when the user enviorment 
without mouse supporting( i know when  the mouse available,using 
bg[GTK_STATE_PRELIGHT]=color, the button's color will show some color after  the mouse 
pointer put on the button).
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



why that not working?

2002-01-21 Thread 黃慶 Kason Huang

hello:
for creating a colorful button,I do a testing code,however,that not working?
why and how to do?anyone could help me?

#include
#include

GdkColor cyan = {0,0x,0x,0x};

int main(int argc,char *argv[])
{
  GtkWidget *window;
  GttkWidget *button1;
  GtkWidget *button2;
  GtkWidget *vbox;

  gtk_init(&argc,&argv);
  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_signal_connect(GTK_OBJECT(window),"destroy",GTK_SIGNAL_FUNC(gtk_exit),NULL);

  vbox = gtk_vbox_new(TRUE,2);
  gtk_container_add(GTK_CONTAINER(window),vbox);
 
  button1= gtk_button_new_with_label("1");
  gtk_widget_realize(button1);
  gdk_window_set_background(button1->window,&cyan);   //not working,why?
  gtk_box_pack_start(GTK_BOX(vbox),button1,TRUE,FALSE,0);
  
   button2= gtk_button_new_with_label("2");
  gtk_widget_realize(button2);
  gdk_window_set_background(button2->window,&cyan);   //not working,why?
  gtk_box_pack_start(GTK_BOX(vbox),button2,TRUE,FALSE,0);

  gtk_widget_show(button1);
  gtk_widget_show(button2);
  gtk_widget_show(vbox);
  gtk_widget_show(window);

  gtk_main();
  return 1;
}

Thank you in advance!   waiting for your mail back.

you can get me by mail :
[EMAIL PROTECTED]
   
 kason
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



FW: SOS-->how to use gdk_window_set_background()?

2002-01-20 Thread 黃慶 Kason Huang


-Original Message-
From: ¶À¼y Kason Huang 
Sent: Monday, January 21, 2002 3:33 PM
To: [EMAIL PROTECTED]
Subject: how to use gdk_window_set_background()?


hello: 
anyone could tell me how to use gdk_window_set_background() to set a button's 
background color? 
Thanks for your help!
kason 
___ gtk-list mailing list 
[EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list 
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



how to use gdk_window_set_background()?

2002-01-20 Thread 黃慶 Kason Huang
Title: how to use gdk_window_set_background()?






hello:


anyone could tell me how to use gdk_window_set_background() to set a button's background color?

Thanks for your help?


                                    kason




___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


how to set a button's background?

2002-01-20 Thread 黃慶 Kason Huang
Title: how to set a button's background?






hello,hi:

    could anyone tell me how to set a button's background?

when the button get focus(with updown key in the keyboard),how to let the button's background being red or other color? 



___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


how to create a elliptic button?

2002-01-20 Thread 黃慶 Kason Huang
Title: how to create a elliptic button?






hello:

    I want to know how to create a elliptic button?

    have a gtk function for doing it?

    do i need incapsulate a new widget with the way that rewrites the virtual functions? but i don't know how to do that?



___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


how to create a button that you could light it with "up-down-left-right"key ?

2002-01-19 Thread 黃慶 Kason Huang

hi,friends:
I know how to create a button that you could light it  with mouse pointer.
you can :
button_lower=gtk_button_new_with_label("Lower Case");
gtk_table_attach_defaults(GTK_TABLE(table1),button_lower,0,1,1,2);
current=gtk_widget_get_default_style();
new_lower=gtk_style_copy(current);
new_lower->bg[GTK_STATE_ACTIVE] = green;
new_lower->bg[GTK_STATE_PRELIGHT] = cyan;
gtk_widget_set_style(button_lower,new_lower);

gtk_signal_connect(GTK_OBJECT(button_lower),"clicked",GTK_SIGNAL_FUNC(ShowNewWindow),NULL);
gtk_widget_show(button_lower);
but "new_lower->bg[GTK_STATE_PRELIGHT] = cyan;" that working only when you mouse 
pointer on the button.i want to know
how to create a button that you could light it  with up-down-left-right key.should i 
use gtk_window_set_focus() to the button?
anyone knows it?


Thanks a lot!
[EMAIL PROTECTED]
   kason


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



about focus?

2002-01-16 Thread 黃慶 Kason Huang

hello:
now i use the gtk_window_set_focus() and could set focus at a button.
but now a new problem  rising. it's following:
1.create a toplevel window;
2.create a text edit in the window;
3 create a button with label"a" in the window.
i want to press the button then 
1.set focus in the text edit;
2. send a keyevent to the text edit and show the key "a" in the text edit;
3. set the focus to the button.
but the result is :
1.set focus in the text edit,the step is ok;
2.in the text edit no show the key "a";
3.set the focus to the button,that's right.
you see the problem is in the 2,how to handle with it.
Thanks in advance.

Thanks a lot!
[EMAIL PROTECTED]
   kason


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



how to set a button's focus?

2002-01-16 Thread 黃慶 Kason Huang
Title: how to set a button's focus?






hi,guys:

could you  tell me how to set a button's focus .

In VC++ ,you could set the buttons focus sequence by "1,2,3,4,..",so how to control the buttons focus with "Tab" in gtk+.

anyone knows?

waiting for your mail back. 


Thanks a lot!

[EMAIL PROTECTED]

   kason





___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


someone can help me?

2001-12-12 Thread 黃慶 Kason Huang
Title: someone can help me?






I want to create two button named "Lower Case"& "A" .

when I click the  "Lower Case" button,the "A" button should change to the "a" button,the button's name changed.

I do the following code,but the button's name doesn't  be changed.

In VC++,when I change something,I can redraw  the screen,and it would be shown.

someone can tell me how to do that in gtk library?



Thanks in advance.

you can get me by mail:

[EMAIL PROTECTED]    

                                    kason 




#include


GtkWidget  *label_show(GtkWidget *object,gchar *label_string)

{

    GtkWidget *label;

    

    label=gtk_label_new(label_string);

    gtk_container_add(GTK_CONTAINER(object),label);

    gtk_widget_show(label);

    gtk_widget_show(object);


    return object;

        

}


void label_change(GtkWidget *object,GtkWidget *slot_object)

{

    g_print("Hello again!");

    slot_object=label_show(slot_object,"a");

    gtk_widget_show(slot_object);

}


int main(int argc,char *argv[])

{

    GtkWidget *window;

    GtkWidget *button1;

    GtkWidget *button2;

    GtkWidget *vbox;

    

    gtk_init(&argc,&argv);

    

    window=gtk_window_new(GTK_WINDOW_TOPLEVEL);

    vbox=gtk_vbox_new(FALSE,0);

    

    gtk_signal_connect(GTK_OBJECT(window),"destroy",GTK_SIGNAL_FUNC(gtk_exit),NULL);

    gtk_signal_connect(GTK_OBJECT(window),"delete_event",GTK_SIGNAL_FUNC(gtk_exit),NULL);

    gtk_container_set_border_width(GTK_CONTAINER(window),10);

    gtk_widget_realize(window);

    gtk_container_add(GTK_CONTAINER(window),vbox);

    gtk_widget_show(vbox);


    button1=gtk_button_new();

    button2=gtk_button_new();

    

    button1=label_show(button1,"Lower Case");

    button2=label_show(button2,"A");


    gtk_box_pack_start(GTK_BOX(vbox),button1,FALSE,FALSE,0);

    gtk_box_pack_start(GTK_BOX(vbox),button2,FALSE,FALSE,0);


    gtk_signal_connect(GTK_OBJECT(button1),"clicked",GTK_SIGNAL_FUNC(label_change),

                                                                                                                                    GTK_OBJECT(button2));

    gtk_widget_show(window);


    gtk_main();

    

    return 0;


}





___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list


how to do a ellipse button?

2001-12-02 Thread 黃慶 Kason Huang
Title: how to do a ellipse button?






How can I do a Ellipse button?

I know I can do that with a pixmap,but I could't understand how to do a  Ellipse button pixmap.

If I want to change the gtk_button_new() to my function named gtk_ellipsebutton_new(),how to do that?

Thank you. 




___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list