00001 /*! \page first_program Your First MadButterfly Program. 00002 * 00003 * MadButterfly use SVG as a media to adapt gap between GUI designers 00004 * and application programmmers. Designers export their works with SVG 00005 * format. Then some ones, designers or programmers, assign IDs to SVG tags 00006 * that will be manipulated by application. For example, you have a menu 00007 * that should be hidden at beginning. When user hit a button, the menu 00008 * should be showed. So, we assign an ID to the group or other tags that 00009 * contain all elements in menu. The ID is the name of a object that 00010 * application manipulate, hide and show it. 00011 * 00012 * After assigning IDs to tags, the file is translated by svg2code.py. 00013 * Outputs of svg2code.py are M4 macro files. Conventional, foo.svg is 00014 * translated a M4 file as foo.mb, using .mb as extension of file name. 00015 * Macro files are translate to *.c and *.h files to link with application 00016 * programs. 00017 * 00018 * For example, to translate foo.svg with steps 00019 * - \$(PREFIX)/bin/svg2code.py foo.svg foo.mb 00020 * - m4 -I \$(PREFIX)/share/mb mb_c_source.m4 foo.mb > foo.c 00021 * - m4 -I \$(PREFIX)/share/mb mb_c_header.m4 foo.mb > foo.h 00022 * 00023 * foo.h declares a structure, named 'foo' and two functions, 00024 * foo_new() and foo_free(). An instance of 'foo' holds all objects for 00025 * foo.svg. One object, with specified ID as name, for each tag. If you 00026 * don't assign one, a random one is picked. foo_new() is invoked to create 00027 * and initialize a 'foo' instance. An instance is released by calling 00028 * foo_free(). 00029 * 00030 * \dontinclude examples/svg2code_ex/main.c 00031 * \skip main 00032 * \until } 00033 */