Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
module Fox
#
# An icon source is an object that loads an icon of any type.
# It exists purely for convenience, to make loading icons
# simpler by concentrating the knowledge of the supported
# icon formats in a single place.
# Needless to say, this class is subclassable, allowing users
# to add additional icon types and make them available to
# all widgets which deal with icons.
# Note, the icons are loaded, but _not_ created (realized) yet;
# this allows users to manipulate the pixel data prior to
# realizing the icons.
#
class FXIconSource < FXObject
#
# Construct an icon source, given a reference to the application object.
#
def initialize(app) # :yields: theIconSource
end
#
# Load an icon from the file _filename_. By default, the file extension is
# stripped and used as the icon _type_; if an explicit icon type is forced,
# then that type is used and the extension is ignored.
# For example, loadIcon("icon", "gif") will try to load a CompuServe GIF
# file, since the filename does not give any clue as to the type of the
# icon.
# Returns a reference to the icon.
#
def loadIconFile(filename, type=nil); end
#
# Load an icon of a given type (e.g. "gif") from reswrapped data.
# Returns +nil+ if there's some error loading the icon. (The optional
# _type_ parameter is actually mandatory at the time of this writing; future
# versions will attempt to inspect the first few bytes of the stream
# to divine the icon format if the parameter is omitted).
# Returns a reference to the icon.
#
def loadIconData(pixels, type=nil); end
#
# Load an icon of a given type (e.g. "gif") from an already open stream.
# Returns +nil+ if there's some error loading the icon. (The optional
# _type_ parameter is actually mandatory at the time of this writing; future
# versions will attempt to inspect the first few bytes of the stream
# to divine the icon format if the parameter is omitted).
# Returns a reference to the icon.
#
def loadIconStream(store, type=nil); end
#
# Load an image from the file filename. By default, the file extension is
# stripped and used as the image type; if an explicit image type is forced,
# then that type is used and the extension is ignored.
# For example, loadImage("image","gif") will try to load a CompuServe GIF
# file, since the filename does not give any clue as to the type of the
# image.
#
def loadImageFile(filename, type=nil); end
#
# Load an image of a given type (e.g. "gif") from reswrapped data.
# Returns +nil+ if there's some error loading the icon. (The optional
# parameter is actually mandatory at the time of this writing; future
# versions will attempt to inspect the first few bytes of the stream
# to divine the icon format if the parameter is omitted).
#
def loadImageData(pixels, type=nil); end
#
# Load an image of a given type (e.g. "gif") from an already open stream.
# Returns +nil+ if there's some error loading the image. (The optional
# parameter is actually mandatory at the time of this writing; future
# versions will attempt to inspect the first few bytes of the stream
# to divine the image format if the parameter is omitted).
#
def loadImageStream(store, type=nil); end
# Load icon and scale it such that its dimensions do not exceed given size
def loadScaledIconFile(filename, size=32, qual=0, type=nil); end
# Load icon and scale it such that its dimensions do not exceed given size
def loadScaledIconData(pixels, size=32, qual=0, type=nil); end
# Load icon and scale it such that its dimensions do not exceed given size
def loadScaledIconStream(store, size=32, qual=0, type=nil); end
# Load image and scale it such that its dimensions do not exceed given size
def loadScaledImageFile(filename, size=32, qual=0, type=nil); end
# Load image and scale it such that its dimensions do not exceed given size
def loadScaledImageData(pixels, size=32, qual=0, type=nil); end
# Load image and scale it such that its dimensions do not exceed given size
def loadScaledImageStream(store, size=32, qual=0, type=nil); end
end
end