FLTK 1.4.4
Toggle main menu visibility
Loading...
Searching...
No Matches
Fl_ICO_Image.H
1
//
2
// ICO image header file for the Fast Light Tool Kit (FLTK).
3
//
4
// Copyright 2022-2023 by Bill Spitzak and others.
5
//
6
// This library is free software. Distribution and use rights are outlined in
7
// the file "COPYING" which should have been included with this file. If this
8
// file is missing or damaged, see the license at:
9
//
10
// http://www.fltk.org/COPYING.php
11
//
12
// Please report all bugs and problems on the following page:
13
//
14
// http://www.fltk.org/str.php
15
//
16
17
// https://en.wikipedia.org/wiki/ICO_(file_format)
18
// http://www.daubnet.com/en/file-format-ico
19
20
#ifndef Fl_ICO_Image_H
21
# define Fl_ICO_Image_H
22
# include "Fl_BMP_Image.H"
23
27
class
FL_EXPORT
Fl_ICO_Image
:
public
Fl_BMP_Image
{
28
29
public
:
31
struct
IconDirEntry
{
32
int
bWidth
;
33
int
bHeight
;
34
int
bColorCount
;
35
int
bReserved
;
36
int
wPlanes
;
37
int
wBitCount
;
38
int
dwBytesInRes
;
39
int
dwImageOffset
;
40
};
41
42
Fl_ICO_Image
(
const
char
*filename,
int
id
= -1,
const
unsigned
char
*
data
= NULL,
const
size_t
datasize = 0);
43
~Fl_ICO_Image
();
44
46
int
idcount
()
const
{
return
idcount_; }
47
49
const
IconDirEntry
*
icondirentry
()
const
{
return
icondirentry_; }
50
51
private
:
52
int
idcount_;
53
struct
IconDirEntry *icondirentry_;
54
void
load_ico_(
class
Fl_Image_Reader
&rdr,
int
id
);
55
};
56
57
#endif
// Fl_ICO_Image_H
Fl_BMP_Image::Fl_BMP_Image
Fl_BMP_Image(const char *filename)
This constructor loads the named BMP image from the given BMP filename.
Definition
Fl_BMP_Image.cxx:57
Fl_ICO_Image::Fl_ICO_Image
Fl_ICO_Image(const char *filename, int id=-1, const unsigned char *data=NULL, const size_t datasize=0)
Loads the named icon image from the given .ico filename or from memory.
Definition
Fl_ICO_Image.cxx:39
Fl_ICO_Image::icondirentry
const IconDirEntry * icondirentry() const
Returns the array of idcount() loaded IconDirEntry structures.
Definition
Fl_ICO_Image.H:49
Fl_ICO_Image::idcount
int idcount() const
Returns the number of icons of various resolutions present in the ICO object.
Definition
Fl_ICO_Image.H:46
Fl_Image_Reader
Definition
Fl_Image_Reader.h:32
Fl_Image::data
void data(const char *const *p, int c)
Sets the current data pointer and count of pointers in the array.
Definition
Fl_Image.H:117
Fl_ICO_Image::IconDirEntry
Windows ICONDIRENTRY structure.
Definition
Fl_ICO_Image.H:31
Fl_ICO_Image::IconDirEntry::bHeight
int bHeight
Image height.
Definition
Fl_ICO_Image.H:33
Fl_ICO_Image::IconDirEntry::wBitCount
int wBitCount
Bits per pixel.
Definition
Fl_ICO_Image.H:37
Fl_ICO_Image::IconDirEntry::bWidth
int bWidth
Image width.
Definition
Fl_ICO_Image.H:32
Fl_ICO_Image::IconDirEntry::wPlanes
int wPlanes
Color Planes.
Definition
Fl_ICO_Image.H:36
Fl_ICO_Image::IconDirEntry::dwImageOffset
int dwImageOffset
Offset to the image.
Definition
Fl_ICO_Image.H:39
Fl_ICO_Image::IconDirEntry::dwBytesInRes
int dwBytesInRes
Resource size in bytes.
Definition
Fl_ICO_Image.H:38
Fl_ICO_Image::IconDirEntry::bReserved
int bReserved
Reserved.
Definition
Fl_ICO_Image.H:35
Fl_ICO_Image::IconDirEntry::bColorCount
int bColorCount
Number of colors (0 if ≥ 8bpp).
Definition
Fl_ICO_Image.H:34
FL
Fl_ICO_Image.H
Generated by
1.17.0