(all-neighbouring-widgets canvas widget widgets)
(all-neighbouring-widgets canvas widget widgets operator-f)
Get all neighbouring widgets by following the neighouring chain. operator-f is a optional order with truthy return (fn [neighbour current-widget] ....) that will be used in a filter ,
- all widgets that are covering the current widget < - all widgets that are covered by the current widget If no order function is given, then take all widgets that touch the current widget.
Get all neighbouring widgets by following the neighouring chain. operator-f is a optional order with truthy return (fn [neighbour current-widget] ....) that will be used in a filter , > - all widgets that are covering the current widget < - all widgets that are covered by the current widget If no order function is given, then take all widgets that touch the current widget.
(distance-x [x1 y1] [x2 y2])
(distance-x canvas widget1 widget2)
Manhatten distance that is sqashed on the x-axis, meaning widgets on similar y positions are treated as being closer together.
Manhatten distance that is sqashed on the x-axis, meaning widgets on similar y positions are treated as being closer together.
(draw-resizing this__7038__auto__ canvas__7039__auto__)
(draw-selected this__7038__auto__ canvas__7039__auto__)
(get-with-property widgets key)
(get-with-property widgets key value)
Returns the widget names for widgets that contain the specific key value pair or a truthy value for the specific key from a sequence of widgets.
Returns the widget names for widgets that contain the specific key value pair or a truthy value for the specific key from a sequence of widgets.
(neighbouring-widgets canvas widget widgets)
get all neighbours of the given widget. Neighbours are sorted by their :z coordinate in ascending order
get all neighbours of the given widget. Neighbours are sorted by their :z coordinate in ascending order
(redraw! canvas & widgets)
redraws the given sequence of widgets
redraws the given sequence of widgets
(register! canvas widget)
(register! canvas widget skip-redraw?)
register the widget and draw it to the canvas. Can skip redraw via ski-redraw?
register the widget and draw it to the canvas. Can skip redraw via ski-redraw?
(replace! canvas old-widget-name new-widget)
(replace! canvas old-widget-name new-widget skip-redraw?)
Replaces the current widget of the given widget name with the new widget, if the current widget actually exists, otherwise it ignores it.
Replaces the current widget of the given widget name with the new widget, if the current widget actually exists, otherwise it ignores it.
(unregister! canvas widget)
(unregister! canvas widget skip-hide?)
unregister the widget and hide it.
unregister the widget and hide it.
collection of functions around redrawing widgets, managing the border etc. ...
collection of functions around redrawing widgets, managing the border etc. ...
(coord this canvas)
gets the coordinates of the widget
gets the coordinates of the widget
(defaults this)
attach default values
attach default values
(draw this canvas)
draw the widget, returns the widget on success
draw the widget, returns the widget on success
(within? coord1 coord2)
(within? coord x y)
Checks wheter the point (x y) is within the given coord coord - vector [x-coord y-coord width height] x - x-coord of point to check y - y-coord of point to check
Checks wheter the point (x y) is within the given coord coord - vector [x-coord y-coord width height] x - x-coord of point to check y - y-coord of point to check
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close