Difference between revisions of "Lua:Class:WinControl"

From Cheat Engine
Jump to navigation Jump to search
Line 1: Line 1:
'''WinControl Class''': (Inheritance: [[Control]]->[[Component]]->[[Object]])
+
Control '''class''': ('''Inheritance''': ''[[Control]]''->''[[Component]]''->''[[Object]]'')
  
Base class for windows aware controls
+
Base class for windows aware controls.
  
===Properties===
+
== Properties ==
  DoubleBuffered: boolean - Graphical updates will go to a offscreen bitmap which will then be shown on the screen instead of directly to the screen. May reduce flickering
 
  ControlCount : integer - The number of child controls of this wincontrol
 
  Control[] : Control - Array to access a child control
 
  OnEnter : function - Function to be called when the WinControl gains focus
 
  OnExit : function - Function to be called when the WinControl loses focus
 
  
===Methods===
+
; DoubleBuffered : boolean
  getControlCount()  Returns the number of Controls attached to this class
+
: Graphical updates will go to a off screen bitmap which will then be shown on the screen instead of directly to the screen.  
  getControl(index) : Returns a WinControl class object
+
: May reduce flickering.
  getControlAtPos(x,y):  Gets the control at the given x,y position relative to the wincontrol's position
 
  canFocus(): returns true if the object can be focused
 
  focused(): returns boolean true when focused
 
  setFocus(): tries to set keyboard focus the object
 
  setShape(Region): Sets the region object as the new shape for this wincontrol
 
  setShape(Bitmap):
 
  setOnEnter(function) : Sets an onEnter event. (Triggered on focus enter)
 
  getOnEnter()
 
  setOnExit(function) : Sets an onExit event. (Triggered on lost focus)
 
  getOnExit()
 
  
 +
; ControlCount : integer
 +
: The number of child controls of this WinControl.
  
----
+
; Control[''index''] : Control
 +
: Array to access a child control.
  
* [[Lua|Lua Functions and Classes]]
+
; OnEnter : function
 +
: Function to be called when the WinControl gains focus.
 +
 
 +
; OnExit : function
 +
: Function to be called when the WinControl loses focus.
 +
 
 +
== Methods ==
 +
 
 +
; getControlCount() : integer
 +
: Returns the number of Controls attached to this class
 +
 
 +
; getControl(''index'') : control
 +
: Returns a WinControl class object
 +
 
 +
; getControlAtPos(''x'', ''y'') : (integer, integer)
 +
: Gets the control at the given x,y position relative to the WinControl's position
 +
 
 +
; canFocus() : boolean
 +
: returns true if the object can be focused
 +
 
 +
; focused() : boolean
 +
: returns boolean true when focused
 +
 
 +
; setFocus()
 +
: tries to set keyboard focus to the object.
 +
 
 +
; setShape(''region'')
 +
: Sets the region object as the new shape for this WinControl
 +
 
 +
; setShape(''bitmap'')
 +
: Sets the Bitmap object as the new shape for this WinControl
 +
 
 +
; setOnEnter(''function'')
 +
: Sets an onEnter event. (Triggered on focus enter)
 +
 
 +
; getOnEnter() : function
 +
: Returns the 'onEnter' call back.
 +
 
 +
; setOnExit(''function'')
 +
: Sets an onExit event. (Triggered on lost focus)
 +
 
 +
; getOnExit() : function
 +
: Returns the 'onExit' call back.
 +
 
 +
== See also ==
 +
* [[Lua]]
 +
* [[Help_File:Script engine|Script engine]]
 +
 
 +
=== Related Functions ===
 +
* [[createClass]]
 +
* [[inheritsFromObject]]
 +
* [[inheritsFromComponent]]
 +
* [[inheritsFromControl]]
 +
* [[inheritsFromWinControl]]
 +
 
 +
=== Related Classes ===
 +
* [[Object]]
 +
* [[Control]]
 +
* [[Component]]
 +
* [[Application]]
 +
* [[Form]]

Revision as of 01:34, 11 March 2017

Control class: (Inheritance: Control->Component->Object)

Base class for windows aware controls.

Properties

DoubleBuffered : boolean
Graphical updates will go to a off screen bitmap which will then be shown on the screen instead of directly to the screen.
May reduce flickering.
ControlCount : integer
The number of child controls of this WinControl.
Control[index] : Control
Array to access a child control.
OnEnter : function
Function to be called when the WinControl gains focus.
OnExit : function
Function to be called when the WinControl loses focus.

Methods

getControlCount() : integer
Returns the number of Controls attached to this class
getControl(index) : control
Returns a WinControl class object
getControlAtPos(x, y) : (integer, integer)
Gets the control at the given x,y position relative to the WinControl's position
canFocus() : boolean
returns true if the object can be focused
focused() : boolean
returns boolean true when focused
setFocus()
tries to set keyboard focus to the object.
setShape(region)
Sets the region object as the new shape for this WinControl
setShape(bitmap)
Sets the Bitmap object as the new shape for this WinControl
setOnEnter(function)
Sets an onEnter event. (Triggered on focus enter)
getOnEnter() : function
Returns the 'onEnter' call back.
setOnExit(function)
Sets an onExit event. (Triggered on lost focus)
getOnExit() : function
Returns the 'onExit' call back.

See also

Related Functions

Related Classes