 			[accWidth, maxi]
 		else
 			[@__colWidths[col_i], @__isMaximizedCol(col_i)]
-
-
-
-	__debugCall: (name, func) ->
-		if not CUI.defaults.debug
-			return func()
-
-		getMs = ->
-			(new Date()).getTime()
-
-		start = getMs()
-		func()
-		end = getMs()
-		@__debugRect(name, end - start)
-
-	__addDebugControl: ->
-		CUI.Events.listen
-			type: "contextmenu"
-			node: @DOM
-			call: (ev) =>
-				if not (ev.altKey() and not (ev.ctrlKey() or ev.shiftKey() or ev.metaKey()))
-					return
-
-				ev.preventDefault()
-				ev.stopPropagation()
-
-				@grid.rect(true, 500)
-
-				get_maximize_text = (name, on_off) =>
-					name+": "+(if on_off then "ON" else "OFF")
-
-				items = [
-					label: "ListView[##{@listViewCounter}] Debug Menu"
-				,
-					text: "layout"
-					onClick: =>
-						@__debugCall "__doLayout", =>
-							@__doLayout(resetRows: true)
-				,
-					text: "flash"
-					onClick: =>
-						@grid.rect(true, 1000, "ListView[##{@listViewCounter}]")
-				,
-					text: "debug"
-					onClick: =>
-						@__debugCall "debug", =>
-							console.debug("ListView[##{@listViewCounter}]", @)
-							console.debug("opts:", @opts)
-							console.debug("manualColWidths:", CUI.util.dump(@__manualColWidths))
-							console.debug("colWidths:", CUI.util.dump(@__colWidths), "rowHeights:", @__rowHeights)
-				,
-					text: "appendRow"
-					onClick: =>
-						lv = new CUI.ListViewRow()
-						for col, display_col_i in @_cols
-							col_i = @getColIdx(display_col_i)
-							lv.addColumn(new CUI.ListViewColumn(text: @getColdef(col_i)+" "+@rowsCount))
-						@appendRow(lv)
-				,
-					text: "removeRow"
-					onClick: =>
-						@removeRow(@getRowIdx(@rowsCount-1))
-				,
-					text: "close"
-					onClick: =>
-						@__control.destroy()
-				]
-
-				(new CUI.Menu
-					auto_close_after_click: false
-					itemList:
-						items: items
-					show_at_position:
-						top: ev.pageY()
-						left: ev.pageX()
-				).show()
-				return false
-		@
-

	__resetCellDims: (col_i) ->
		@__cellDims = []
		@__colWidths = []
		@__rowHeights = []

	__isMaximizedCol: (col_i) ->
		col_i in @__maxCols and not @__manualColWidths.hasOwnProperty(col_i)

				continue

			row = anchor_row[anchor_row_idx]
			anchor_row_idx++

			if mode == "after"
