機能 #1197 » 1197-2.patch
| core/mui/cairo_miracle_painter.rb | ||
|---|---|---|
|
def point_moved(x, y)
|
||
|
point_moved_main_icon(x, y)
|
||
|
signal_emit(:motion_notify_event, x, y)
|
||
|
textselector_select(*main_pos_to_index_forclick(x, y)[1..2]) end
|
||
|
textselector_select(*main_pos_to_index_forclick(x, y)[1..2])
|
||
|
# change cursor shape
|
||
|
index = main_pos_to_index(x, y)
|
||
|
cursor_name = if index # the cursor is placed on text
|
||
|
if message.links.respond_to?(:segment_by_index) \
|
||
|
&& message.links.segment_by_index(index)
|
||
|
# the cursor is placed on link
|
||
|
'pointer'
|
||
|
else
|
||
|
'text'
|
||
|
end
|
||
|
else
|
||
|
'default'
|
||
|
end
|
||
|
window = @tree.get_ancestor Gtk::Window
|
||
|
display = window.screen.display
|
||
|
cursor = Gdk::Cursor.new display, cursor_name
|
||
|
window.window.cursor = cursor
|
||
|
end
|
||
|
# leaveイベントを発生させる
|
||
|
def point_leaved(x, y)
|
||
|
iob_main_leave
|
||
|
signal_emit(:leave_notify_event)
|
||
|
# textselector_release
|
||
|
# restore cursor shape
|
||
|
window = @tree.get_ancestor Gtk::Window
|
||
|
display = window.screen.display
|
||
|
cursor = Gdk::Cursor.new display, 'default'
|
||
|
window.window.cursor = cursor
|
||
|
end
|
||
|
# MiraclePainterが選択解除されたことを通知する
|
||