ListIcon Action Plugin Help File

ListIcon Action Plugin Help File

Plugin Name:

ListIcon Action Plugin

Current Version:

1.1.0.2

Description:

Adds a powerful yet easy to use ListIcon object to your AMS projects.

Licence:

Commercial Software

Author:

Dean Hall (AKA) RizlaUK

Web:

luadevils.com

E-mail:

rizlauk@luadevils.com

Requirements:

Explorer objects require AMSWaves 'Memory' plugin for its call backsystem.

Memory Plugin

Copyright:

Copyright © 2010 Lua Devils

Install Notes:

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


Table of Contents

ListIcon.AddColumn
ListIcon.AddRow
ListIcon.CellStringWidth
ListIcon.ClearRows
ListIcon.CountCheckedRows
ListIcon.CountColumns
ListIcon.CountRows
ListIcon.CountSelectedRows
ListIcon.Create
ListIcon.DeleteColumn
ListIcon.DeleteRow
ListIcon.EnsureVisible
ListIcon.ExtensionIcon
ListIcon.ExtractIcon
ListIcon.Find
ListIcon.GetCellText
ListIcon.GetColumnText
ListIcon.GetEnabled
ListIcon.GetPos
ListIcon.GetRowChecked
ListIcon.GetRowSelected
ListIcon.GetSelected
ListIcon.GetSize
ListIcon.GetUnpackPath
ListIcon.GetUpdate
ListIcon.GetVisible
ListIcon.InsertColumn
ListIcon.InsertRow
ListIcon.LoadImage
ListIcon.MessageBarGetButtonVisible
ListIcon.MessageBarGetIcon
ListIcon.MessageBarGetIconVisible
ListIcon.MessageBarGetText
ListIcon.MessageBarGetVisible
ListIcon.MessageBarSetButtonVisible
ListIcon.MessageBarSetIcon
ListIcon.MessageBarSetIconVisible
ListIcon.MessageBarSetText
ListIcon.MessageBarSetVisible
ListIcon.Redraw
ListIcon.SetCellText
ListIcon.SetColumnText
ListIcon.SetEnabled
ListIcon.SetMode
ListIcon.SetPos
ListIcon.SetRowChecked
ListIcon.SetRowSelected
ListIcon.SetSelected
ListIcon.SetSize
ListIcon.SetUnpackPath
ListIcon.SetUpdate
ListIcon.SetVisible
ListIcon.Update
ListIcon.EnterKey

ListIcon.AddColumn


ListIcon.AddColumn ( 

(number) ListIconID,

(string) Text,

(number) Width )

Description

Adds a column to the listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Text

(string) The text caption to be displayed in the column header.

Width

(number) The width of the column.

Returns

This action dose not return any value.


ListIcon.AddRow


ListIcon.AddRow ( 

(number) ListIconID,

(string) Text,

(number) IconIndex = nil )

Description

Adds a row to the listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Text

(string) The text that will be displayed in this row, use ("|") to seperate columns EG: ("Item 1|Item 2|Item 3")

IconIndex

(number) The index of the icon.

Returns

This action dose not return any value.


ListIcon.CellStringWidth


(number) ListIcon.CellStringWidth ( 

(number) ListIconID,

(number) Row,

(number) Column )

Description

Determines the width of the string in a specified cell.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Row

(number) The row that the cell is on.

Column

(number) The column that the cell is on.

Returns

(number) The the exact width, in pixels, of the text contained in the indecated cell,

If you use the returned string width as the column width in the LuistIcon.SetColumnWidth, the string will be truncated.

To retrieve the column width that can contain the string without truncating it, you must add padding to the returned string width.


ListIcon.ClearRows


ListIcon.ClearRows ( 

(number) ListIconID )

Description

Clears all rows from the listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

This action dose not return any value.


ListIcon.CountCheckedRows


(number) ListIcon.CountCheckedRows ( 

(number) ListIconID )

Description

Count the checked rows.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

(number) The number of rows that are currently checked, or 0 if any error.


ListIcon.CountColumns


(number) ListIcon.CountColumns ( 

(number) ListIconID )

Description

Counts the number of comumns in a listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

(number) The number of columns the the ListIcon contains, or 0 if any error.


ListIcon.CountRows


(number) ListIcon.CountRows ( 

(number) ListIconID )

Description

Counts the number of rows in the listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

(number) The number of rows the the ListIcon contains, or 0 if any error.


ListIcon.CountSelectedRows


(number) ListIcon.CountSelectedRows ( 

(number) ListIconID )

Description

Count the selected rows.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

(number) The number of rows that are currently selected, or 0 if any error.


ListIcon.Create


(number) ListIcon.Create ( 

(number) X,

(number) Y,

(number) Width,

(number) Height,

(string) Text,

(number) ColumnWidth,

(table) Flags = nil )

Description

Creates a ListIcon object with the given arguments.

Parameters

X

(number) The X position of the ListIcon.

Y

(number) The Y position of the ListIcon.

Width

(number) The Width of the ListIcon.

Height

(number) The Height of the ListIcon.

Text

(string) The title of the 1st column.

ColumnWidth

(number) The width of the 1st column.

Flags

(table) Define optional flags table.

CONSTANT

VALUE

DESCRIPTION

CheckBoxes

Boolean

Display checkboxes in the first column.

MultiSelect

Boolean

Enable multiple selection.

GridLines

Boolean

Display separator lines between rows and columns.

FullRowSelect

Boolean

The selection covers the full row instead of the first column.

HeaderDragDrop

Boolean

The order of columns can be changed using drag'n'drop.

AlwaysShowSelection

Boolean

The selection is still visible, even when the gadget is not activated.

ObjectHost

Humber (Hwnd)

The host object that will house the listicon, if set (X,Y,W,H) are ignored and host size is used.
For ease of use, when a ListIcon 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 ListIcon
If useing a multi page application it is recomended the you embed the ListIcon into a AMS host object.

Returns

(number) Returns a numeric ID for the ListIcon object, this id should be used in function caalls to the object, if any error nil is returned.


Example

    -- creation flags
    tFlags={}
    tFlags.CheckBoxes     = true     -- Display checkboxes in the first column.
    tFlags.MultiSelect     = true     -- Enable multiple selection.
    tFlags.GridLines     = true     -- Display separator lines between rows and columns.
    tFlags.FullRowSelect     = true     -- The selection covers the full row instead of the first column.
    tFlags.HeaderDragDrop     = true     -- The order of columns can be changed using drag'n'drop.
    tFlags.AlwaysShowSelection    = true     -- The selection is still visible, even when the gadget is not activated.
    tFlags.ObjectHost             = ListBox.GetProperties("ListBox1").WindowHandle
    -- The host object that will house the listicon, if set (X,Y,W,H) are ignored and host size is used.
    -- For ease of use, when a ListIcon 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 ListIcon
    -- If useing a multi page application it is recomended the you embed the ListIcon into a AMS host object.
    
    
    nListIconID=ListIcon.Create(0,0,0,0,"Column 0",100,tFlags)



ListIcon.DeleteColumn


ListIcon.DeleteColumn ( 

(number) ListIconID,

(number) Index )

Description

Deletes a column from the listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Index

(number) The index of the column to remove.

Returns

This action dose not return any value.


ListIcon.DeleteRow


ListIcon.DeleteRow ( 

(number) ListIconID,

(number) Index )

Description

Removes a row from the listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Index

(number) The index of the row to remove

Returns

This action dose not return any value.


ListIcon.EnsureVisible


ListIcon.EnsureVisible ( 

(number) ListIconID,

(number) Row )

Description

Ensure that a certen row is visible.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Row

(number) The row that the cell is on.

Returns

This action dose not return any value.


ListIcon.ExtensionIcon


(number) ListIcon.ExtensionIcon ( 

(string) Extension )

Description

Loads the default system icon for the indecated extension.

Parameters

Extension

(string) The extension for which you want to get the system default icon.

Returns

(number) A image ID that can be used in other functions, or nil if any error.


ListIcon.ExtractIcon


(number) ListIcon.ExtractIcon ( 

(string) Filepath,

(number) Index )

Description

Extracts an icon from a dll or exe file and loads it into memory.

Parameters

Filepath

(string) Path to the file that contains the icon.

Index

(number) The index of the icon inside the external resource.

Returns

(number) A image ID that can be used in other functions, or nil if any error.


ListIcon.Find


(number) ListIcon.Find ( 

(number) ListIconID,

(number) StartRow,

(string) Text,

(boolean) PartialMatch = false )

Description

Searches for the specified text.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

StartRow

(number) The index of the item after which to begin the search, or -1 to start from the beginning.

Text

(string) The text to search for.

PartialMatch

(boolean) Checks to see if the item text begins with the string, else the item text of the matching item must exactly match the Text argument. However, the search is case-insensitive.

Returns

(number) The index of the first row that contains a match for the search pattern, or -1 if the pattern was not found or if any error.


ListIcon.GetCellText


(string) ListIcon.GetCellText ( 

(number) ListIconID,

(number) Row,

(number) Column )

Description

Gets the text of the indecated cell.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Row

(number) The row that the cell is on.

Column

(number) The column that the cell is on.

Returns

(string) The text string from the indecated cell, or a blank string ("") if any error.


ListIcon.GetColumnText


(string) ListIcon.GetColumnText ( 

(number) ListIconID,

(number) Column )

Description

Gets the text of the indecated column.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Column

(number) The column that the cell is on.

Returns

(string) The text string from the indecated column, or a blank string ("") if any error.


ListIcon.GetEnabled


(boolean) ListIcon.GetEnabled ( 

(number) ListIconID )

Description

Gets the enabled state of a listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

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


ListIcon.GetPos


(table) ListIcon.GetPos ( 

(number) ListIconID )

Description

Gets the position of a listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.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.


ListIcon.GetRowChecked


(boolean) ListIcon.GetRowChecked ( 

(number) ListIconID,

(number) Index )

Description

Gets a rows checked state.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Index

(number) The index of the row to check.

Returns

(boolean) True if the indecated row is checked, flase if not or if any error.


ListIcon.GetRowSelected


(boolean) ListIcon.GetRowSelected ( 

(number) ListIconID,

(number) Index )

Description

Gets a rows selection state.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Index

(number) The index of the row to check.

Returns

(boolean) True if the indecated row is selected, flase if not or if any error.


ListIcon.GetSelected


(number) ListIcon.GetSelected ( 

(number) ListIconID )

Description

Gets the first selected row in a listicon.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

(number) The index of the selecrted row, or -1 if any error.


ListIcon.GetSize


(table) ListIcon.GetSize ( 

(number) ListIconID )

Description

Gets the size of a listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.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.


ListIcon.GetUnpackPath


(string) ListIcon.GetUnpackPath ()

Description

Gets the unpack path for the plugins external resources.

Returns

(string) The path to the folder where the internal support files will be extracted.


ListIcon.GetUpdate


(boolean) ListIcon.GetUpdate ( 

(number) ListIconID )

Description

Gets the update state of a listicon.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

(boolean) True if the ListIcon is able to update, flase if not or if any error.


ListIcon.GetVisible


(boolean) ListIcon.GetVisible ( 

(number) ListIconID )

Description

Gets the visible state of a listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

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


ListIcon.InsertColumn


ListIcon.InsertColumn ( 

(number) ListIconID,

(number) Index,

(string) Text,

(number) Width )

Description

Inserts a column to the listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Index

(number) The index where to insert the new column.

Text

(string) The text caption to be displayed in the column header.

Width

(number) The width of the column.

Returns

This action dose not return any value.


ListIcon.InsertRow


ListIcon.InsertRow ( 

(number) ListIconID,

(number) Index,

(string) Text,

(number) IconIndex = nil )

Description

Inserts a row to the listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Index

(number) The index where to insert the new row.

Text

(string) The text that will be displayed in this row, use ("|") to seperate columns EG: ("Item 1|Item 2|Item 3")

IconIndex

(number) The index of the icon.

Returns

This action dose not return any value.


ListIcon.LoadImage


(number) ListIcon.LoadImage ( 

(string) Filepath )

Description

Loads an image file into memory.

Parameters

Filepath

(string) Path to an image file (.bmp, .png, .jpg and .ico supported)

Returns

(number) A image ID that can be used in other functions, or nil if any error.


ListIcon.MessageBarGetButtonVisible


(boolean) ListIcon.MessageBarGetButtonVisible ( 

(number) ListIconID )

Description

Gets the visible state of the message bar close button.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

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


ListIcon.MessageBarGetIcon


(number) ListIcon.MessageBarGetIcon ( 

(number) ListIconID )

Description

Gets icon image on the message bar.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

(number) A image ID that can be used in other functions, or nil if any error.


ListIcon.MessageBarGetIconVisible


(boolean) ListIcon.MessageBarGetIconVisible ( 

(number) ListIconID )

Description

Gets the visible state of the message bar icon.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

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


ListIcon.MessageBarGetText


(string) ListIcon.MessageBarGetText ( 

(number) ListIconID )

Description

Gets a ListIcons message bar text.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

(string) The text string contained in the messagebar, or a blank string("") if any error.


ListIcon.MessageBarGetVisible


ListIcon.MessageBarGetVisible ( 

(number) ListIconID )

Description

Gets a ListIcons message bars visible state.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

This action dose not return any value.


ListIcon.MessageBarSetButtonVisible


ListIcon.MessageBarSetButtonVisible ( 

(number) ListIconID,

(boolean) Visible )

Description

Sets the visible state of the message bar close button.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Visible

(boolean) True to show the close button, false to hide it.

Returns

This action dose not return any value.


ListIcon.MessageBarSetIcon


ListIcon.MessageBarSetIcon ( 

(number) ListIconID,

(number) IconIndex )

Description

Sets icon image on the message bar.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

IconIndex

(number) The index of the icon.

Returns

This action dose not return any value.


ListIcon.MessageBarSetIconVisible


ListIcon.MessageBarSetIconVisible ( 

(number) ListIconID,

(boolean) Visible )

Description

Sets the visible state of the message bar icon.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Visible

(boolean) True to show the icon, false to hide it.

Returns

This action dose not return any value.


ListIcon.MessageBarSetText


ListIcon.MessageBarSetText ( 

(number) ListIconID,

(string) Text )

Description

Sets a ListIcons message bar text.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Text

(string) The text to be displayed in the message bar.

Returns

This action dose not return any value.


ListIcon.MessageBarSetVisible


ListIcon.MessageBarSetVisible ( 

(number) ListIconID,

(boolean) Visible )

Description

Sets a ListIcons message bars visible state.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Visible

(boolean) True to set the message bar visible.

Returns

This action dose not return any value.


ListIcon.Redraw


ListIcon.Redraw ( 

(number) ListIconID )

Description

Redraws the ListIcons host area.

Note: This function redraws the whole ListIcon area ikncluding the messagebar, to redraw the client area (where rows are added) use ListIcon.Update

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

This action dose not return any value.


ListIcon.SetCellText


ListIcon.SetCellText ( 

(number) ListIconID,

(number) Row,

(number) Column,

(string) Text )

Description

Sets the text of the indecated cell.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Row

(number) The row that the cell is on.

Column

(number) The column that the cell is on.

Text

(string) The new text for the cell.

Returns

This action dose not return any value.


ListIcon.SetColumnText


ListIcon.SetColumnText ( 

(number) ListIconID,

(number) Column,

(string) Text )

Description

Sets the text of the indecated column.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Column

(number) The column that the cell is on.

Text

(string) The new text for the cell.

Returns

This action dose not return any value.


ListIcon.SetEnabled


ListIcon.SetEnabled ( 

(number) ListIconID,

(boolean) Enabled )

Description

Sets the enabled state of a listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Enabled

(boolean) True to enable the object, false to disable it.

Returns

This action dose not return any value.


ListIcon.SetMode


ListIcon.SetMode ( 

(number) ListIconID,

(number) Mode )

Description

Sets the ListIcons display mode.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Mode

(number) The mode to set.

CONSTANT

VALUE

DESCRIPTION

ListIcon_LargeIcon

0

Large icon mode

ListIcon_SmallIcon

1

Small icon mode

ListIcon_List

2

List icon mode

ListIcon_Report

3

Report mode (columns, Default mode)

Returns

This action dose not return any value.


ListIcon.SetPos


ListIcon.SetPos ( 

(number) ListIconID,

(number) X,

(number) Y )

Description

Sets the position of a listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

X

(number) The X position of the ListIcon.

Y

(number) The Y position of the ListIcon.

Returns

This action dose not return any value.


ListIcon.SetRowChecked


ListIcon.SetRowChecked ( 

(number) ListIconID,

(number) Index,

(boolean) State )

Description

Sets a rows checked state.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Index

(number) The index of the row to check/uncheck.

State

(boolean) True to check the row, fasle to uncheck it.

Returns

This action dose not return any value.


ListIcon.SetRowSelected


ListIcon.SetRowSelected ( 

(number) ListIconID,

(number) Index,

(boolean) State )

Description

Sets a rows selection state.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Index

(number) The index of the row to select.

State

(boolean) True to select the row, fasle to deselect it.

Returns

This action dose not return any value.


ListIcon.SetSelected


ListIcon.SetSelected ( 

(number) ListIconID,

(number) Index )

Description

Selects a single row in a listicon.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Index

(number) The index of the row to select.

Returns

This action dose not return any value.


ListIcon.SetSize


ListIcon.SetSize ( 

(number) ListIconID,

(number) Width,

(number) Height )

Description

Sets the size of a listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Width

(number) The width of the ListIcon.

Height

(number) The height of the ListIcon.

Returns

This action dose not return any value.


ListIcon.SetUnpackPath


ListIcon.SetUnpackPath ( 

(number) FolderPath )

Description

Sets the unpack path for the plugins external resources.

Note: Only use this if you have problems unpacking the resources.

Parameters

FolderPath

(number) Path to a folder to extract the external resources to.

Returns

This action dose not return any value.


ListIcon.SetUpdate


ListIcon.SetUpdate ( 

(number) ListIconID,

(boolean) bUpdate )

Description

Sets the update state of a listicon.

Note: Setting this to false will disable the redrawing of the ListIconClient area, use this when adding lots of rows.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

bUpdate

(boolean) Treu to allow the ListIcon to update (redraw)

Returns

This action dose not return any value.


ListIcon.SetVisible


ListIcon.SetVisible ( 

(number) ListIconID,

(boolean) Visible )

Description

Sets the visible state of a listicon object.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Visible

(boolean) True to show the object, false to hide it.

Returns

This action dose not return any value.


ListIcon.Update


ListIcon.Update ( 

(number) ListIconID )

Description

Updates (redraws) the ListIcon object.

Note: This function updates the ListIcon client area, use this function to update after adding a row.

Parameters

ListIconID

(number) The numeric ID of the listicon as returned with ListIcon.Create

Returns

This action dose not return any value.


ListIcon.EnterKey


ListIcon.EnterKey ( 

(number) Key )

Description

Unlocks the nag window.

Parameters

Key

(number) The key you received when you purchased this plugin.

Returns

This action dose not return any value.



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