示例#1
0
        public override void CallPlace(Area area)
        {
            // dmsg( M_WML, "%s->Dock::callPlace( %s )", this->getName().c_str(), a->getName().c_str() );
            // dmsg( M_WML, "  cursor_start = %f, %f", cursor_start[0], cursor_start[1] );
            // Vector2 sub_size = a->doPlace( Rect(cursor_start,cursor_end) );
            // cursor_start[axis_sum] += sub_size[axis_sum] + style->padding[axis_sum];
            // dmsg( M_WML, "  cursor_start = %f, %f", cursor_start[0], cursor_start[1] );

            //Debug.Print(Name + ".Dock.CallPlace(" + area.Name + ")");
            //Debug.Print("  cursorStart = " + cursorStart.ToString());

            Rectangle reference = new Rectangle(cursorStart, cursorEnd);

            Vector2 subSize = area.DoPlace(reference, growDirection);

            switch (Orientation)
            {
            case Orientation.Horizontal:    cursorStart.X += growDirection.X * (subSize.X + Style.InnerPadding.X); break;

            case Orientation.Vertical:      cursorStart.Y += growDirection.Y * (subSize.Y + Style.InnerPadding.Y); break;
            }
            //Debug.Print("  cursorStart = " + cursorStart.ToString() + " subSize was " + subSize.ToString());
        }
示例#2
0
 public virtual void CallPlace(Area area)
 {
     //Debug.Print(Name + ".Area.CallPlace(" + area.Name + ")");
     area.DoPlace(rect, Vector2.One);
 }