From: John Darrington Date: Sat, 26 Dec 2020 07:44:38 +0000 (+0100) Subject: pspp-dev (Graphic User Interface): New chapter. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df85c4e95a81e8ca70b60c551f15714cc8302096;hp=e333a444bba7a84682b26a68c0894a8ca4f353a4;p=pspp pspp-dev (Graphic User Interface): New chapter. --- diff --git a/doc/automake.mk b/doc/automake.mk index 4ec6b5dcae..4cc2b230ed 100644 --- a/doc/automake.mk +++ b/doc/automake.mk @@ -51,6 +51,7 @@ doc_pspp_TEXINFOS = doc/version.texi \ doc_pspp_dev_TEXINFOS = doc/version-dev.texi \ doc/dev/intro.texi \ doc/dev/concepts.texi \ + doc/dev/gui.texi \ doc/dev/syntax.texi \ doc/dev/data.texi \ doc/dev/i18n.texi \ 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 diff --git a/doc/pspp-dev.texi b/doc/pspp-dev.texi index f751dd879c..a9d00a9c22 100644 --- a/doc/pspp-dev.texi +++ b/doc/pspp-dev.texi @@ -86,6 +86,7 @@ Free Documentation License". * Processing Data:: Data input, output, and processing. * Presenting Output:: Producing machine- and human-readable output. * Internationalisation:: Dealing with locale issues. +* Graphic User Interface:: Hacking the GUI * Function Index:: Index of PSPP functions. * Concept Index:: Index of concepts. @@ -107,6 +108,7 @@ Free Documentation License". @include dev/data.texi @include dev/output.texi @include dev/i18n.texi +@include dev/gui.texi @include function-index.texi @include concept-index.texi