FLTK 1.3.2
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
Fl_Bitmap.H
1
//
2
// "$Id: Fl_Bitmap.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
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_Xlib_Graphics_Driver
;
37
public
:
38
40
const
uchar
*
array
;
42
int
alloc_array
;
43
44
private
:
45
46
#if defined(__APPLE__) || defined(WIN32)
47
48
void
*id_;
49
#else
50
51
unsigned
id_;
52
#endif // __APPLE__ || WIN32
53
54
public
:
55
57
Fl_Bitmap
(
const
uchar
*bits,
int
W,
int
H) :
58
Fl_Image
(W,H,0), array(bits), alloc_array(0), id_(0) {
data
((
const
char
**)&array, 1);}
60
Fl_Bitmap
(
const
char
*bits,
int
W,
int
H) :
61
Fl_Image
(W,H,0), array((const
uchar
*)bits), alloc_array(0), id_(0) {
data
((
const
char
**)&array, 1);}
62
virtual
~
Fl_Bitmap
();
63
virtual
Fl_Image
*
copy
(
int
W,
int
H);
64
Fl_Image
*
copy
() {
return
copy
(
w
(),
h
()); }
65
virtual
void
draw
(
int
X,
int
Y,
int
W,
int
H,
int
cx=0,
int
cy=0);
66
void
draw
(
int
X,
int
Y) {
draw
(X, Y,
w
(),
h
(), 0, 0);}
67
virtual
void
label
(
Fl_Widget
*w);
68
virtual
void
label
(
Fl_Menu_Item
*m);
69
virtual
void
uncache
();
70
};
71
72
#endif
73
74
//
75
// End of "$Id: Fl_Bitmap.H 8864 2011-07-19 04:49:30Z greg.ercolano $".
76
//
© 1998-2012 by Bill Spitzak and others.