/
FXProgressBar.rb
executable file
·57 lines (44 loc) · 1.36 KB
/
FXProgressBar.rb
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
module Fox
#
# Progress bar widget
#
# === Progress bar styles
#
# +PROGRESSBAR_HORIZONTAL+:: Horizontal display
# +PROGRESSBAR_VERTICAL+:: Vertical display
# +PROGRESSBAR_PERCENTAGE+:: Show percentage done
# +PROGRESSBAR_DIAL+:: Show as a dial instead of bar
# +PROGRESSBAR_NORMAL+:: same as <tt>FRAME_SUNKEN|FRAME_THICK</tt>
#
class FXProgressBar < FXFrame
# Amount of progress [Integer]
attr_accessor :progress
# Maximum value for progress [Integer]
attr_accessor :total
# Bar width [Integer]
attr_accessor :barSize
# Bar color {FXColor}
attr_accessor :barColor
# Bar background color {FXColor}
attr_accessor :barBGColor
# Text color {FXColor}
attr_accessor :textColor
# Alternate text color {FXColor}
attr_accessor :textAltColor
# Text font {FXFont}
attr_accessor :font
# Progress bar style [Integer]
attr_accessor :barStyle
#
# Construct progress bar.
#
def initialize(p, target=nil, selector=0, opts=PROGRESSBAR_NORMAL, x=0, y=0, width=0, height=0, padLeft=DEFAULT_PAD, padRight=DEFAULT_PAD, padTop=DEFAULT_PAD, padBottom=DEFAULT_PAD) # :yields: theProgressBar
end
# Increment progress by given _amount_.
def increment(amount); end
# Hide progress percentage
def hideNumber; end
# Show progress percentage
def showNumber; end
end
end