immutable class TK_BUTTON_EVENT < $TK_EVENT
****
Mouse button related events Egs: The common mouse button events can be specified by
___TK_BUTTON_EVENT::B1__________Click_with_mouse_button_1
___TK_BUTTON_EVENT::B1.Double___Double_click_with_mouse_button_1
In general:
___TK_BUTTON_EVENT::Press+1______Press_mouse_button_1
___TK_BUTTON_EVENT::Release+2____Release_mouse_button_2
___TK_BUTTON_EVENT::Press.Double+1__Double_press_(click)_button_1


Ancestors
$TK_EVENT



Public


Constants
const cb_str: STR := "%# @a %b @c @d @f @h @k @m @o @p %s @t @w %x %y @@A @B @E @K @N @R @T @W %X %Y";
**** Same callback string for all button events

Features
Alt:SAME .. Included as Alt
**** Event Modifier: hold down the alt key as well to trigger the event
B1: SAME
**** Event Creation: Mouse Button 1 press
B2: SAME
B3: SAME
Caps_lock:SAME .. Included as Caps_lock
**** lock,any are pSather Event Modifier: hold down the caps lock key as well to trigger the event
Control:SAME .. Included as Control
**** Event Modifier: hold down the control key as well to trigger the event
Double:SAME .. Included as Double
**** Double occurrence of the same event, usually a click
Ignore_others:SAME .. Included as Ignore_others
**** keywords
Meta:SAME .. Included as Meta
**** Event Modifier: hold down the meta key as well to trigger the event
Mouse_1:SAME .. Included as Mouse_1
**** Modifier: while mouse button 1 is being held down
Mouse_2:SAME .. Included as Mouse_2
Mouse_3:SAME .. Included as Mouse_3
Press: SAME
**** Event Creation: Mouse Button press event
Release: SAME
**** Event Creation: Mouse Button release event
Shift:SAME .. Included as Shift
**** Event Modifier: hold down the shift key as well to trigger the event
Triple:SAME .. Included as Triple
plus(i: INT): SAME
**** Add on a detail field onto the event, indicating which button (i). An error if you do this twice or call it after calling one of B1, B2 or B3
str: STR .. Included as str
**** Return the string that Tcl needs to describe this event


Private

create(s: STR): SAME .. Included as create
**** Should not be created directly, but by one of the other calls.
const default_cb: STR := "@# @a @b @c @d @f @h @k @m @o @p @s @t @w @x @y @@A @B @E @K @N @R @T @W @X @Y"; .. Included as default_cb
**** No callback info until a string is actualy set, no information is provided
attr detail: STR; .. Included as detail
****
attr detail: STR; .. Included as detail
****
attr has_detail: BOOL; .. Included as has_detail
**** By default detail is not specified
attr has_detail: BOOL; .. Included as has_detail
**** By default detail is not specified
attr internal_str: STR; .. Included as internal_str
attr internal_str: STR; .. Included as internal_str
prepend(c: STR): SAME .. Included as prepend
**** Prepend some new modifier
set_detail(s: STR): SAME .. Included as set_detail
**** Set the detail field of this event.
verify_non_void(c: STR) .. Included as verify_non_void
**** Make sure that an event is set

The Sather Home Page