Esempio n. 1
0
	void CurvePreview::SetCurve(Curve* curve)
	{
		if (mCurve)
			mCurve->onKeysChanged -= THIS_FUNC(OnCurveChanged);

		mCurve = curve;

		if (mCurve)
			mCurve->onKeysChanged += THIS_FUNC(OnCurveChanged);
	}
Esempio n. 2
0
/*
    External:   rm_not_implemented
    Purpose:    raise NotImplementedError
    Notes:      Called when a xMagick API is not available.
                Replaces Ruby's rb_notimplement function.
*/
void
rm_not_implemented(void)
{

    rb_raise(rb_eNotImpError, "the `%s' method is not supported by ImageMagick "
            MagickLibVersionText, rb_id2name(THIS_FUNC()));
}
Esempio n. 3
0
/*
    Extern:     rm_progress_monitor
    Purpose:    SetImage(Info)ProgressMonitor exit
    Notes:      ImageMagick's "tag" argument is unused. We pass along the method name instead.
*/
MagickBooleanType
rm_progress_monitor(
    const char *tag,
    const MagickOffsetType of,
    const MagickSizeType sp,
    void *client_data)
{
    volatile VALUE rval;
    volatile VALUE method, offset, span;

    tag = tag;      // defeat gcc message

#if defined(HAVE_LONG_LONG)     // defined in Ruby's defines.h
    offset = rb_ll2inum(of);
    span = rb_ull2inum(sp);
#else
    offset = rb_int2big((long)of);
    span = rb_uint2big((unsigned long)sp);
#endif

    method = rb_str_new2(rb_id2name(THIS_FUNC()));

    rval = rb_funcall((VALUE)client_data, rm_ID_call, 3, method, offset, span);

    return RTEST(rval) ? MagickTrue : MagickFalse;
}
Esempio n. 4
0
	FrameScrollView::FrameScrollView(const FrameScrollView& other):
		ScrollView(other), 
		mHorScrollbar(other.mHorScrollbar->CloneAs<HorizontalScrollBar>()), 
		mVerScrollbar(other.mVerScrollbar->CloneAs<VerticalScrollBar>())
	{
		mReady = false;

		mHorScrollbar->SetInternalParent(this);
		mHorScrollbar->onUserChange = THIS_FUNC(OnHorScrollScrolled);

		mVerScrollbar->SetInternalParent(this);
		mVerScrollbar->onUserChange = THIS_FUNC(OnVerScrollScrolled);

		RetargetStatesAnimations();

		mReady = true;
	}
Esempio n. 5
0
	void FrameScrollView::CopyData(const Actor& otherActor)
	{
		const FrameScrollView& other = dynamic_cast<const FrameScrollView&>(otherActor);

		ScrollView::CopyData(other);

		delete mHorScrollbar;
		delete mVerScrollbar;

		mHorScrollbar = other.mHorScrollbar->CloneAs<HorizontalScrollBar>();
		mHorScrollbar->SetInternalParent(this);
		mHorScrollbar->onUserChange = THIS_FUNC(OnHorScrollScrolled);

		mVerScrollbar = other.mVerScrollbar->CloneAs<VerticalScrollBar>();
		mVerScrollbar->SetInternalParent(this);
		mVerScrollbar->onUserChange = THIS_FUNC(OnVerScrollScrolled);
	}
Esempio n. 6
0
	FrameScrollView::FrameScrollView():
		ScrollView()
	{
		mReady = false;

		mHorScrollbar = mnew HorizontalScrollBar();
		*mHorScrollbar->layout = WidgetLayout::HorStretch(VerAlign::Bottom, 0, 0, 20);
		mHorScrollbar->SetInternalParent(this);
		mHorScrollbar->onUserChange = THIS_FUNC(OnHorScrollScrolled);

		mVerScrollbar = mnew VerticalScrollBar();
		*mVerScrollbar->layout = WidgetLayout::VerStretch(HorAlign::Right, 0, 0, 20);
		mVerScrollbar->SetInternalParent(this);
		mVerScrollbar->onUserChange = THIS_FUNC(OnVerScrollScrolled);

		mReady = true;
	}
Esempio n. 7
0
	void FrameScrollView::SetHorScrollbar(HorizontalScrollBar* scrollbar)
	{
		delete mHorScrollbar;
		mHorScrollbar = scrollbar;
		mHorScrollbar->SetInternalParent(this);
		mHorScrollbar->onUserChange = THIS_FUNC(OnHorScrollScrolled);

		SetLayoutDirty();
	}
Esempio n. 8
0
	void FrameScrollView::SetVerScrollbar(VerticalScrollBar* scrollbar)
	{
		delete mVerScrollbar;
		mVerScrollbar = scrollbar;
		mVerScrollbar->SetInternalParent(this);
		mVerScrollbar->onUserChange = THIS_FUNC(OnVerScrollScrolled);

		SetLayoutDirty();
	}
Esempio n. 9
0
	void EnumProperty::InitializeControls()
	{
		mDropDown = FindChildByType<DropDown>();
		if (mDropDown)
		{
			mDropDown->onSelectedText = THIS_FUNC(OnSelectedItem);
			mDropDown->SetState("undefined", true);
		}
	}
Esempio n. 10
0
	AssetsFoldersTree::AssetsFoldersTree():
		Widget()
	{
		if (!UIManager::IsSingletonInitialzed())
			return;

		mFoldersTree = o2UI.CreateWidget<Tree>("folders");
		*mFoldersTree->layout = WidgetLayout::BothStretch();

		mFoldersTree->SetRearrangeType(Tree::RearrangeType::OnlyReparent);
		mFoldersTree->SetMultipleSelectionAvailable(false);

		mFoldersTree->getObjectParentDelegate = THIS_FUNC(GetFoldersTreeNodeParent);
		mFoldersTree->getObjectChildrenDelegate = THIS_FUNC(GetFoldersTreeNodeChilds);
		mFoldersTree->fillNodeDataByObjectDelegate = THIS_FUNC(SetupFoldersTreeNode);
		mFoldersTree->onNodeDoubleClicked = THIS_FUNC(OnFoldersTreeNodeDblClick);
		mFoldersTree->onObjectsSelectionChanged = THIS_FUNC(OnFoldersTreeSelect);
		mFoldersTree->onNodeRightButtonClicked = THIS_FUNC(OnFoldersTreeRightClick);
		mFoldersTree->UpdateNodesView();

		AddChild(mFoldersTree);

		InitializeContext();
	}