Exemple #1
0
static WEditMenu *makeFactoryMenu(WMWidget * parent, int width)
{
	WEditMenu *pad;

	pad = WCreateEditMenuPad(parent);
	WMResizeWidget(pad, width, 10);
	WSetEditMenuMinSize(pad, wmksize(width, 0));
	WSetEditMenuMaxSize(pad, wmksize(width, 0));
	WSetEditMenuSelectable(pad, False);
	WSetEditMenuEditable(pad, False);
	WSetEditMenuIsFactory(pad, True);
	WSetEditMenuDelegate(pad, &menuDelegate);

	return pad;
}
Exemple #2
0
static void initSourceDragInfo(WMView * sourceView, WMDraggingInfo * info)
{
	WMRect emptyZone;

	XDND_SOURCE_INFO(info) = (W_DragSourceInfo *) wmalloc(sizeof(W_DragSourceInfo));

	XDND_SOURCE_VIEW(info) = sourceView;
	XDND_DEST_WIN(info) = None;
	XDND_DRAG_ICON(info) = None;

	XDND_SOURCE_ACTION(info) = W_OperationToAction(W_VIEW_SCREEN(sourceView),
						       sourceView->dragSourceProcs->
						       wantedDropOperation(sourceView));

	XDND_DEST_ACTION(info) = None;

	XDND_SOURCE_STATE(info) = idleState;

	emptyZone.pos = wmkpoint(0, 0);
	emptyZone.size = wmksize(0, 0);
	XDND_NO_POS_ZONE(info) = emptyZone;
}