コード例 #1
0
ファイル: CssBox.cs プロジェクト: danieloff/HtmlRenderer
        public CssBox(BoxSpec spec)
        {
            _aa_boxes = new CssBoxCollection();
#if DEBUG
            //if (__aa_dbugId == 13)
            //{
            //}
            //if (!spec.IsFreezed)
            //{
            //    //must be freezed
            //    throw new NotSupportedException();
            //}
#endif

            //assign spec
            _myspec = spec;
            EvaluateSpec(spec);
            ChangeDisplayType(this, _myspec.CssDisplay);
        }
コード例 #2
0
ファイル: CssBox.cs プロジェクト: danieloff/HtmlRenderer
        public CssBox(BoxSpec spec, CssDisplay displayType)
        {
            _aa_boxes = new CssBoxCollection();
#if DEBUG
            //if (__aa_dbugId == 13)
            //{
            //}
            if (!spec.IsFreezed)
            {
                //must be freezed
                throw new NotSupportedException();
            }
#endif

            //assign spec
            _boxCompactFlags |= BoxFlags.DONT_CHANGE_DISPLAY_TYPE;
            _cssDisplay       = displayType;
            _myspec           = spec;
            //----------------------------
            EvaluateSpec(spec);
            ChangeDisplayType(this, _myspec.CssDisplay);
        }
コード例 #3
0
        /// <summary>
        /// append box to this element's absolute layer
        /// </summary>
        /// <param name="box"></param>
        public void AppendToAbsoluteLayer(CssBox box)
        {
            //find proper ancestor node for absolute position
            if (this._absPosLayer == null)
            {
                this._absPosLayer = new CssBoxCollection();
            }
            if (box.ParentBox != null)
            {
                box.ParentBox.RemoveChild(box);
            }

            this._absPosLayer.AddChild(this, box);
            //if (this._absLayer2 == null)
            //{
            //    this._absLayer2 = new List<CssBox>();
            //}
            //TODO: fix here again
            //if (!_absLayer2.Contains(box))
            //{
            //    this._absLayer2.Add(box);
            //}
        }
コード例 #4
0
        /// <summary>
        /// append box to this element's absolute layer
        /// </summary>
        /// <param name="box"></param>
        public void AppendToAbsoluteLayer(CssBox box)
        {
            //find proper ancestor node for absolute position 
            if (this._absPosLayer == null)
            {
                this._absPosLayer = new CssBoxCollection();
            }
            if (box.ParentBox != null)
            {
                box.ParentBox.RemoveChild(box);
            }

            this._absPosLayer.AddChild(this, box);
            //if (this._absLayer2 == null)
            //{
            //    this._absLayer2 = new List<CssBox>();
            //}
            //TODO: fix here again 
            //if (!_absLayer2.Contains(box))
            //{
            //    this._absLayer2.Add(box);
            //}

        }