docs
[pspp] / doc / dev / gui.texi
1 @c PSPP - a program for statistical analysis.
2 @c Copyright (C) 2020 Free Software Foundation, Inc.
3 @c Permission is granted to copy, distribute and/or modify this document
4 @c under the terms of the GNU Free Documentation License, Version 1.3
5 @c or any later version published by the Free Software Foundation;
6 @c with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
7 @c A copy of the license is included in the section entitled "GNU
8 @c Free Documentation License".
9 @c
10
11 @node Graphic User Interface
12 @chapter Graphic User Interface
13
14 Files pertaining to the GUI are found in the directory @file{src/ui/gui/}.
15
16 The GUI uses the Gtk+ library.  Many parts are defined using GtkBuilder files
17 which have a @samp{.ui} prefix.  These are XML files and as such can be editied
18 using a text editor, which is often easiest when making small changes.  More
19 substantial changes however are best done using Glade.  Since however PSPP
20 has many custom defined widgets, Glade must be started with certain environment
21 variables set.  The easiest way to run Glade with the correct variables is as follows:
22
23 @example
24 make src/ui/gui/glade-wrapper
25 ./src/ui/gui/glade-wrapper <name-of-gtk-builder-file>
26 @end example
27
28
29 If you create new custom widgets for use in PSPP you must do the following to
30 make sure they are available to Glade:
31
32 @itemize
33 @item  Add a call to its @code{_get_type} function to @code{preregister_widgets} which
34        is found in @file{src/ui/gui/widgets.c}.
35 @item Add the name of the module to @code{src_ui_gui_libwidgets_essential_la_SOURCES} in
36       @file{src/ui/gui/automake.mk}.
37 @end itemize