Example #1
0
void WMDeleteLeafForTreeNode(WMTreeNode * aNode, int index)
{
	wassertr(aNode != NULL);
	wassertr(aNode->leaves != NULL);

	WMDeleteFromArray(aNode->leaves, index);
}
Example #2
0
void WMRemoveSplitViewSubviewAt(WMSplitView * sPtr, int index)
{
	CHECK_CLASS(sPtr, WC_SplitView);

	/* TODO: same about rewrite */
	if (index >= 0 && index < _GetSubviewsCount()) {
		WMDeleteFromArray(sPtr->subviews, index);
		sPtr->flags.adjustOnPaint = 1;
		paintSplitView(sPtr);
	}
}
Example #3
0
void WMRemoveLeafForTreeNode(WMTreeNode * aNode, void *leaf)
{
	int index;

	wassertr(aNode != NULL);
	wassertr(aNode->leaves != NULL);

	index = WMFindInArray(aNode->leaves, sameData, leaf);
	if (index != WANotFound) {
		WMDeleteFromArray(aNode->leaves, index);
	}
}
Example #4
0
void WMRemoveSplitViewSubview(WMSplitView * sPtr, WMView * view)
{
	W_SplitViewSubview *p;
	int i, count;

	CHECK_CLASS(sPtr, WC_SplitView);

	/* TODO: rewrite this. This code with macros is getting more complex than it worths */
	count = _GetSubviewsCount();
	for (i = 0; i < count; i++) {
		p = _GetPSubviewStructAt(i);
		if (p->view == view) {
			WMDeleteFromArray(sPtr->subviews, i);
			sPtr->flags.adjustOnPaint = 1;
			paintSplitView(sPtr);
			break;
		}
	}
}