Пример #1
0
        public CPaned(Paned p)
        {
            if (!(p is VPaned) || !(p.Child2 is Expander))
            {
                Console.WriteLine("CPaned: this ain't gonna fly");
                return;
            }

            paned    = p;
            expander = p.Child2 as Expander;

            paned.SizeAllocated +=
                new SizeAllocatedHandler(OnPanedSizeAllocated);
            paned.AcceptPosition +=
                new AcceptPositionHandler(OnPanedAcceptPosition);
            paned.ButtonPressEvent +=
                new ButtonPressEventHandler(OnPanedButtonPressEvent);
            paned.ButtonReleaseEvent +=
                new ButtonReleaseEventHandler(OnPanedButtonReleaseEvent);
            paned.AddNotification(
                "position", new NotifyHandler(OnPanedPositionChanged));

            expander.AddNotification("expanded", new GLib.NotifyHandler(OnExpandedChanged));
        }