X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fdev%2Fgui.texi;fp=doc%2Fdev%2Fgui.texi;h=8602950afa8637b5482431a3537e8f77f588d856;hb=df85c4e95a81e8ca70b60c551f15714cc8302096;hp=0000000000000000000000000000000000000000;hpb=e333a444bba7a84682b26a68c0894a8ca4f353a4;p=pspp diff --git a/doc/dev/gui.texi b/doc/dev/gui.texi new file mode 100644 index 0000000000..8602950afa --- /dev/null +++ b/doc/dev/gui.texi @@ -0,0 +1,37 @@ +@c PSPP - a program for statistical analysis. +@c Copyright (C) 2020 Free Software Foundation, Inc. +@c Permission is granted to copy, distribute and/or modify this document +@c under the terms of the GNU Free Documentation License, Version 1.3 +@c or any later version published by the Free Software Foundation; +@c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. +@c A copy of the license is included in the section entitled "GNU +@c Free Documentation License". +@c + +@node Graphic User Interface +@chapter Graphic User Interface + +Files pertaining to the GUI are found in the directory @file{src/ui/gui/}. + +The GUI uses the Gtk+ library. Many parts are defined using GtkBuilder files +which have a @samp{.ui} prefix. These are XML files and as such can be editied +using a text editor, which is often easiest when making small changes. More +substantial changes however are best done using Glade. Since however PSPP +has many custom defined widgets, Glade must be started with certain environment +variables set. The easiest way to run Glade with the correct variables is as follows: + +@example +make src/ui/gui/glade-wrapper +./src/ui/gui/glade-wrapper +@end example + + +If you create new custom widgets for use in PSPP you must do the following to +make sure they are available to Glade: + +@itemize +@item Add a call to its @code{_get_type} function to @code{preregister_widgets} which + is found in @file{src/ui/gui/widgets.c}. +@item Add the name of the module to @code{src_ui_gui_libwidgets_essential_la_SOURCES} in + @file{src/ui/gui/automake.mk}. +@end itemize