Class: GanttFooter

Inherits:
Gtk::HBox
  • Object
show all
Defined in:
lib/ListHolder/GanttHolder/GanttFooter.rb

Overview

this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint([email protected])

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gantt_holder) ⇒ GanttFooter

Returns a new instance of GanttFooter.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ListHolder/GanttHolder/GanttFooter.rb', line 6

def initialize(gantt_holder)
	@gantt_holder=gantt_holder
	super()
	set_height_request(20)
	pack_start(zoomer=Gtk::HBox.new,false,false)
	zoomer.pack_start(zoom_in=Gtk::Button.new.set_image(Gtk::Image.new(Gtk::Stock::ZOOM_IN,Gtk::IconSize::SMALL_TOOLBAR)))
	zoomer.pack_start(zoom_out=Gtk::Button.new.set_image(Gtk::Image.new(Gtk::Stock::ZOOM_OUT,Gtk::IconSize::SMALL_TOOLBAR)))
	zoomer.pack_start(@zoom_label=Gtk::Label.new)
	set_res_label
	zoom_in.signal_connect("pressed"){|me| 
		gantt_holder.gantt.zoom_in
	}
	zoom_out.signal_connect("pressed"){|me| 
		gantt_holder.gantt.zoom_out
	}
end

Instance Attribute Details

#gantt_holderObject (readonly)

Returns the value of attribute gantt_holder.



22
23
24
# File 'lib/ListHolder/GanttHolder/GanttFooter.rb', line 22

def gantt_holder
  @gantt_holder
end

Instance Method Details

#set_res_labelObject



23
24
25
# File 'lib/ListHolder/GanttHolder/GanttFooter.rb', line 23

def set_res_label
	@zoom_label.set_label("resolution:\n#{gantt_holder.gantt.res_name}")
end