]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/README
We don't currently use fork anywhere (or if we do it's by mistake!), so
[lyx.git] / src / frontends / gnome / README
1 GNOME FRONT END
2 ===============
3
4 Firstly, this stuff is pre-alpha.  I don't use it so you shouldn't
5 either.  At all, no exceptions :). 
6
7 The GNOME frontend of LyX uses libglade to draw the dialogs.  The base
8 (GnomeBase.C) class handles the drawing and activating of the Dialogs,
9 for an example of contructing a simple dialog see FormUrl.[Ch]
10
11 FormUrl::FormUrl(ControlUrl & c)
12         : FormCB<ControlUrl>(c, "FormUrl")
13 {}
14
15
16
17 To manipulate a widget you extract a pointer using getWidget(string).
18
19 If you look at FormUrl you'll see that there are a number of
20 helper functions at the bottom of the .C file.  These are
21 automatically generated by accessors.py
22
23 Glade files now must follow the following conventions:
24
25  * The filename should be the same as the .C and .h Files (i.e
26    FormTabularCreate.glade) 
27  * The root widget should have the same name
28  * Functional widgets should have an r_ as the first two characters of
29    their name. (see below)
30
31 USING ACCESSORS.PY
32 ==================
33
34 Usage:
35
36 python accessors.py glade_ui_file DialogClass
37
38 Accessors.py will write the helper functions to DialogClass.C_gen and
39 the function declarations to DialogClass.g_gen.  To ensure the widgets
40 you're interested in are made available using this method, prefix the
41 widgets name with r_ when you build the dialog in Glade.