Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Gtk+/Gnome Application Development
Prev Home Next

GtkWindow

Library

GTK+

Header File

gtk/gtkwindow.h

Description

GtkWindow represents a toplevel dialog or application window. As the primary toplevel widget in GTK+, it has many special responsibilities; for example, it maintains the current keyboard focus and determines its own size allocation (rather than receiving one from a parent widget).

Gnome applications typically use GnomeApp for main application windows, to take advantage of its added features; for dialogs, you should use GnomeDialog with Gnome and GtkDialog with GTK+. Of course there are several specialized dialog subclasses available as well. If none of GtkWindow's subclasses seem appropriate to your application, GtkWindow can also be used directly.

A danger worthy of note: GtkWindow is automatically destroyed if it receives a "delete_event" signal. To prevent this, you must install the last signal handler to run, and your signal handler must return TRUE. This is a very common GTK+ programming mistake; see the section called Window Change Events in the chapter called GDK Basics for details. GnomeDialog will help you handle this situation; see the chapter called User Communication: Dialogs.

It is a good idea to make GtkWindow the last container you call gtk_widget_show() on. Most widgets are not actually mapped (placed onscreen) until their parent container is; but GtkWindow has no parent, and appears immediately. So if you show its children after you've shown the window, you will see some flicker.

Gtk+/Gnome Application Development
Prev Home Next

 
 
  Published under free license. Design by Interspire