pspp-dev (Graphic User Interface): New chapter.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 26 Dec 2020 07:44:38 +0000 (08:44 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 26 Dec 2020 13:26:47 +0000 (14:26 +0100)
doc/automake.mk
doc/dev/gui.texi [new file with mode: 0644]
doc/pspp-dev.texi

index 4ec6b5dcaec87d6ceb6fd4437ad909c2d10bfae1..4cc2b230ede16a93e1fcee62d407580ddf79ba76 100644 (file)
@@ -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 (file)
index 0000000..8602950
--- /dev/null
@@ -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 <name-of-gtk-builder-file>
+@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
index f751dd879cf4d856afa47eae130930b96c867473..a9d00a9c227734b8a74e4d177ee97805377c1f33 100644 (file)
@@ -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