Exemplo n.º 1
0
        /// <summary> Initialize local ressources for all constructors. </summary>
        private void InitializeSmeRessources()
        {
            _focusedColorPixel = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.FocusedColor);

            Enter += HandleEnterDefault;
            Leave += HandleLeaveDefault;
        }
Exemplo n.º 2
0
        // ###############################################################################
        // ### C O N S T R U C T I O N   A N D   I N I T I A L I Z A T I O N
        // ###############################################################################

        #region Construction

        /// <summary> Hidden initializing constructor. </summary>
        /// <param name="display">The display pointer, that specifies the connection to the X server. <see cref="IntPtr"/> </param>
        /// <param name="screenNumber"> The appropriate screen number on the host server. <see cref="System.Int32"/> </param>
        /// <param name="parentWindow"> The X11 *** parent *** window for X11 calls. This widget has no X11 *** own *** window. <see cref="IntPtr"/> </param>
        protected XrwBox(IntPtr display, X11.TInt screenNumber, IntPtr parentWindow)
            : base(display, screenNumber, parentWindow)
        {
            _expandToAvailableWidth = true;

            _borderColorPixel     = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.OuterBorderColor);
            _backgroundColorPixel = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.BackGroundColor);
        }
Exemplo n.º 3
0
        /// <summary> Initialize local ressources for all constructors. </summary>
        private void InitializeCommandRessources()
        {
            _frameWidth = XrwTheme.InteractingFrameWidth;
            _frameType  = (TFrameTypeExt)XrwTheme.InteractingFrameType;

            _focusedColorPixel = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.FocusedColor);

            Enter         += this.HandleEnterDefault;
            Leave         += this.HandleLeaveDefault;
            ButtonPress   += this.HandleButtonPressDefault;
            ButtonRelease += this.HandleButtonReleaseDefault;
        }
        /// <summary> Initialize local ressources for all constructors. </summary>
        private void InitializeXrwVisibleRectObjRessources()
        {
            _gc = X11lib.XCreateGC(_display, _window, 0, IntPtr.Zero);
            if (_gc == IntPtr.Zero)
            {
                throw new OperationCanceledException("Failed to create graphics context.");
            }

            _backgroundColorPixel  = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.BackGroundColor);
            _darkShadowColorPixel  = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.DarkShadowColor);
            _lightShadowColorPixel = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.LightShadowColor);
        }
Exemplo n.º 5
0
 /// <summary> Initialize local ressources for all constructors. </summary>
 private void InitializeCoreRessources()
 {
     _borderColorPixel = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.OuterBorderColor);
 }
Exemplo n.º 6
0
        // ###############################################################################
        // ### A T T R I B U T E S
        // ###############################################################################

        #region Attributes


        #endregion

        // ###############################################################################
        // ### C O N S T R U C T I O N   A N D   I N I T I A L I Z A T I O N
        // ###############################################################################

        #region Construction

        /// <summary> Hidden initializing constructor. </summary>
        /// <param name="display">The display pointer, that specifies the connection to the X server. <see cref="IntPtr"/> </param>
        /// <param name="screenNumber"> The appropriate screen number on the host server. <see cref="System.Int32"/> </param>
        /// <param name="parentWindow"> The X11 *** parent *** window for X11 calls. This widget has no X11 *** own *** window. <see cref="IntPtr"/> </param>
        public XrwStack(IntPtr display, X11.TInt screenNumber, IntPtr parentWindow)
            : base(display, screenNumber, parentWindow)
        {
            _borderColorPixel     = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.OuterBorderColor);
            _backgroundColorPixel = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.BackGroundColor);
        }
Exemplo n.º 7
0
 /// <summary> Initialize local ressources for all constructors. </summary>
 private void InitializeLabelRessources()
 {
     _textColorPixel = X11lib.XAllocParsedColorByName(_display, _screenNumber, XrwTheme.TextColor);
 }