1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
-----------------------------------------------------------------------------
$Id: README,v 1.26 2002/03/22 17:04:48 monate Exp $
-----------------------------------------------------------------------------
mlglade is a tool to translate a glade xml file into a set of modules for
OCaml >= 3.04
BUILDING
--------
Compiling mlglade requires OCaml 3.04 or above.
To compile use :
./configure
make
make install
It will copy mlglade in '/us/local/bin/'. You can change this with
./configure --bin-dir=/my/own/path/
The executable 'mlglade' is standalone therefore you can simply copy
it somewhere in your $PATH if you do not want to use 'make install'.
Sorry, no man page yet.
To compile the code produced by mlglade you need lablgtk for ocaml 3.04.
INVOKING MLGLADE
----------------
`mlglade project.glade' reads project.glade and creates the files :
- project_glade_main.ml
- project_glade_callbacks.ml
- project_glade_interface.ml
- makefile
You can safely modify project_glade_main.ml and makefile, they will never be
overwritten by mlglade.
EXPERTS ONLY: if you really do not want to invoke mlglade by hand, you
may integrate mlglade in glade itself. Download the sources for glade
0.6.2 and apply the patch provided in file "glade.diff. Compile and
install glade. From now on you just have to choose OCaml as language
in the project options panel of glade and to click on "Generate" to
run mlglade. This patch will eventally be included in glade in a
later than 0.6.4 version. This step is NOT necessary to use mlglade
from the command line.
LIMITATIONS
-----------
Only a subset of the widgets are recognized at this time:
-GtkButton (no stock buttons)
-GtkCheckb
-GtkColorSelectionDialog
(you cannot change the labels of the buttons inside glade)
-GtkCombo (no method connect available in GEdit.combo : lablgtk pb ???)
-GtkDrawingArea
-GtkEntry
-GtkEventBox
-GtkFileSelection (you cannot change the labels of the buttons inside glade)
-GtkFontSelectionDialog
(you cannot change the labels of the buttons inside glade)
-GtkHBox
-GtkHButtonBox
-GtkHPaned
-GtkHSeparator
-GtkHandleBox
-GtkLabel
-GtkList
-GtkMenu
-GtkMenuBar
-GtkMenuItem
-GtkNoteBook
-GtkOptionMenu (you cannot fill it from glade right now)
-GtkPixmap
-GtkProgressBar
-GtkScrolledWindow
-GtkSpinButton
-GtkStatusBar
-GtkTable
-GtkText (TODO unknown events copy_clipboard, cut_clipboard, kill_char
kill_line, kill_word, move_cursor, move_page, move_to_column
move_to_row, paste_clipboard, set_editable. labgtk pb ?)
-GtkToolbar (not the 2 specific events because of lablgtk)
-GtkToggleButton
-GtkTree
-GtkVBox
-GtkVButtonBox
-GtkVPaned
-GtkVSeparator
-GtkViewPort
-GtkWindow
Tooltips are supported for all widgets.
Note that mlglade may produce non compilable ocaml code
when you use some features that seem available in glade but
are in fact non existent in Gtk. For example you should not try to
use Xevents with windowless widgets or you will get something like:
"This expression has type GMisc.label
It has no method event".
Accelerators are supported.
Event fields are supported (thanks to Gauthier Nadji).
Data and Object fields of signals are not supported. They are deprecated
in glade anyway.
If you encounter any problem with these widgets please report it to
Benjamin.Monate@lri.fr.
BUGS
----
Here is a list of what I would name a bug:
-The autogenerated code does not compile AND what you want to do is allowed
by Gtk.
-Some properties you chose in glade are not present in the ml program
-Your custom callbacks are not called properly
Here is a list of what I would name a feature wish:
-An unimplemented message
-An unimplemented widget
-Another architecture for the generated modules
In any case I would be grateful if you could send me:
-a minimal .glade example
-your version of glade
-your version of gtk
-your version of lablgtk
-your version of ocaml
COPYING
-------
In short: LGPL.
See LICENCE file.
FEEDBACK
--------
Any feedback is appreciated - bug reports, patches, enhancements.
Please send them to the address given below.
AUTHOR
------
Benjamin Monate
LRI-Bat 490
Universite Paris-Sud
91405 ORSAY CEDEX
France
mailto:Benjamin.Monate@lri.fr
http://www.lri.fr/~monate/mlglade
This product includes software developed by Christian Lindig and
Jean-Christophe Fillitre.
|