lyx_mirror/src/frontends/xforms/forms
Lars Gullik Bjønnes 8f66b3860c fix distdir target
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4048 a592a061-630c-0410-9148-cb99ea01b6c8
2002-04-23 17:33:16 +00:00
..
.cvsignore (Rob Lahaye): add Makefile to a couple of .cvsignore files. 2002-04-17 16:13:40 +00:00
fdfix.sh new alert code 2001-11-26 10:19:58 +00:00
fdfixc.sed Compile fixes for DEC cxx, John's maths and keymap patches. 2001-03-16 12:08:14 +00:00
fdfixh.sed major GUII cleanup + Baruchs patch + Angus's patch + removed a couple of generated files 2000-08-14 05:24:35 +00:00
form_aboutlyx.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_bibitem.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_bibtex.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_browser.fd controller-view split of FormLog and FormVCLog. 2001-03-20 10:14:03 +00:00
form_character.fd blah 2001-09-07 15:58:45 +00:00
form_citation.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_document.C.patch 'a radio control is a radio control is a radio control' patch from John 2002-01-07 11:28:09 +00:00
form_document.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_error.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_ert.C.patch Various update/redraw fixes. Cleaned up InsetERT and added a dialog for 2001-08-06 14:55:02 +00:00
form_ert.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_external.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_filedialog.C.patch Small cleanup, not part of MVC changes. 2001-03-15 10:02:36 +00:00
form_filedialog.fd Applied John's FileDialog patch. 2001-03-07 14:25:31 +00:00
form_float.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_forks.fd The graphics inset now has: 2002-02-27 09:59:52 +00:00
form_graphics.fd Change the name of some methods and some widgets. 2002-03-25 11:16:15 +00:00
form_include.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_index.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_maths_deco.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_maths_delim.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_maths_matrix.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_maths_panel.fd Martin's latest mods to the math panel. 2002-01-18 12:18:20 +00:00
form_maths_space.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_maths_style.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_minipage.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_paragraph.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_preamble.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_preferences.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_print.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_ref.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_search.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_sendto.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_spellchecker.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_tabular_create.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_tabular.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_texinfo.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_thesaurus.fd the aik patch 2002-01-13 01:46:33 +00:00
form_toc.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
form_url.fd Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00
Makefile.am fix distdir target 2002-04-23 17:33:16 +00:00
makefile.old To make make install behave 2002-04-07 12:32:26 +00:00
README Ensure all widgets follow the naming scheme. 2002-03-12 14:11:15 +00:00

All .fd files go in this directory.
Each .fd file should have just one form in them

NOTE: An exception to the above is any tabbed form which 
      xforms requires multiple forms to create.  In that case
      the group of forms constitutes one gui form.

All forms should be named form_xxx and saved into a file by the same name.
For example, the copyright notice is called form_copyright and is stored in
form_copyright.fd.  Its used by class FormCopyright.  If you match this pattern
the fdfix.sh script will do all the conversions for you.  That'll make
updating the source incredibly easy.

Name all buttons and other form components that are likely to cause a callback.
The names should be of the form:  button_ok, radio_group_item and so on.

Being more explicit (Angus, 12 Mar 2002):
	class             | prefix
	------------------+-------
	FL_BROWSER        | browser
	FL_BUTTON         | button
	FL_PIXMAPBUTTON   | button
	FL_CHECKBUTTON    | check
	FL_CHOICE         | choice
	FL_COUNTER        | counter
	FL_DIAL           | dial
	FL_INPUT          | input
	FL_FRAME          | frame
	FL_LABELFRAME     | frame
	FL_ROUND3DBUTTON,
	RADIO_BUTTON      | radio
	FL_SLIDER         | slider
	FL_VALSLIDER      | slider
	FL_TABFOLDER      | tabfolder
	FL_TEXT           | text

The only exceptions to this are objects that are to be converted in the sed
scripts. At the moment this applies only to bmtable:

	Convert an FL_BUTTON to a FL_BMTABLE by using prefix "bmtable".

Enter the full name of the callback eg.:
        C_FormBaseOkCB

That is, they all have the same format: C_##FormName##CallbackName.
Your code will then need to use the appropriate macro to setup this C callback
function which will in turn call the corresponding static class member function
of the form FormName::CallbackName.  You should be able to copy the macro
entries from a similar dialog for reuse without having to change anything.

The name of the wrapped dialog will be dialog_ eg.
        typedef struct {
        ...
        } FD_form_copyright;

        FD_form_copyright * dialog_;

Angus Leeming has modified the scripts to forward declare FD_form_xxxx thereby
removing one inter-file dependency and removing the struct declaration from the
FormXxxx.h file which was the previous practice.

If you follow these simple rules then the generated code for create_form_form_xxxx
can will be converted as the FormXxxx::build_xxxx method without any extra 
editting to make it work.  Every forms implementation will thereby follow a very
simple pattern and make it easier to maintain.

All the forms are rebuild by running `make test`.  This will generate all
the form_xxxx.[Ch] files. You should run `make updatesrc` to install them in the
parent directory.  `make updatesrc` will also regenerate all the files for you
so you don't have to do the `make test` step unless, for example, you are
testing the conversion scripts. The files fdfix.sh, fdfixc.sed, fdfixh.sed and
makefile contain the necessary smarts to convert the generated code into
something that can be used directly in the LyX codebase.

The easiest way to fit into the pattern is to copy an existing dialogs
implementation and adjust it to suit, keeping the variable names the same.
Take a look at the existing .fd files as well to see what is needed in there
in the way of callback names and widget names.

In addition a lot of work can be saved by using the code that has already been
written in the "lyx" module of the LyX CVS repository. This is where the old
development branch is kept.  The code there will need to be modified slightly
to meet these new guidelines.  In addition, an earlier generation signalling
system was used in that code. A conversion script called gtkmmconvert2 is 
available from the gtk-- distribution.  It updates all the signals to use
libsigc++.

Don't reinvent the wheel.  There's 18 months worth of code in the "lyx" cvs
module that you should at least use as a guide even if you don't actually make
direct use of it.

Allan. (ARRae)