diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-09-29 19:32:03 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-09-29 19:32:03 +0200 |
commit | 624bab4dd36e1bea09c27a67f1ff0a3b983f1ac1 (patch) | |
tree | 2fc93406fb732d9e15d17ab9d6b00616eb282266 /tools/glade/doc/C | |
parent | e041da40b7fe9bebd76dc04f25b0c345986d9ad0 (diff) |
added our glade fork
Diffstat (limited to 'tools/glade/doc/C')
26 files changed, 3212 insertions, 0 deletions
diff --git a/tools/glade/doc/C/Makefile.am b/tools/glade/doc/C/Makefile.am new file mode 100644 index 00000000..7bd38ae0 --- /dev/null +++ b/tools/glade/doc/C/Makefile.am @@ -0,0 +1,2 @@ + +SUBDIRS = glade-faq glade-user-guide diff --git a/tools/glade/doc/C/glade-faq/Makefile.am b/tools/glade/doc/C/glade-faq/Makefile.am new file mode 100644 index 00000000..62e77106 --- /dev/null +++ b/tools/glade/doc/C/glade-faq/Makefile.am @@ -0,0 +1,7 @@ +docname = glade-faq +figs = +lang = C +omffile = glade-faq-C.omf +entities = legal.xml +include $(top_srcdir)/doc/xmldocs.make +dist-hook: app-dist-hook diff --git a/tools/glade/doc/C/glade-faq/glade-faq-C.omf b/tools/glade/doc/C/glade-faq/glade-faq-C.omf new file mode 100644 index 00000000..172d5cf4 --- /dev/null +++ b/tools/glade/doc/C/glade-faq/glade-faq-C.omf @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<omf> + <resource> + <creator> + damon@gnome.org (Damon Chaplin) + </creator> + <title> + Glade FAQ + </title> + <date> + 2004-03-17 + </date> + <subject category="GNOME|Applications|Programming"/> + <description> + Frequently Asked Questions list for the Glade application. + </description> + <format mime="text/xml" dtd="-//OASIS//DTD DocBook XML V4.1.2//EN"/> + <identifier url="glade-faq.xml"/> + <language code="C"/> + <relation seriesid="2619c82a-a636-11d6-8522-d29c286dcc64"/> + <rights type="GNU FDL" license.version="1.1" holder="Damon Chaplin"/> + </resource> +</omf> diff --git a/tools/glade/doc/C/glade-faq/glade-faq.xml b/tools/glade/doc/C/glade-faq/glade-faq.xml new file mode 100644 index 00000000..a668e23b --- /dev/null +++ b/tools/glade/doc/C/glade-faq/glade-faq.xml @@ -0,0 +1,910 @@ +<?xml version="1.0"?> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<!ENTITY legal SYSTEM "legal.xml"> +<!ENTITY date "Mar. 30, 2002"> <!-- date the manual was last updated --> +<!ENTITY app "<application>Glade</application>"> +]> + +<article id="index" lang="en"> + + <articleinfo> + <title>Glade FAQ</title> + <copyright> + <year>2000</year> + <holder>Damon Chaplin</holder> + </copyright> + + <publisher> + <publishername> + GNOME Documentation Project + </publishername> + </publisher> + + &legal; + + <legalnotice id="feedback"> + <title>Feedback Information</title> + <para> + To report a bug or make a suggestion regarding this + application or this documentation, please see the + <ulink type="help" + url="ghelp:gnome-feedback">GNOME Feedback Page</ulink>. + </para> + </legalnotice> + + <authorgroup> + <author> + <firstname>Damon</firstname> + <surname>Chaplin</surname> + </author> + </authorgroup> + + <revhistory> + + <revision> + <revnumber>1.0</revnumber> + <date>11 May 2000</date> <!-- or use &date; --> + <revdescription> + <para role="author">Damon Chaplin + <email>damon@gnome.org</email></para> + <para role="publisher">GNOME Documentation Project</para> + </revdescription> + + </revision> + + </revhistory> + <releaseinfo> + This is the Glade FAQ. It was last updated on &date;. + </releaseinfo> + + </articleinfo> + + + <!-- ============= General Information About Glade =========== --> + + <sect1 id="general"> + <title>General Information</title> + + <sect2><title> + What documentation is there for Glade? + </title> + + <para> + In the GNOME version of Glade the Glade Manual and this FAQ should be +available from the Help menu. + </para> + <para> +There are a few other tutorials and guides available on the Internet, +in several languages. Links to these can be found on Glade's website at +<ulink url="http://glade.gnome.org" type="http">glade.gnome.org</ulink>. + </para> + + </sect2> + + <sect2><title> + Is there any example code? + </title> + + <para> +Glade includes a simple text editor example application in the examples/editor +directory. If you have a binary-only package of Glade, these files have +probably not been installed, so you'll need to download the Glade source +code from +<ulink url="http://glade.gnome.org" type="http">glade.gnome.org</ulink>. + </para> + <para> +The website also contains links to quite a few applications created using Glade. +These may contain useful example code. See the 'Applications' page on +<ulink url="http://glade.gnome.org" type="http">glade.gnome.org</ulink>. + </para> + + </sect2> + + <sect2><title> + Do I have to use a particular license for the C code generated by Glade? + </title> + + <para> +No. You are free to use whatever license you like for the C code generated +by Glade. + </para> + <para> +Though in the spirit of free software we do encourage you to use the GPL or +LGPL licenses. + </para> + + </sect2> + + <sect2><title> + Which is better - generated C code or libglade? + </title> + + <para> +For large projects libglade is recommended over generated C code. +You can keep each window or dialog in a separate XML file, which makes it +more manageable for large projects with multiple developers. + </para> + <para> +If you do want to use generated C code for large projects, I'd still suggest +keeping each window or dialog in a separate XML file. You can change the +project options so that the C code is output into separate files for each +window or dialog (e.g. change <filename>interface.c</filename> to +<filename>main_window.c</filename>), and turn +off all the 'File Output' options. + </para> + + </sect2> + + <sect2><title> +How do I port a GTK+ 1.2 or GNOME 1.4 project to GTK+/GNOME 2.0. + </title> + + <para> +libglade includes a script called libglade-convert which will convert an +old GTK+ 1.2 or GNOME 1.4 Glade XML file to the new GTK+/GNOME 2.0 format. + </para> + <para> +However, for GTK+ applications there is currently a slight problem with this. +You need to: + (1) Convert the XML file with libglade-convert. + (2) Open the new file in Glade and save it immediately. This will create + the project options file with the same name as the XML file but with + a 'p' on the end. + (3) Add '<gnome_support>FALSE</gnome_support>' + to the project options file, so Glade knows it is a GTK+ project. + </para> + + </sect2> + + </sect1> + + <!-- ============= Creating A User Interface In Glade ======== --> + + <sect1 id="creating"> + <title>Creating A User Interface</title> + + <sect2><title> + When I add a widget to a window, it fills the whole window and I + can't add any other widgets. + </title> + + <para> + This is not a bug in <application>Glade</application>! In GTK+ + you use containers to lay out your widgets. The commonly-used + containers are at the bottom of the main page on the + palette. Try adding a vertical box to a window in + <application>Glade</application>. Now add a table to one of the + positions in the vertical box. Do you get the idea now? + </para> + <para> + If you really want to position widgets at specific coordinates, + try the Fixed container. However, this isn't recommended since + your windows/dialogs will not look good when resized, and if + you translate the text in the labels and buttons into other + languages they may not fit. + </para> + + </sect2> + + <sect2><title> + How do I change the colors of a widget, e.g. make a label red? + </title> + + <para> +In GTK+ 2 there are new convenience functions to change some of the style +properties of a widget, e.g. you can use gtk_widget_modify_fg() to set the +foreground color of a widget. + </para> + <para> +It is also possible to use GTK+ rc files to set the colors & fonts of +your widgets. +If you turn on the 'Set Widget Names' project option in Glade, that may make +it easier to refer to your widgets, as you can refer to them by name. +See the GTK+ Resource Files documentation at <ulink +url="http://developer.gnome.org/doc/API/gtk/index.html" +type="http">developer.gnome.org/doc/API/gtk/index.html</ulink>. + </para> + <para> +You can also change a widget's style within your code by calling +gtk_widget_modify_style(), e.g. + <programlisting> + GdkColor red = { 0, 65535, 0, 0 }; + GtkRcStyle *rc_style = gtk_rc_style_new (); + rc_style->fg[GTK_STATE_NORMAL] = red; + rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_FG; + gtk_widget_modify_style (widget, rc_style); + gtk_rc_style_unref (rc_style); + </programlisting> + </para> + + </sect2> + + <sect2><title> + How do I add a pixmap to a button? + </title> + + <para> + Create a button and select <guilabel>Remove Label</guilabel> + from the popup menu. You can then add any widgets you like to + the button, e.g. a horizontal box with a pixmap and a label + inside it. (<application>Glade</application> may make this even + easier in future.) + </para> + + </sect2> + + <sect2><title> + How do I add several widgets of the same type in one go? + </title> + + <para> + Hold the 'Control' key when you select the widget in the + <interface>Palette</interface>. It will then stay selected until + you select another widget or the + <interface>Selector</interface>. + </para> + + </sect2> + + <sect2><title> + I get this warning whenever I use a scrolled window: + Gtk-WARNING **: <errorname>gtk_scrolled_window_add(): cannot add + non scrollable widget use + gtk_scrolled_window_add_with_viewport() instead</errorname> + </title> + + <para> + You can safely ignore this warning. It is output by GTK+ to + remind people to update their code, since the behaviour of + scrolled windows changed quite a bit between GTK+ 1.0 and GTK+ + 1.2. But the <application>Glade</application> code is OK. The + warning should not appear in your final application. + </para> + + </sect2> + + <sect2><title> + What graphics formats does Glade support? + </title> + + <para> +GTK+ 2.0 includes the gdk-pixbuf library which provides support for many +graphics formats, including PNG, TIFF, BMP, JPEG and XPM files. + </para> + <para> +You can convert images between formats using the GIMP graphics +application or the 'convert' utility in the ImageMagick toolkit. + </para> + + </sect2> + + <sect2><title> + How do I add a signal handler? + </title> + + <para> +Follow these steps: + <itemizedlist> + <listitem> + <para> +Select the widget you want to add the handler to. + </para> + </listitem> + <listitem> + <para> +Select the 'Signals' page in the Property Editor window. + </para> + </listitem> + <listitem> + <para> +Click the '...' button to the right of the 'Signal:' field. This should + show a popup window listing the signals that this widget emits. + </para> + </listitem> + <listitem> + <para> +In the popup window, select which signal you want to connect a handler for + and hit the 'OK' button. + </para> + </listitem> + <listitem> + <para> +Glade automatically creates a name for the signal handler function in the + 'Handler:' field, but you are free to change this if you desire. + </para> + </listitem> + <listitem> + <para> +Click the 'Add' button to add it to the list of signal handlers for this + widget. + </para> + </listitem> + </itemizedlist> + </para> + <para> +When you generate the C source code, an empty signal handler function should +be output in the callbacks.c file. You can add your code to this function. + </para> + + </sect2> + + </sect1> + + + <!-- ============= Building The C Code Generated By Glade ====== --> + <sect1 id="building"> + <title>Building The C Code</title> + + <sect2><title> + How do I build the code generated by Glade? + </title> + + <para> + You need <application>automake</application> >= 1.4 & + <application>autoconf</application> >= 2.52 to build the generated + C code. You also need <application>gettext</application> >= + 0.10.40 if you enabled <application>gettext</application> + support. See the <citetitle>Requirements</citetitle> section in + the <filename>README</filename> file for links to these. + </para> + <para> + Run <command>./autogen.sh</command> in the toplevel directory of + the project to run <application>automake</application>, + <application>autoconf</application> and the related utilities to + build the <filename>Makefile</filename>'s. Pass it any options + you want passed to configure, e.g. <command>./autogen.sh + --prefix /usr/local/gnome</command>. + </para> + <para> + Then run <command>make</command> to build your application. + </para> + <para> + You you must also do a <command>make install</command> so that the + pixmaps are + installed properly. If you don't do that, it will still run, but + you won't see the pixmaps. + </para> + + </sect2> + + <sect2><title> + I get this error: + aclocal: configure.in: 10: <errorname>macro `AM_PATH_GTK' not + found in library</errorname> + </title> + + <para> + This means that the <filename>gtk.m4</filename> file cannot be + found. (<filename>gtk.m4</filename> is a set of m4 macros which + is installed as part of GTK+ and is used to build programs + which use GTK+.) <application>aclocal</application> (part of + <application>automake</application>) searches for these macros + to add to <filename>aclocal.m4</filename> in your program's root + directory. + </para> + <para> + To find out whereabouts GTK+ is installed, run + <command>pkg-config --cflags gtk+-2.0</command>. + The <filename>gtk.m4</filename> file should + be in the <filename class="directory">share/aclocal</filename> + subdirectory rather than the + <filename class="directory">include</filename> subdirectory. + To find out the directory that + <application>aclocal</application> is using, run + <command>aclocal --print-ac-dir</command>. + </para> + <para> + You should add the directory that the GTK+ m4 file is installed + to the <varname>ACLOCAL_FLAGS</varname> environment variable, + e.g. if the GTK+ m4 files are in <filename + class="directory">/usr/local/share/aclocal</filename>, then add + this to your <filename>$HOME/.profile</filename>: + <command>export ACLOCAL_FLAGS="-I + /usr/local/share/aclocal/"</command>. + </para> + + </sect2> + + <sect2><title> + I get this error: + ** CRITICAL **: file glade_gnome.c: line 939 + (glade_gnome_write_menu_item_source): + assertion `source_buffer != NULL' failed. + </title> + + <para> + You are trying to use Gnome stock menu items in a GTK+-only app. + Edit any menus you have and make sure the "Stock" property is set to + "None" for every item. + </para> + <para> +This shouldn't happen in the new version of Glade, as it prevents you from +using GNOME features in GTK+ applications. + </para> + + </sect2> + + </sect1> + + <!-- ============= Using The C Code Generated By Glade ====== --> + <sect1 id="using"> + <title>Using The C Code</title> + + <sect2><title> + What are all the files output by Glade? + </title> + + <para> + These are the default output files, but some of your file names + may differ if you have changed the project options. + </para> + + <formalpara> + <title> + <filename>autogen.sh</filename> + </title> + <para> + A script which runs <application>automake</application>, + <application>autoconf</application> and the related programs in + the correct order, making it very easy to build the + application. You pass it any arguments you want to be passed + to <application>configure</application>. After running it, you + can type <command>make</command> to build the application. + </para> + </formalpara> + + <formalpara> + <title> + <filename>configure.in</filename> + </title> + <para> + Standard script passed to <application>autoconf</application> + to generate the configure script. + </para> + </formalpara> + + <formalpara> + <title> + <filename>Makefile.am</filename> + </title> + <para> + Standard make rules passed to automake to generate the + <filename>Makefile.in</filename>, which the configure script + turns into <filename>Makefile</filename>. + </para> + </formalpara> + + <formalpara> + <title> + <filename>stamp-h.in</filename> + </title> + <para> + Used as a timestamp by <application>automake</application>, for + rebuilding some generated files. + </para> + </formalpara> + + <formalpara> + <title> + <filename>AUTHORS</filename>, <filename>ChangeLog</filename>, + <filename>NEWS</filename>, <filename>README</filename> + </title> + <para> + These files are all initially empty, but are created to comply + with the GNU conventions. + </para> + </formalpara> + + <formalpara> + <title> + <filename>src/Makefile.am</filename> + </title> + <para> + Standard automake file. + </para> + </formalpara> + + <formalpara> + <title> + <filename>src/main.c</filename> + </title> + <para> + Contains the <function>main</function>() function which will + create one of each window/dialog for you. + </para> + </formalpara> + + <formalpara> + <title> + <filename>src/interface.h</filename> + </title> + <para> + Declarations of functions you can call to create the windows + and dialogs which were built in + <application>Glade</application>. + </para> + </formalpara> + + <formalpara> + <title> + <filename>src/interface.c</filename> + </title> + <para> + The code to create the windows and dialogs and all the widgets. + </para> + </formalpara> + + <formalpara> + <title> + <filename>src/callbacks.h</filename> + </title> + <para> + Declarations of the signal handler and callback functions which + you will write. + </para> + </formalpara> + + <formalpara> + <title> + <filename>src/callbacks.c</filename> + </title> + <para> + Tthe signal handler and callback functions. + </para> + </formalpara> + + <formalpara> + <title> + <filename>src/support.h</filename> + </title> + <para> + Declarations of some support functions, including + <function>lookup_widget</function>() which you can use to get + pointers to widgets. + </para> + </formalpara> + + <formalpara> + <title> + <filename>src/support.c</filename> + </title> + <para> + The support functions. + </para> + </formalpara> + + <para> + If <application>gettext</application> support is enabled, the + <filename class="directory">po</filename> directory is created, + with <filename>POTFILES.in</filename> and a separate + <filename>ChangeLog</filename>. <filename>POTFILES.in</filename> + lists the source files which contain translatable strings, and + you should add any source files you create here. + </para> + + <para> + <note> + <title>Changing the GNOME and Gettext Support Options</title> + <para> + If you change the <guilabel>Gnome Support</guilabel> or + <guilabel>Gettext Support</guilabel> project options after + building the project, you will need to update some of the + build files such as <filename>configure.in</filename> and + <filename>Makefile.am</filename>. The best solution may be to + change the project directory in the <interface>Project + Options</interface> dialog, and to rebuild the project from + scratch. However, you would have to copy over any code you + have added to signal handlers. An alternative would be to + delete <filename>autogen.sh</filename>, + <filename>configure.in</filename>, + <filename>Makefile.am</filename>, + <filename>src/Makefile.am</filename>, and + <filename>src/main.c</filename> and use + <application>Glade</application> to recreate them. But if you + have changed these files you will need to add the changes back + in. (Hopefully <application>Glade</application> will deal + with this better in future.) + </para> + </note> + </para> + + </sect2> + + <sect2><title> + What files can the developer edit safely and which files are + overwritten? + </title> + + <para> + <application>Glade</application> will not overwrite most of the + files. It will recreate the build files if they don't exist (and + the corresponding project option is set.) + </para> + <para> + The files which <application>Glade</application> overwrites are: + <filename>interface.h</filename>, + <filename>interface.c</filename>, + <filename>support.h</filename>, and + <filename>support.c</filename>. + (Though you may have named them differently in your project, if + you changed them in the <interface>Project Options</interface> + dialog.) + </para> + <para> + These files all have a warning at the top saying <quote>DO NOT + EDIT</quote>. + </para> + <para> + If you have added or updated any signal handlers, then these are + appended to the <filename>callbacks.h</filename> and + <filename>callbacks.c</filename> files. So any code you have + already added for callbacks is completely safe! If you have + renamed a handler function then it is up to you to remove the + old version and copy any code to the new function. + </para> + + </sect2> + + <sect2><title> + How do I add my own source files to the project? + </title> + + <para> + Add the source file (and any header file) to + <filename>src/Makefile.am</filename>, in the + <varname><replaceable>project1</replaceable>_SOURCES</varname> + variable (where <replaceable>project1</replaceable> is the name + of your project). + </para> + <para> + If you are using <application>gettext</application>, you may + also want to add the source file to + <filename>po/POTFILES.in</filename> so that the strings can be + translated. + </para> + + </sect2> + + <sect2><title> + How do I add a library to the project? + </title> + + <para> +You need to add a test for the library in your project's configure.in file, +making sure that the CPPFLAGS and LIBS are updated to account for the library. +(The CPPFLAGS variable should contain any -I flags to pass to the C +preprocessor, and the LIBS variable should contain the -l and -L options to +pass to the linker.) + </para> + <para> +autoconf provides macros such as AC_CHECK_HEADER and AC_CHECK_LIB which can +be used to check for general headers and libraries. + </para> + <para> +Many GTK+ and Gnome libraries provide a config script such as gtk-config +which will output the CPPFLAGS and LIBS flags needed. + </para> + <para> +For example, libxml provides an xml-config script which you can use like this: + <programlisting> + dnl Get libxml flags & libs + AC_PATH_PROG(xml_config, xml-config) + if test "x$xml_config" = "x"; then + AC_MSG_ERROR([*** xml-config not found.]) + fi + + XML_CFLAGS=`$xml_config --cflags 2>/dev/null` + XML_LIBS=`$xml_config --libs 2>/dev/null` + CPPFLAGS="$CPPFLAGS $XML_CFLAGS" + LIBS="$LIBS $XML_LIBS" + </programlisting> + </para> + <para> +Make sure you place your configure.in test before the call to AC_OUTPUT. + </para> + + </sect2> + + <sect2><title> + How do I get a pointer to a widget from within a signal handler? + </title> + + <para> + Use the <function>lookup_widget</function>() function + provided. (It can be found in <filename>support.c</filename>.) + </para> + <para> + You pass it a pointer to any widget in a window, and the name of + the widget that you want to get. Usually in signal handlers you + can use the first argument to the signal handler as the first + parameter to <function>lookup_widget</function>(), e.g. + <programlisting> +void +on_button1_clicked (GtkButton *button, + gpointer user_data) +{ + GtkWidget *entry1; + + entry1 = lookup_widget (GTK_WIDGET (button), "entry1"); + + ... +} + </programlisting> + </para> + <para> + Note that this does not work if you are using libglade. The corresponding + code for libglade would be: + <programlisting> + +void +on_button1_clicked (GtkButton *button, + gpointer user_data) +{ + GladeXML* xml; + GtkWidget* entry1; + + xml = glade_get_widget_tree (GTK_WIDGET (button1)); + entry1 = glade_xml_get_widget (xml, "entry1"); + + ... +} + </programlisting> + </para> + + </sect2> + + <sect2><title> + How do I get a pointer to a widget in another window? + </title> + + <para> +You need to keep track of pointers to all your toplevel windows. +For simple applications you can just use global variables to store these +pointers. + </para> + <para> +For more complicated applications you can use +<function>gtk_object_set_data</function>() and the +related functions to store a pointer to one window inside another window. +For example, if you want to create a dialog which needs to access widgets in +the main window you can do this: + <programlisting> + dialog = create_dialog1 (); /* Call the function generated by Glade. */ + gtk_object_set_data (GTK_OBJECT (dialog), "main_window", main_window); + </programlisting> +Then when you need to access the main window from within the dialog code, +you can do this: + <programlisting> + main_window = gtk_object_get_data (GTK_OBJECT (dialog), "main_window"); + </programlisting> + </para> + <para> +You need to be careful to ensure that the pointer is always valid. +If the window being pointed to is destroyed, make sure you no longer use the +pointer to it or your application may crash. + </para> + + </sect2> + + <sect2><title> + How do I get the value of a GtkOptionMenu? + </title> + + <para> + Call <function>gtk_menu_get_active</function>() with the + GtkOptionMenu's menu to get the currently selected menu + item. You can use <function>g_list_index</function>() to find + its index in the menu: + <programlisting> +void +on_button1_clicked (GtkButton *button, + gpointer user_data) +{ + GtkWidget *option_menu, *menu, *active_item; + gint active_index; + + option_menu = lookup_widget (GTK_WIDGET (button), "optionmenu1"); + menu = GTK_OPTION_MENU (option_menu)->menu; + active_item = gtk_menu_get_active (GTK_MENU (menu)); + active_index = g_list_index (GTK_MENU_SHELL (menu)->children, active_item); + + g_print ("Active index: %i\n", active_index); +}</programlisting> + </para> + + </sect2> + + <sect2 id="gtkoptionmenu"><title> + How do I get a GtkOptionMenu to call a function when it changes? + </title> + + <para> + <application>Glade</application> doesn't support this at + present, but you can set it up manually. + </para> + <para> + When you create the window, get the option menu and connect to + the <quote>deactivate</quote> signal emitted by its menu: + <programlisting> + window1 = create_window1 (); + option_menu = lookup_widget (window1, "optionmenu1"); + gtk_signal_connect (GTK_OBJECT (GTK_OPTION_MENU (option_menu)->menu), + "deactivate", GTK_SIGNAL_FUNC (on_option_selected), + NULL);</programlisting> + </para> + + <para> + Then add a handler to <filename>callbacks.c</filename>. You can + get the index of the selected item just like the previous answer: + <programlisting> +static void +on_option_selected (GtkMenuShell *menu_shell, + gpointer data) +{ + GtkWidget *active_item; + gint item_index; + + active_item = gtk_menu_get_active (GTK_MENU (menu_shell)); + item_index = g_list_index (menu_shell->children, active_item); + + g_print ("In on_option_selected active: %i\n", item_index); +}</programlisting> + </para> + + </sect2> + + <sect2><title> + How do I connect to GtkAdjustment signals? + </title> + + <para> + <application>Glade</application> doesn't support this at + present, but you can set it up manually. + </para> + <para> + When you create the window, get a pointer to the widget + containing the adjustment, and connect to the + <quote>changed</quote> or <quote>value_changed</quote> signals: + <programlisting> + window1 = create_window1 (); + hscale = lookup_widget (window1, "hscale1"); + gtk_signal_connect (GTK_OBJECT (GTK_RANGE (hscale)->adjustment), + "changed", GTK_SIGNAL_FUNC (on_adjustment_changed), + NULL);</programlisting> + + </para> + + </sect2> + + <sect2><title> + How do I add rows to a GtkCList before the window is shown? + </title> + + <para> +After you create the window, using the 'create' function generated by Glade, +use <function>lookup_widget</function>() to get a pointer to the GtkCList +widget, and add the rows as required. e.g. + <programlisting> + GtkWidget *window, *clist; + gchar *row[2]; /* Our GtkCList only has 2 columns. */ + + window = create_window1 (); + clist = lookup_widget (window, "clist1"); + + row[0] = "Hello"; + row[1] = "World"; + gtk_clist_append (GTK_CLIST (clist), row); + + row[0] = "Second"; + row[1] = "Row"; + gtk_clist_append (GTK_CLIST (clist), row); + + gtk_widget_show (window1); + </programlisting> + </para> + + </sect2> + + </sect1> +</article> diff --git a/tools/glade/doc/C/glade-faq/legal.xml b/tools/glade/doc/C/glade-faq/legal.xml new file mode 100644 index 00000000..ac97e1de --- /dev/null +++ b/tools/glade/doc/C/glade-faq/legal.xml @@ -0,0 +1,76 @@ + <legalnotice id="legalnotice"> + <para> + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License (GFDL), Version 1.1 or any later version published + by the Free Software Foundation with no Invariant Sections, + no Front-Cover Texts, and no Back-Cover Texts. You can find + a copy of the GFDL at this <ulink type="help" + url="ghelp:fdl">link</ulink> or in the file COPYING-DOCS + distributed with this manual. + </para> + <para> This manual is part of a collection of GNOME manuals + distributed under the GFDL. If you want to distribute this + manual separately from the collection, you can do so by + adding a copy of the license to the manual, as described in + section 6 of the license. + </para> + + <para> + Many of the names used by companies to distinguish their + products and services are claimed as trademarks. Where those + names appear in any GNOME documentation, and the members of + the GNOME Documentation Project are made aware of those + trademarks, then the names are in capital letters or initial + capital letters. + </para> + + <para> + DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED + UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE + WITH THE FURTHER UNDERSTANDING THAT: + + <orderedlist> + <listitem> + <para>DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR + IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES + THAT THE DOCUMENT OR MODIFIED VERSION OF THE + DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR + A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE + RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE + OF THE DOCUMENT OR MODIFIED VERSION OF THE + DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR + MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY + CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY + SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS + LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED + VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER + EXCEPT UNDER THIS DISCLAIMER; AND + </para> + </listitem> + <listitem> + <para>UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL + THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), + CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, + INITIAL WRITER, ANY CONTRIBUTOR, OR ANY + DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION + OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH + PARTIES, BE LIABLE TO ANY PERSON FOR ANY + DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER + INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS + OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR + MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR + LOSSES ARISING OUT OF OR RELATING TO USE OF THE + DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, + EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF + THE POSSIBILITY OF SUCH DAMAGES. + </para> + </listitem> + </orderedlist> + </para> + </legalnotice> + diff --git a/tools/glade/doc/C/glade-user-guide/Makefile.am b/tools/glade/doc/C/glade-user-guide/Makefile.am new file mode 100644 index 00000000..becc2083 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/Makefile.am @@ -0,0 +1,24 @@ +docname = glade-user-guide +figs = \ + figures/edit-menu.png \ + figures/file-menu.png \ + figures/glade-windows.png \ + figures/grid-options.png \ + figures/help-menu.png \ + figures/menu.png \ + figures/options-c.png \ + figures/options-general.png \ + figures/options-libglade.png \ + figures/settings-menu.png \ + figures/snap-options.png \ + figures/toolbar.png \ + figures/view-menu.png \ + figures/window-main.png \ + figures/window-palette-add.png \ + figures/window-palette-basic.png \ + figures/window-palette-gnome.png +lang = C +omffile = glade-user-guide-C.omf +entities = legal.xml +include $(top_srcdir)/doc/xmldocs.make +dist-hook: app-dist-hook diff --git a/tools/glade/doc/C/glade-user-guide/figures/edit-menu.png b/tools/glade/doc/C/glade-user-guide/figures/edit-menu.png Binary files differnew file mode 100644 index 00000000..e8f24345 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/edit-menu.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/file-menu.png b/tools/glade/doc/C/glade-user-guide/figures/file-menu.png Binary files differnew file mode 100644 index 00000000..816bd9e3 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/file-menu.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/glade-windows.png b/tools/glade/doc/C/glade-user-guide/figures/glade-windows.png Binary files differnew file mode 100755 index 00000000..e72cfb48 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/glade-windows.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/grid-options.png b/tools/glade/doc/C/glade-user-guide/figures/grid-options.png Binary files differnew file mode 100644 index 00000000..3adcb405 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/grid-options.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/help-menu.png b/tools/glade/doc/C/glade-user-guide/figures/help-menu.png Binary files differnew file mode 100644 index 00000000..212575f8 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/help-menu.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/menu.png b/tools/glade/doc/C/glade-user-guide/figures/menu.png Binary files differnew file mode 100644 index 00000000..ae926380 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/menu.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/options-c.png b/tools/glade/doc/C/glade-user-guide/figures/options-c.png Binary files differnew file mode 100644 index 00000000..81e971b4 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/options-c.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/options-general.png b/tools/glade/doc/C/glade-user-guide/figures/options-general.png Binary files differnew file mode 100644 index 00000000..3153c7c4 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/options-general.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/options-libglade.png b/tools/glade/doc/C/glade-user-guide/figures/options-libglade.png Binary files differnew file mode 100644 index 00000000..e8475c6a --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/options-libglade.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/settings-menu.png b/tools/glade/doc/C/glade-user-guide/figures/settings-menu.png Binary files differnew file mode 100644 index 00000000..2c1207ca --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/settings-menu.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/snap-options.png b/tools/glade/doc/C/glade-user-guide/figures/snap-options.png Binary files differnew file mode 100644 index 00000000..ead2654f --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/snap-options.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/toolbar.png b/tools/glade/doc/C/glade-user-guide/figures/toolbar.png Binary files differnew file mode 100644 index 00000000..c37d897c --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/toolbar.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/view-menu.png b/tools/glade/doc/C/glade-user-guide/figures/view-menu.png Binary files differnew file mode 100644 index 00000000..10ecb3ca --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/view-menu.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/window-main.png b/tools/glade/doc/C/glade-user-guide/figures/window-main.png Binary files differnew file mode 100644 index 00000000..b5d01d07 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/window-main.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/window-palette-add.png b/tools/glade/doc/C/glade-user-guide/figures/window-palette-add.png Binary files differnew file mode 100644 index 00000000..17cca3f5 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/window-palette-add.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/window-palette-basic.png b/tools/glade/doc/C/glade-user-guide/figures/window-palette-basic.png Binary files differnew file mode 100644 index 00000000..bccc4484 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/window-palette-basic.png diff --git a/tools/glade/doc/C/glade-user-guide/figures/window-palette-gnome.png b/tools/glade/doc/C/glade-user-guide/figures/window-palette-gnome.png Binary files differnew file mode 100644 index 00000000..c7935868 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/figures/window-palette-gnome.png diff --git a/tools/glade/doc/C/glade-user-guide/glade-user-guide-C.omf b/tools/glade/doc/C/glade-user-guide/glade-user-guide-C.omf new file mode 100644 index 00000000..cd504b07 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/glade-user-guide-C.omf @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<omf> + <resource> + <creator> + docs@gnome.org (GDP) + </creator> + <maintainer> + docs@gnome.org (GDP) + </maintainer> + <title> + Glade Manual V2.1 + </title> + <date> + 2004-06-17 + </date> + <version identifier="2.1" date="2004-06-17" description="Updated for GNOME 2.6, program version 2.0.0"/> + <subject category="GNOME|Applications|Programming"/> + <description> + User manual for the Glade application. + </description> + <type> + user's guide + </type> + <format mime="text/xml" dtd="-//OASIS//DTD DocBook XML V4.1.2//EN"/> + <identifier url="glade-user-guide.xml"/> + <language code="C"/> + <relation seriesid="15c7f60c-3093-11d8-924d-b89741557cdb"/> + <rights type="GNU FDL" license.version="1.1" holder="Sun Microsystems, Michael Vance"/> + </resource> +</omf> diff --git a/tools/glade/doc/C/glade-user-guide/glade-user-guide.xml b/tools/glade/doc/C/glade-user-guide/glade-user-guide.xml new file mode 100644 index 00000000..2d56e103 --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/glade-user-guide.xml @@ -0,0 +1,2064 @@ +<?xml version="1.0"?> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" " +http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ +<!ENTITY app "Glade"> +<!ENTITY appversion "2.0.0"> +<!ENTITY date "17 June 2004"> +<!ENTITY legal SYSTEM "legal.xml"> +<!ENTITY manrevision "2.1"> +]> +<article id="index" lang="en"> + <articleinfo> + <title>&app; Manual V&manrevision;</title> + <copyright> + <year>2004</year> + <year>2003</year> + <holder>Sun Microsystems</holder> + </copyright> + <copyright> + <year>2002</year><year>2000</year> + <holder>Michael Vance</holder> + </copyright> + + <publisher> + <publishername> GNOME Documentation Project</publishername> + </publisher> &legal; + <legalnotice id="feedback"> + <title>Feedback Information</title> + <para> + To report a bug or make a suggestion regarding this +application or this + documentation, see the + <ulink type="help" url="ghelp:gnome-feedback">GNOME +Feedback + Page</ulink>. + </para> + </legalnotice> + <authorgroup> + <author> + <firstname>Sun</firstname> + <surname>GNOME Documentation Team</surname> + <affiliation> + <orgname>Sun Microsystems</orgname> + </affiliation> + </author> + <author> + <firstname>Michael</firstname> + <surname>Vance</surname> + <affiliation> + <orgname>GNOME Documentation Project</orgname> + </affiliation> + </author> + </authorgroup> + <affiliation> + <orgname>GNOME Documentation Project</orgname> + </affiliation> + <revhistory> + <revision> + <revnumber>&app; Manual V&manrevision;</revnumber> + <date>&date;</date> + <revdescription> + <para> + Sun GNOME Documentation Team</para> + <para> + GNOME Documentation Project + </para> + </revdescription> + </revision> + <revision> + <revnumber>&app; User Manual V2.0</revnumber> + <date>25 February 2004</date> + <revdescription> + <para> + Sun GNOME Documentation Team</para> + <para> + GNOME Documentation Project + </para> + </revdescription> + </revision> + <revision> + <revnumber>&app; User Manual V1.2</revnumber> + <date>10 Feb 2004</date> + <revdescription> + <para> + Sun GNOME Documentation Team</para> + <para> + GNOME Documentation Project + </para> + </revdescription> + </revision> + <revision> + <revnumber>&app; User Manual V1.1</revnumber> + <date>30 Mar 2002</date> + <revdescription> + <para role="author"> + Michael Vance</para> + <para role="publisher"> + GNOME Documentation Project</para> + </revdescription> + </revision> + <revision> + <revnumber>&app; User Manual V1.0</revnumber> + <date>11 May 2000</date> + <revdescription> + <para role="author"> + Michael Vance</para> + <para role="publisher"> + GNOME Documentation Project</para> + </revdescription> + </revision> + </revhistory> + <releaseinfo> This manual describes version &appversion; of + &app;.</releaseinfo> + </articleinfo> + + +<!-- INTRODUCTION --> + <sect1 id="introduction"> + <title>Introduction</title> + <para> + The <application>Glade</application> application enables +you to create + graphical user interfaces (GUIs) from the +<application>GTK+</application> and + <application>GNOME</application> libraries. +<application>Glade</application> + enables you to create source code for your GUIs in the +following languages: + </para> + <itemizedlist> + + <listitem> + <para> + Ada</para> + </listitem><listitem> + <para> + C + </para> + </listitem> + <listitem> + <para> + C++ + </para> + </listitem> + </itemizedlist> + <para><application>Glade</application> generates C code by +default. You might have to install additional packages to generate code in +the other languages.</para><para> + You can also use <application>Glade</application> in +conjunction with + <application>libglade</application> to dynamically create +GUIs from the XML + description file that <application>Glade</application> +creates. For large applications, the use of +<application>libglade</application> is recommended rather than C code +generation.</para> + <para> + The <application>GTK+</application> and +<application>GNOME</application> + libraries provide an extensive collection of user interface +building blocks + such as text boxes, dialog labels, numeric entries, check +boxes, and menus. These + building blocks are called +<emphasis>widgets</emphasis>.</para> + <para> + <application>Glade</application> enables you to do the +following tasks in a simple manner:</para><itemizedlist><listitem><para> +Place widgets correctly in a GUI.</para></listitem><listitem><para>Assign +functionality to the widgets.</para></listitem></itemizedlist><para>You + choose widgets from a palette of available widgets, and +place the widgets + into your project. You edit the widget properties in the + <guilabel>Properties</guilabel> window. You also use the + <guilabel>Properties</guilabel> window to add connections +between your + widgets and externally-written code. + </para> + <para> + You can obtain <application>Glade</application> from the +following + locations: + </para> + <variablelist> + <varlistentry> + <term>Glade download site</term> + <listitem> + <para> + Links are provided on the following +<application>Glade</application> + download site for various package formats: +<ulink url="http://glade.gnome.org/download.html" type="http"> +http://glade.gnome.org/download.html</ulink></para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term>GNOME CVS</term> + <listitem> + <para> + For information about how to get +<application>Glade</application> + from the <application>GNOME</application> +CVS server, see the + + <application>GNOME</application> CVS page +at the following location: <ulink url=" +http://developer.gnome.org/tools/cvs.html" type="http"> +http://developer.gnome.org/tools/cvs.html</ulink></para> + </listitem> + </varlistentry> + </variablelist> + <para> + <application>Glade</application> features a +<application>GNOME</application> support option. However, + to use this feature you need to have a recent version of +the + <application>GNOME</application> desktop environment. If +you do not have a recent version of the <application>GNOME</application> +desktop environment, you can + disable the support feature when you compile +<application>Glade</application>. To disable the support feature, include +the following option in the compile command: + <command>--disable-gnome</command>. + </para> + </sect1> + +<!-- GETTING STARTED--> + <sect1 id="getting-started"> + <title>Getting Started</title> + <para> + You can start Glade in the following ways: + </para> + <variablelist> + <varlistentry> + <term>Command line</term> + <listitem> + <para> + Execute the following command: + <command>glade-2</command> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Applications menu</term> + <listitem> + <para>Choose +<menuchoice><guimenu>Applications</guimenu><guisubmenu>Programming</guisubmenu><guimenuitem>Glade +Interface Designer</guimenuitem></menuchoice>.</para> + </listitem> + </varlistentry> + </variablelist> + <para> + When you start <application>Glade</application>, the +following windows appear: + </para> + <para> + <inlinemediaobject> + <imageobject> <imagedata +fileref="figures/glade-windows.png"/> + </imageobject> + </inlinemediaobject> + </para> + <para> + <application>Glade</application> consists of the following +windows:</para> + <variablelist> + <varlistentry> + <term>Glade window</term> + <listitem> +<!-- + <figure> + <title>Main window</title> + <screenshot> + <graphic fileref="figures/window-main.png" +format="PNG" srccredit="mkv"/> + </screenshot> + </figure> + <sect3 id="windows-main-menu"> + <title>Menu</title> + <para> + Menus are documented + <link linkend="menus"> here</link>. + </para> + </sect3> + <sect3 id="windows-main-toolbar"> + <title>Toolbar</title> + <para> + The toolbar is documented + <link linkend="toolbar"> here</link>. + </para> + </sect3> +--> + <para> + The + <guilabel>Glade</guilabel> window contains +a menubar and a toolbar. + You can use either the menubar or the +toolbar to work with projects. This + manual documents functionality from the +menubar. The + <guilabel>Glade</guilabel> window also +contains a list of the top-level + widgets that are defined for the current +project. + </para> +<!-- + <itemizedlist> + <listitem> + <para> + <structname>GtkWindow</structname> + </para> + </listitem> + <listitem> + <para> + <structname>GtkDialog</structname> + </para> + </listitem> + <listitem> + <para> + <structname>GtkFileSelection</structname> + </para> + </listitem> + <listitem> + <para> + <structname>GtkColorSelectionDialog</structname> + </para> + </listitem> + <listitem> + <para> + <structname>GtkFontSelectionDialog</structname> + </para> + </listitem> + <listitem> + <para> + <structname>GtkInputDialog</structname> + </para> + </listitem> + <listitem> + <para> + <structname>GnomeApp</structname> + </para> + </listitem> + <listitem> + <para> + <structname>GnomeDialog</structname> + </para> + </listitem> + <listitem> + <para> + <structname>GnomeMessageBox</structname> + </para> + </listitem> + <listitem> + <para> + <structname>GnomeAbout</structname> + </para> + </listitem> + <listitem> + <para> + <structname>GnomePropertyBox</structname> + </para> + </listitem> + </itemizedlist> +--> + </listitem> + </varlistentry> + <varlistentry> + <term>Palette window</term> + <listitem> + <para> + The + <guilabel>Palette</guilabel> window +contains the widgets that you + can use to build an interface. You add +widgets from the + <guilabel>Palette</guilabel> window to your +project.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>Properties window</term> + <listitem> + <para> + The + <guilabel>Properties</guilabel> window +enables you to manipulate + the properties of widgets, such as their +size, color, signal masks, and so on.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>Widget Tree window</term> + <listitem> + <para> + All widgets in a user interface are +organized into the + <guilabel>Widget Tree</guilabel>. You can +view the path up the tree from a + specific widget to the root widget, or +top-level widget. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Clipboard</term> + <listitem> + <para> + The + <guilabel>Clipboard</guilabel> enables you +to remove items from + your project, and paste items back into +your project. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Project Windows</term> + <listitem> + <para> + These are the windows of the application +that you are designing. + </para> + </listitem> + </varlistentry> + </variablelist> + </sect1> + +<!-- VIEWING PROJECT WINDOWS--> + <sect1 id="menus"> + <title>Viewing Glade Windows</title> + <para> + You can use the + <guimenu>View</guimenu> menu to perform the following +actions: + </para> + <itemizedlist> + <listitem> + <para> + Display hidden windows. + </para> + </listitem> + <listitem> + <para> + Raise obscured windows to the top of the window +stack. + </para> + </listitem> + </itemizedlist> + <sect2 id="view-palette"> + <title>To View the Palette Window</title> + <para>Choose + <menuchoice> + <guimenu>View</guimenu> + <guisubmenu>Show Palette</guisubmenu> + </menuchoice>. + </para> + </sect2> + <sect2 id="view-properties"> + <title>To View the Properties Window</title> + <para>Choose + <menuchoice> + <guimenu>View</guimenu> + <guisubmenu>Show Property Editor</guisubmenu> + </menuchoice>. + </para> + </sect2> + <sect2 id="view-widgets"> + <title>To View the Widget Tree</title> + <para>Choose + <menuchoice> + <guimenu>View</guimenu> + <guisubmenu>Show Widget Tree</guisubmenu> + </menuchoice>. + </para> + </sect2> + <sect2 id="view-menu"> + <title>To View the Clipboard</title> + <para>Choose + <menuchoice> + <guimenu>View</guimenu> + <guisubmenu>Show Clipboard</guisubmenu> + </menuchoice>. + </para> + </sect2> <!-- Toolbar --> +<!-- + <sect2 id="toolbar"> + <title>Toolbar</title> + <figure> + <title>Toolbar</title> + <screenshot> + <graphic fileref="figures/toolbar.png" +format="PNG" srccredit="mkv"/> + </screenshot> + </figure> + <sect3 id="toolbar-open"> + <title>Open</title> + <para> + Corresponds to + <link linkend="file-open-project"> + <command>File:Open</command></link>. + </para> + </sect3> + <sect3 id="toolbar-save"> + <title>Save</title> + <para> + Corresponds to + <link linkend="file-save-project"> + <command>File:Save</command></link>. + </para> + </sect3> + <sect3 id="toolbar-options"> + <title>Options</title> + <para> + Corresponds to + <link linkend="file-project-options"> + <command>File:Project +Options</command></link>. + </para> + </sect3> + <sect3 id="toolbar-build"> + <title>Build</title> + <para> + Corresponds to + <link linkend="file-build-source-code"> + <command>File:Build</command></link>. + </para> + </sect3> + </sect2> +--> + </sect1> + + +<!-- WORKING WITH PROJECTS--> + <sect1 id="working-with-projects"> + <title>Working With Projects</title> + <para> + The typical stages in a <application>Glade</application> +project are as + follows: + </para> + <variablelist> + <varlistentry> + <term> Construct the user interface</term> + <listitem> + <para> + Select the widgets that you require from +the <guilabel>Palette</guilabel> window. Insert the widgets into your +project. Right-click on a widget to view a popup menu from + which you can choose to perform actions on +that widget.</para> + +<note><para>Take care when you + perform actions on widgets that have +children. If you delete the parent widget, + you also delete the children.</para></note> + + + </listitem> + </varlistentry> + <varlistentry> + <term> Refine the widgets</term> + <listitem> + <para> + While you construct the interface, you use +the + <guilabel>Properties</guilabel> window to +manipulate the various settings and dimensions of the widgets. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> Build the source code</term> + <listitem> + <para> + When the interface is finished, you save +the project and build the + source files that generate the user +interface. You can then integrate the + source code with your project logic. The +default language for source code is C.</para> + + </listitem> + </varlistentry> + </variablelist> + <sect2 id="file-new-project"> + <title>To Create a New Project</title> + <para>Perform the following steps to create a new project: + </para> + <orderedlist> + <listitem> + <para>Choose + <menuchoice> + <guimenu>Project</guimenu> + <guisubmenu>New</guisubmenu> + </menuchoice>. + </para> + </listitem> + <listitem> + <para>In the <guilabel>Glade</guilabel> +dialog box, click <guibutton>OK</guibutton>. + </para> + </listitem> + <listitem> + <para>In the <guilabel>New +Project</guilabel> dialog box, click on the appropriate button to select a +new <application>GTK+</application> project or a new +<application>GNOME</application> project. + </para> + </listitem> + <listitem> + <para>In the <guilabel>Palette</guilabel> +window, click on the window widget. + </para> + </listitem> + <listitem> + <para> + You can now add widgets for your +application to the new project window. See <xref +linkend="working-with-widgets"/> for more information about how to use +widgets to build your application interface. + </para> + </listitem> + </orderedlist> + </sect2> + <sect2 id="file-open-project"> + <title>To Open an Existing Project</title> + <para>Choose + <menuchoice> + <guimenu>Project</guimenu> + <guisubmenu>Open</guisubmenu> + </menuchoice>. An <guilabel>Open Project</guilabel> +dialog appears, in + which you specify the filename of the project that you +want to open. </para> + </sect2> + <sect2 id="file-save-project"> + <title>To Save a Project</title> + <para>Choose + <menuchoice> + <guimenu>Project</guimenu> + <guisubmenu>Save</guisubmenu> + </menuchoice>. If this is the first time you are saving +your project, a + <guilabel>Project Options</guilabel> dialog +appears, + containing default values. See <xref +linkend="project-options"/> for more information about setting project +options. +</para> +<para> + If you have previously specified the project settings, + <application>Glade</application> saves your current +project without comment. + </para> + </sect2> + <sect2 id="file-build-source-code"> + <title>To Generate Source Code For Your Project</title> + <para>Choose + <menuchoice> + <guimenu>Project</guimenu> + <guisubmenu>Build</guisubmenu> + </menuchoice>. If this is the first time you are saving +your project, a + <guilabel>Project Options</guilabel> dialog +appears, + containing default values. See <xref +linkend="project-options"/> for more information about setting project +options. +</para> +<para> +If you have previously specified the project + settings, <application>Glade</application> outputs code +without comment. </para> + </sect2> + <sect2 id="file-project-options"> + <title>To Set Project Options</title> + <para>Choose + <menuchoice> + <guimenu>Project</guimenu> + <guisubmenu>Options</guisubmenu> + </menuchoice>. The + + <guilabel>Project Options</guilabel> dialog +appears, + containing default values. If you have previously +specified the project + settings, those settings appear in the + <guilabel>Project Options</guilabel> fields. + See <xref linkend="project-options"/> for more +information about setting project options.</para> + </sect2> + <sect2 id="file-menu"> + <title>To Exit Glade</title> + <para> + Save your project before you exit the application.</para> + <para> + To exit <application>Glade</application>, choose + <menuchoice> + <guimenu>Project</guimenu> + <guisubmenu>Quit</guisubmenu> + </menuchoice>. <application>Glade</application> asks you +if you want to + quit the application, but does not query you to save +unsaved project data. + </para> + </sect2> + </sect1><!-- SETTING PROJECT OPTIONS--> + <sect1 id="project-options"> + <title>Setting Your Project Options</title> + <para> + Use only ASCII characters for names of files and +directories in the + <guilabel>Project Options</guilabel> dialog. Other systems +might use + different character encodings for the names of files and +directories, which can cause + problems. You can set options in the following functional +areas in the + <guilabel>Project Options</guilabel> dialog: + </para> + <itemizedlist> + <listitem> + <para> + <guilabel>General</guilabel> + </para> + </listitem> + <listitem> + <para> + <guilabel>C Options</guilabel> + </para> + </listitem> + <listitem> + <para> + <guilabel>LibGlade Options</guilabel> + </para> + </listitem> + </itemizedlist><!-- General options--> + <sect2 id="project-options-general"> + <title>General</title> + + <!-- Basic options --> + <sect3 id="project-options-general-basic"> + <title>Basic Options</title> + <variablelist> + <varlistentry> + <term>Project Directory</term> + <listitem> + <para> + Enter the location of your project +in this field. + Click on + <guibutton>Browse</guibutton> to +select a location directory + from your file system.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>Project Name</term> + <listitem> + <para> + Type the name of your project in +this text box. When you edit + this information, the program name +and project filename change automatically.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>Program Name</term> + <listitem> + <para> + Type the name of the executable +for your project in this text + box. +<application>Glade</application> uses this executable to generate code for + your project. When you edit this +information, the project file changes automatically.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>Project File</term> + <listitem> + <para> + Type the filename for your project +in this text box. All of + your project information is stored +in this file.</para> + </listitem> + </varlistentry> + </variablelist> + </sect3> <!-- Subdirectories --> + <sect3 id="project-options-general-subdirs"> + <title>Subdirectories</title> + <variablelist> + <varlistentry> + <term>Source Directory</term> + <listitem> + <para> + Use the text box to specify where +you want + <application>Glade</application> +to build source code for the project.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>Pixmaps Directory</term> + <listitem> + <para> + Use the text box to specify where + <application>Glade</application> +can find any image files that are used in the + project.</para> + </listitem> + </varlistentry> + </variablelist> + </sect3> <!-- Language --> + <sect3 id="project-options-general-language"> + <title>Language</title> + <para> + Pick the programming language that you want + <application>Glade</application> to use to build +source code for the project. + </para> + </sect3> + <!-- GNOME Support--> + <sect3> + <title>Enable Gnome Support</title> + <para> + Select this check box if you want +<application>Glade</application> to + build source code that uses the GNOME libraries. + </para> + </sect3> + </sect2> <!-- C Options --> + <sect2 id="c-options"> + <title>C Options</title> + <sect3 id="project-options-c-general"> + <title>General Options</title> + <variablelist> + <varlistentry> + <term>Gettext Support</term> + <listitem> + <para> + Select this option to create code +that supports GNU gettext for + internationalization. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Set Widget Names</term> + <listitem> + <para> + Select this option to create code +to set the names for all + widgets. This feature is useful if +you intend to use <application>GTK+ + </application> calls such as +<function>gtk_widget_path()</function>.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>Backup Source Files</term> + <listitem> + <para> + Select this option to make a +backup of all your source files + when you build new files. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Gnome Help Support</term> + <listitem> + <para> + Select this option to create code +that supports Help in the GNOME desktop environment.</para> + </listitem> + </varlistentry></variablelist> + </sect3> + <sect3 id="project-options-c-file"> + <title>File Output Options</title> + <variablelist> + <varlistentry> + <term>Output <filename>main.c</filename> +File</term> + <listitem> + <para> + Select this option to output a +file named + <filename>main.c</filename>, which +contains a simple bootstrap. The function + called by +<filename>main.c</filename> depends on the status of the + <guilabel>Enable Gnome +Support</guilabel> option: + <informaltable frame="topbot"> + <tgroup cols="2" +colsep="0"><colspec colnum="1" colname="col1" colwidth="1.00*"/><colspec +colnum="2" colname="col2" colwidth="2.07*"/> + <thead> + <row> + <entry +colname="col1"><para>Option Status</para></entry> + <entry +colname="col2"><para>Called Function</para></entry> + </row> + </thead> + <tbody> + <row rowsep="0"> + <entry +colname="col1" rowsep="0"><para>Enabled</para></entry> + <entry +colname="col2" +rowsep="0"><para><function>gnome_init()</function></para></entry> + </row> + <row> + <entry +colname="col1"><para>Not Enabled</para></entry> + <entry +colname="col2"><para><function>gtk_init()</function></para></entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Output Support Functions</term> + <listitem> + <para> + Select this option to output a +file named + <filename>support.c</filename>, +which contains utility functions for various tasks, for example: + </para> + <itemizedlist><listitem><para>Create an +image file.</para></listitem><listitem><para>Look for a widget by +name.</para></listitem></itemizedlist></listitem> + </varlistentry> + <varlistentry> + <term>Output Build Files</term> + <listitem> + <para> + Select this option to output files +to support configuration of your + project through +<function>automake</function> and + <function>autoconf</function>. +This option creates the following files: + </para> + <informaltable frame="topbot"> + <tgroup cols="2"><colspec +colnum="1" colname="col1" colsep="0" colwidth="1.00*"/><colspec colnum="2" +colname="col2" colwidth="2.11*"/> + <thead> + <row> + <entry +colname="col1" colsep="0"><para>Filename</para></entry> + <entry +colname="col2"><para>Description</para></entry> + </row> + </thead> + <tbody> + <row rowsep="0"> + <entry +colname="col1" rowsep="0" colsep="0"> + <para> + <filename>AUTHORS</filename> + </para> + </entry> + <entry +colname="col2"> + <para> + Authorship +file for contributors. + </para> + </entry> + </row> + <row rowsep="0"> + <entry +colname="col1" rowsep="0" colsep="0"> + <para> + <filename>autogen.sh</filename> + </para> + </entry> + <entry +colname="col2"> + <para> + Script +for building a configure script. + </para> + </entry> + </row> + <row rowsep="0"> + <entry +colname="col1" rowsep="0" colsep="0"> + <para> + <filename>ChangeLog</filename> + </para> + </entry> + <entry +colname="col2"> + <para> + Log of +changes you have made in the project. + </para> + </entry> + </row> + <row rowsep="0"> + <entry +colname="col1" rowsep="0" colsep="0"> + <para> + <filename>configure.in</filename> + </para> + </entry> + <entry +colname="col2"> + <para> + Template +for building a configure script. + </para> + </entry> + </row> + <row rowsep="0"> + <entry +colname="col1" rowsep="0" colsep="0"> + <para> + <filename>Makefile.am</filename> + </para> + </entry> + <entry +colname="col2"> + <para> + Automake +template for the project. + </para> + </entry> + </row> + <row rowsep="0"> + <entry +colname="col1" rowsep="0" colsep="0"> + <para> + <filename>NEWS</filename> + </para> + </entry> + <entry +colname="col2"> + <para> + Announcements +for new releases. + </para> + </entry> + </row> + <row rowsep="0"> + <entry +colname="col1" rowsep="0" colsep="0"> + <para> + <filename>README</filename> + </para> + </entry> + <entry +colname="col2"> + <para> + Contains +general information about the project. + </para> + </entry> + </row> + <row rowsep="0"> + <entry +colname="col1" rowsep="0" colsep="0"> + <para> + <filename>src/Makefile.am</filename> + </para> + </entry> + <entry +colname="col2"> + <para> + Automake +template for the <filename>src/ </filename> + directory. + </para> + </entry> + </row> + <row rowsep="0"> + <entry +colname="col1" rowsep="0" colsep="0"> + <para> + <filename>stamp-h.in</filename> + </para> + </entry> + <entry +colname="col2"> + <para> + Timestamp +file. + </para> + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </listitem> + </varlistentry> + </variablelist> + </sect3> + <sect3 id="project-options-c-interface"> + <title>Interface Creation Functions</title> + <variablelist> + <varlistentry> + <term>Source File</term> + <listitem> + <para> + Use the text box to specify the +file where you want + <application>Glade</application> +to store the code for the user interface. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Header File</term> + <listitem> + <para> + Use the text box to specify the +name of the file where you want + <application>Glade</application> +to store function prototypes for the user + interface code. + </para> + </listitem> + </varlistentry> + </variablelist> + </sect3> + <sect3 id="project-options-c-signal"> + <title>Signal Handler & Callback Functions</title> + <variablelist> + <varlistentry> + <term>Source File</term> + <listitem> + <para> + Use the text box to specify the +name of the file where you want + <application>Glade</application> +to store signal handler code. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Header File</term> + <listitem> + <para> + Use the text box to specify the +file where you want + <application>Glade</application> +to store function prototypes for signal + handler code. + </para> + </listitem> + </varlistentry> + </variablelist> + </sect3> + <!-- Support Functions--> + <sect3 id="project-options-c-support"> + <title>Support Functions</title> + <variablelist> + <varlistentry> + <term>Source File</term> + <listitem> + <para> + Use the text box to specify the +file where you want + <application>Glade</application> +to store support function code. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Header File</term> + <listitem> + <para> + Use the text box to specify the +file where you + <application>Glade</application> +to store function prototypes for the support + function code. + </para> + </listitem> + </varlistentry> + </variablelist> + </sect3> + </sect2> <!-- Libglade options --> + <sect2 id="libglade-options"> + <title>Libglade Options</title> + <sect3 id="project-options-libglade-trans"> + <title>Save Translatable Strings</title> + <para>This option is deprecated. Use +<application>intltool</application> instead when you want to translate +interfaces designed in Glade.</para> + </sect3> + </sect2> + </sect1> <!-- WORKING WITH WIDGETS--> + <sect1 id="working-with-widgets"> + <title>Working With Widgets</title> + <sect2 id="select-widgets-palette"> + <title>To Select Widgets From the Palette Window</title> + <para> + You can work with the widgets in the + <guilabel>Palette</guilabel> window in the following +ways: + </para> + <variablelist> + <varlistentry> + <term>Selection mode</term> + <listitem> + <para> + To use selection mode, + click on the + <guilabel>Selector</guilabel> arrow. The +pointer changes to an + arrow to indicate that selection mode is +active. In this mode, you use the mouse to select widgets in your project. +You can then use the <guilabel>Properties</guilabel> window to edit the +properties of the widgets. If you hold down the <keycap>Shift</keycap> key +and repeatedly select a widget, the selection cycles through the widget and +all of its parent widgets.</para> +<para>You can also use the widget context menu to select a widget. +Right-click on a widget to open the widget context menu.</para><para>You +can add multiple widgets of a specific type from the +<guilabel>Palette</guilabel> to your project by holding down the +<keycap>Control</keycap> key when you select a widget. You need to click on +the <guilabel>Selector</guilabel> arrow or another widget in the +<guilabel>Palette</guilabel> to return to normal mode.</para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term>Widget placement mode</term> + <listitem> + <para> + To use widget placement mode, select a +widget in the + <guilabel>Palette</guilabel> window. When +you select most widgets, the + pointer changes to a pointer-plus-cross. +You can then place the widget inside containers, + top-level widgets, and so on. After you +place a widget, the mode returns to + selection mode.</para> + </listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term>Top-level placement mode</term> + <listitem> + <para> + To use top level placement mode, select a +defined top-level + widget in the +<application>Palette</application> window. When you select a top-level + widget in the + <guilabel>Palette</guilabel> window, the +widget appears + immediately on your desktop. You can then +edit the widget. After you select a top-level widget, + the mode returns to selection mode. + </para> + </listitem> + </varlistentry> + </variablelist> + </sect2> +<sect2 id="organize-widgets"> +<title>To Organize Widgets In Your Project</title> +<para>You use widget containers, or boxes, to layout and organize widgets +in your project window. You can choose the following widget containers from +the <guilabel>Palette</guilabel> window: +</para> +<itemizedlist> +<listitem><para>Horizontal Box</para> +</listitem><listitem><para>Vertical Box</para></listitem> +<listitem><para>Table</para></listitem> +<listitem><para>Fixed Positions</para></listitem> +<listitem><para>Horizontal Button Box</para></listitem> +<listitem><para>Vertical Button Box</para></listitem> +<listitem><para>Horizontal Panes</para></listitem> +<listitem><para>Vertical Panes</para></listitem> +<listitem><para>Notebook</para></listitem> +<listitem><para>Frame</para></listitem> +<listitem><para>Scrolled Window</para></listitem> +<listitem><para>Viewport</para></listitem> +</itemizedlist> +<para> +You can nest boxes to create complex layout structures. When you create +horizontal and vertical boxes, <application>Glade</application> asks you +how many rows or columns to create initially, though rows and columns can +easily be added or deleted later. +</para> +<para> +When you have created all the boxes you require, you can add specific +widgets like labels, buttons, and more complicated widgets into the boxes. +Notice that <application>Glade</application> packs widgets into the layout +which eliminates a lot of tedious work. The use of boxes enables windows to +change size to accommodate different size labels in different languages +when the application is localized.</para></sect2> + <sect2 id="place-widgets-clipboard"> + <title>To Place a Widget on the Clipboard</title> + <para> + To remove a widget from a parent and place the widget on +the clipboard, + select the widget then choose + <menuchoice> + <guimenu>Edit</guimenu> + <guisubmenu>Cut</guisubmenu> + </menuchoice>. + </para> + </sect2> + <sect2 id="copy-widget-clipboard"> + <title>To Copy a Widget to the Clipboard</title> + <para> + To copy a widget to the clipboard, select the widget then +choose + <menuchoice> + <guimenu>Edit</guimenu> + <guisubmenu>Copy</guisubmenu> + </menuchoice>. The original widget remains attached to +the parent. + </para> + </sect2> + <sect2 id="paste-widget-clipboard"> + <title>To Paste a Widget From the Clipboard Into Your +Project</title> + <para> + To paste a widget that exists on the clipboard into your +project, + choose + <menuchoice> + <guimenu>Edit</guimenu> + <guisubmenu>Paste</guisubmenu> + </menuchoice>.</para><para>All widgets must have a unique +name within <application>Glade</application>. If you cut a widget, and then +paste the widget into your project, then the widget and all of the children +of the widget keep their original names. If you copy a widget, or paste the +widget multiple times into your project, then +<application>Glade</application> generates new names for the widget +copies.</para> + </sect2> + <sect2 id="delete-widget"> + <title>To Delete a Widget</title> + <para>To delete a widget from the parent without + moving the widget to the clipboard, + select the widget then + choose + <menuchoice> + <guimenu>Edit</guimenu> + <guisubmenu>Clear</guisubmenu> + </menuchoice>. + </para> + + </sect2> + </sect1><!--WIDGET REFERENCE INFORMATION--> + <sect1 id="finding-out-about-widgets"> + <title>Finding Out More About Widgets</title> + <para> + Widgets are grouped into the following categories in the + <guilabel>Palette</guilabel> window:</para> + <variablelist> + <varlistentry> + <term>GTK+ Basic</term> + <listitem> + <para> + This category contains frequently-used + <application>GTK+</application> widgets +such as + windows and labels.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>GTK+ Additional</term> + <listitem> + <para> + This category contains widgets such as + <structname>GtkAlignment</structname>, +<structname>GtkPacker</structname>, and + <structname>GtkCalendar</structname>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Gnome</term> + <listitem> + <para> + This category includes all of the +<application>GNOME</application> + widgets that +<application>Glade</application> supports.</para> + </listitem> + </varlistentry> + </variablelist> + <para> +To find out the purpose of a + widget in the <application>Palette</application> window, +point to the widget to activate a tooltip. + For more information about the widgets that + <application>Glade</application> supports, see the + <citetitle><ulink url=" +http://developer.gnome.org/doc/API/2.0/gtk/index.html">GTK+ Reference +Manual</ulink></citetitle>. + </para> +<!-- + <sect2 id="gtk+-basic"> + <title>GTK+ Basic</title> + <para> + + <inlinemediaobject> + <imageobject> + <imagedata +fileref="figures/window-palette-basic.png"/> + </imageobject> + </inlinemediaobject> + <informaltable> + <tgroup cols="4"><colspec colnum="1" +colname="col1"/><colspec colnum="2" colname="col2" colwidth="*"/><colspec +colnum="3" colname="col3" colwidth="*"/><colspec colnum="4" colname="col4" +colwidth="*"/> + <tbody> + <row><entry colname="col1"><para> + <structname>GtkButton</structname> + </para></entry><entry +colname="col2"><para> + <structname>GtkFixed</structname> + </para></entry><entry +colname="col3"><para> + <structname>GtkMenuBar</structname> + </para></entry><entry +colname="col4"><para> + <structname>GtkTree</structname> + </para></entry></row><row><entry +colname="col1"><para> + <structname>GtkCheckButton</structname> + </para></entry><entry +colname="col2"><para> + <structname>GtkFontSelectionDialog</structname> + </para></entry><entry +colname="col3"><para> + <structname>GtkNotebook</structname> + </para></entry><entry +colname="col4"><para> + <structname>GtkScrolledWindow</structname> + </para></entry></row><row><entry +colname="col1"><para> + <structname>GtkCList</structname> + </para></entry><entry +colname="col2"><para> + <structname>GtkFrame</structname> + </para></entry><entry +colname="col3"><para> + <structname>GtkOptionMenu</structname> + </para></entry><entry +colname="col4"><para> + <structname>GtkSpinButton</structname> + </para></entry></row><row><entry +colname="col1"><para> + <structname>GtkColorSelectionDialog</structname> + </para></entry><entry +colname="col2"><para> + <structname>GtkHandleBox</structname> + </para></entry><entry +colname="col3"><para> + <structname>GtkPixmap</structname> + </para></entry><entry +colname="col4"><para> + <structname>GtkStatusbar</structname> + </para></entry></row><row><entry +colname="col1"><para> + <structname>GtkCombo</structname> + </para></entry><entry +colname="col2"><para> + <structname>GtkHBox</structname> + </para></entry><entry +colname="col3"><para> + <structname>GtkProgressBar</structname> + </para></entry><entry +colname="col4"><para> + <structname>GtkVBox</structname> + </para></entry></row><row><entry +colname="col1"><para> + <structname>GtkCTree</structname> + </para></entry><entry +colname="col2"><para> + <structname>GtkHButtonBox</structname> + </para></entry><entry +colname="col3"><para> + <structname>GtkRadioButton</structname> + </para></entry><entry +colname="col4"><para> + <structname>GtkVButtonBox</structname> + </para></entry></row><row><entry +colname="col1"><para> + <structname>GtkDialog</structname> + </para></entry><entry +colname="col2"><para> + <structname>GtkHPaned</structname> + </para></entry><entry +colname="col3"><para> + <structname>GtkTable</structname> + </para></entry><entry +colname="col4"><para> + <structname>GtkViewport</structname> + </para></entry></row><row><entry +colname="col1"><para> + <structname>GtkDrawingArea</structname> + </para></entry><entry +colname="col2"><para> + <structname>GtkHSeparator</structname> + </para></entry><entry +colname="col3"><para> + <structname>GtkText</structname> + </para></entry><entry +colname="col4"><para> + <structname>GtkVPaned</structname> + </para></entry></row><row><entry +colname="col1"><para> + <structname>GtkEntry</structname> + </para></entry><entry +colname="col2"><para> + <structname>GtkLabel</structname> + </para></entry><entry +colname="col3"><para> + <structname>GtkToggleButton</structname> + </para></entry><entry +colname="col4"><para> + <structname>GtkVSeparator</structname> + </para></entry></row><row><entry +colname="col1"><para> + <structname>GtkFileSelection</structname> + </para></entry><entry +colname="col2"><para> + <structname>GtkList</structname> + </para></entry><entry +colname="col3"><para> + <structname>GtkToolbar</structname> + </para></entry><entry +colname="col4"><para> + <structname>GtkWindow</structname> + </para></entry></row> + + </tbody> + </tgroup> + </informaltable> + </para> + </sect2> + <sect2 id="gtk+-additional"> + <title>GTK+ Additional</title> + <para> + <inlinemediaobject> + <imageobject> <imagedata +fileref="figures/window-palette-add.png"/> + </imageobject> + </inlinemediaobject> + <informaltable> + <tgroup cols="4"><colspec colnum="1" +colname="col1"/><colspec colnum="2" colname="col2" colwidth="*"/><colspec +colnum="3" colname="col3" colwidth="*"/><colspec colnum="4" colname="col4" +colwidth="*"/> + <tbody> + <row> + <entry colname="col1"><para> + Custom Widget + </para> + + </entry> + <entry +colname="col2"><structname>GtkColorSelection</structname> + + + </entry> + <entry colname="col3"><para> + <structname>GtkHScale</structname> + </para> + + </entry> + <entry +colname="col4"><structname>GtkPopopMenu</structname> + + + </entry> + </row> + <row> + <entry colname="col1"><para> + <structname>GtkAccelLabel</structname> + </para> + + </entry> + <entry +colname="col2"><structname>GtkCurve</structname> + + + + + </entry> + <entry colname="col3"><para> + <structname>GtkHScrollbar</structname> + </para> + + </entry> + <entry colname="col4"><para> + <structname>GtkPreview</structname> + </para> + + </entry> + </row> + <row> + <entry colname="col1"><para> + <structname>GtkAlignment</structname> + + </para> + + </entry> + <entry colname="col2"><para> + <structname>GtkEventBox</structname> + </para> + + </entry> + <entry colname="col3"><para> + <structname>GtkImage</structname> + </para> + + </entry> + <entry colname="col4"> + <para> + <structname>GtkVRuler</structname> + + </para> + </entry> + </row> + <row> + <entry colname="col1"> + <para><structname>GtkArrow</structname> + + </para> + </entry> + <entry colname="col2"><para> + <structname>GtkFontSelection</structname> + </para> + + </entry> + <entry colname="col3"><para> + <structname>GtkInputDialog</structname> + </para> + + </entry> + <entry colname="col4"><para> + <structname>GtkVScale</structname> + </para> + + </entry> + </row> + <row> + <entry colname="col1"><para> + <structname>GtkAspectFrame</structname> + </para> + + </entry> + <entry colname="col2"><para> + <structname>GtkGammaCurve</structname> + </para> + + </entry> + <entry colname="col3"> + <para> + <structname>GtkLayout</structname> + + </para> + </entry> + <entry colname="col4"><para> + <structname>GtkVScrollbar</structname> + </para> + + </entry> + </row> + <row> + <entry colname="col1"><para> + <structname>GtkCalendar</structname> + </para> + + </entry> + <entry colname="col2"><para> + <structname>GtkHRuler</structname> + </para> + + </entry> + <entry colname="col3"><para> + <structname>GtkPacker</structname> + </para></entry> + <entry colname="col4"> </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </sect2> + <sect2 id="GNOME"> + <title>GNOME</title> + <para> + + <inlinemediaobject> + <imageobject> + <imagedata +fileref="figures/window-palette-gnome.png"/> + </imageobject> + </inlinemediaobject> + <informaltable> + <tgroup cols="4"><colspec colnum="1" +colname="col1" colwidth="1.02*"/><colspec colnum="2" colname="col2" +colwidth="1.00*"/><colspec colnum="3" colname="col3" +colwidth="1.05*"/><colspec colnum="4" colname="col4" colwidth="1.04*"/> + <tbody> + <row><entry colname="col1"><para> + <structname>GnomeApp</structname> + + </para></entry><entry +colname="col2"><para><structname>GnomeDateEdit</structname> + + + + + + </para></entry><entry +colname="col3"><para><structname>GnomeIconEntry</structname></para> + + + </entry><entry +colname="col4"><para> + <structname>GnomePixmap</structname></para></entry></row> + <row> + <entry +colname="col1"><para><structname>GnomeAbout</structname></para> + + + + </entry> + <entry colname="col2"><para> + <structname>GnomeDialog</structname> + </para></entry> + <entry colname="col3"><para> + <structname>GnomeIconList</structname> + </para> + + </entry> + <entry colname="col4"> + <para> + <structname>GnomePixmapEntry</structname></para> + </entry> + </row> + <row> + <entry colname="col1"> + <para> + + + <structname>GnomeAnimator</structname></para> + </entry> + <entry colname="col2"> + + <para> + <structname>GnomeDruid</structname></para></entry> + <entry colname="col3"> + <para><structname></structname> + + + + <structname>GnomeIconSelection</structname> + </para> + </entry> + <entry colname="col4"> + <para> + <structname>GnomePropertyBox</structname> + </para> + </entry> + </row> + <row> + <entry colname="col1"><para> + <structname>GnomeAppBar</structname> + </para> + + </entry> + <entry +colname="col2"><para><structname>GnomeEntry</structname></para> + + + + + + + </entry> + <entry colname="col3"><para> + <structname>GnomeLess</structname></para> + + </entry> + <entry colname="col4"><para> + <structname>GnomeSpell</structname></para> + </entry> + </row> + <row> + <entry colname="col1"><para> + <structname>GnomeCalculator</structname> + </para> + + </entry> + <entry colname="col2"><para> + <structname>GnomeFileEntry</structname> + </para></entry> + <entry colname="col3"><para> + <structname>GnomeMessageBox</structname></para><structname></structname> + + + </entry> + <entry colname="col4"><para> + <structname>GtkClock</structname></para> + + + </entry> + </row> + <row> + <entry +colname="col1"><para><structname>GnomeCanvas</structname> + + </para> + + </entry> + <entry colname="col2"><para> + <structname>GnomeFontPicker</structname> + </para> + + </entry> + <entry colname="col3"><para> + <structname>GnomeNumberEntry</structname></para></entry> + <entry colname="col4"> + <para><structname>GtkDial</structname> + + + </para> + </entry> + </row> + <row> + <entry colname="col1"><para> + <structname>GnomeColorPicker</structname> + </para></entry> + <entry +colname="col2"><para><structname>GnomeHRef</structname> + + </para></entry> + <entry colname="col3"> + <para> + <structname>GnomePaperSelector</structname> + </para> + </entry> + <entry colname="col4"></entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </sect2> +--> + </sect1> + <!-- SETTINGS--> + <sect1 id="settings"> + <title>Preferences</title> + <sect2 id="settings-menu"> + <title>Settings Menu</title> + <variablelist> + <varlistentry> + <term>Show Grid</term> + <listitem> + <para> + Select this option if you want to show a +grid when you place a + widget in a GtkFixed or GtkLayout +container.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>Snap to Grid</term> + <listitem> + <para> + Select this option if you want widgets to +snap to the grid in a + GtkFixed or GtkLayout container.</para> + </listitem> + </varlistentry> + <varlistentry> + <term>Show Widget Tooltips</term> + <listitem> + <para> + Select this option to enable the tooltips +you have set in your interface. Tooltip display can be a distraction when +you are creating an interface within Glade, so you might like to turn them +off.</para> + </listitem> + </varlistentry> + </variablelist> + </sect2> + <sect2 id="grid-options"> + <title>Grid Options</title> + <variablelist> + <varlistentry> + <term>Horizontal spacing</term> + <listitem> + <para> + Use the spin box to specify the number of +pixels to skip + horizontally before drawing a line in the +grid. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> Vertical spacing</term> + <listitem> + <para> + Use the spin box to specify the number of +pixels to skip + vertically before drawing a line in the +grid. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>Grid style</term> + <listitem> + <para> + Use the radio buttons to specify whether +to draw the grid with + dots or lines. + </para> + </listitem> + </varlistentry> + </variablelist> + </sect2> + <sect2 id="snap-options"> + <title>Snap Options</title> + <variablelist> + <varlistentry> + <term>Horizontal snapping</term> + <listitem> + <para> + Use the check boxes to specify the snap +behavior in the grid of + the left and right edges of a widget. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> Vertical snapping</term> + <listitem> + <para> + Use the check boxes to specify the snap +behavior in the grid of + the top and bottom edges of a widget. + </para> + </listitem> + </varlistentry> + </variablelist> + </sect2> + </sect1><!-- OUTPUT --> +<!-- + <sect1 id="output"> + <title>Output</title> + <para> + Please write me. + </para> + </sect1> +--> +<!-- LIBGLADE --> +<!-- + <sect1 id="libglade"> + <title>Libglade</title> + <para> + Please write me. + </para> + </sect1> +--> +<!-- QUICKSTART --> +<!-- + <sect1 id="quickstart"> + <title>Quick Start</title> + <para> + Please write me. + </para> + </sect1> +--> +<!-- HELLOWORLD --> +<!-- + <sect1 id="helloworld"> + <title>Hello, World - A Simple Project</title> + <para> + Please write me. + </para> + </sect1> +--> +<!-- AUTHORS --> +<!-- + <sect1 id="authors"> + <title>Authors</title> + <para> + Glade was written by Damon Chaplin +<email>damon@gnome.org</email>. To + find more information about Glade, please visit the Glade + <ulink url="http://glade.gnome.org" type="http">web +page</ulink>. + </para> + <para> + Please send all comments, suggestions, and bug reports to +the Glade + mailing list. Information on how to join this list is +available at + <ulink url="http://glade.gnome.org/lists.html" +type="http">this + page</ulink>. + </para> + <para> + This reference manual is maintained by Michael Vance + <email>briareos@lokigames.com</email>. Please send all +comments, suggestions, + and bug reports regarding the manual his way. + </para> + <para> + <variablelist> + <title>Contributors</title> + <varlistentry> + <term>Ray Barker +<email>fatray@home.com</email></term> + <listitem> + <para> + Contributed menu dialog, file output +documentation + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> Paul J. Drongowski +<email>pjd@ives.lkg.dec.com</email> </term> + + <listitem> + <para> + Contributed quick start tutorial + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> + You can also add your comments online by using + <ulink type="http" url="http://www.gnome.org/gdp/doctable/ +">GNOME + Documentation Status Table</ulink>. + </para> + </sect1> + --> +</article> diff --git a/tools/glade/doc/C/glade-user-guide/legal.xml b/tools/glade/doc/C/glade-user-guide/legal.xml new file mode 100644 index 00000000..ac97e1de --- /dev/null +++ b/tools/glade/doc/C/glade-user-guide/legal.xml @@ -0,0 +1,76 @@ + <legalnotice id="legalnotice"> + <para> + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation + License (GFDL), Version 1.1 or any later version published + by the Free Software Foundation with no Invariant Sections, + no Front-Cover Texts, and no Back-Cover Texts. You can find + a copy of the GFDL at this <ulink type="help" + url="ghelp:fdl">link</ulink> or in the file COPYING-DOCS + distributed with this manual. + </para> + <para> This manual is part of a collection of GNOME manuals + distributed under the GFDL. If you want to distribute this + manual separately from the collection, you can do so by + adding a copy of the license to the manual, as described in + section 6 of the license. + </para> + + <para> + Many of the names used by companies to distinguish their + products and services are claimed as trademarks. Where those + names appear in any GNOME documentation, and the members of + the GNOME Documentation Project are made aware of those + trademarks, then the names are in capital letters or initial + capital letters. + </para> + + <para> + DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED + UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE + WITH THE FURTHER UNDERSTANDING THAT: + + <orderedlist> + <listitem> + <para>DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR + IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES + THAT THE DOCUMENT OR MODIFIED VERSION OF THE + DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR + A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE + RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE + OF THE DOCUMENT OR MODIFIED VERSION OF THE + DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR + MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY + CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY + SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS + LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED + VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER + EXCEPT UNDER THIS DISCLAIMER; AND + </para> + </listitem> + <listitem> + <para>UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL + THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), + CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, + INITIAL WRITER, ANY CONTRIBUTOR, OR ANY + DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION + OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH + PARTIES, BE LIABLE TO ANY PERSON FOR ANY + DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER + INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS + OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR + MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR + LOSSES ARISING OUT OF OR RELATING TO USE OF THE + DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, + EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF + THE POSSIBILITY OF SUCH DAMAGES. + </para> + </listitem> + </orderedlist> + </para> + </legalnotice> + |