Advertisement
Guest User

Untitled

a guest
Aug 1st, 2011
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. using Gtk;
  2. using Gdk;
  3.  
  4. using Granite.Widgets;
  5. using Granite.Services;
  6.  
  7. using Foto;
  8. using Foto.Widgets;
  9.  
  10. /* FIX ME */
  11. //FotoViewer is an image widget, in this experimental state, it's
  12. //not using cairo for zoom, but it's the goal to have a cairo surface
  13. //for this work, and for resizing.
  14.  
  15.  
  16. namespace mynamespace{
  17.  
  18. public class myclass : Image{
  19.  
  20.  
  21.  
  22. //Constructor
  23. public FotoViewer(FotoWindow window){
  24.  
  25. //add events
  26. events = EventMask.SCROLL_MASK;
  27. this.scroll_event.connect (on_scroll_event);
  28.  
  29.  
  30. //etc etc
  31.  
  32.  
  33. }
  34.  
  35. private bool on_scroll_event (Gdk.EventScroll e) {
  36.  
  37. this.image_zoom_in();
  38.  
  39. return false;
  40. }
  41.  
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement