I want to add 2 Widgets on same window one is of type gtk_drawing_area_new (); for using Cairo and other is of fixed to add some buttons.
gtk_drawing_area_new ();
fixed
Is there anyway I can do this on same Window? I'm new to GTK+.
Use a GtkContainer subclass such as GtkHBox, GtkVBox or GtkGrid
GtkHBox
GtkVBox
GtkGrid
GtkWidget *hbox = gtk_hbox_new (FALSE, 0); GtkWidget *drawingArea = gtk_drawing_area_new (); GtkWidget *button = gtk_button_new_with_label ("Button"); gtk_container_add (GTK_CONTAINER (window), hbox); gtk_box_pack_start (GTK_BOX (hbox), drawingArea, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0); gtk_widget_show_all (window);
You can see all the standard containers that are available here: https://developer.gnome.org/gtk3/stable/GtkContainer.html#GtkContainer.object-hierarchy
Use a GtkContainer subclass such as
GtkHBox
,GtkVBox
orGtkGrid
You can see all the standard containers that are available here: https://developer.gnome.org/gtk3/stable/GtkContainer.html#GtkContainer.object-hierarchy