Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.0 - 日本語

Change language to:
English - Français - Português

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab manual >> Graphics Library > interaction > seteventhandler

seteventhandler

カレントのグラフィックウインドウのイベントハンドルを設定

呼び出し手順

seteventhandler(sfun_name)
seteventhandler('')

パラメータ

sfun_name

文字列. イベントを処理させるScilab関数の名前

説明

この関数によりユーザはカレントのグラフィックウインドウの特定のイベントの ハンドラを設定できます. seteventhandler('')はハンドラを削除します.

イベントハンドラ関数に関する詳細については, event handler functionsヘルプを参照ください.

function my_eventhandler(win, x, y, ibut)
  if ibut==-1000 then return,end
  [x,y]=xchange(x,y,'i2f')
  xinfo(msprintf('Event code %d at mouse position is (%f,%f)',ibut,x,y))
endfunction

plot2d()
seteventhandler('my_eventhandler')
//ここで:
//   -  グラフィックウインドウでマウスを移動
//   -  シフトキーまたはCtrlキーを押す/押さない状態でキーを押す
//   -  ボタンを押し, 少し待ってから離す
//   -  ボタンを押して離す
//   -  ボタンをダブルクリック

seteventhandler('') //イベントハンドラを削除
<< locate interaction xclick >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jan 26 16:25:13 CET 2011