Пример #1
0
 public override void setDelegate(Delegate anyDelegate, String delegateName = null)
 {
     m_callback = (ScrollBarCallBack)anyDelegate;
 }
Пример #2
0
        public bool useScrollbar(uint order, bool side, int lineWeight, String image, int minSliderSize, uint colorNormal, uint colorSelect, bool active, ScrollBarCallBack callback, bool hideMode = false, bool shortHide = true)
		{
            if(CppObject != IntPtr.Zero) {
                m_scrollbarCallback = callback;
                return CKLBUIList_useScrollBar(CppObject, order, side, lineWeight, __MarshallingUtils.NativeUtf8FromString(image), minSliderSize, colorNormal, colorSelect, active, hideMode, shortHide);
            } else {
                throw new CKLBExceptionNullCppObject();
            }
		}
Пример #3
0
        public CKLBUIScrollBar(
                                CKLBUITask parent, 
                                uint order, float x, float y, float width, float height, 
                                int minValue, int maxValue, int pos, 
                                String image, 
                                int sliderSize, int minSliderSize,
                                uint argbNormal = 0xFFFFFFFF, uint argbSelect = 0xFFFFFFFF, bool vert = true, bool active = true, bool hideMode = false, ScrollBarCallBack callback = null)
            : base(s_classID)
        {
            NativeManagement.resetCppError();
            IntPtr ptr = CKLBUIScrollBar_create(
                        parent != null ? parent.CppObject : IntPtr.Zero,
	                    order, x, y, width, height,
	                    minValue, maxValue, pos,
	                    __MarshallingUtils.NativeUtf8FromString(image),
	                    sliderSize, minSliderSize, 
	                    argbNormal, argbSelect, vert, active, hideMode);
            NativeManagement.intercepCppError();
            bind(ptr);
            m_callback = callback;
        }
Пример #4
0
 public override void setDelegate(Delegate anyDelegate, String delegateName)
 {
     if(delegateName == "limit") {
         m_limitCallback = (LimitCallBack)anyDelegate;
     } else if(delegateName == "drag") {
         m_dragCallback = (DragCallBack)anyDelegate;
     } else if(delegateName == "dynamic") {
         m_dynamicCallback = (DynamicCallBack)anyDelegate;
     } else if(delegateName == "anim") {
         m_animCallback = (AnimCallBack)anyDelegate;
     } else if(delegateName == "scrollbar") {
         m_scrollbarCallback = (ScrollBarCallBack)anyDelegate;
     } else {
         throw new CKLBException("Unvalid delegate name");
     }
 }