Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 388995 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/gui/widgets/tree_view_node.cpp (-10 / +34 lines)
Lines 233-238 void ttree_view_node::clear() Link Here
233
233
234
struct ttree_view_node_implementation
234
struct ttree_view_node_implementation
235
{
235
{
236
private:
237
238
	template<class W, class It>
239
	static W* find_at_aux(
240
			  It begin
241
			, It end
242
			, const tpoint& coordinate
243
			, const bool must_be_active)
244
	{
245
		for(It it = begin; it != end; ++it) {
246
			if(W* widget = it->find_at(coordinate, must_be_active)) {
247
				return widget;
248
			}
249
		}
250
		return NULL;
251
	}
252
253
public:
254
236
	template<class W>
255
	template<class W>
237
	static W* find_at(
256
	static W* find_at(
238
			  typename tconst_duplicator<W, ttree_view_node>::type&
257
			  typename tconst_duplicator<W, ttree_view_node>::type&
Lines 250-262 struct ttree_view_node_implementation Link Here
250
		}
269
		}
251
270
252
		typedef typename tconst_duplicator<W, ttree_view_node>::type thack;
271
		typedef typename tconst_duplicator<W, ttree_view_node>::type thack;
253
		foreach(thack& node, tree_view_node.children_) {
272
		return find_at_aux<W>(tree_view_node.children_.begin(),
254
			if(W* widget = node.find_at(coordinate, must_be_active)) {
273
				      tree_view_node.children_.end(),
255
				return widget;
274
				      coordinate, must_be_active);
256
			}
257
		}
258
259
		return NULL;
260
	}
275
	}
261
};
276
};
262
277
Lines 308-314 tpoint ttree_view_node::get_current_size() const Link Here
308
		return size;
323
		return size;
309
	}
324
	}
310
325
311
	foreach(const ttree_view_node& node, children_) {
326
	for(boost::ptr_vector<ttree_view_node>::const_iterator itor =
327
			children_.begin (); itor != children_.end (); ++itor) {
328
329
		const ttree_view_node& node = *itor;
312
330
313
		if(node.grid_.get_visible() == twidget::INVISIBLE) {
331
		if(node.grid_.get_visible() == twidget::INVISIBLE) {
314
			continue;
332
			continue;
Lines 339-345 tpoint ttree_view_node::get_unfolded_size() const Link Here
339
		size.x += (get_indention_level() - 1) * tree_view().indention_step_size_;
357
		size.x += (get_indention_level() - 1) * tree_view().indention_step_size_;
340
	}
358
	}
341
359
342
	foreach(const ttree_view_node& node, children_) {
360
	for(boost::ptr_vector<ttree_view_node>::const_iterator itor =
361
			children_.begin (); itor != children_.end (); ++itor) {
362
363
		const ttree_view_node& node = *itor;
343
364
344
		if(node.grid_.get_visible() == twidget::INVISIBLE) {
365
		if(node.grid_.get_visible() == twidget::INVISIBLE) {
345
			continue;
366
			continue;
Lines 373-379 tpoint ttree_view_node::calculate_best_size(const int indention_level Link Here
373
394
374
	DBG_GUI_L << LOG_HEADER << " own grid best size " << best_size << ".\n";
395
	DBG_GUI_L << LOG_HEADER << " own grid best size " << best_size << ".\n";
375
396
376
	foreach(const ttree_view_node& node, children_) {
397
	for(boost::ptr_vector<ttree_view_node>::const_iterator itor =
398
			children_.begin (); itor != children_.end (); ++itor) {
399
400
		const ttree_view_node& node = *itor;
377
401
378
		if(node.grid_.get_visible() == twidget::INVISIBLE) {
402
		if(node.grid_.get_visible() == twidget::INVISIBLE) {
379
			continue;
403
			continue;

Return to bug 388995