1 
2 /*
3  *  This file is part of XForms.
4  *
5  *  XForms is free software; you can redistribute it and/or modify it
6  *  under the terms of the GNU Lesser General Public License as
7  *  published by the Free Software Foundation; either version 2.1, or
8  *  (at your option) any later version.
9  *
10  *  XForms is distributed in the hope that it will be useful, but
11  *  WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  *  Lesser General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Lesser General Public
16  *  License along with XForms; see the file COPYING.  If not, write to
17  *  the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
18  *  MA 02111-1307, USA.
19  */
20 
21 
22 /*
23  * This demo shows the use of special symbol labels
24  *
25  * This file is part of xforms packge
26  * M. Overmars and T.C. Zhao (1997)
27  */
28 
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif
32 
33 #include "include/forms.h"
34 
35 
36 /***************************************
37  ***************************************/
38 
39 int
main(int argc,char * argv[])40 main( int    argc,
41       char * argv[ ] )
42 {
43     FL_FORM *form;
44     FL_OBJECT *obj;
45 
46     fl_initialize( &argc, argv, "FormDemo", 0, 0 );
47 
48     form = fl_bgn_form( FL_FLAT_BOX, 400, 400 );
49 
50     obj = fl_add_button( FL_NORMAL_BUTTON, 50, 250, 100, 100, "@1" );
51     fl_set_object_lcolor( obj, FL_BLUE );
52 
53     obj = fl_add_button( FL_NORMAL_BUTTON, 150, 250, 100, 100, "@2" );
54     fl_set_object_lcolor( obj, FL_BLUE );
55 
56     obj = fl_add_button( FL_NORMAL_BUTTON, 250, 250, 100, 100, "@3" );
57     fl_set_object_lcolor( obj, FL_BLUE );
58 
59     obj = fl_add_button( FL_NORMAL_BUTTON, 50, 150, 100, 100, "@4" );
60     fl_set_object_lcolor( obj, FL_BLUE );
61 
62     obj = fl_add_button( FL_NORMAL_BUTTON, 250, 150, 100, 100, "@6" );
63     fl_set_object_lcolor( obj, FL_BLUE );
64 
65     obj = fl_add_button( FL_NORMAL_BUTTON, 50, 50, 100, 100, "@7" );
66     fl_set_object_lcolor( obj, FL_BLUE );
67 
68     obj = fl_add_button( FL_NORMAL_BUTTON, 150, 50, 100, 100, "@8" );
69     fl_set_object_lcolor( obj, FL_BLUE );
70 
71     obj = fl_add_button( FL_NORMAL_BUTTON, 250, 50, 100, 100, "@9" );
72     fl_set_object_lcolor( obj, FL_BLUE );
73 
74     obj = fl_add_button( FL_NORMAL_BUTTON, 150, 150, 100, 100, "@square" );
75     fl_set_object_lcolor( obj, FL_GREEN );
76     fl_set_object_color( obj, FL_MAGENTA, FL_RED );
77 
78     fl_end_form( );
79 
80     fl_show_form( form, FL_PLACE_ASPECT, FL_TRANSIENT, "Buttons" );
81 
82     while ( fl_do_forms( ) != obj )
83         /* empty */ ;
84 
85     fl_finish( );
86     return 0;
87 }
88 
89 
90 /*
91  * Local variables:
92  * tab-width: 4
93  * indent-tabs-mode: nil
94  * End:
95  */
96