This file is indexed.

/usr/share/SuperCollider/HelpSource/Classes/View.schelp is in supercollider-common 1:3.8.0~repack-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
CLASS:: View
summary:: The basic visible element of GUI
categories:: GUI>Views

DESCRIPTION::
The View class is the superclass of all view classes.

The view is the basic visible element of which the graphical user interface is composed. It occupies a rectangular space on screen within which it draws itself to display some data or to indicate a mode of interaction between the user and the program. Views receive keyboard and mouse events generated by the user and respond to them by controlling the behavior of the program. They also display information about the state of the program and the data on which it operates.



CLASSMETHODS::

PRIVATE:: key

METHOD:: new

Creates a new instance of View and makes it a child of another View or Window, effectively placing it within the parent's visual space. If there is a link::#-decorator#decorator:: installed on the parent, it will manage the position of the new View.

note::

The 'parent' argument may be omitted, in which case the view will be displayed as a window on its own, when link::Classes/View#-front#shown::.

The 'bounds' argument may be omitted, in which case the view will be created with its preferred size at position (0,0).

If a parent is given and there is a layout installed on it, the layout will manage the position and size of this view and the 'bounds' argument will have no effect.
::

argument:: parent
The instance of View or Window that the new View will become a child of.

argument:: bounds
A Rect or a Point describing size and position of the new View. If a Point is given, its coordinates will denote the view's size, while the view's position will be (0,0). Position is measured relative to the parent's top-left corner.



METHOD:: globalKeyDownAction

	A settable class variable containing an object (e.g. an instance of Function or FunctionList) which is evaluated (i.e. link::Classes/Object#-value#value:: method is called on it) whenever a key is pressed, independently of keyboard focus. See also link::#-addAction::.

	When the action object is evaluated, it is passed the following arguments: view, char, modifiers, unicode, keycode.

METHOD:: globalKeyUpAction

	A settable class variable containing an object (e.g. an instance of Function or FunctionList) which is evaluated (i.e. link::Classes/Object#-value#value:: method is called on it) whenever a key is released, independently of keyboard focus. See also link::#-addAction::.

	When the action object is evaluated, it is passed the following arguments: view, char, modifiers, unicode, keycode.


METHOD:: currentDrag

	A class variable holding the content of the current drag. It is set by beginDrag.


METHOD:: currentDragString

	A class variable holding the content of the current drag as link::Classes/Object#-asCompileString#"compile string"::. It is set by beginDrag.




INSTANCEMETHODS::

SUBSECTION:: Hierarchy and existence

METHOD:: parent
	returns:: The view's parent view, or nil if the view is a top view.

METHOD:: parents
	returns:: An array of all the parents, grandparents, etc., of the view.

METHOD:: getParents
	returns:: Same as link::#-parents#parents::.

METHOD:: children
	returns:: An array of all immediate children of the view.

METHOD:: remove
	Removes the view from its parent view (if any) and destroys the view. After this method is called, the view is not usable anymore.

METHOD:: removeAll
	Removes all the children of the view and destroys them. After this method is called, the former child views are not usable anymore.

METHOD:: close

	If link::#-deleteOnClose:: is true, this method has the same effect as link::#-remove::, otherwise makes the view invisible.

METHOD:: isClosed
	returns:: A Boolean stating whether the view has been destroyed.

METHOD:: notClosed
	returns:: A Boolean, the opposite of 'isClosed'.

METHOD:: asView
	Method that allows compatibility with Window and other classes that are not real subclasses of View, but implement a part of its interface.

	returns:: This view.

SUBSECTION:: Visibility

METHOD:: visible
	Gets or sets whether the view is visible.

	Making a child view invisible means it does not occupy any space from the standpoint of the layout that contains it, so the layout will distribute the space the view occupied when visible among other views. When the view becomes visible again it is given back the same space.

	If the view has no parent, setting this to true has the same effect as link::#-front::, and setting it to false closes the window without destroying it.

	argument::
		A Boolean stating the visibility of the view.

METHOD:: front

	If the view does not have a parent, displays it on the screen as a window (it has the same effect as setting link::#-visible:: to true), otherwise it has no effect.

METHOD:: minimize

	If the view is a window, hides it (only keep it present in the dock/taskbar/etc.).

METHOD:: unminimize

	If the view is a window, restores the its previous state after being minimized.

METHOD:: fullScreen

	If the view is a window, displays it full-screen.

METHOD:: endFullScreen

	If the view is a window, restores its previous state after being displayed full-screen.

METHOD:: alwaysOnTop


	If the view is a window, gets or sets whether it should always stay on top of other windows.

	argument:: boolean
		A Boolean stating whether the view should always stay on top.




SUBSECTION:: Size and position

METHOD:: bounds

	Gets or sets both the position and the size of the view. The position is relative to the parent view's top-left corner. Some containers, such as HLayoutView and VLayoutView, will use only the width and height of a child view's bounds.

	The setter takes a Rect or a Point interpreted link::Classes/Point#-asRect#as Rect::. The getter always returns a Rect.

METHOD:: absoluteBounds

	returns:: A Rect describing the absolute position and the size of the view on the screen.

METHOD:: sizeHint

	returns:: A Size describing the preferred size of the view to comfortably display its contents and allow useful interaction.

METHOD:: minSizeHint


	returns:: A Size describing the minimum size of the view to be able to display its contents and allow any interaction.

METHOD:: maxSize

	Set maximum allowed size of the view. The view will not be able to grow larger than this size, neither by user interaction nor programmatically.

	argument:: size
		A Size.

METHOD:: minSize

	Set minimum allowed size of the view. The view will not be able to shrink smaller than this size, neither by user interaction nor programmatically.

	argument:: size
		A Size.


METHOD:: fixedSize

	Set both minimum and maximum allowed size of the view, thus making it non-resizable.

	argument:: size
		A Size.

METHOD:: fixedWidth

	Set both minimum and maximum allowed width of the view, thus making it non-resizable.

	argument:: width
		An Int.

METHOD:: fixedHeight

	Set both minimum and maximum allowed height of the view, thus making it non-resizable.

	argument:: height
		An Int.

METHOD:: maxWidth

	Set maximum allowed width of the view, the view will not be able to grow larger in width, neither by user interaction nor programmatically.

	argument:: width
		An Int.


METHOD:: minWidth

	Set minimum allowed width of the view, the view will not be able to shrink smaller in width, neither by user interaction nor programmatically.

	argument:: width
		An Int.


METHOD:: maxHeight

	Set maximum allowed height of the view, the view will not be able to grow larger in height, neither by user interaction nor programmatically.

	argument:: height
		An Int.



METHOD:: minHeight

	Set minimum allowed height of the view, the view will not be able to shrink smaller in height, neither by user interaction nor programmatically.

	argument:: height
		An Int.

METHOD:: moveTo

	Move the view to new position, preserving its size.

	argument:: x
		An Int: the horizontal position of the new position.

	argument:: y
			An Int: the vertical position of the new position.

METHOD:: resizeTo

	Resize the view, preserving its position.

	argument:: width
		An Int: the new horizontal size of the view.

	argument:: height
		An Int: the new vertical size of the view.

METHOD:: resize
	Determines what happens with the view's position and size when its parent is resized. See link::Guides/GUI-Introduction#view:: for further explanation.

	argument::
		An Int (1 to 9) defining the auto-resize behavior. See link::Reference/Resize:: for a list of valid resize modes.

METHOD:: decorator


	Get or set the decorator object, that automatically manages the positioning of new children of the view when they are created. See link::Guides/GUI-Introduction#decorators:: for further explanation.

	argument::
		An instance of a decorator class (e.g. FlowLayout).

METHOD:: addFlowLayout


	A convenience method which sets decorator to a new instance of FlowLayout. See link::Classes/FlowLayout:: for examples.

	argument:: margin
		A Point describing the link::Classes/FlowLayout#-margin#margin:: of the FlowLayout.

	argument:: gap
		A Point describing the link::Classes/FlowLayout#-gap#gap:: of the FlowLayout.

	returns:: The new FlowLayout instance.

METHOD:: flow


	Creates a FlowView as a child of the view, and then evaluates the object given in the 'func' argument. It is most common to pass a Function for 'func' in which the FlowView is filled with other child views.

	argument:: func
		The object that will be evaluated after the creation of the FlowView, passing the new FlowView instance as an argument.

	argument:: bounds
		A Rect to set as the bounds of the FlowView, or nil, implying the size of this view and position (0,0).

		After 'func' is evaluated, the FlowView will be resized to fit its contents and cast away any extra space it occupies.

	returns:: The new FlowView instance.

METHOD:: layout


	Get or set the layout object, that automatically manages the position and the size of the children of the view dynamically, in relation to the view's size. See link::Guides/GUI-Introduction#layouts:: for further explanation.

	argument::
		An instance of a subclass of Layout.




METHOD:: mapToGlobal


	Map a point relative to this view's top-left to absolute position on screen.

	argument::
		A Point describing a position relative to the view.

	returns::
		A Point describing the same position, but relative to the screen.


SUBSECTION:: Appearance

METHOD:: name


	If the view is a window, sets its title

	argument::
		A String containing text for the window title.


METHOD:: alpha


	If the view is a window, this controls its transparency.

	argument:: aFloat
		A Float between 0.0 (invisible) and 1.0 (opaque).

METHOD:: font
	note:: Every view has this method.::
	The font used by the view to display text (if any).

	argument::
		A Font.


METHOD:: background
	Get or set the color of whatever is considered the background of the view.

	argument::
		A Color.


METHOD:: focusColor
	Get or set the color used to display keyboard focus on the view.

	argument::
		A Color.

METHOD:: palette

	Get or set the palette to be used by the view.

	When setting a palette, only those colors that have been set on the palette will take effect, other colors will be inherited from the parent view's palette. See also link::Classes/QPalette#-hasColor::.

	When getting a palette, it will return a new copy of the view's palette every time. Therefore, if you wish to change the view's palette, you have to set the changed palette back on the view:

code::
	w = Window().front.layout_( HLayout( a = Slider() ) );
	a.action = { |a|
		a.palette = a.palette.buttonText_( if(a.value > 0.5){Color.red}{Color.green} );
	};
	a.valueAction = 0.0;
::

	To dynamically modify the view's palette, it is thus more efficient, if possible, to keep a palette instance to operate on. Note that this is also more efficient than using methods like link::Classes/Slider#-knobColor::, since internally they use the above approach:

code::
	w = Window().front.layout_( HLayout( a = Slider() ) );
	p = QPalette();
	a.action = { |a|
		a.palette = p.buttonText_( if(a.value > 0.5){Color.red}{Color.green} );
	};
	a.valueAction = 0.0;
::

	See link::Classes/QPalette:: for detailed explanation of how palettes work.

	argument::
		A QPalette.

METHOD:: refresh
	Redraws the view and all its children.


SUBSECTION:: Common behavior


METHOD:: userCanClose


	If the view is a window, sets or gets whether the user can close it via mouse or key actions.

	argument::
		A Boolean.


METHOD:: deleteOnClose


	Sets or gets whether the view should be destroyed when closed.

	argument::
		A Boolean.

METHOD:: enabled
	Sets or gets whether the view allows the user to interact with it. Usually, when a view is disabled it will be displayed differently (typically it will be greyed out).

	argument::
		A Boolean.


METHOD:: canFocus
	Sets or gets whether the view can receive keyboard focus.

	argument::
		A Boolean.

METHOD:: focus
	If 'flag' is true, gives keyboard focus to the view (if possible), otherwise removes the keyboard focus from it.

	argument:: flag
		A Boolean.

METHOD:: hasFocus

	returns:: A Boolean, stating whether the view currently has the keyboard focus.

METHOD:: acceptsMouse


    Sets or gets whether the view responds to mouse interaction. If code::false::, the view will be completely transparent for mouse and interaction will be possible with any view under.

    Defaults to code::true::.

    argument::
        A Boolean.

METHOD:: acceptsMouseOver
	If this is a top view, this variable defines whether the view and all its children receive mouse-over events. The default is code::false::.

	See also: link::#-mouseOverAction::.

	argument::
		A Boolean.


SUBSECTION:: Actions in general

METHOD:: action
	Gets or sets the default action of the view, i.e. the object to be evaluated when the user interacts with the view in an essential way (e.g. a Button is clicked, a ListView item is selected, etc.).

	argument:: func
		Any object to set as default action, usually a Function or a FunctionList. When evaluated, it will be passed the view as an argument.


METHOD:: doAction
	Evaluates the default link::#-action#action::.


METHOD:: addAction
METHOD:: removeAction

	Adds/removes 'func' to or from the list of objects in the variable determined by 'selector'. If 'selector' is not an Array or a List, it will become one, containing the previous object plus 'func'.

	This is useful for adding functionality to existing frameworks that have action functions already.

	argument:: func
		Any object to add as an action, usually a Function.

	argument:: selector
		A Symbol containing the name of the action variable to which 'func' will be added. In other words, 'add' method will be invoked on that variable; by default that is \action, but any other (sensible) instance or class variable of the view could work (e.g. \globalKeyDownAction or \mouseUpAction or \onClose, etc.). See the other action variables below.

SUBSECTION:: Key and mouse event processing

Both mouse and key events can propagate to the parent view. Event processing works differently: by default, after a mouse or key action is evaluated, the control returns to the C++ implementation of the view, and if no response to the particular mouse or key event is implemented there, it propagates to the parent.

If you wish to control whether the event will be propagated or not, return code::true:: or code::false:: from the action. True means you have responded to the event, and the propagation will be stopped; false means you are not interested in the event, and the event will propagate. However, returning either code::true:: or code::false:: will completely bypass the view's C++ implementation, so it will not get a chance at responding to the event with its standard behavior. Use this feature with care.

SUBSECTION:: Mouse actions

Use the methods below to set or get the view's actions in response to mouse interaction with the view. A view must be enabled for the mouse actions to work.

note::
Mouse actions are subject to emphasis::event propagation::. See link::#Key and mouse event processing:: for details.
::

When the mouse action object is evaluated, it is passed one or more arguments from the following list (in that order):

list::
## strong::view:: - the view
## strong::x:: - the x coordinate
## strong::y:: - the y coordinate
## strong::modifiers:: - A bitwise or of integers indicating the modifier keys in effect. For a list of these, see link::Reference/Modifiers::.
## strong::buttonNumber:: - 0-left, 1-right, 2-middle, etc.
## strong::clickCount:: - the number of clicks within the system click time limit. At least 1.
::

METHOD:: mouseDownAction
    The object to be evaluated when a mouse button is pressed on the view.

    The following arguments are passed at evaluation: strong::view, x, y, modifiers, buttonNumber, clickCount::. See link::#Mouse actions:: for explanation of arguments.

    The return value of evaluation controls the event propagation to parent view. See link::#Key and mouse event processing:: for details.

METHOD:: mouseUpAction
    The object to be evaluated when a mouse button is released after it was pressed on the view.

    The following arguments are passed at evaluation: strong::view, x, y, modifiers::. See link::#Mouse actions:: for explanation of arguments.

    The return value of evaluation controls the event propagation to parent view. See link::#Key and mouse event processing:: for details.

METHOD:: mouseMoveAction
    The object to be evaluated whenever the mouse pointer moves after a mouse button was pressed on the view.

    The following arguments are passed at evaluation: strong::view, x, y, modifiers::. See link::#Mouse actions:: for explanation of arguments.

    The return value of evaluation controls the event propagation to parent view. See link::#Key and mouse event processing:: for details.

METHOD:: mouseOverAction
    The object to be evaluated when the mouse pointer moves over the view with no mouse buttons pressed.

    The following arguments are passed at evaluation: strong::view, x, y::. See link::#Mouse actions:: for explanation of arguments.

    The object is evaluated only when link::Classes/Window#-acceptsMouseOver:: of the containing Window (or link::#-acceptsMouseOver:: of the top View) is code::true::.

    The return value of evaluation controls the event propagation to parent view. See link::#Key and mouse event processing:: for details.

METHOD:: mouseWheelAction

    The object to be evaluated when the mouse wheel is used while the mouse is pointing onto the view.

    The following arguments are passed at evaluation: strong::view, x, y, modifiers, xDelta, yDelta::. See link::#Mouse actions:: for explanation of arguments.

    The xDelta and yDelta arguments express rotation in horizontal and vertical direction, respectively. The value is in degrees (typically, an event occurs every 15 degrees), and can be positive or negative, depending on the direction of rotation.

    The return value of evaluation controls the event propagation to parent view. See link::#Key and mouse event processing:: for details.

METHOD:: mouseEnterAction

    The object to be evaluated when the mouse pointer enters the view.

    The following arguments are passed at evaluation: strong::view, x, y::. See link::#Mouse actions:: for explanation of arguments.

METHOD:: mouseLeaveAction

    The object to be evaluated when the mouse pointer leaves the view.

    The following arguments are passed at evaluation: strong::view, x, y::. See link::#Mouse actions:: for explanation of arguments.


SUBSECTION:: Key actions

Use the methods below to set or get the view's actions in response to keyboard interaction when the view has the keyboard focus.

note::
Key actions are subject to emphasis::event propagation::. See link::#Key and mouse event processing:: for details.
::

When the key action object is evaluated, it is passed one or more arguments from the following list (in that order):

list::
## strong::view:: - The view.

## strong::char:: - The character (link::Classes/Char::) associated with the key, possibly unprintable. Character sequences (for example é) get passed as two characters, the first one blank ( ), the second one is the unmodified character (e). This will also vary depending on the nationality the keyboard is set to.
note:: Only characters with an ASCII code are passed. Non-ASCII keys (Ctrl/Alt/Cmd/Shift modifiers, arrow keys and other control sequences) will pass a link::Classes/Char:: with ASCII code 0. (Ctrl-characters emphasis::do:: have ASCII codes, and are passed as a Char. The Ctrl key by itself also triggers the key action, but with ASCII code 0.) A useful test is link::Classes/Char#-isPrint::.::

## strong::modifiers:: - A bitwise or of integers indicating the modifier keys in effect. You can examine individual flag settings using the C bitwise AND operator. For a list of these, see link::Reference/Modifiers::.

## strong::unicode:: - The Integer unicode number associated with the 'char' passed.

## strong::keycode:: - The hardware dependent keycode indicating the physical key. This will vary from machine to machine, but is useful for building musical interfaces using the computer keyboard. warning::Function key modifier in combination with another key may change the latter's keycode.::

## strong::key:: - An Integer denoting a key, corresponding to the "Key" enum of the Qt C++ API. Comparing this value is the most reliable way to check which key was pressed. For a list of possible values, see: link::http://qt-project.org/doc/qt-4.8/qt.html#Key-enum::.
::

METHOD:: keyDownAction
    The object to be evaluated when a key is pressed.

    The following arguments are passed at evaluation: strong::view, char, modifiers, unicode, keycode, key::. See link::#Key actions:: for explanation of arguments.

    The return value of evaluation controls the event propagation to parent view. See link::#Key and mouse event processing:: for details.

    If no code::keyDownAction:: is set, link::#-defaultKeyDownAction:: is called instead, and its return value controls the event propagation.

CODE::
// open a new document that posts the parameters passed into the keydownAction function.
(
Document("test arguments").keyDownAction = { |doc, char, mod, unicode, keycode, key|
	[doc, char, mod, unicode, keycode, key].postln
};
)
::

METHOD:: keyUpAction
    The object to be evaluated when a key is released.

    The following arguments are passed at evaluation: strong::view, char, modifiers, unicode, keycode, key::. See link::#Key actions:: for explanation of arguments.

    The return value of evaluation controls the event propagation to parent view. See link::#Key and mouse event processing:: for details.

    If no code::keyUpAction:: is set, link::#-defaultKeyUpAction:: is called instead, and its return value controls the event propagation.

METHOD:: keyModifiersChangedAction
    The object to be evaluated when a modifier key is pressed or released.

    The following arguments are passed at evaluation: strong::view, modifiers::.


SUBSECTION:: Drag and drop

Use the methods below to define or override how the view handles drag&drop operations.

METHOD:: beginDragAction
	Sets or gets the object evaluated when a drag&drop operation is initiated.

	At evaluation, the following arguments will be passed: strong:: view, x, y ::. The view expects an object to be returned which will become the data subject to the drag&drop operation. Returning nil will prevent the drag&drop operation to begin.

	If this variable is nil (the default) the view's link::#-defaultGetDrag:: method is called instead.

METHOD:: canReceiveDragHandler
	Sets or gets the object evaluated when the mouse pointer moves over the view while a drag&drop operation is taking place.

	At evaluation, the following arguments will be passed: strong:: view, x, y ::. The view expects the link::#*currentDrag#drag&drop data:: to be examined, and a Boolean returned stating whether the view can make use of that data. If true is returned, the data may be dropped on the view, otherwise the drop event will not be handled by this view.

	If this variable is nil (the default) the view's link::#-defaultCanReceiveDrag:: method is called instead.

METHOD:: receiveDragHandler
	Sets or gets the object evaluated when a drag&drop operation finishes on this view.

	At evaluation, the following arguments will be passed: strong:: view, x, y ::. The link::#*currentDrag#drag&drop data:: is expected to be applied to the view in some way.

	If this variable is nil (the default) the view's link::#-defaultReceiveDrag:: method is called instead.


METHOD:: dragLabel
	Sets or gets the text displayed by the mouse pointer during the drag&drop operation. It is expected to be set while handling the beginning of the operation, i.e. in link::#-beginDragAction:: or link::#-defaultGetDrag::.

	argument::
		A String containing the text to be displayed.




SUBSECTION:: Other actions and hooks

METHOD:: focusGainedAction

	Sets or gets the object to be evaluated when the view gains the keyboard focus. It is passed the view as an argument.

METHOD:: focusLostAction


	Sets or gets the object to be evaluated when the view looses the keyboard focus. It is passed the view as an argument.

METHOD:: toFrontAction


	Sets or gets the object to be evaluated when the view becomes the active window. It is passed the view as an argument.

METHOD:: endFrontAction


	Sets or gets the object to be evaluated when the view becomes the active window. It is passed the view as an argument.

METHOD:: onResize


	Sets or gets the object to be evaluated when the view changes its size. It is passed the view as an argument.

METHOD:: onMove


	Sets or gets the object to be evaluated when the view changes position relatively to its parent. It is passed the view as an argument.

METHOD:: onClose

	Sets or gets the object to be evaluated when the view is destroyed (i.e. link::#-close#closed:: or link::#-remove#removed::). It is passed the view as an argument.




SUBSECTION:: Handlers

note:: Older tutorials might recommend subclassing View to override these methods. Don't do that. Use composition, not inheritance. Make the View a property of your custom view class. ::

The following methods are the default handlers of key press and release events.

METHOD:: defaultKeyDownAction

	The method called when a key is pressed and link::#-keyDownAction:: is nil. Subclass it to define your own functionality on key presses.

	See link::#Key actions:: for explanation of arguments.

    The return value controls the event propagation to parent view. See link::#Key and mouse event processing:: for details.

METHOD:: defaultKeyUpAction

	The method called when a key is released and link::#-keyUpAction:: is nil.  Subclass it to define your own functionality on key-release.

	See link::#Key actions:: for explanation of arguments.

	The return value controls the event propagation to parent view. See link::#Key and mouse event processing:: for details.


METHOD:: keyDown
	Handles response to a key press event. First evaluates link::#*globalKeyDownAction::.

	note::
	This method directly triggers the action and returns, forwarding the action's return value. See link::#Key actions:: for detailed explanation.
	::

	See link::#Key actions:: for explanation of arguments.

	returns:: A Boolean, stating whether the event was handled or not (and will not or will propagate to the parent view, respectively), or the view, in which case it lets the Qt view implementation handle the event.

METHOD:: keyUp

	Handles response to a key release event. Sets link::#-keyTyped:: to 'char', evaluates link::#*globalKeyUpAction::, and then calls link::#-handleKeyUpBubbling::.

	note::
	This method directly triggers the action and returns, forwarding the action's return value. See link::#Key actions:: for detailed explanation.
	::

	See link::#Key actions:: for explanation of arguments.

	returns:: A Boolean, stating whether the event was handled or not (and will not or will propagate to the parent view, respectively), or the view, in which case it lets the Qt view implementation handle the event.

METHOD:: keyModifiersChanged
	Handles response to a modifier key press or release event. Calls link::#-handleKeyModifiersChangedBubbling::.

	note::
	Instead of calling link::#-handleKeyModifiersChangedBubbling::, a modifier key press or release event also produces a normal key press or release event, and it is the handling of those events that will determine propagation to the parent.
	::

	See link::#Key actions:: for explanation of arguments.

METHOD:: keyTyped

	An instance variable containing the key just typed (after it is released).



METHOD:: mouseDown
	Handles response to a mouse button press event. Evaluates link::#-mouseDownAction::.

	See link::#Mouse actions:: for explanation of arguments.

METHOD:: mouseUp
	Handles response to a mouse button release event. Evaluates link::#-mouseDownAction::.

	See link::#Mouse actions:: for explanation of arguments.

METHOD:: mouseMove
	Handles response to mouse pointer moving after a mouse button has been pressed on the view. Evaluates link::#-mouseMoveAction::.

	See link::#Mouse actions:: for explanation of arguments.

METHOD:: mouseOver
	Handles response to mouse pointer moving over the view with no mouse buttons pressed. Evaluates link::#-mouseOverAction::.

	This method is called only if link::Classes/Window#-acceptsMouseOver:: of the containing Window (or, link::#-acceptsMouseOver:: of the top View) is code::true::.

	See link::#Mouse actions:: for explanation of arguments.

METHOD:: mouseEnter

	Handles response to mouse pointer entering the view. Evaluates link::#-mouseEnterAction::.

METHOD:: mouseLeave

	Handles response to mouse pointer leaving the view. Evaluates link::#-mouseLeaveAction::.



METHOD:: defaultGetDrag

note::Not yet implemented::

	The view's default method to determine the content of the drag&drop operation just initiated.

	returns:: The object to be set as link::#*currentDrag::. If nil is returned, the drag&drop operation will not begin.

METHOD:: defaultCanReceiveDrag

note::Not yet implemented::

	The view's default evaluation whether the content of the ongoing drag&drop operation can be accepted.

	returns:: A Boolean stating whether link::#*currentDrag:: is useful. If false is returned, the drop will not be handled by this view.

METHOD:: defaultReceiveDrag

note::Not yet implemented::

	The view's default handling of the data dropped on it (stored in link::#*currentDrag::).

METHOD:: beginDrag
	Handles initiation of a drag&drop operation. Evaluates link::#-beginDragAction:: or calls link::#-defaultGetDrag:: if the former is nil, then stores the object returned into link::#*currentDrag::, and the object interpreted as link::Classes/Object#-asCompileString#"compile string":: into link::#*currentDragString::. Returns whether link::#*currentDrag:: is not nil.


	argument:: x
		Current horizontal position of the mouse pointer.

	argument:: y
		Current vertical position of the mouse pointer.

	returns:: A Boolean stating whether the drag&drop operation shall begin.

METHOD:: canReceiveDrag
	Handles evaluation whether the view can accept the current drag&drop data. Evaluates link::#-canReceiveDragHandler:: or calls link::#-defaultCanReceiveDrag:: if the former is nil, then forwards the return value.

	argument:: x
		Current horizontal position of the mouse pointer.

	argument:: y
		Current vertical position of the mouse pointer.

	returns:: A Boolean stating whether the current drag&drop content can be dropped on the view.

METHOD:: receiveDrag
	Handles the end of the drag&drop operation. Evaluates link::#-receiveDragHandler:: or calls link::#-defaultReceiveDrag:: if the former is nil, then sets link::#*currentDrag:: and link::#*currentDragString:: to nil.

	argument:: x
		Current horizontal position of the mouse pointer.

	argument:: y
		Current vertical position of the mouse pointer.