Class: Iup::ProgressBar

Inherits:
Widget
  • Object
show all
Defined in:
lib/wrapped/progressbar.rb

Overview

A progress bar control, showing a percent-complete value.

Attributes

dashed

Changes style of progress bar to a dashed pattern, as ‘yes’ / ‘no’.

expand

Allows bar to fill available space in indicated direction. Values ‘no’ / ‘horizontal’ / ‘vertical’ / ‘yes’.

marquee

Displays an undefined state if set. Values ‘yes’ / ‘no’.

max

maximum value, default 1.

min

minimum value, default 0.

orientation

‘horizontal’ / ‘vertical’.

position

read-only returns position in pixels within client window as “x,y”.

rastersize

Size of the widget, in pixels, value as “widthxheight”.

screenposition

read-only returns position in pixels on screen as “x,y”.

tip

Tooltip string.

value

number between min and max, for current position.

Instance Attribute Summary

Attributes inherited from Widget

#handle

Instance Method Summary collapse

Methods inherited from Widget

#assign_handle, #enterwindow_cb, #getfocus_cb, #help_cb, #k_any, #killfocus_cb, #leavewindow_cb, #map_cb, #open_controls, #unmap_cb

Methods included from AttributeBuilders

#define_attribute, #define_id_attribute, #define_id_readonly, #define_id_writeonly, #define_property_attribute, #define_property_writeonly, #define_readonly, #define_writeonly

Methods included from CallbackSetter

#define_callback

Constructor Details

#initialize(&block) ⇒ ProgressBar

Creates an instance of a progress bar.

block

optional block to set up the widget’s appearance.



26
27
28
29
30
31
# File 'lib/wrapped/progressbar.rb', line 26

def initialize &block
  @handle = IupLib.IupProgressBar

  # run any provided block on instance, to set up further attributes
  self.instance_eval &block if block_given?
end