コード例 #1
0
ファイル: list.cs プロジェクト: RoDaniel/featurehouse
 public BigList(IListModel provider)
 {
     this.provider = provider;
       RefAccessible ().Role = Atk.Role.List;
       hAdjustment = new Gtk.Adjustment (0, 0, currentWidth, 1, 1, 1);
       hAdjustment.ValueChanged += new EventHandler (HAdjustmentValueChangedHandler);
       vAdjustment = new Gtk.Adjustment (0, 0, provider.Rows, 1, 1, 1);
       vAdjustment.ValueChanged += new EventHandler (VAdjustmentValueChangedHandler);
       layout = new Pango.Layout (PangoContext);
       ExposeEvent += new ExposeEventHandler (ExposeHandler);
       ButtonPressEvent += new ButtonPressEventHandler (ButtonPressEventHandler);
       ButtonReleaseEvent += new ButtonReleaseEventHandler (ButtonReleaseEventHandler);
       KeyPressEvent += new KeyPressEventHandler (KeyHandler);
       Realized += new EventHandler (RealizeHandler);
       Unrealized += new EventHandler (UnrealizeHandler);
       ScrollEvent += new ScrollEventHandler (ScrollHandler);
         SizeAllocated += new SizeAllocatedHandler (SizeAllocatedHandler);
       MotionNotifyEvent += new MotionNotifyEventHandler (MotionNotifyEventHandler);
       AddEvents ((int) EventMask.ButtonPressMask | (int) EventMask.ButtonReleaseMask | (int) EventMask.KeyPressMask | (int) EventMask.PointerMotionMask);
       CanFocus = true;
       style_widget = new EventBox ();
       style_widget.StyleSet += new StyleSetHandler (StyleHandler);
       layout.SetMarkup (ellipsis);
       layout.GetPixelSize (out ellipsis_width, out line_height);
       layout.SetMarkup ("n");
       layout.GetPixelSize (out en_width, out line_height);
       layout.SetMarkup ("W");
       layout.GetPixelSize (out en_width, out line_height);
       old_width = Allocation.Width;
 }
コード例 #2
0
ファイル: color.cs プロジェクト: GNOME/gtkglext-sharp
 public ColorTriangle(GdkGL.Config config)
 {
     m_gl = new GtkGL.GlWidget (this, config);
     Realized += new EventHandler (OnRealize);
     ConfigureEvent += new ConfigureEventHandler (OnConfigure);
     ExposeEvent += new ExposeEventHandler (OnExpose);
 }
コード例 #3
0
ファイル: PanelDibujo.cs プロジェクト: albfernandez/gSimple2
        /// <summary>Crea una nueva instancia de la clase.</summary>

        public PanelDibujo()
        {
            rdd             = new RepresentacionRDD(this);
            ExposeEvent    += new ExposeEventHandler(OnExposeEvent);
            ConfigureEvent += new ConfigureEventHandler(OnConfigureEvent);
            this.layout     = new Pango.Layout(this.PangoContext);
        }
コード例 #4
0
        public GLWidget(GLWidget sharedContextWidget)
        {
            base.DoubleBuffered = false;
            Realized           += new EventHandler(HandleRealized);
            ExposeEvent        += new ExposeEventHandler(HandleExposeEvent);

            this.sharedContextWidget = sharedContextWidget;
        }
コード例 #5
0
        public static void SetExposeTrigger(Widget widget, System.Action action)
        {
            ExposeEventHandler handler = null;

            handler = delegate {
                widget.ExposeEvent -= handler;
                action();
            };
            widget.ExposeEvent += handler;
        }
コード例 #6
0
ファイル: list.cs プロジェクト: lulzzz/ifolder
        int currentWidth = 50; // pixels

        public BigList(IListModel provider)
        {
            this.provider = provider;

            //Accessibility
            RefAccessible().Role = Atk.Role.List;

            hAdjustment = new Gtk.Adjustment(0, 0, currentWidth, 1, 1, 1);
            hAdjustment.ValueChanged += new EventHandler(HAdjustmentValueChangedHandler);

            vAdjustment = new Gtk.Adjustment(0, 0, provider.Rows, 1, 1, 1);
            vAdjustment.ValueChanged += new EventHandler(VAdjustmentValueChangedHandler);

            layout = new Pango.Layout(PangoContext);

            ExposeEvent        += new ExposeEventHandler(ExposeHandler);
            ButtonPressEvent   += new ButtonPressEventHandler(ButtonPressEventHandler);
            ButtonReleaseEvent += new ButtonReleaseEventHandler(ButtonReleaseEventHandler);
            KeyPressEvent      += new KeyPressEventHandler(KeyHandler);
            Realized           += new EventHandler(RealizeHandler);
            Unrealized         += new EventHandler(UnrealizeHandler);
            ScrollEvent        += new ScrollEventHandler(ScrollHandler);
            SizeAllocated      += new SizeAllocatedHandler(SizeAllocatedHandler);
            MotionNotifyEvent  += new MotionNotifyEventHandler(MotionNotifyEventHandler);

            AddEvents((int)EventMask.ButtonPressMask | (int)EventMask.ButtonReleaseMask | (int)EventMask.KeyPressMask | (int)EventMask.PointerMotionMask);
            CanFocus = true;

            style_widget           = new EventBox();
            style_widget.StyleSet += new StyleSetHandler(StyleHandler);

            //
            // Compute the height and ellipsis width of the font,
            // and the en_width for our ellipsizing algorithm
            //
            layout.SetMarkup(ellipsis);
            layout.GetPixelSize(out ellipsis_width, out line_height);

            layout.SetMarkup("n");
            layout.GetPixelSize(out en_width, out line_height);

            layout.SetMarkup("W");
            layout.GetPixelSize(out en_width, out line_height);

            old_width = Allocation.Width;
        }
コード例 #7
0
ファイル: gears.cs プロジェクト: GNOME/gtkglext-sharp
        public GearsArea(GdkGL.Config glconfig)
        {
            // Enable GL Widget and schedule context creating
            m_gl = new GlWidget (this, glconfig);

            // Events
            ExposeEvent += new ExposeEventHandler (OnExpose);
            ConfigureEvent += new ConfigureEventHandler (OnConfigure);
            Realized += new EventHandler (OnRealize);
            MapEvent += new MapEventHandler (OnMap);
            UnmapEvent += new UnmapEventHandler (OnUnmap);
            VisibilityNotifyEvent += new VisibilityNotifyEventHandler (OnVisible);
            AddEvents ((int)Gdk.EventMask.VisibilityNotifyMask);

            // Timers
            Timeout.Add (s_timerPeriod, new Function (OnTimer));
        }
コード例 #8
0
 public GLWidget()
 {
     base.DoubleBuffered = false;
     Realized           += new EventHandler(HandleRealized);
     ExposeEvent        += new ExposeEventHandler(HandleExposeEvent);
 }
コード例 #9
0
 public GLWidget(GLWidget sharedContextWidget)
 {
     base.DoubleBuffered = false;
     Realized += new EventHandler(HandleRealized);
     ExposeEvent += new ExposeEventHandler(HandleExposeEvent);
     
     this.sharedContextWidget = sharedContextWidget;
 }
コード例 #10
0
 public GLWidget()
 {
     base.DoubleBuffered = false;
     Realized += new EventHandler(HandleRealized);
     ExposeEvent += new ExposeEventHandler(HandleExposeEvent);
 }
コード例 #11
0
ファイル: shapes.cs プロジェクト: GNOME/gtkglext-sharp
        public ShapesArea(Config config)
        {
            m_gl = new GlWidget (this, config);

            AddEvents (	(int)(Gdk.EventMask.Button1MotionMask |
                        Gdk.EventMask.Button2MotionMask |
                        Gdk.EventMask.ButtonPressMask |
                        Gdk.EventMask.ButtonReleaseMask |
                        Gdk.EventMask.VisibilityNotifyMask) );
            Realized += new EventHandler (OnRealize);
            ConfigureEvent += new ConfigureEventHandler (OnConfigure);
            ExposeEvent += new ExposeEventHandler (OnExpose);

            ButtonPressEvent += new ButtonPressEventHandler (OnButtonPress);
            ButtonReleaseEvent += new ButtonReleaseEventHandler (OnButtonRelease);
            MotionNotifyEvent += new MotionNotifyEventHandler (OnMotionNotify);

            MapEvent += new MapEventHandler (OnMap);
            UnmapEvent += new UnmapEventHandler (OnUnmap);
            VisibilityNotifyEvent += new VisibilityNotifyEventHandler (OnVisibilityNotify);
            KeyPressEvent += new KeyPressEventHandler (OnKeyPress);

            int i = 0;
            shapeArray = new ShapeProp [9];
            shapeArray[i++] = new ShapeProp ("Cube");
            shapeArray[i++] = new ShapeProp ("Sphere");
            shapeArray[i++] = new ShapeProp ("Cone");
            shapeArray[i++] = new ShapeProp ("Torus");
            shapeArray[i++] = new ShapeProp ("Tetrahedron");
            shapeArray[i++] = new ShapeProp ("Octahedron");
            shapeArray[i++] = new ShapeProp ("Dodecahedron");
            shapeArray[i++] = new ShapeProp ("Icosahedron");
            shapeArray[i  ] = new ShapeProp ("Teapot");
            shape_current = i;
            mat_current = (MaterialProp)materialList[0];

            /*
            * Popup menu.
            */
            CreatePopupMenu ();
            ButtonPressEvent += new ButtonPressEventHandler (OnButtonPressPopupMenu);
        }