WinButtonEx Object Help File

WinButtonEx Object Help File

Plugin Name:

WinButtonEx Object

Current Version:

1.0.0.0

Description:

WinButtonEx is a advanced windows button that can display an icon and colored text and has many features.

Licence:

Commerical Plugin

More Info

Author:

Dean Hall (AKA) RizlaUK

Web:

luadevils.com

E-mail:

rizlauk@luadevils.com

Requirements:

WinButtonEx object require AMSWaves 'Memory' plugin for its call backsystem.

Memory Plugin

Copyright:

Copyright © 2010 Lua Devils

Install Notes:

Copy folder 'WinButtonEx' to your AMS install directory '\Plugins\Actions'


Table of Contents

WinButtonEx.Create
WinButtonEx.EnterKey
WinButtonEx.GetEnabled
WinButtonEx.GetFocusRect
WinButtonEx.GetFont
WinButtonEx.GetIcon
WinButtonEx.GetIconPosition
WinButtonEx.GetIconSize
WinButtonEx.GetPos
WinButtonEx.GetSize
WinButtonEx.GetText
WinButtonEx.GetTextColor
WinButtonEx.GetUnpackPath
WinButtonEx.GetVisible
WinButtonEx.LoadFont
WinButtonEx.LoadIcon
WinButtonEx.SetEnabled
WinButtonEx.SetFocusRect
WinButtonEx.SetFont
WinButtonEx.SetIcon
WinButtonEx.SetIconPosition
WinButtonEx.SetIconSize
WinButtonEx.SetPos
WinButtonEx.SetSize
WinButtonEx.SetText
WinButtonEx.SetTextColor
WinButtonEx.SetUnpackPath
WinButtonEx.SetVisible

WinButtonEx.Create


(number) WinButtonEx.Create ( 

(number) X,

(number) Y,

(number) Width,

(number) Height,

(string) Text,

(table) Propertys = nil )

Description

Creates a WinButtonEx object.

Parameters

X

(number) The X position of the object.

Y

(number) The Y position of the object.

Width

(number) The Width of the object.

Height

(number) The Height of the object.

Text

(string) The text to display in the button.

Propertys

(table) A table of propertys indexed by the following values.

CONSTANT

VALUE

DESCRIPTION

IconPosition

Number

Sets the position of the icon, use one of the following values, ICO_TOP, ICO_RIGHT, ICO_BOTTOM, ICO_LEFT

Font

Number

Sets the buttons font, Use WinButtonEx.LoadFont to load a valid font ID.

DefaultIcon

Number

The icon to show when the button is in its default state.

HoverIcon

Number

The icon to show when the button is in its hover state.

DownIcon

Number

The icon to show when the button is in its down state.

DisabledIcon

Number

The icon to show when the button is in its disabled state.

DefaultTextCol

Number

The text color for the buttons default state.

HoverTextCol

Number

The text color for the buttons hover state.

DownTextCol

Number

The text color for the buttons down state.

DisabledTextCol

Number

The text color for the buttons disabled state.

DefaultText

String

The text for the buttons default state.

HoverText

String

The text color for the buttons hover state.

DownText

String

The text color for the buttons down state.

DisabledText

String

The text color for the buttons disabled state.

IconWidth

Number

Sets the buttons icon width.

IconHeight

Number

Sets the buttons icon height.

DrawFocusRect

Boolean

True to show the focus rect, false to not show it.

ObjectHost

Number

The host object that will house the button, if set (X,Y,W,H) are ignored and host size is used.
For ease of use, when a button is hosted inside a AMS object the resizeing will de done by the AMS host object also,
setting the host objects visible and enable actions will affect the button.
If useing a multi page application it is recomended the you embed the button into a AMS host object.

Returns

(number) Returns a numeric ID for the object, this ID should be used in all other functions that access the object, if any error then nil is returned.


WinButtonEx.EnterKey


(string) WinButtonEx.EnterKey ( 

(string) Key )

Description

Unlock the nag window.

Parameters

Key

(string) Enter your key here.

Returns

(string)


WinButtonEx.GetEnabled


(boolean) WinButtonEx.GetEnabled ( 

(number) ObjectID )

Description

Gets the enabled state of the button.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Returns

(boolean) True if the object is visible, false if it's invisible. If an error occurs, false will be returned.


WinButtonEx.GetFocusRect


(boolean) WinButtonEx.GetFocusRect ( 

(number) ObjectID )

Description

Gets the enabled state of the buttons focus rect.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Returns

(boolean) True if the focus rect is visible, false if it's invisible. If an error occurs, false will be returned.


WinButtonEx.GetFont


(number) WinButtonEx.GetFont ( 

(number) ObjectID )

Description

Gets the font of the displayed text..

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Returns

(number) The numeric font ID, else 0 if any error.


WinButtonEx.GetIcon


(number) WinButtonEx.GetIcon ( 

(number) ObjectID,

(number) State )

Description

Gets the icon for a button state.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

State

(number) The button state to apply the change to.

CONSTANT

VALUE

DESCRIPTION

STATE_NORMAL

0

The button is in its normal state.

STATE_HOVER

1

The button is in its hover state.

STATE_DOWN

2

The button is in its down state.

STATE_DISABLE

3

The button is in its disabled state.

STATE_ALL

4

This flag affects all button states.

Returns

(number) The numeric icon ID, else 0 if any error.


WinButtonEx.GetIconPosition


(number) WinButtonEx.GetIconPosition ( 

(number) ObjectID )

Description

Gets the position of the displayed icon.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Returns

(number) The icons position

0=Top
1=Right
2=Bottom
3=Left


WinButtonEx.GetIconSize


(table) WinButtonEx.GetIconSize ( 

(number) ObjectID )

Description

Gets the size of the displayed icon.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Returns

(table) A table containing the icons pixel dimensions, indexed by values "Width" and "Height." If any error, nil will be returned.


WinButtonEx.GetPos


(table) WinButtonEx.GetPos ( 

(number) ObjectID )

Description

Gets the position of the object.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Returns

(table) A table containing the object's current coordinates, indexed by values X and Y. If the object cannot be found, nil will be returned.


WinButtonEx.GetSize


(table) WinButtonEx.GetSize ( 

(number) ObjectID )

Description

Gets the size of the object.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Returns

(table) A table containing the object's pixel dimensions, indexed by values "Width" and "Height." If the object cannot be found, nil will be returned.


WinButtonEx.GetText


(string) WinButtonEx.GetText ( 

(number) ObjectID,

(number) State )

Description

Gets the text for a button state.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

State

(number) The button state to apply the change to.

CONSTANT

VALUE

DESCRIPTION

STATE_NORMAL

0

The button is in its normal state.

STATE_HOVER

1

The button is in its hover state.

STATE_DOWN

2

The button is in its down state.

STATE_DISABLE

3

The button is in its disabled state.

STATE_ALL

4

This flag affects all button states.

Returns

(string) The text caption of the object, if any error then a blank string ("") is returned.


WinButtonEx.GetTextColor


(number) WinButtonEx.GetTextColor ( 

(number) ObjectID,

(number) State )

Description

Gets the text color for a button state.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

State

(number) The button state to apply the change to.

CONSTANT

VALUE

DESCRIPTION

STATE_NORMAL

0

The button is in its normal state.

STATE_HOVER

1

The button is in its hover state.

STATE_DOWN

2

The button is in its down state.

STATE_DISABLE

3

The button is in its disabled state.

STATE_ALL

4

This flag affects all button states.

Returns

(number) The decimal text color, if any error -1 is returned.


WinButtonEx.GetUnpackPath


(string) WinButtonEx.GetUnpackPath ()

Description

Gets the path to the folder that the external dll is unpacked to..

Returns

(string)


WinButtonEx.GetVisible


(boolean) WinButtonEx.GetVisible ( 

(number) ObjectID )

Description

Gets the visible state of the button.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Returns

(boolean) True if the object is visible, false if not or if any error.


WinButtonEx.LoadFont


(number) WinButtonEx.LoadFont ( 

(string) FontName,

(number) Size,

(table) Propertys = nil )

Description

Loads a system font into memory for later use.

Parameters

FontName

(string) The name of the font you want to load.

Size

(number) The size of the font.

Propertys

(table) A table of propertys indexed by the following values.

CONSTANT

VALUE

DESCRIPTION

Bold

Boolean

The font will be bold.

Italic

Boolean

The font will be italic.

Underline

Boolean

The font will be underlined.

StrikeOut

Boolean

The font will be strikeout.

Returns

(number) A numeric ID for this font, else nil if any error.


WinButtonEx.LoadIcon


(number) WinButtonEx.LoadIcon ( 

(string) IconPath )

Description

Loads a icon file into memory for later use.

Parameters

IconPath

(string) The path to your icon file.

Note: Only (.ico) format is supported.

Returns

(number) A numeric ID for this icon, else nil if any error.


WinButtonEx.SetEnabled


WinButtonEx.SetEnabled ( 

(number) ObjectID,

(boolean) Enabled )

Description

Sets the enabled state of the button.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Enabled

(boolean) True to enable the button.

Returns

This action dose not return any value.


WinButtonEx.SetFocusRect


WinButtonEx.SetFocusRect ( 

(number) ObjectID,

(boolean) Enable )

Description

Sets the enabled state of the buttons focus rect.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Enable

(boolean) True to enable the focus rect.

Returns

This action dose not return any value.


WinButtonEx.SetFont


WinButtonEx.SetFont ( 

(number) ObjectID,

(number) FontID )

Description

Sets the font of the displayed text..

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

FontID

(number) The ID of the font.

Note: The ID as returned by "WinButtonEx.LoadFont"

Returns

This action dose not return any value.


WinButtonEx.SetIcon


WinButtonEx.SetIcon ( 

(number) ObjectID,

(number) State,

(number) Icon )

Description

Sets the icon for a button state.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

State

(number) The button state to apply the change to.

CONSTANT

VALUE

DESCRIPTION

STATE_NORMAL

0

The button is in its normal state.

STATE_HOVER

1

The button is in its hover state.

STATE_DOWN

2

The button is in its down state.

STATE_DISABLE

3

The button is in its disabled state.

STATE_ALL

4

This flag affects all button states.

Icon

(number) The ID of the icon.

Note: This is the ID returned by "WinButtonEx.LoadIcon"

Returns

This action dose not return any value.


WinButtonEx.SetIconPosition


WinButtonEx.SetIconPosition ( 

(number) ObjectID,

(number) Position )

Description

Sets the position of the displayed icon.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Position

(number) The position of the icon.

CONSTANT

VALUE

DESCRIPTION

ICO_TOP

0

The icon is positioned above the text.

ICO_RIGHT

1

The icon is positioned to the right the text.

ICO_BOTTOM

2

The icon is positioned below the text.

ICO_LEFT

3

The icon is positioned to the left of the text.

Returns

This action dose not return any value.


WinButtonEx.SetIconSize


WinButtonEx.SetIconSize ( 

(number) ObjectID,

(number) Width,

(number) Height )

Description

Sets the size of the displayed icon.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Width

(number) The width of the icon.

Height

(number) The height of the icon.

Returns

This action dose not return any value.


WinButtonEx.SetPos


WinButtonEx.SetPos ( 

(number) ObjectID,

(number) X,

(number) Y )

Description

Sets the position of the object.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

X

(number) The x position of the object.

Y

(number) The Y position of the object.

Returns

This action dose not return any value.


WinButtonEx.SetSize


WinButtonEx.SetSize ( 

(number) ObjectID,

(number) Width,

(number) Height )

Description

Sets the size of the object.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Width

(number) The width of the object.

Height

(number) The height of the object.

Returns

This action dose not return any value.


WinButtonEx.SetText


WinButtonEx.SetText ( 

(number) ObjectID,

(number) State,

(string) Text )

Description

Sets the text for a button state.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

State

(number) The button state to apply the change to.

CONSTANT

VALUE

DESCRIPTION

STATE_NORMAL

0

The button is in its normal state.

STATE_HOVER

1

The button is in its hover state.

STATE_DOWN

2

The button is in its down state.

STATE_DISABLE

3

The button is in its disabled state.

STATE_ALL

4

This flag affects all button states.

Text

(string) The text for this state.

Returns

This action dose not return any value.


WinButtonEx.SetTextColor


WinButtonEx.SetTextColor ( 

(number) ObjectID,

(number) State,

(number) Color )

Description

Sets the text color for a button state.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

State

(number) The button state to apply the change to.

CONSTANT

VALUE

DESCRIPTION

STATE_NORMAL

0

The button is in its normal state.

STATE_HOVER

1

The button is in its hover state.

STATE_DOWN

2

The button is in its down state.

STATE_DISABLE

3

The button is in its disabled state.

STATE_ALL

4

This flag affects all button states.

Color

(number) The text color for this state.

Returns

This action dose not return any value.


WinButtonEx.SetUnpackPath


(string) WinButtonEx.SetUnpackPath ( 

(string) Path )

Description

Gets the path to the folder that the external dll is unpacked to..

Parameters

Path

(string) The path to the folder

Returns

(string)


WinButtonEx.SetVisible


WinButtonEx.SetVisible ( 

(number) ObjectID,

(boolean) Visible )

Description

Sets the visible state of the button.

Parameters

ObjectID

(number) The ID of the button.

Note: This is the ID returned by "WinButtonEx.Create"

Visible

(boolean) True to show the button.

Returns

This action dose not return any value.



Copyright © 2010 Lua Devils
This File Was Generated With AMS ActionFile Editor