4Misc_Startl4Platforml@ xHHL Xg(HHdh xHHL Xg(HHdh x HH(Fg(HHdh ^Graph*NWDashSettings#  ! 4i6Normal@ Lucida Console<HHHH$$4 4 4 4 4 4 ohome;3dC:Users:TRM:Desktop:C:Users:TRM:Desktop,i\TRM\ ҢC,C:\Users\TRM\ C:\UsersDesktop\HC:\Users\TRM\HRecentWindows}Advanced Topics.ihfIgor Mouse CursorsIgor Reference.ihfMouse Cursor Control NotesMouse Cursor Demo GraphProgramming.ihf 4Misc_EndlTXOPState_Start lPeakFunctions2-64fIgor Mouse C4XOPState_Endl`AV_Flag?mouseCursorCode!b21|@B1M2M2Ādata????n=a>>>#>?|M?y3?OF?jW?le?p?x?}?d?~?.z?M(s?h?0[?K?(9?U\$? ?>0>>Á>D*ZsľU/׌yQM=#j$>X>>W>O?F0(?:>kN>=!Iut~/D {:"/7IOZHgFrye~\K~sy1qߣf]X |H˜5x \ yl*01=H>" >??Ϧ1?D?yU?.d?o?x&x?r}?? 1L 1wτIgorMouseCursors!????01234567891011121314151617181920212223242526272829303132Arrow cursorIBeam cursorWatch cursorCrosshair cursorLeft/Up arrows cursorLeft/Right arrows cursorUp/Down arrows cursorRight/Down arrows cursorLeft/Right/Up/Down arrows cursorContextual Menu cursorLeft/Down arrows cursorUp/Right arrows cursorSmall cross cursorHand cursorSquare with X cursorCircle with cross cursorDouble box with dot cursorQuestion mark cursorSmall box with large cross cursorLightning bolt cursorSmall cross cursorFour-way arrows cursorLeft/Right arrows with thick bar cursorUp/Down arrows with thick bar cursor"Click" cursorTop/Left frame corner cursorHelp balloon cursorFinger cursorFour-way arrows cursorLeft/Right arrows cursorUp/Down arrows cursorNorthwest/Southeast arrows cursorNortheast/Southwest arrows cursorkArrowCursorkIBeamCursorkWatchCursorkCrosshairCursorkLeftUpArrowsCursorkLeftRightArrowsCursorkUpDownArrowsCursorkRightDownArrowsCursorkLeftRightUpDownArrowsCursorkContextualMenuCursorkLeftDownArrowsCursorkUpRightArrowsCursorkSmallCrossCursorkHandCursorkSquareWithXCursorkCircleWithCrossCursorkAttachTagCursorkQuestionMarkCursorkEditPointCursorkDeletePointCursorkDrawPointCursorkDragEdgeCursorkDragVerticalAxisCursorkDragHorizontalAxisCursorkClickCursorkPlacePictureCursorkHelpBalloonCursorkFingerCursorkFourArrowsCursorkLeftRightArrowsCursor2kUpDownArrowsCursor2kNorthwestSoutheastArrowsCursorkNortheastSouthwestArrowsCursorObject selection toolText selection toolWatch icon indicating that something will take a while to executeUsed in the body of graphsIndicates that left-clicking will display a contextual menuUsed when in drawing layers when a click creates or extends a drawing objectUsed for dragging annotationsUsed to represent graph cursor B when dragging that cursorUsed to represent graph cursor A when dragging that cursorUsed for dragging tag annotations to attach to another wave pointUsed for dragging points during wave editingUsed for zapping points during wave editingUsed for drawing points during wave editingUsed for dragging the edge of a polygon in drawing modeUsed for dragging vertical axes and similar draggingUsed for dragging horizontal axes and similar draggingUsed with Sleep/B operationUsed for placing pictures in page layout windowsUsed when the mouse is over a help link or notebook action  "$&(*,.02468DP\l);FZr%IWs$0<L_u &<L_o6Ji      FFF#ddQ *d0TMW????NotesMouseCursorControlNotesMouse Cursor Control Notesr]}r]}HH(Fg(HHdh   $Normal 6< BHHHH$$< Zv   Mouse Cursor Control Notes  yThis experiment is for advanced programmers using the mouse-cursor-setting features of Igor named window hook functions.  WAn advanced Igor programmer can use a window hook function to change the mouse cursor.  You might want to do this, for example, if your window hook function intercepts mouse events on certain items (e.g., textboxes, waves) and performs custom actions. By setting a custom cursor you indicate to the user that clicking the items results in different from normal actions.  To set the mouse cursor your window hook function must set the doSetCursor and cursorCode fields of the WMWinHookStruct structure passed to it.  The procedure window of this experiment contains a window hook function that demonstrates this feature using the "Cursor Demo Graph". Activate the graph and press the up and down arrow keys - the graph window displays the next Igor mouse cursor and displays information about it.  KTo see a list of cursor codes, choose Windows->Tables->Igor Mouse Cursors.  Z|BJhppGeneva// Platform=WindowsNT, IGORVersion=7.020, architecture=Intel, systemTextEncoding="Windows-1252", historyTextEncoding="MacRoman", procwinTextEncoding="MacRoman", recreationTextEncoding="MacRoman", build=28598 #pragma TextEncoding = "MacRoman" Silent 101 // use | as bitwise or -- not comment. DefaultFont "Arial" MoveWindow/P 29.25,52.25,989.25,617 IgorMouseCursorTables() MouseCursorDemoGraph() String/G root:gWMSetNextTextFilesTextEncoding = "MacRoman" // Text encoding for MouseCursorControlNotes. Used by Igor Pro 7. OpenNotebook/N=MouseCursorControlNotes/W=(114,155,893.25,605)/J=7335 "Notes" as "Mouse Cursor Control Notes" MoveWindow/C 27.75,538.25,987.75,740.75 KillStrings/Z root:gWMSetNextTextFilesTextEncoding Window MouseCursorDemoGraph() : Graph PauseUpdate; Silent 1 // building window... Display /W=(33,53,954,383.75)/K=1 data as "Mouse Cursor Demo Graph" TextBox/C/N=MouseCursorReadout/M/B=(65535,65532,16385)/A=LT/X=0.00/Y=0.00 "\\Z24Press the up or down arrow key to change the mouse cursor" AppendText "Mouse cursor code = 0 (kArrowCursor)\rArrow cursor\rObject selection tool" SetWindow kwTopWin,hook(MouseCursorHook)=MouseCursorHook EndMacro Window IgorMouseCursorTables() : Table PauseUpdate; Silent 1 // building window... Edit/W=(35.25,49.25,995.25,614) IgorMouseCursors as "Igor Mouse Cursors" ModifyTable format(Point)=1,width(Point)=0,size(IgorMouseCursors)=12,alignment(IgorMouseCursors)=0 ModifyTable width(IgorMouseCursors.d)=136,width[1]=78,width[2]=256,width[3]=232 ModifyTable width[4]=494 ModifyTable title(IgorMouseCursors.d)="",title[1]="cursorCode",title[2]="Description" ModifyTable title[3]="InternalName",title[4]="Notes" ModifyTable showParts=0xfb EndMacro  #pragma rtGlobals=1 // Use modern global access method. Menu "Macros" "Demo Mouse Cursor Hooks",/Q, DoWindow/K MouseCursorDemoGraph; CreateMouseCursorDemoGraph() End Function/S MouseCursorReadoutText(code) Variable code Wave/T IgorMouseCursors = root:IgorMouseCursors String mouseCursorDescription = IgorMouseCursors[code][1] String internalName = IgorMouseCursors[code][2] String mouseCursorNotes = IgorMouseCursors[code][3] String codeText String format = "Mouse cursor code = %d (%s)" sprintf codeText, format, code, internalName String text = "\\Z24Press the up or down arrow key to change the mouse cursor\r" text += codeText + "\r" text += mouseCursorDescription if (strlen(mouseCursorNotes) > 0) text += "\r" + mouseCursorNotes endif return text End Function CreateMouseCursorDemoGraph() PauseUpdate; Silent 1 // building window... Display /K=1 /W=(33,53,954,384) /N=MouseCursorDemoGraph data as "Mouse Cursor Demo Graph" String readoutText = MouseCursorReadoutText(0) TextBox/C/N=MouseCursorReadout/M/B=(65535,65532,16385)/A=LT/X=0/Y=0 readoutText SetWindow kwTopWin, hook(MouseCursorHook)=MouseCursorHook EndMacro Function SetMouseCursor(s, code) STRUCT WMWinHookStruct &s Variable code if (code < 0) code = 0 endif if (code > 32) code = 32 endif s.doSetCursor = 1 s.cursorCode = code NVAR mouseCursorCode = root:mouseCursorCode mouseCursorCode = code String readout = MouseCursorReadoutText(code) TextBox/C/N=MouseCursorReadout/W=MouseCursorDemoGraph readOut End Function IncrementMouseCursorCode(s) STRUCT WMWinHookStruct &s NVAR mouseCursorCode = root:mouseCursorCode Variable code = mouseCursorCode + 1 SetMouseCursor(s, code) End Function DecrementMouseCursorCode(s) STRUCT WMWinHookStruct &s NVAR mouseCursorCode = root:mouseCursorCode Variable code = mouseCursorCode - 1 SetMouseCursor(s, code) End Function SetSameMouseCursorCode(s) STRUCT WMWinHookStruct &s NVAR mouseCursorCode = root:mouseCursorCode Variable code = mouseCursorCode SetMouseCursor(s, code) End Function MouseCursorHook(s) STRUCT WMWinHookStruct &s Variable hookResult = 0 switch(s.eventCode) case 4: // Mouse moved event SetSameMouseCursorCode(s) break case 11: // Keyboard event switch (s.keycode) case 30: // Up arrow key IncrementMouseCursorCode(s) hookResult = 1 break case 31: // Down arrow key DecrementMouseCursorCode(s) hookResult = 1 break endswitch break endswitch return hookResult // Non-zero means we handled the event and Igor should ignore it End Window MouseCursorDemoGraph() : Graph PauseUpdate; Silent 1 // building window... Display /W=(33,53,954,384)/K=1 data as "Mouse Cursor Demo Graph" TextBox/C/N=MouseCursorReadout/M/B=(65535,65532,16385)/A=LT/X=0.60/Y=-0.71 "\\Z24Press the up or down arrow key to change the mouse cursor" AppendText "Mouse cursor code = 16 (kornCsr)\rDouble box with dot cursor\rUsed for dragging annotations" SetWindow kwTopWin,hook(MouseCursorHook)=MouseCursorHook EndMacro