]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/bmtable.h
change some __GNUG_ to __GNUG__
[lyx.git] / src / frontends / xforms / bmtable.h
1 /**
2  * \file bmtable.h
3  * Copyright 2002 the LyX Team
4  * Copyright 1995-1996 Alejandro Aguilar Sierra
5  * Read the file COPYING
6  *
7  * \author Alejandro Aguilar Sierra
8  */
9
10 /* A bitmap table uses a single bitmap to simulate a 2d array
11  * of bitmap buttons. It can be used to build bitmap menus.
12  */
13
14 #ifndef BMTABLE_H
15 #define BMTABLE_H
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include FORMS_H_LOCATION
22
23 #if defined(__cplusplus)
24 extern "C"
25 {
26 #endif
27
28 /**/
29 #define FL_BMTABLE 1500
30 /* A flat bitmap table */
31 #define FL_BMTABLE_FLAT 0
32 /* A grided bitmap table */
33 #define FL_BMTABLE_GRID 1
34
35
36 /*  Same as fl_bitmapbutton */
37
38
39 /**
40  *  normal bmtable default
41  */
42 #define FL_BMTABLE_BOXTYPE      FL_UP_BOX
43
44
45 /**/
46 FL_OBJECT *fl_create_bmtable(int, FL_Coord, FL_Coord,
47                              FL_Coord, FL_Coord, char const *);
48 /**/
49 FL_OBJECT *fl_add_bmtable(int, FL_Coord, FL_Coord,
50                           FL_Coord, FL_Coord, char const *);
51
52 /** Same as fl_get_button_numb() */
53 int fl_get_bmtable_numb(FL_OBJECT *ob);
54 /**/
55 void fl_set_bmtable(FL_OBJECT *, int pushed, int pos);
56
57 /** Number of columns and rows, and the background bitmap */
58 void fl_set_bmtable_data(FL_OBJECT *, int, int, int, int , unsigned char const *);
59 /**/
60 void fl_set_bmtable_pixmap_data(FL_OBJECT *, int, int, char **);
61 /**/
62 void fl_set_bmtable_file(FL_OBJECT *, int, int, char const *);
63 /**/
64 void fl_set_bmtable_pixmap_file(FL_OBJECT *, int, int, char const *);
65
66 /** Adjust bitmap origin (ox, oy) and cell dimensions (dx, dy) incrementally */
67 void fl_set_bmtable_adjust(FL_OBJECT *, int ox, int oy, int dx, int dy);
68
69 /** The number of items is by default nc x nr, but you can change it */
70 void fl_set_bmtable_maxitems(FL_OBJECT *, int);
71 /**/
72 int fl_get_bmtable_maxitems(FL_OBJECT *);
73
74 /** Returns the index of the selected item or -1 if none was selected */
75 int fl_get_bmtable(FL_OBJECT *);
76
77 /** Replace an item's sub_bitmap at id position */
78 void fl_replace_bmtable_item(FL_OBJECT *ob, int id, int  cw, int ch, char *data);
79
80 /** Get the sub_bitmap from id position. You must alloc memory for the data. */
81 void fl_get_bmtable_item(FL_OBJECT *ob, int id, int *cw, int *ch, char *data);
82
83 /** Returns a pixmap from the table, if available. */
84 Pixmap fl_get_bmtable_pixmap(FL_OBJECT *);
85
86 /** Draws a single item on a drawable */
87 void fl_draw_bmtable_item(FL_OBJECT *ob, int i, Drawable d, int xx, int yy);
88
89 /** Free the current bitmap in preparation for installing a new one */
90 void fl_free_bmtable_bitmap(FL_OBJECT *ob);
91
92 /** Free the current pixmap in preparation for installing a new one */
93 void fl_free_bmtable_pixmap(FL_OBJECT *ob);
94
95 #if defined(__cplusplus)
96 }
97 #endif
98
99 #endif  /* BMTABLE_H */