Esempio n. 1
0
        protected void CreateMotifGadget(
            Native.Motif.CreateSymbol sym, IWidget parent, XResource res)
        {
            if (0 == this.Name.Length) {
                // 名無しは作れないので強制命名
                this.Name = AppContext.CreateTempName(this.GetType().Name);
            }

            IntPtr w = Native.Motif.XmSports.CallCreate2P(sym,
                                    parent,
                                    this.Name,
                                    (null != res) ? res.ToXtArg() : null);

            if (IntPtr.Zero == w) {
                throw new Exception($"{sym.ToString()} failed");
            }
            NativeHandle = new Native.WidgetHandle(w);
            if (null != res) {
                res.Clear();
            }
        }
Esempio n. 2
0
 internal Rendition(IntPtr rendition)
 {
     resource = new XResource(null);
     isReference = true;
     handle = rendition;
 }
Esempio n. 3
0
 public Rendition(Widgets.IWidget widget)
 {
     resource = new XResource(null);
     handle = NativeMethods.XmRenditionCreate(widget.NativeHandle.Widget,
                 Native.Motif.StringConstant.XmFONTLIST_DEFAULT_TAG, new Native.Xt.NativeXtArg[]{}, 0);
 }
Esempio n. 4
0
 public Rendition(Widgets.IWidget widget, string tag)
 {
     resource = new XResource(null);
     handle = NativeMethods.XmRenditionCreate(widget.NativeHandle.Widget, tag, new Native.Xt.NativeXtArg[]{}, 0);
 }
Esempio n. 5
0
 public Rendition()
 {
     resource = new XResource(null);
 }