ScreenGadget Overview

These Library handles gadgets for a screen instead of a win32-window. It is made as near as possible to PB.

The following gadgets are supported:

Text

String

Editor

Button

Checkbox

ComboBox

Option

Trackbar

Listicon

ExplorerList

ScrollBar

Image

Imagebutton

Frame3D

If the gadgets are created 'statically' i.e. the gadget number is set by the user, the return is a pointer to the internal structur. (See the code of this lib for more infos about this)

If the gadgets are created 'dynamically' i.e. 'PB_Any' is used as gadget number, the return is the gadget number given.

The lib needs the following things to be initiaized:

Sprite()

Keyboard()

Mouse()

A general note to the number of gadgets possible

There are up to 2000 gadgets possible. The Gadget-IDs from 2000 and up are reserved for internal use (mainly the scrollbars used with the Listicon-, ComboBox- and the Editor-Gadgets)

Resourcen used by this lib

- Sprites for the editor-gadgets. These Sprites are created using `PB_Any`.

- Font number 1 and 2.

Something to test: This Lib should compile under linux, too. Cos I havenīt a linux-system to test, I hope that someone else could test it...


Screengadgets

SG_AddGadgetColumn()

add a column To the listicon gadget

SG_AddGadgetItem()

add an item To the specified listicon gagdet

SG_ButtonGadget()

creates a button gadget

SG_ButtonImageGadget()

creates a Imagebutton gadget

SG_CheckBoxGadget()

creates a checkbox gadget

SG_ClearGadgetItemList()

remove all items of the specified listicon gagdet

SG_ComboBoxGadget()

creates a ComboBox gadget

SG_CountGadgetItems()

returns the number of items of the specified listicon gagdet

SG_DisableGadget()

disables the specified gagdet

SG_DrawGadgets()

SG_EditorGadget()

creates an editor gadget

SG_EventScreenGadgetID()

returns the number of the gadget, where the event happened

SG_EventType()

returns the EventID, of the event happened

SG_ExplorerListGadget()

creates a Explorerlist gadget

SG_Frame3DGadget()

creates a Image gadget

SG_FreeAllGadgets()

releases all gadgets

SG_FreeGadget()

remove the specified gagdet

SG_GadgetHeight()

returns the height of the specified gagdet

SG_GadgetID()

returns the ID (=pointer To the listelement) of that gadget

SG_GadgetWidth()

returns the width of the specified gagdet

SG_GadgetX()

returns the x Position of the specified gagdet

SG_GadgetY()

returns the y Position of the specified gagdet

SG_GetFocusGadget()

returns the Number of the gagdet With the current focus, otherwise -1

SG_GetGadgetAttribute()

returns the flags of the specified gadget

SG_GetGadgetColor()

change the color of the specified gagdet

SG_GetGadgetData()

returns the Value stored With this gadget

SG_GetGadgetFont()

returns the font used by the specified gagdet

SG_GetGadgetItemAttribute()

Return the flags ot this gadget

SG_GetGadgetItemColor()

returns the color of that item

SG_GetGadgetItemData()

returns the Value stored With this item of the gadget

SG_GetGadgetItemFont()

returns the font used by the specified gagdet

SG_GetGadgetItemState()

returns the item state of the specified gagdet

SG_GetGadgetItemText()

returns the item text of the specified gagdet

SG_GetGadgetState()

returns the state of the specified gagdet

SG_GetGadgetText()

returns the text of the specified gagdet

SG_GetGadgetToggleState()

returns the toggle - state of the button Or Imagebutton

SG_GetHeaderState()

returns the current state of the Listicon Header: 1 For down And 0 For up Or -1 For none.

SG_HideGadget()

hides the specified gagdet

SG_ImageGadget()

creates a Image gadget

SG_IsGadget()

returns the the ID (=pointer To the listelement) of the specified gagdet, Or 0, If it does Not exist

SG_ListIconGadget()

creates a listicon gadget

SG_MoveLiconHeader()

returns 1, If the Mouse of over a Licon Header gap

SG_OptionGadget()

creates a option gadget

SG_RemoveGadgetColumn()

remove the given Column from the specified gadget

SG_RemoveGadgetItem()

removes the item an the Position from the specified listicon gagdet

SG_ResizeGadget()

change the Size of the specified gagdet

SG_ScreenGadgetEvent()

checks If an event happened And Return the EventID

SG_ScrollBarGadget()

creates a scrollbar gadget

SG_SetBackground()

set the background type For all gadgets created after that command (0 = none, 1 = color, 2 = image)

SG_SetBackgroundColor()

set the background color For all gadgets created after that command

SG_SetBackgroundImage()

set the background image For all gadgets created after that command

SG_SetColor()

set the text color For all gadgets created after that command

SG_SetFocusGadget()

set the focus To the specified gagdet

SG_SetGadgetAttribute()

change the flag of the specified gadget

SG_SetGadgetBackground()

set the background type For the specified gagdet (0 = none, 1 = color, 2 = image)

SG_SetGadgetBackgroundImage()

set the background image For the specified gagdet

SG_SetGadgetColor()

change the color of the specified gagdet

SG_SetGadgetData()

stores a Value With this gadget

SG_SetGadgetFont()

change the text font of the specified gagdet

SG_SetGadgetItemAttribute()

stores the flags ot this gadget

SG_SetGadgetItemColor()

Set the color of the specified Row of the Gadget

SG_SetGadgetItemData()

stores a Value With this item of the gadget

SG_SetGadgetItemFont()

change the font of an item of the specified gagdet - only EditorGadgets

SG_SetGadgetItemState()

change the state of an item of the specified gagdet

SG_SetGadgetItemText()

change the text of an item of the specified gagdet

SG_SetGadgetPos()

set the Position For this gadget

SG_SetGadgetState()

change the state of the specified gagdet

SG_SetGadgetText()

change the text of the specified gagdet

SG_SetGadgetToggleState()

set the toggle - state of the button Or Imagebutton

SG_SetHeaderState()

set the state of the Header of the colums 1 For down, 0 For up Or -1 For none

SG_ShowListItem()

makes the item at Position_L visible

SG_Sort_ListIconGadget()

SG_StringGadget()

creates a string gadget

SG_TextGadget()

creates a text gadget

SG_TrackBarGadget()

creates a trackbar gadget