HomeForumSourceResearchGuide
Sign in to contribute to source. how it works
Type definition file ui.Window by barry
expand copy to clipboardexpand
uses Rect
uses media.PixelMap
uses Cursor

/*
 {"description" : "This API allows the programmer to create new graphical windows on the screen."}
*/
interface Window extends Panel {
	
	event resize(WH newSize)
	
	event close()
	
	/* {"@description" : "Instantiate a new window with the given title."} */
	Window(char title[])
	
	/* {"@description" : "Make the window visible / invisible."} */
	void setVisible(bool b)
	
	/* {"@description" : "Make the window user-resizable or not."} */
	void setResizable(bool b)
	
	/* {"@description" : "Place the window in full-screen mode, or in windowed mode."} */
	void setFullScreen(bool b)
	
	/* {"@description" : "Set the title of the window."} */
	void setTitle(char title[])
	
	/* {"@description" : "Set the icon used to represent the window, if the operating system supports this."} */
	void setIcon(store PixelMap p)

	/* {"@description" : "Set the mouse cursor globally for the window; this overrides any locally-requested cursor by GUI widgets until set back to default."} */
	void setCursor(byte cursorType, opt Cursor c)
	
	/* {"@description" : "Get the current location of this window, relative to the top-left corner of the screen."} */
	Rect getRect()

	/* {"@description" : "Get the window's rendered content as a pixel map."} */
	PixelMap getPixels()
	
	/* {"@description" : "Close the window (no further operations can be called on the window once this is done)."} */
	void close()
	
	}
Revision history
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n ui.Window -m "reason for update" -u yourUsername
Version 3 by barry
Version 2 by barry
Version 1 (this version) by barry
Notes for this version: Standard Library Initialisation