Difference between revisions of "Application:set"

From GiderosMobile
m
(added example)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
 
<languages />
 
<languages />
 +
 
'''<translate>Available since</translate>:''' Gideros 2015.7
 
'''<translate>Available since</translate>:''' Gideros 2015.7
 
<br/>
 
<br/>
 +
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]
 
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]
 
<br/>
 
<br/>
 +
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate>
 
<translate>
Line 13: Line 17:
 
</source>
 
</source>
 
<br/>
 
<br/>
 +
 
<translate>To get a list of parameters that can be set use:</translate>
 
<translate>To get a list of parameters that can be set use:</translate>
 
<source lang="lua">
 
<source lang="lua">
Line 18: Line 23:
 
</source>
 
</source>
 
<br/>
 
<br/>
 +
 
<translate>To get help for individual settings use:</translate>
 
<translate>To get help for individual settings use:</translate>
 
<source lang="lua">
 
<source lang="lua">
 
print(application:set("cursor","help"))
 
print(application:set("cursor","help"))
 +
</source>
 +
 +
=== <translate>Example</translate> ===
 +
<source lang="lua">
 +
print(application:set("help"))
 +
--[[
 +
- windowPosition(x,y)
 +
- windowSize(w,h)
 +
- minimumSize(w,h)
 +
- maximumSize(w,h)
 +
- windowColor(r,g,b)
 +
- windowTitle(text)
 +
- windowModel(type//help)
 +
- cursor(type//help)
 +
- cursorPosition(x,y)
 +
- clipboard(text)
 +
- mkdir(path|dirName//help)
 +
- documentDirectory(path)
 +
- temporaryDirectory(path)
 +
]]
 +
 +
application:set("windowPosition", 64, 64)
 +
application:set("windowColor", 0, 0, 0)
 +
application:set("windowTitle", "My lovely window title")
 +
 +
 +
print(application:set("cursor","help"))
 +
--[[
 +
- arrow
 +
- upArrow
 +
- cross
 +
- wait
 +
- IBeam
 +
- sizeVer
 +
- sizeHor
 +
- sizeBDiag
 +
- sizeFDiag
 +
- sizeAll
 +
- blank
 +
- splitV
 +
- splitH
 +
- pointingHand
 +
- forbidden
 +
- whatsThis
 +
- busy
 +
- openHand
 +
- closedHand
 +
- dragCopy
 +
- dragMove
 +
- dragLink
 +
]]
 +
 +
application:set("cursor", "openHand")
 
</source>
 
</source>
 
<br/>
 
<br/>
 
<br/>
 
<br/>

Revision as of 19:30, 28 July 2019



Available since: Gideros 2015.7

Class: Application

Description

Sets the state of the desktop setting provided as string parameter.

application:set("windowTitle", "My lovely window title")


To get a list of parameters that can be set use:

print(application:set("help"))


To get help for individual settings use:

print(application:set("cursor","help"))

Example

print(application:set("help"))
--[[
- windowPosition(x,y)
- windowSize(w,h)
- minimumSize(w,h)
- maximumSize(w,h)
- windowColor(r,g,b)
- windowTitle(text)
- windowModel(type//help)
- cursor(type//help)
- cursorPosition(x,y)
- clipboard(text)
- mkdir(path|dirName//help)
- documentDirectory(path)
- temporaryDirectory(path)
]]

application:set("windowPosition", 64, 64)
application:set("windowColor", 0, 0, 0)
application:set("windowTitle", "My lovely window title")


print(application:set("cursor","help"))
--[[
- arrow
- upArrow
- cross
- wait
- IBeam
- sizeVer
- sizeHor
- sizeBDiag
- sizeFDiag
- sizeAll
- blank
- splitV
- splitH
- pointingHand
- forbidden
- whatsThis
- busy
- openHand
- closedHand
- dragCopy
- dragMove
- dragLink
]]

application:set("cursor", "openHand")