FLTK 1.3.11
Toggle main menu visibility
Loading...
Searching...
No Matches
Fl_Bitmap.H
1
//
2
// "$Id$"
3
//
4
// Bitmap header file for the Fast Light Tool Kit (FLTK).
5
//
6
// Copyright 1998-2010 by Bill Spitzak and others.
7
//
8
// This library is free software. Distribution and use rights are outlined in
9
// the file "COPYING" which should have been included with this file. If this
10
// file is missing or damaged, see the license at:
11
//
12
// http://www.fltk.org/COPYING.php
13
//
14
// Please report all bugs and problems on the following page:
15
//
16
// http://www.fltk.org/str.php
17
//
18
19
/* \file
20
Fl_Bitmap widget . */
21
22
#ifndef Fl_Bitmap_H
23
#define Fl_Bitmap_H
24
# include "
Fl_Image.H
"
25
26
class
Fl_Widget
;
27
struct
Fl_Menu_Item
;
28
33
class
FL_EXPORT
Fl_Bitmap
:
public
Fl_Image {
34
friend
class
Fl_Quartz_Graphics_Driver;
35
friend
class
Fl_GDI_Graphics_Driver;
36
friend
class
Fl_GDI_Printer_Graphics_Driver;
37
friend
class
Fl_Xlib_Graphics_Driver;
38
public
:
39
41
const
uchar
*
array
;
43
int
alloc_array
;
44
45
private
:
46
int
start(
int
XP,
int
YP,
int
WP,
int
HP,
int
&cx,
int
&cy,
47
int
&X,
int
&Y,
int
&W,
int
&H);
48
#if defined(__APPLE__) || defined(WIN32)
50
void
*id_;
51
#else
53
unsigned
id_;
54
#endif
// __APPLE__ || WIN32
55
56
public
:
57
59
Fl_Bitmap
(
const
uchar
*bits,
int
W,
int
H) :
60
Fl_Image(W,H,0),
array
(bits),
alloc_array
(0), id_(0) {
data
((
const
char
**)&
array
, 1);}
61
62
Fl_Bitmap
(
const
char
*bits,
int
W,
int
H) :
63
Fl_Image(W,H,0),
array
((const
uchar
*)bits),
alloc_array
(0), id_(0) {
data
((
const
char
**)&
array
, 1);}
64
virtual
~Fl_Bitmap
();
65
virtual
Fl_Image
*copy(
int
W,
int
H);
66
Fl_Image
*copy() {
return
copy(w(), h()); }
67
virtual
void
draw(
int
X,
int
Y,
int
W,
int
H,
int
cx=0,
int
cy=0);
68
void
draw(
int
X,
int
Y) {draw(X, Y, w(), h(), 0, 0);}
69
virtual
void
label(Fl_Widget*w);
70
virtual
void
label(Fl_Menu_Item*m);
71
virtual
void
uncache();
72
};
73
74
#endif
75
76
//
77
// End of "$Id$".
78
//
Fl_Image.H
Fl_Image, Fl_RGB_Image classes.
Fl_Bitmap
The Fl_Bitmap class supports caching and drawing of mono-color (bitmap) images.
Definition
Fl_Bitmap.H:33
Fl_Bitmap::array
const uchar * array
pointer to raw bitmap data
Definition
Fl_Bitmap.H:41
Fl_Bitmap::Fl_Bitmap
Fl_Bitmap(const char *bits, int W, int H)
The constructors create a new bitmap from the specified bitmap data.
Definition
Fl_Bitmap.H:62
Fl_Bitmap::alloc_array
int alloc_array
Non-zero if array points to bitmap data allocated internally.
Definition
Fl_Bitmap.H:43
Fl_Bitmap::Fl_Bitmap
Fl_Bitmap(const uchar *bits, int W, int H)
The constructors create a new bitmap from the specified bitmap data.
Definition
Fl_Bitmap.H:59
Fl_Image
Base class for image caching and drawing.
Definition
Fl_Image.H:55
Fl_Image::data
void data(const char *const *p, int c)
Sets the current array pointer and count of pointers in the array.
Definition
Fl_Image.H:100
Fl_Widget
Fl_Widget is the base class for all widgets in FLTK.
Definition
Fl_Widget.H:101
uchar
unsigned char uchar
unsigned char
Definition
fl_types.h:30
Fl_Menu_Item
The Fl_Menu_Item structure defines a single menu item that is used by the Fl_Menu_ class.
Definition
Fl_Menu_Item.H:112
FL
Fl_Bitmap.H
Generated by
1.18.0