Module: MiddleBtn

Overview

FX

Instance Method Summary collapse

Instance Method Details

#handleMMB_EventsObject



39
40
41
42
# File 'lib/libGUIb14.rb', line 39

def handleMMB_Events
  FXMAPFUNC(Fox::SEL_MIDDLEBUTTONPRESS, 0, :onMiddleBtnPress)
  FXMAPFUNC(Fox::SEL_MIDDLEBUTTONRELEASE, 0, :onMiddleBtnRelease)
end

#onMiddleBtnPress(sender, sel, evt) ⇒ Object



44
45
46
47
48
49
50
51
# File 'lib/libGUIb14.rb', line 44

def onMiddleBtnPress(sender, sel, evt)
  if enabled?
    if !target.nil? && (target.handle(self, MKUINT(selector, Fox::SEL_MIDDLEBUTTONPRESS), evt) != 0)
      return 1
    end
  end
  0
end

#onMiddleBtnRelease(sender, sel, evt) ⇒ Object



53
54
55
56
57
58
59
60
# File 'lib/libGUIb14.rb', line 53

def onMiddleBtnRelease(sender, sel, evt)
  if enabled?
    if !target.nil? && (target.handle(self, MKUINT(selector, Fox::SEL_MIDDLEBUTTONRELEASE), evt) != 0)
      return 1
    end
  end
  0
end