lyx_mirror/src/frontends/gnome
Angus Leeming cda53633ff Hold on to your hats.
Qt users should autogen.sh
Gnome users --- you're on your own ;-)
Happy recompiling.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6253 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-25 14:51:38 +00:00
..
dialogs Changes Dialog for gnome frontend. 2003-02-12 06:10:42 +00:00
.cvsignore
accessors.py
ChangeLog Make the GUI instantiation invisible to Timeout. 2003-02-22 18:01:16 +00:00
Dialogs2.C Hold on to your hats. 2003-02-25 14:51:38 +00:00
Dialogs3.C Hold on to your hats. 2003-02-25 14:51:38 +00:00
Dialogs_impl.h Hold on to your hats. 2003-02-25 14:51:38 +00:00
Dialogs.C Hold on to your hats. 2003-02-25 14:51:38 +00:00
FileDialog.C Strip trailing whitespace. 2003-02-25 13:17:01 +00:00
GAbout.C Strip trailing whitespace. 2003-02-25 13:17:01 +00:00
GAbout.h dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GChanges.C dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GChanges.h dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GError.C Hold on to your hats. 2003-02-25 14:51:38 +00:00
GError.h Hold on to your hats. 2003-02-25 14:51:38 +00:00
GERT.C dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GERT.h dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GFloat.C dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GFloat.h dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GLog.C dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GLog.h dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
gnome_helpers.C Strip trailing whitespace. 2003-02-25 13:17:01 +00:00
gnome_helpers.h dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GnomeBase.C Strip trailing whitespace. 2003-02-25 13:17:01 +00:00
GnomeBase.h dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
gnomeBC.C dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
gnomeBC.h dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
gnomeTimeout.C Make the GUI instantiation invisible to Timeout. 2003-02-22 18:01:16 +00:00
gnomeTimeout.h Make the GUI instantiation invisible to Timeout. 2003-02-22 18:01:16 +00:00
GPreamble.C dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GPreamble.h dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GTabularCreate.C dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GTabularCreate.h dont use pragma impementation and interface anymore 2003-02-13 16:53:15 +00:00
GUrl.C Hold on to your hats. 2003-02-25 14:51:38 +00:00
GUrl.h Hold on to your hats. 2003-02-25 14:51:38 +00:00
GView.C Hold on to your hats. 2003-02-25 14:51:38 +00:00
GView.h Hold on to your hats. 2003-02-25 14:51:38 +00:00
lyx_gui.C applying Martin Craig's gnome patch. Upgrading to gtkmm-2.0+ from the 1.3 development stream. 2003-02-08 00:25:34 +00:00
Makefile.am Hold on to your hats. 2003-02-25 14:51:38 +00:00
pixbutton.h
README
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.