OUTPUT BUFFER:
# # $Id: cursors.tcl,v 1.2 2008/10/28 20:02:03 jenglish Exp $ # # Map symbolic cursor names to platform-appropriate cursors. # # The following cursors are defined: # # standard -- default cursor for most controls # "" -- inherit cursor from parent window # none -- no cursor # # text -- editable widgets (entry, text) # link -- hyperlinks within text # crosshair -- graphic selection, fine control # busy -- operation in progress # forbidden -- action not allowed # # hresize -- horizontal resizing # vresize -- vertical resizing # # Also resize cursors for each of the compass points, # {nw,n,ne,w,e,sw,s,se}resize. # # Platform notes: # # Windows doesn't distinguish resizing at the 8 compass points, # only horizontal, vertical, and the two diagonals. # # OSX doesn't have resize cursors for nw, ne, sw, or se corners. # We use the Tk-defined X11 fallbacks for these. # # X11 doesn't have a "forbidden" cursor (usually a slashed circle); # "pirate" seems to be the conventional cursor for this purpose. # # Windows has an IDC_HELP cursor, but it's not available from Tk. # # Tk does not support "none" on Windows. # namespace eval ttk { variable Cursors # Use X11 cursor names as defaults, since Tk supplies these # on all platforms. # array set Cursors { "" "" none none standard left_ptr text xterm link hand2 crosshair crosshair busy watch forbidden pirate hresize sb_h_double_arrow vresize sb_v_double_arrow nresize top_side sresize bottom_side wresize left_side eresize right_side nwresize top_left_corner neresize top_right_corner swresize bottom_left_corner seresize bottom_right_corner move fleur } # Platform-specific overrides for Windows and OSX. # switch [tk windowingsystem] { "win32" { array set Cursors { none {} standard arrow text ibeam link hand2 crosshair crosshair busy wait forbidden no vresize size_ns nresize size_ns sresize size_ns wresize size_we eresize size_we hresize size_we nwresize size_nw_se swresize size_ne_sw neresize size_ne_sw seresize size_nw_se } } "aqua" { if {[package vsatisfies [package provide Tk] 8.5]} { # appeared 2007-04-23, Tk 8.5a6 array set Cursors { standard arrow text ibeam link pointinghand crosshair crosshair busy watch forbidden notallowed hresize resizeleftright vresize resizeupdown nresize resizeup sresize resizedown wresize resizeleft eresize resizeright } } } } } ## ttk::cursor $cursor -- # Return platform-specific cursor for specified symbolic cursor. # proc ttk::cursor {name} { variable Cursors return $Cursors($name) } ## ttk::setCursor $w $cursor -- # Set the cursor for specified window. # # [ttk::setCursor] should be used in