lyx_mirror/src/frontends/gnome
Lars Gullik Bjønnes 3005c47180 handle some tmpl files in a more sane way
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4355 a592a061-630c-0410-9148-cb99ea01b6c8
2002-06-10 17:33:05 +00:00
..
dialogs Implement the Log dialog, also update accessors.py 2002-06-03 03:38:30 +00:00
.cvsignore Added lyx-func tabular-feature for menu structure. 2000-07-28 14:28:54 +00:00
accessors.py Implement the Log dialog, also update accessors.py 2002-06-03 03:38:30 +00:00
ChangeLog handle some tmpl files in a more sane way 2002-06-10 17:33:05 +00:00
Dialogs.C Implement the Log dialog, also update accessors.py 2002-06-03 03:38:30 +00:00
FileDialog.C guii2 2002-05-23 12:08:47 +00:00
GError.C gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GError.h gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GERT.C gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GERT.h Renamed classes from FormX to GX, renamed glade files similarly. Added Preamble. 2002-03-31 23:17:11 +00:00
GLog.C Implement the Log dialog, also update accessors.py 2002-06-03 03:38:30 +00:00
GLog.h Implement the Log dialog, also update accessors.py 2002-06-03 03:38:30 +00:00
gnome_helpers.C gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
gnome_helpers.h gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GnomeBase.C gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GnomeBase.h gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
gnomeBC.C handle some tmpl files in a more sane way 2002-06-10 17:33:05 +00:00
gnomeBC.h Clean-up of the button controller. 2001-06-16 14:48:12 +00:00
GPreamble.C gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GPreamble.h gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GTabularCreate.C gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GTabularCreate.h gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GUIRunTime.C gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GUrl.C gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
GUrl.h Renamed classes from FormX to GX, renamed glade files similarly. Added Preamble. 2002-03-31 23:17:11 +00:00
Makefile.am Implement the Log dialog, also update accessors.py 2002-06-03 03:38:30 +00:00
pixbutton.h ws cleanup 2002-03-21 21:21:28 +00:00
README A lean, clean and working start to the new, improved gnome frontend. 2002-03-27 10:07:57 +00:00
support.c Marko's GNOME patch and Baruch's insetgraphic patch + some fixes to make all 2000-08-14 09:44:53 +00:00
support.h ws cleanup 2002-03-21 21:21:28 +00:00
Timeout_pimpl.C gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00
Timeout_pimpl.h gtkmm-2 upgrade. Still some small bugs to iron out, but mostly functional 2002-06-02 04:15:33 +00:00

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.