~ubuntu-branches/ubuntu/vivid/gimp/vivid

« back to all changes in this revision

Viewing changes to devel-docs/ui-framework.txt

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-08 18:50:03 UTC
  • mto: (1.1.26) (0.5.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 71.
  • Revision ID: package-import@ubuntu.com-20120508185003-tltkvbaysf8d2426
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
  GIMP UI Framework
 
2
  =================
 
3
 
 
4
This document describes how the GIMP UI framework functions and is
 
5
implemented. Here, "UI framework" refers to the system that saves the
 
6
UI layout between GIMP sessions, i.e. how docks, dockable dialogs etc
 
7
are setup.
 
8
 
 
9
 
 
10
  Key Classes
 
11
  -----------
 
12
 
 
13
GimpDockable      - Represents a dockable dialog.
 
14
GimpDockbook      - A GtkNotebook of GimpDockables
 
15
GimpDock          - A columns of GimpDockbooks
 
16
GimpToolbox       - Subclasses GimpDock, contains the toolbox.
 
17
                    Dockables are added at the bottom
 
18
GimpMenuDock      - Subclasses GimpDock, contains dockables, should
 
19
                    probably be merged with GimpDock. The name
 
20
                    contains "menu" from the time when it hosted the
 
21
                    Image Selection Menu that is now in the
 
22
                    GimpDockWindow
 
23
GimpDockColumns   - A set of GimpDocks arranged side by side.
 
24
GimpDockWindow    - A toplevel window containing a GimpDockColumns.
 
25
GimpImageWindow   - A toplevel window containing images and one
 
26
                    GimpDockColumns to the left and to the right.
 
27
GimpDialogFactory - A factory to create and position toplevel windows
 
28
GimpSessionInfo   - Contains session info for one toplevel
 
29
GimpUIConfigurer  - Configures the UI when switching between
 
30
                    single-window and multi-window mode
 
31
 
 
32
 
 
33
  GimpDialogFactory
 
34
  -----------------
 
35
 
 
36
The GimpDialogFactory can be considered to solve two distinct
 
37
problems:
 
38
 
 
39
1. Create widgets from text, in particular from text in sessionrc
 
40
2. Session manage toplevel windows so their position is remebered
 
41
   across GIMP sessions
 
42
 
 
43
One possible design adjustment would be to have GimpWidgetFactory that
 
44
takes care of 1), and then have GimpDialogFactory inherit from
 
45
GtkWidgetFactory and implementing 2). GimpWidgetFactory could possibly
 
46
use GtkBuilder.
 
47
 
 
48
 
 
49
  sessionrc
 
50
  ---------
 
51
When GIMP starts, the sessionrc file is parsed. This step puts
 
52
GimpSessionInfo:s into GimpDialogFactories. Later when dialogs are
 
53
created, the dialog factory looks up existing session info entries. If
 
54
one exists, it uses the session info to set e.g. the position of the
 
55
created dialog. If it doesn't exist, it creates a new session info
 
56
object for the dialog. When GIMP exists, the current session infos are
 
57
then written back to sessionrc.