lyx_mirror/src/frontends/gnome
Angus Leeming b5589bf6cf The package reworking.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9463 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-10 19:17:43 +00:00
..
dialogs Changes Dialog for gnome frontend. 2003-02-12 06:10:42 +00:00
.cvsignore
accessors.py No trailing whitespace left in src... 2003-10-13 09:43:15 +00:00
ChangeLog The package reworking. 2005-01-10 19:17:43 +00:00
Dialogs2.C Remove the Forks dialog. 2004-03-17 21:21:47 +00:00
Dialogs3.C simple ws changes only 2004-04-03 08:37:12 +00:00
Dialogs_impl.h Remove the Forks dialog. 2004-03-17 21:21:47 +00:00
Dialogs.C Remove the Forks dialog. 2004-03-17 21:21:47 +00:00
FileDialog.C If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GAbout.C change "support/std_sstream.h" to <sstream> 2004-07-24 10:55:30 +00:00
GAbout.h If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GChanges.C If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GChanges.h If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GError.C If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GError.h If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GERT.C If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GERT.h Whitespace, only whitespace. 2004-10-05 10:11:42 +00:00
GFloat.C Cleanup usage of contains and simplify a bit. 2004-02-01 12:46:14 +00:00
GFloat.h If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GLog.C If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GLog.h Whitespace, only whitespace. 2004-10-05 10:11:42 +00:00
gnome_helpers.C simple ws changes only 2004-04-03 08:37:12 +00:00
gnome_helpers.h If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GnomeBase.C Whitespace, only whitespace. 2004-10-05 10:11:42 +00:00
GnomeBase.h Whitespace, only whitespace. 2004-10-05 10:11:42 +00:00
gnomeBC.C If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
gnomeBC.h If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
gnomeTimeout.C If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
gnomeTimeout.h If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GPreamble.C simple ws changes only 2004-04-03 08:37:12 +00:00
GPreamble.h Whitespace, only whitespace. 2004-10-05 10:11:42 +00:00
GTabularCreate.C If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GTabularCreate.h If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GUrl.C If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GUrl.h If I ever see another licence blurb again, it'll be too soon... 2003-08-23 00:17:00 +00:00
GView.C Whitespace, only whitespace. 2004-10-05 10:11:42 +00:00
GView.h Whitespace, only whitespace. 2004-10-05 10:11:42 +00:00
lyx_gui.C The package reworking. 2005-01-10 19:17:43 +00:00
Makefile.am Remove trailing slash from -Ifoo/ in the AM_CPPFLAGS rules in the various 2004-12-14 10:41:09 +00:00
pixbutton.h Whitespace, only whitespace. 2004-10-05 10:11:42 +00:00
README Get rid of trailing whitespace 'noise' in future patches for the 2003-09-09 18:27:24 +00:00
support.c
support.h

GNOME FRONT END
===============

Firstly, this stuff is pre-alpha.  I don't use it so you shouldn't
either.  At all, no exceptions :). Secondly I'm no c++ guru, I'm
learning as I go along so if something looks stupid, there's a good
chance it is.

Adding Dialogs
--------------

The GNOME frontend of LyX uses libglade to draw the dialogs.  The base
(GnomeBase.C) class handles the drawing and activating of the Dialogs,
for an example of contructing a simple dialog see GUrl.[Ch]

FormUrl::FormUrl(ControlUrl & c)
	: FormCB<ControlUrl>(c, "FormUrl")
{}



To manipulate a widget you extract a pointer using getWidget(string).

If you look at FormUrl you'll see that there are a number of
helper functions at the bottom of the .C file.  These are
automatically generated by accessors.py

For accessors.py to work glade files now must adhere to the following
conventions:

 * The root widget and the file should be named after the form (i.e
   FormTabularCreate & FormTabularCreate.glade)
 * Functional widgets, those actually used rather than the filler
   widgets like Gtk::HBox etc,  should have an r_ as the first two
   characters of their name. (see below)

To make the build system include your new dialog edit Makefile.am as
follows:
 1) make clean in src/frontends/gnome/
 2) Add GX.C and GX.h to libgnome_la_SOURCES
 3) Remove FormX.lo and form_x.lo (if applicable) from xforms_objects
 4) make clean && make in src/frontends/
 5) make in src/


Using accessors.py
------------------

Usage:

python accessors.py glade_ui_file DialogClass

e.g

python accessors.py FormTabularCreate.glade GTabularCreate

Accessors.py will write the helper functions to DialogClass.C_gen and
the function declarations to DialogClass.g_gen.  To ensure the widgets
you're interested in are made available using this method, prefix the
widgets name with r_ when you build the dialog in Glade.