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