uses Window
uses media.WH
uses Point
uses Panel
uses Canvas
/* {"description" : "This is an API that represents a generic graphical object. All other graphical object types should inherit from this one." } */
interface GraphicsObject{
/* {"@description" : "The current x-position of the object." } */
transfer int xPosition
/* {"@description" : "The current y-position of the object." } */
transfer int yPosition
/* {"@description" : "An event of this type can be emitted to request the graphical region hosting this object to call the paint function of the object." } */
event repaint()
/* {"@description" : "Request a graphics object to redraw itself." } */
void postRepaint()
/* {"@description" : "This function is called by the rendering system when it is time to draw this object." } */
void paint(Canvas c)
/* {"@description" : "Set the location of this object, in pixels, from the top-left of the containing entity." } */
void setPosition(int x, int y)
/* {"@description" : "Get the location of this object, in pixels, from the top-left of the containing entity." } */
Point getPosition()
/* {"@description" : "This function is called when another graphics entity would like to know the preferred size of this object, for example to help with layout calculations." } */
WH getPreferredSize()
}To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n ui.GraphicsObject -m "reason for update" -u yourUsername
Version 3 (this version) by barry
Notes for this version: Updates to documentation strings.