Re: Combining GTK+ and C++
Hi Nickolai I have coded in GTK+/GDK/C++ directly and used it from scratch. You can look at my project named Samvaad http://samvaad.sf.net Its an IM client for Google server. (talk.google.com:5222).Still this soft is in testing phase. The souce code may help you. Well,soon i am going to rewrite this Soft from scratch :P as now i believe i can write better code ;) Best Regards Amitesh Singh http://www.amitesh.info On 10/13/06, Nickolai Dobrynin <[EMAIL PROTECTED]> wrote: > Brian, > > Certainly, I am well aware of gtkmm. I've actually done serious work in it > previously. The library I am currently > using, called GtkExtra, is GTK+-based, but I still would like to code my > stuff in C++. The framework > gtkmm provides is overly and unnecessarily general for what I need. > Therefore I am trying to hear from those > who coded in GTK+/C++ directly and from scratch and see how they set things > up without going into all the > complexity and genericity gtkmm/glibmm has. > > I have to admit that gtkmm is so incredibly well-done that you truly feel in > safe haven when you program > with it. But then it becomes a bit of a shocker when you have to step one > level down and start doing things with > pure GTK. An obvious solution would be to use C, but then you only get a > fraction of what C++ offers. Hence all > the confusion I have. :) > > > Regards, > > Nickolai > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Removing text from gtkcombobox
Can we only hide the Small arrow button in GtkComboBoxEntry?As we can hide the GtkEntry's widget in GtkComboEntry .. GTK_ENTRY(GTK_BIN(combo_box)->child) . On 4/14/06, Sandy K <[EMAIL PROTECTED]> wrote: > > Hello, >In combobox, is it possible to remove all the text in it? I am > using gtk_combo_box_new_text() and gtk_combo_box_append_text() to add the > text in it.. And later i need to empty all its contents > Also can i get the number of text entries in the combobox? > If yes.. how can this be done? > > Thanking You > Sandy > > > - > Jiyo cricket on Yahoo! India cricket > Yahoo! Messenger Mobile Stay in touch with your buddies all the time. > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Adding popdown menu list in GtkEntry
Hi I want to show pop down menu list on mouse clicking on the GtkEntry Widget's area.I know it can be done using GtkComboBoxEntry .. how to do it ? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Theme not affecting titlebar on windows xp... help needed
Hi To do Resize ,First Make Border of Window lets say north,north-west,north-east,east,east-south,south,south-west .. add events to each widegts and connect to callback functions which do resizing .. g_signal_connect(G_OBJECT(event_north_east]),"button-press-event",G_CALLBACK(Resize_Window_North_East),(gpointer)window) ** bool Resize_Window_North_East(GtkWidget *widget,GdkEventButton *event,gpointer data) { gtk_window_begin_resize_drag(GTK_WINDOW(data),GDK_WINDOW_EDGE_NORTH_EAST,event->button,event->x_root,event->y_root,event->time); return false; } ******* Cheers ! Amitesh Singh (AMI) Final Year, B.Tech. ISM Dhanbad India On 3/18/06, Michael L Torrie <[EMAIL PROTECTED]> wrote: > > On Sat, 2006-03-18 at 00:38 +0100, Gus Koppel wrote: > > However, then you would have to manage all tasks the window manager > > takes care of by yourself, i.e. minimizing and maximizing the window on > > request and providing correct drag behaviour. For resizability of your > > windows you would still have to rely on the real window manager, since > > the resizing borders don't (and can't) belong to the interior of a > > window. > > To do resize, you can just detect a mouse drag that starts in, say the > lower right-hand corner, and then give the real window manager hints to > resize the window. This would work on linux and windows. This is how > xmms does it (gtk1 app, though). So you could simulate all aspects of > the real window manager from within a decoration-less window as you have > mentioned, but it would be a lot of work and the usability would be > questionable. > > Michael > > > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
How to make Own Decorated window
Hi i have able to write a new decorated window .. its only minimize till now ... but one problem is that how to make it move by sticking it to Cursor .. its not happening in this case :( #include GtkWidget * make_window (void) { GtkWidget *window; GdkColor color; gdk_color_parse ("#a1c0f5", &color); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "Chat Window"); gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_MOUSE); g_signal_connect (G_OBJECT (window), "destroy", gtk_main_quit, NULL); gtk_widget_modify_bg (window, GTK_STATE_NORMAL, &color); gtk_widget_set_size_request (window, 320, 220); gtk_container_set_border_width (GTK_CONTAINER (window), 0); return window; } void minimize_window (GtkWidget * widget, gpointer data) { gtk_window_iconify (data); } gint main (gint argc, gchar ** argv) { GtkWidget *window, *event_box, *hbox, *vbox; GdkColor color; gdk_color_parse ("#f3f3f3", &color); gtk_init (&argc, &argv); window = make_window (); //Hbox hbox = gtk_hbox_new (FALSE, 0); vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), vbox); gtk_box_pack_start (GTK_BOX (vbox), hbox, 0, 0, 0); event_box = gtk_event_box_new (); gtk_widget_set_size_request (hbox, 10, 20); gtk_container_add (GTK_CONTAINER (hbox), event_box); gtk_widget_modify_bg (event_box, GTK_STATE_NORMAL, &color); GtkWidget *button = gtk_button_new (); GtkWidget *image = gtk_image_new_from_file ("/home/ami/Desktop/pirate.xpm"); gtk_container_add (GTK_CONTAINER (button), image); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (minimize_window), (gpointer) window); gtk_box_pack_end (GTK_BOX (hbox), button, 0, 0, 1); gtk_widget_show (image); gtk_widget_show (button); gtk_widget_realize (window); gdk_window_set_decorations (window->window, 0); gdk_window_set_functions (window->window, (GDK_FUNC_MOVE | GDK_FUNC_MINIMIZE | GDK_FUNC_CLOSE)); gtk_widget_show (event_box); gtk_widget_show (hbox); gtk_widget_show (vbox); gtk_widget_show (window); gtk_main (); return 0; } Any suggestions ? Thanks Amitesh ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Changing font size and color
On 2/24/06, Sandeep KS <[EMAIL PROTECTED]> wrote: > > Hi everyone, > I want to increase the font size and also change the font color in > GTK. So can anyone please tell me how to do it? Hi sandeep To modify font size PangoFontDescription *font; font=pango_font_description_from_string("San 9"); gtk_widget_modify_font(widget,font); To modify color GdkColor color; gdk_color_parse("blue",color); gtk_widget_modify_fg(widget,GTK_STATE_NORMAL,&color); Also tell me if i can change the background color of the GtkWindow. gtk_widget_modify_bg() look on API Docs for details :) Regards ! Amitesh B.Tech Final Year ISM,Dhanbad India Thanking You > Sandeep > > > Regards > > > > > > > > - > > What are the most popular cars? Find out at Yahoo! Autos > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How To Draw a window without an option to Maximize it
There was error in the code ; it should be .. + static unsigned int j= MAXIMIZE; + j=~j; but still its not working !! :-p I want to disable MAXIMIZE option of Window via gdk_window_set_decorations() ,, although gtk_window_set_resizable (GTK_WINDOW(window),FALSE); does that ! Thanks Amitesh www.amitesh.info ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How To Draw a window without an option to Maximize it
Hi to all i have found the solution *** gtk_window_set_resizable (GTK_WINDOW(window),FALSE); gtk_widget_show (window); i have also tried to do the same using gdk_window_set_decorations (); but its not working !! :( Any solutions ! here is the Code * static int j=GDK_DECOR_MAXIMIZE; j=!j; gtk_widget_realize (window); gdk_window_set_decorations(window->window,j); gtk_widget_show(window); * /*Gdkwindow.h*/ typedef enum { GDK_DECOR_ALL = 1 << 0, GDK_DECOR_BORDER = 1 << 1, GDK_DECOR_RESIZEH = 1 << 2, GDK_DECOR_TITLE = 1 << 3, GDK_DECOR_MENU= 1 << 4, GDK_DECOR_MINIMIZE= 1 << 5, GDK_DECOR_MAXIMIZE= 1 << 6 } GdkWMDecoration; On 2/11/06, Amitesh Singh <[EMAIL PROTECTED]> wrote: > Hi > How to Draw a Window without an option to Maximize it ? > > Regards ! > Amitesh > -- Cheers !! AMITESH ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
How To Draw a window without an option to Maximize it
Hi How to Draw a Window without an option to Maximize it ? Regards ! Amitesh ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list