# copyright= 'Huynh Duong Phuong Vi @ 2013-2014'
# suforyou.vn@gmail.com
module S4U
	@s4u_menu=UI.menu("Plugins").add_submenu("Suforyou") if !S4U.instance_variable_defined?(:@s4u_menu)
	module S4u_AlignTool        
		Sketchup::require 'sketchup.rb' 
		Sketchup::require 'langhandler.rb'
		if(not file_loaded?("s4u_aligntool_menu")) 
			Sketchup::require "s4u_aligntool/s4u_aligntool_code"
			names=[Strings.GetString("Align Tools"),"aligntool_large.png","aligntool_small.png",Strings.GetString("Select target Object and aligned Object.Press hold Ctrl(Alt on Mac) -> Multiselect.Tab -> Align or Align+Move.")]             
			toolbar = UI::Toolbar.new("s4u-"+names[0])  
			commands= UI::Command.new(names[0]){self.aligntool}
			commands.large_icon = names[1] 
			commands.small_icon = names[2]
			commands.status_bar_text = names[3] 
			commands.tooltip= names[0] 
			commands.menu_text = names[0] 
			toolbar = toolbar.add_item commands
			menu=S4U.instance_variable_get :@s4u_menu 
			menu.add_item commands
			toolbar.show if toolbar.get_last_state.abs == 1 
		end
		file_loaded("s4u_aligntool_menu")
	end
end
