public static void MoveWidgetBy(WidgetID inWidget, int inDeltaX, int inDeltaY)
 {
     IL.DeclareLocals(false);
     Guard.NotNull(MoveWidgetByPtr);
     IL.Push(inWidget);
     IL.Push(inDeltaX);
     IL.Push(inDeltaY);
     IL.Push(MoveWidgetByPtr);
     IL.Emit.Calli(new StandAloneMethodSig(CallingConvention.Cdecl, typeof(void), typeof(WidgetID), typeof(int), typeof(int)));
 }
Example #2
0
    /// <summary>
    /// Get settings from data store
    /// </summary>
    /// <returns>Settings</returns>
    public StringDictionary GetSettings()
    {
        string cacheId = "be_widget_" + WidgetID;

        if (Cache[cacheId] == null)
        {
            WidgetSettings ws = new WidgetSettings(WidgetID.ToString());
            Cache[cacheId] = (StringDictionary)ws.GetSettings();
        }
        return((StringDictionary)Cache[cacheId]);
    }
        public static int FixedLayout(WidgetMessage inMessage, WidgetID inWidget, IntPtr inParam1, IntPtr inParam2)
        {
            IL.DeclareLocals(false);
            Guard.NotNull(FixedLayoutPtr);
            int result;

            IL.Push(inMessage);
            IL.Push(inWidget);
            IL.Push(inParam1);
            IL.Push(inParam2);
            IL.Push(FixedLayoutPtr);
            IL.Emit.Calli(new StandAloneMethodSig(CallingConvention.Cdecl, typeof(int), typeof(WidgetMessage), typeof(WidgetID), typeof(IntPtr), typeof(IntPtr)));
            IL.Pop(out result);
            return(result);
        }
        public static int DefocusKeyboard(WidgetMessage inMessage, WidgetID inWidget, IntPtr inParam1, IntPtr inParam2, int inEatClick)
        {
            IL.DeclareLocals(false);
            Guard.NotNull(DefocusKeyboardPtr);
            int result;

            IL.Push(inMessage);
            IL.Push(inWidget);
            IL.Push(inParam1);
            IL.Push(inParam2);
            IL.Push(inEatClick);
            IL.Push(DefocusKeyboardPtr);
            IL.Emit.Calli(new StandAloneMethodSig(CallingConvention.Cdecl, typeof(int), typeof(WidgetMessage), typeof(WidgetID), typeof(IntPtr), typeof(IntPtr), typeof(int)));
            IL.Pop(out result);
            return(result);
        }
        public static int DragWidget(WidgetMessage inMessage, WidgetID inWidget, IntPtr inParam1, IntPtr inParam2, int inLeft, int inTop, int inRight, int inBottom)
        {
            IL.DeclareLocals(false);
            Guard.NotNull(DragWidgetPtr);
            int result;

            IL.Push(inMessage);
            IL.Push(inWidget);
            IL.Push(inParam1);
            IL.Push(inParam2);
            IL.Push(inLeft);
            IL.Push(inTop);
            IL.Push(inRight);
            IL.Push(inBottom);
            IL.Push(DragWidgetPtr);
            IL.Emit.Calli(new StandAloneMethodSig(CallingConvention.Cdecl, typeof(int), typeof(WidgetMessage), typeof(WidgetID), typeof(IntPtr), typeof(IntPtr), typeof(int), typeof(int), typeof(int), typeof(int)));
            IL.Pop(out result);
            return(result);
        }
 /// <inheritdoc />
 protected override int HandleMessageCore(WidgetMessage message, WidgetID widgetId, IntPtr param1, IntPtr param2)
 {
     return(WidgetUtilsAPI.SelectIfNeeded(message, widgetId, param1, param2, EatClicks.ToInt()));
 }
Example #7
0
 /// <inheritdoc />
 protected override int HandleMessageCore(WidgetMessage message, WidgetID widgetId, IntPtr param1, IntPtr param2)
 {
     return(WidgetUtilsAPI.DefocusKeyboard(message, widgetId, param1, param2, EatClicks.ToInt()));
 }
 public static unsafe void CreateWidgets(WidgetCreate *inWidgetDefs, int inCount, WidgetID inParamParent, WidgetID *ioWidgets)
 {
     IL.DeclareLocals(false);
     Guard.NotNull(CreateWidgetsPtr);
     IL.Push(inWidgetDefs);
     IL.Push(inCount);
     IL.Push(inParamParent);
     IL.Push(ioWidgets);
     IL.Push(CreateWidgetsPtr);
     IL.Emit.Calli(new StandAloneMethodSig(CallingConvention.Cdecl, typeof(void), typeof(WidgetCreate *), typeof(int), typeof(WidgetID), typeof(WidgetID *)));
 }
Example #9
0
        public static unsafe WidgetID CreateWidget(int inLeft, int inTop, int inRight, int inBottom, int inVisible, byte *inDescriptor, int inIsRoot, WidgetID inContainer, WidgetClass inClass)
        {
            IL.DeclareLocals(false);
            Guard.NotNull(CreateWidgetPtr);
            WidgetID result;

            IL.Push(inLeft);
            IL.Push(inTop);
            IL.Push(inRight);
            IL.Push(inBottom);
            IL.Push(inVisible);
            IL.Push(inDescriptor);
            IL.Push(inIsRoot);
            IL.Push(inContainer);
            IL.Push(inClass);
            IL.Push(CreateWidgetPtr);
            IL.Emit.Calli(new StandAloneMethodSig(CallingConvention.Cdecl, typeof(WidgetID), typeof(int), typeof(int), typeof(int), typeof(int), typeof(int), typeof(byte *), typeof(int), typeof(WidgetID), typeof(WidgetClass)));
            IL.Pop(out result);
            return(result);
        }
 /// <inheritdoc />
 protected override int HandleMessageCore(WidgetMessage message, WidgetID widgetId, IntPtr param1, IntPtr param2)
 {
     return(WidgetUtilsAPI.FixedLayout(message, widgetId, param1, param2));
 }