module Fox::Enhancement
Include this in your top class objects. If for a module, you want to extend, rather than include. FIXME: later we will clean this up.
Constants
- INITFORCE
- SPECIAL
Attributes
queues for messages objects coming from and going to other threads.
queues for messages objects coming from and going to other threads.
queues for messages objects coming from and going to other threads.
Public Class Methods
# File lib/fxruby-enhancement/enhancement.rb, line 76 def activate_deferred_setups common_ob, app: Enhancement.base Enhancement.deferred_setups.each { |b| b.(common_ob, app) } end
Sets up the mechanism by which the custom ingress is activated
# File lib/fxruby-enhancement/enhancement.rb, line 53 def activate_ingress_handlers app = Enhancement.base raise "Application Object not instantiated yet" if app.nil? || app.inst.nil? raise "No ingress blocks set" if @ingress_map.empty? @ing_blk = ->(sender, sel, data) { begin unless @ingress.empty? @ingress_delay = @ms_ingress_delay_min until @ingress.empty? dispatch_to, payload = @ingress.next raise "Unknown dispatch ':#{dispatch_to}'" unless @ingress_map.member? dispatch_to @ingress_map[dispatch_to].(dispatch_to, payload) end else @ingress_delay *= 2 unless @ingress_delay >= @ms_ingress_delay_max end ensure app.inst.addTimeout(@ingress_delay, &@ing_blk) end } app.inst.addTimeout(@ingress_delay ||= @ms_ingress_delay_min, &@ing_blk) end
# File lib/fxruby-enhancement/enhancement.rb, line 37 def included(klass) @ingress ||= QDing.new @egress ||= QDing.new @ingress_map ||= {} @deferred_setups ||= [] @ms_ingress_delay_min = 100 @ms_ingress_delay_max = 1600 klass.extend ClassMethods end
# File lib/fxruby-enhancement/enhancement.rb, line 48 def reset_components @components = {} end
Public Instance Methods
Start a drag
# File lib/fxruby-enhancement/api-mapper.rb, line 12048 def sel_begindrag(&block) self.connect(SEL_BEGINDRAG, &block) end
GUI has changed
# File lib/fxruby-enhancement/api-mapper.rb, line 11993 def sel_changed(&block) self.connect(SEL_CHANGED, &block) end
Background chore
# File lib/fxruby-enhancement/api-mapper.rb, line 12093 def sel_chore(&block) self.connect(SEL_CHORE, &block) end
Clicked
# File lib/fxruby-enhancement/api-mapper.rb, line 11973 def sel_clicked(&block) self.connect(SEL_CLICKED, &block) end
Widget gained clipboard
# File lib/fxruby-enhancement/api-mapper.rb, line 12083 def sel_clipboard_gained(&block) self.connect(SEL_CLIPBOARD_GAINED, &block) end
Widget lost clipboard
# File lib/fxruby-enhancement/api-mapper.rb, line 12078 def sel_clipboard_lost(&block) self.connect(SEL_CLIPBOARD_LOST, &block) end
Inquire clipboard data
# File lib/fxruby-enhancement/api-mapper.rb, line 12088 def sel_clipboard_request(&block) self.connect(SEL_CLIPBOARD_REQUEST, &block) end
Close window
# File lib/fxruby-enhancement/api-mapper.rb, line 11938 def sel_close(&block) self.connect(SEL_CLOSE, &block) end
Closed
# File lib/fxruby-enhancement/api-mapper.rb, line 12033 def sel_closed(&block) self.connect(SEL_CLOSED, &block) end
Collapsed
# File lib/fxruby-enhancement/api-mapper.rb, line 12043 def sel_collapsed(&block) self.connect(SEL_COLLAPSED, &block) end
GUI command
# File lib/fxruby-enhancement/api-mapper.rb, line 11968 def sel_command(&block) self.connect(SEL_COMMAND, &block) end
Resize
# File lib/fxruby-enhancement/api-mapper.rb, line 11908 def sel_configure(&block) self.connect(SEL_CONFIGURE, &block) end
# File lib/fxruby-enhancement/api-mapper.rb, line 11888 def sel_create(&block) self.connect(SEL_CREATE, &block) end
Delete window
# File lib/fxruby-enhancement/api-mapper.rb, line 11943 def sel_delete(&block) self.connect(SEL_DELETE, &block) end
Deleted
# File lib/fxruby-enhancement/api-mapper.rb, line 12023 def sel_deleted(&block) self.connect(SEL_DELETED, &block) end
Deselected
# File lib/fxruby-enhancement/api-mapper.rb, line 12003 def sel_deselected(&block) self.connect(SEL_DESELECTED, &block) end
# File lib/fxruby-enhancement/api-mapper.rb, line 11893 def sel_destroy(&block) self.connect(SEL_DESTROY, &block) end
Drop on drop target
# File lib/fxruby-enhancement/api-mapper.rb, line 12143 def sel_dnd_drop(&block) self.connect(SEL_DND_DROP, &block) end
Drag action entering potential drop target
# File lib/fxruby-enhancement/api-mapper.rb, line 12133 def sel_dnd_enter(&block) self.connect(SEL_DND_ENTER, &block) end
Drag action leaving potential drop target
# File lib/fxruby-enhancement/api-mapper.rb, line 12138 def sel_dnd_leave(&block) self.connect(SEL_DND_LEAVE, &block) end
Drag position changed over potential drop target
# File lib/fxruby-enhancement/api-mapper.rb, line 12148 def sel_dnd_motion(&block) self.connect(SEL_DND_MOTION, &block) end
Inquire drag and drop data
# File lib/fxruby-enhancement/api-mapper.rb, line 12153 def sel_dnd_request(&block) self.connect(SEL_DND_REQUEST, &block) end
Toolbar docked
# File lib/fxruby-enhancement/api-mapper.rb, line 12188 def sel_docked(&block) self.connect(SEL_DOCKED, &block) end
Double-clicked
# File lib/fxruby-enhancement/api-mapper.rb, line 11978 def sel_doubleclicked(&block) self.connect(SEL_DOUBLECLICKED, &block) end
Dragged
# File lib/fxruby-enhancement/api-mapper.rb, line 12058 def sel_dragged(&block) self.connect(SEL_DRAGGED, &block) end
End a drag
# File lib/fxruby-enhancement/api-mapper.rb, line 12053 def sel_enddrag(&block) self.connect(SEL_ENDDRAG, &block) end
Mouse entered window
# File lib/fxruby-enhancement/api-mapper.rb, line 11853 def sel_enter(&block) self.connect(SEL_ENTER, &block) end
Expanded
# File lib/fxruby-enhancement/api-mapper.rb, line 12038 def sel_expanded(&block) self.connect(SEL_EXPANDED, &block) end
Toolbar floated
# File lib/fxruby-enhancement/api-mapper.rb, line 12193 def sel_floated(&block) self.connect(SEL_FLOATED, &block) end
Focus moved down
# File lib/fxruby-enhancement/api-mapper.rb, line 12113 def sel_focus_down(&block) self.connect(SEL_FOCUS_DOWN, &block) end
Focus moved left
# File lib/fxruby-enhancement/api-mapper.rb, line 12108 def sel_focus_left(&block) self.connect(SEL_FOCUS_LEFT, &block) end
Focus moved to next widget
# File lib/fxruby-enhancement/api-mapper.rb, line 12123 def sel_focus_next(&block) self.connect(SEL_FOCUS_NEXT, &block) end
Focus moved to previous widget
# File lib/fxruby-enhancement/api-mapper.rb, line 12128 def sel_focus_prev(&block) self.connect(SEL_FOCUS_PREV, &block) end
Focus moved right
# File lib/fxruby-enhancement/api-mapper.rb, line 12103 def sel_focus_right(&block) self.connect(SEL_FOCUS_RIGHT, &block) end
Focus on widget itself
# File lib/fxruby-enhancement/api-mapper.rb, line 12098 def sel_focus_self(&block) self.connect(SEL_FOCUS_SELF, &block) end
Focus moved up
# File lib/fxruby-enhancement/api-mapper.rb, line 12118 def sel_focus_up(&block) self.connect(SEL_FOCUS_UP, &block) end
Focus into window
# File lib/fxruby-enhancement/api-mapper.rb, line 11863 def sel_focusin(&block) self.connect(SEL_FOCUSIN, &block) end
Focus out of window
# File lib/fxruby-enhancement/api-mapper.rb, line 11868 def sel_focusout(&block) self.connect(SEL_FOCUSOUT, &block) end
Inserted
# File lib/fxruby-enhancement/api-mapper.rb, line 12013 def sel_inserted(&block) self.connect(SEL_INSERTED, &block) end
Except activity on a pipe
# File lib/fxruby-enhancement/api-mapper.rb, line 12168 def sel_io_except(&block) self.connect(SEL_IO_EXCEPT, &block) end
Read activity on a pipe
# File lib/fxruby-enhancement/api-mapper.rb, line 12158 def sel_io_read(&block) self.connect(SEL_IO_READ, &block) end
Write activity on a pipe
# File lib/fxruby-enhancement/api-mapper.rb, line 12163 def sel_io_write(&block) self.connect(SEL_IO_WRITE, &block) end
# File lib/fxruby-enhancement/api-mapper.rb, line 11873 def sel_keymap(&block) self.connect(SEL_KEYMAP, &block) end
Key pressed
# File lib/fxruby-enhancement/api-mapper.rb, line 11808 def sel_keypress(&block) self.connect(SEL_KEYPRESS, &block) end
Key released
# File lib/fxruby-enhancement/api-mapper.rb, line 11813 def sel_keyrelease(&block) self.connect(SEL_KEYRELEASE, &block) end
Lassoed
# File lib/fxruby-enhancement/api-mapper.rb, line 12063 def sel_lassoed(&block) self.connect(SEL_LASSOED, &block) end
Mouse left window
# File lib/fxruby-enhancement/api-mapper.rb, line 11858 def sel_leave(&block) self.connect(SEL_LEAVE, &block) end
Window to bottom of stack
# File lib/fxruby-enhancement/api-mapper.rb, line 11933 def sel_lowered(&block) self.connect(SEL_LOWERED, &block) end
Window was shown
# File lib/fxruby-enhancement/api-mapper.rb, line 11903 def sel_map(&block) self.connect(SEL_MAP, &block) end
Maximized
# File lib/fxruby-enhancement/api-mapper.rb, line 11958 def sel_maximize(&block) self.connect(SEL_MAXIMIZE, &block) end
Iconified
# File lib/fxruby-enhancement/api-mapper.rb, line 11948 def sel_minimize(&block) self.connect(SEL_MINIMIZE, &block) end
Mouse motion
# File lib/fxruby-enhancement/api-mapper.rb, line 11848 def sel_motion(&block) self.connect(SEL_MOTION, &block) end
Mouse wheel
# File lib/fxruby-enhancement/api-mapper.rb, line 11988 def sel_mousewheel(&block) self.connect(SEL_MOUSEWHEEL, &block) end
# File lib/fxruby-enhancement/api-mapper.rb, line 11803 def sel_none(&block) self.connect(SEL_NONE, &block) end
Opened
# File lib/fxruby-enhancement/api-mapper.rb, line 12028 def sel_opened(&block) self.connect(SEL_OPENED, &block) end
Must repaint window
# File lib/fxruby-enhancement/api-mapper.rb, line 11883 def sel_paint(&block) self.connect(SEL_PAINT, &block) end
Picked some location
# File lib/fxruby-enhancement/api-mapper.rb, line 12173 def sel_picked(&block) self.connect(SEL_PICKED, &block) end
Message inquiring about statusline help
# File lib/fxruby-enhancement/api-mapper.rb, line 12183 def sel_query_help(&block) self.connect(SEL_QUERY_HELP, &block) end
Message inquiring about tooltip
# File lib/fxruby-enhancement/api-mapper.rb, line 12178 def sel_query_tip(&block) self.connect(SEL_QUERY_TIP, &block) end
Window to top of stack
# File lib/fxruby-enhancement/api-mapper.rb, line 11928 def sel_raised(&block) self.connect(SEL_RAISED, &block) end
Replaced
# File lib/fxruby-enhancement/api-mapper.rb, line 12018 def sel_replaced(&block) self.connect(SEL_REPLACED, &block) end
No longer iconified or maximized
# File lib/fxruby-enhancement/api-mapper.rb, line 11953 def sel_restore(&block) self.connect(SEL_RESTORE, &block) end
Selected
# File lib/fxruby-enhancement/api-mapper.rb, line 12008 def sel_selected(&block) self.connect(SEL_SELECTED, &block) end
Widget gained selection
# File lib/fxruby-enhancement/api-mapper.rb, line 11918 def sel_selection_gained(&block) self.connect(SEL_SELECTION_GAINED, &block) end
Widget lost selection
# File lib/fxruby-enhancement/api-mapper.rb, line 11913 def sel_selection_lost(&block) self.connect(SEL_SELECTION_LOST, &block) end
Inquire selection data
# File lib/fxruby-enhancement/api-mapper.rb, line 11923 def sel_selection_request(&block) self.connect(SEL_SELECTION_REQUEST, &block) end
Session is closed
# File lib/fxruby-enhancement/api-mapper.rb, line 12203 def sel_session_closed(&block) self.connect(SEL_SESSION_CLOSED, &block) end
Session is about to close
# File lib/fxruby-enhancement/api-mapper.rb, line 12198 def sel_session_notify(&block) self.connect(SEL_SESSION_NOTIFY, &block) end
Signal received
# File lib/fxruby-enhancement/api-mapper.rb, line 12073 def sel_signal(&block) self.connect(SEL_SIGNAL, &block) end
Timeout occurred
# File lib/fxruby-enhancement/api-mapper.rb, line 12068 def sel_timeout(&block) self.connect(SEL_TIMEOUT, &block) end
Triple-clicked
# File lib/fxruby-enhancement/api-mapper.rb, line 11983 def sel_tripleclicked(&block) self.connect(SEL_TRIPLECLICKED, &block) end
Lost the grab (Windows)
# File lib/fxruby-enhancement/api-mapper.rb, line 11878 def sel_ungrabbed(&block) self.connect(SEL_UNGRABBED, &block) end
Window was hidden
# File lib/fxruby-enhancement/api-mapper.rb, line 11898 def sel_unmap(&block) self.connect(SEL_UNMAP, &block) end
GUI update
# File lib/fxruby-enhancement/api-mapper.rb, line 11963 def sel_update(&block) self.connect(SEL_UPDATE, &block) end
Verify change
# File lib/fxruby-enhancement/api-mapper.rb, line 11998 def sel_verify(&block) self.connect(SEL_VERIFY, &block) end