📄 gtk+ faq.htm
字号:
<DT>5.23. <A href="http://www.gtk.org/faq/#AEN654">How do I render
pixels (image data) to the screen?</A>
<DT>5.24. <A href="http://www.gtk.org/faq/#AEN660">How do I create a
pixmap without having my window being realized/shown?</A>
<DT>5.25. <A href="http://www.gtk.org/faq/#AEN666">How do I do
drag-and-drop?</A>
<DT>5.26. <A href="http://www.gtk.org/faq/#AEN672">Why does GTK+/GLib
leak memory?</A></DT></DL>
<DT>6. <A href="http://www.gtk.org/faq/#AEN677">Development with GTK+:
widget specific questions</A>
<DD>
<DL>
<DT>6.1. <A href="http://www.gtk.org/faq/#AEN679">How do I find out
about the selection of a GtkList?</A>
<DT>6.2. <A href="http://www.gtk.org/faq/#AEN716">How do I stop the
column headings of a GtkCList disappearing when the list is
scrolled?</A>
<DT>6.3. <A href="http://www.gtk.org/faq/#AEN722">I don't want the
user of my applications to enter text into a GtkCombo. Any idea?</A>
<DT>6.4. <A href="http://www.gtk.org/faq/#AEN729">How do I catch a
combo box change?</A>
<DT>6.5. <A href="http://www.gtk.org/faq/#AEN739">How can I define a
separation line in a menu?</A>
<DT>6.6. <A href="http://www.gtk.org/faq/#AEN744">How can I right
justify a menu, such as Help?</A>
<DT>6.7. <A href="http://www.gtk.org/faq/#AEN750">How do I add some
underlined accelerators to menu items?</A>
<DT>6.8. <A href="http://www.gtk.org/faq/#AEN758">How can I retrieve
the text from a GtkMenuItem?</A>
<DT>6.9. <A href="http://www.gtk.org/faq/#AEN768">How do I right (or
otherwise) justify a GtkLabel?</A>
<DT>6.10. <A href="http://www.gtk.org/faq/#AEN780">How do I set the
background color of a GtkLabel widget?</A>
<DT>6.11. <A href="http://www.gtk.org/faq/#AEN784">How do I set the
color and font of a GtkLabel using a Resource File?</A>
<DT>6.12. <A href="http://www.gtk.org/faq/#AEN798">How do I configure
Tooltips in a Resource File?</A>
<DT>6.13. <A href="http://www.gtk.org/faq/#AEN803">I can't add more
than (something like) 2000 chars in a GtkEntry. What's wrong?</A>
<DT>6.14. <A href="http://www.gtk.org/faq/#AEN808">How do I make a
GtkEntry widget activate on pressing the Return key?</A>
<DT>6.15. <A href="http://www.gtk.org/faq/#AEN812">How do I
validate/limit/filter the input to a GtkEntry?</A>
<DT>6.16. <A href="http://www.gtk.org/faq/#AEN816">How do I use
horizontal scrollbars with a GtkText widget?</A>
<DT>6.17. <A href="http://www.gtk.org/faq/#AEN819">How do I change the
font of a GtkText widget?</A>
<DT>6.18. <A href="http://www.gtk.org/faq/#AEN825">How do I set the
cursor position in a GtkText object?</A></DT></DL>
<DT>7. <A href="http://www.gtk.org/faq/#AEN835">About GDK</A>
<DD>
<DL>
<DT>7.1. <A href="http://www.gtk.org/faq/#AEN837">What is GDK?</A>
<DT>7.2. <A href="http://www.gtk.org/faq/#AEN840">How do I use color
allocation?</A></DT></DL>
<DT>8. <A href="http://www.gtk.org/faq/#AEN844">About GLib</A>
<DD>
<DL>
<DT>8.1. <A href="http://www.gtk.org/faq/#AEN846">What is GLib?</A>
<DT>8.2. <A href="http://www.gtk.org/faq/#AEN863">How can I use the
doubly linked lists?</A>
<DT>8.3. <A href="http://www.gtk.org/faq/#AEN870">Memory does not seem
to be released when I free the list nodes I've allocated</A>
<DT>8.4. <A href="http://www.gtk.org/faq/#AEN877">Why use g_print,
g_malloc, g_strdup and fellow glib functions?</A>
<DT>8.5. <A href="http://www.gtk.org/faq/#AEN887">What's a GScanner
and how do I use one?</A></DT></DL>
<DT>9. <A href="http://www.gtk.org/faq/#AEN926">GTK+ FAQ Contributions,
Maintainers and Copyright</A></DT></DL></DIV>
<DIV class=CHAPTER>
<HR>
<H1><A name=AEN18>Chapter 1. General Information</A></H1>
<DIV class=TOC>
<DL>
<DT><B>Table of Contents</B>
<DT>1.1. <A href="http://www.gtk.org/faq/#AEN20">Before anything else:
the greetings</A>
<DT>1.2. <A href="http://www.gtk.org/faq/#AEN45">Authors</A>
<DT>1.3. <A href="http://www.gtk.org/faq/#AEN56">What is GTK+?</A>
<DT>1.4. <A href="http://www.gtk.org/faq/#AEN60">What is the + in
GTK+?</A>
<DT>1.5. <A href="http://www.gtk.org/faq/#AEN65">Does the G in GTK+, GDK
and GLib stand for?</A>
<DT>1.6. <A href="http://www.gtk.org/faq/#AEN70">Where is the
documentation for GTK+?</A>
<DT>1.7. <A href="http://www.gtk.org/faq/#AEN89">Is there a mailing list
(or mailing list archive) for GTK+?</A>
<DT>1.8. <A href="http://www.gtk.org/faq/#AEN93">How to get help with
GTK+</A>
<DT>1.9. <A href="http://www.gtk.org/faq/#AEN96">How to report bugs in
GTK+</A>
<DT>1.10. <A href="http://www.gtk.org/faq/#AEN111">Is there a Windows
version of GTK+?</A>
<DT>1.11. <A href="http://www.gtk.org/faq/#AEN116">What applications
have been written with GTK+?</A>
<DT>1.12. <A href="http://www.gtk.org/faq/#AEN142">I'm looking for an
application to write in GTK+. How about an IRC client?</A></DT></DL></DIV>
<DIV class=SECT1>
<H1 class=SECT1><A name=AEN20>1.1. Before anything else: the
greetings</A></H1>
<H4 class=sect1>Before anything else: the greetings</H4>
<P>The FAQ authors want to thank:</P>
<P></P>
<UL compact>
<LI><SPAN>Havoc Pennington</SPAN>
<LI><SPAN>Erik Mouw</SPAN>
<LI><SPAN>Owen Taylor</SPAN>
<LI><SPAN>Tim Janik</SPAN>
<LI><SPAN>Thomas Mailund Jensen</SPAN>
<LI><SPAN>Joe Pfeiffer</SPAN>
<LI><SPAN>Andy Kahn</SPAN>
<LI><SPAN>Federico Mena Quntero</SPAN>
<LI><SPAN>Damon Chaplin</SPAN>
<LI><SPAN>and all the members of the GTK+ lists</SPAN></LI></UL>
<P>If we forgot you, please email us! Thanks again (I know, it's really
short :) </P></DIV>
<DIV class=SECT1>
<HR>
<H1 class=SECT1><A name=AEN45>1.2. Authors</A></H1>
<H4 class=sect1>Authors</H4>
<P>The original authors of GTK+ were:</P>
<P></P>
<UL compact>
<LI><SPAN>Peter Mattis</SPAN>
<LI><SPAN>Spencer Kimball</SPAN>
<LI><SPAN>Josh MacDonald</SPAN></LI></UL>
<P>Since then, much has been added by others. Please see the AUTHORS file
in the distribution for the GTK+ Team.</P></DIV>
<DIV class=SECT1>
<HR>
<H1 class=SECT1><A name=AEN56>1.3. What is GTK+?</A></H1>
<H4 class=sect1>What is GTK+?</H4>
<P>GTK+ is a small and efficient widget set designed with the general look
and feel of Motif. In reality, it looks much better than Motif. It
contains common widgets and some more complex widgets such as a file
selection, and color selection widgets.</P>
<P>GTK+ provides some unique features. (At least, I know of no other
widget library which provides them). For example, a button does not
contain a label, it contains a child widget, which in most instances will
be a label. However, the child widget can also be a pixmap, image or any
combination possible the programmer desires. This flexibility is adhered
to throughout the library.</P></DIV>
<DIV class=SECT1>
<HR>
<H1 class=SECT1><A name=AEN60>1.4. What is the + in GTK+?</A></H1>
<H4 class=sect1>What is the + in GTK+?</H4>
<P>Peter Mattis informed the gtk mailing list that:</P>
<P><SPAN class=QUOTE>"I originally wrote gtk which included the three
libraries, libglib, libgdk and libgtk. It featured a flat widget
hierarchy. That is, you couldn't derive a new widget from an existing one.
And it contained a more standard callback mechanism instead of the signal
mechanism now present in gtk+. The + was added to distinguish between the
original version of gtk and the new version. You can think of it as being
an enhancement to the original gtk that adds object oriented
features."</SPAN></P></DIV>
<DIV class=SECT1>
<HR>
<H1 class=SECT1><A name=AEN65>1.5. Does the G in GTK+, GDK and GLib stand
for?</A></H1>
<H4 class=sect1>Does the G in GTK+, GDK and GLib stand for?</H4>
<P>GTK+ == Gimp Toolkit</P>
<P>GDK == GTK+ Drawing Kit</P>
<P>GLib == G Libray</P></DIV>
<DIV class=SECT1>
<HR>
<H1 class=SECT1><A name=AEN70>1.6. Where is the documentation for
GTK+?</A></H1>
<H4 class=sect1>Where is the documentation for GTK+?</H4>
<P>In the GTK+ distribution's doc/ directory you will find the reference
material for both GTK and GDK, this FAQ and the GTK Tutorial.</P>
<P>In addition, you can find links to HTML versions of these documents by
going to <A target=_top
href="http://www.gtk.org/">http://www.gtk.org/</A>. A packaged version of
the GTK Tutorial, with SGML, HTML, Postscript, DVI and text versions can
be found in <A target=_top
href="ftp://ftp.gtk.org/pub/gtk/tutorial">ftp://ftp.gtk.org/pub/gtk/tutorial</A></P>
<P>There are now a couple of books available that deal with programming
GTK+, GDK and GNOME:</P>
<P></P>
<UL>
<LI>
<P>Eric Harlows book entitled "Developing Linux Applications with GTK+
and GDK". The ISBN is 0-7357-0021-4</P>
<LI>
<P>The example code from Eric's book is available on-line at <A
target=_top
href="http://www.bcpl.net/~eharlow/book">http://www.bcpl.net/~eharlow/book</A></P>
<LI>
<P>Havoc Pennington has released a book called "GTK+/GNOME Application
Development". The ISBN is 0-7357-0078-8</P>
<P>The free version of the book lives here: <A target=_top
href="http://developer.gnome.org/doc/GGAD/">http://developer.gnome.org/doc/GGAD/</A></P>
<P>And Havoc maintains information about it and errata here: <A
target=_top
href="http://pobox.com/~hp/gnome-app-devel.html">http://pobox.com/~hp/gnome-app-devel.html</A></P></LI></UL></DIV>
<DIV class=SECT1>
<HR>
<H1 class=SECT1><A name=AEN89>1.7. Is there a mailing list (or mailing
list archive) for GTK+?</A></H1>
<H4 class=sect1>Is there a mailing list (or mailing list archive) for
GTK+?</H4>
<P>Information on mailing lists relating to GTK+ can be found at: <A
target=_top
href="http://www.gtk.org/mailinglists.html">http://www.gtk.org/mailinglists.html</A></P></DIV>
<DIV class=SECT1>
<HR>
<H1 class=SECT1><A name=AEN93>1.8. How to get help with GTK+</A></H1>
<H4 class=sect1>How to get help with GTK+</H4>
<P>First, make sure your question isn't answered in the documentation,
this FAQ or the tutorial. Done that? You're sure you've done that, right?
In that case, the best place to post questions is to the GTK+ mailing
list.</P></DIV>
<DIV class=SECT1>
<HR>
<H1 class=SECT1><A name=AEN96>1.9. How to report bugs in GTK+</A></H1>
<H4 class=sect1>How to report bugs in GTK+</H4>
<P>Bugs should be reported to the GNOME bug tracking system (<A
target=_top
href="http://bugzilla.gnome.org/">http://bugzilla.gnome.org/</A>). You
will need to enter your email address and receive a password before you
can use the system to register a new bug report.</P>
<P>There are a number of options to select and boxes to fill in when
submitting a bug report. Please remember that the more information you
give, the easier it will be to track the problem down. Extra information
that may prove useful includes:</P>
<P></P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -