lyx_mirror/src/frontends/xforms/forms
André Pönitz c520bdbd89 Juergen S.'s slightly modified patch to access the preview setting from the gui
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4498 a592a061-630c-0410-9148-cb99ea01b6c8
2002-06-27 17:48:09 +00:00
..
.cvsignore fix aiksaurus compile 2002-06-18 18:39:36 +00:00
fdfix.sh Fail gracefully if fdesign fails. 2002-06-14 10:51:32 +00:00
fdfixc.sed xforms clean-up, described in detail in my mail of 31 May. See 2002-06-13 13:43:51 +00:00
fdfixh.sed xforms clean-up, described in detail in my mail of 31 May. See 2002-06-13 13:43:51 +00:00
form_aboutlyx.fd xforms clean-up, described in detail in my mail of 31 May. See 2002-06-13 13:43:51 +00:00
form_bibitem.fd
form_bibtex.fd Merge Herbert's bibtex patch; it doesn't introduce any new bugs and 2002-06-20 20:41:00 +00:00
form_browser.fd
form_character.fd
form_citation.fd
form_document.fd xforms clean-up, described in detail in my mail of 31 May. See 2002-06-13 13:43:51 +00:00
form_error.fd
form_ert.fd
form_external.fd
form_filedialog.fd
form_float.fd
form_forks.fd
form_graphics.fd xforms clean-up, described in detail in my mail of 31 May. See 2002-06-13 13:43:51 +00:00
form_include.fd
form_index.fd
form_maths_deco.fd
form_maths_delim.fd *duck* 2002-06-18 15:44:30 +00:00
form_maths_matrix.fd
form_maths_panel.fd
form_maths_space.fd
form_maths_style.fd
form_minipage.fd
form_paragraph.fd
form_preamble.fd
form_preferences.fd Juergen S.'s slightly modified patch to access the preview setting from the gui 2002-06-27 17:48:09 +00:00
form_print.fd
form_ref.fd
form_search.fd
form_sendto.fd
form_spellchecker.fd
form_tabular_create.fd
form_tabular.fd xforms clean-up, described in detail in my mail of 31 May. See 2002-06-13 13:43:51 +00:00
form_texinfo.fd Auto-scan for texinfo and bibtex dialogs 2002-06-20 23:35:10 +00:00
form_thesaurus.fd
form_toc.fd
form_url.fd
Makefile.am Make the .Ch files dependent on the fdfix files. 2002-06-14 10:12:59 +00:00
README Pedantry 2002-06-14 10:58:05 +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 of the same name.
For example, the copyright notice is called form_copyright and is stored in
form_copyright.fd.
Tabbed folders should be named form_xxx_yyy.
For example, the file folder in the graphics dialog has the identifier
form_graphics_file.

If you match this pattern, the fdfix.sh script will be able to manipulate
the generated .c and .h files to produce the .C and .h files used by LyX. A form
called form_xxx will result in a struct FD_xxx.

* 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:
	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

If you follow these simple rules then you will generate code for functions
build_xxx that will need no further editing to make them work. For example,
form_graphics.h contains the struct declarations and build methods, so:

extern FD_graphics * build_graphics(void *);
extern FD_graphics_file * build_graphics_file(void *);
extern FD_graphics_size * build_graphics_size(void *);
extern FD_graphics_bbox * build_graphics_bbox(void *);
extern FD_graphics_special * build_graphics_special(void *);
extern FD_graphics_lyxview * build_graphics_lyxview(void *);

where the function is to be passed a pointer to the parent dialog
(usually "this") so that this pointer can be cast off to FormBase * in the
assigned callback function and the appropriate class method called.