Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Class GadgetBase
- _pb_object.i
- _tooltip.s
- Map _x.i()
- Map _y.i()
- _width.i
- _height.i
- _flags.i
- _text.s
- _state.i
- _fontID.i
- Map _data.i()
- Map _attributes.i()
- Map _colors.i()
- _disabled.i
- _hidden.i
- Public Method Constructor()
- me\_fontID = #PB_Default ; -1 on Windows
- EndMethod
- Public Method.i ID()
- If me\_pb_object
- ProcedureReturn GadgetID(me\_pb_object)
- EndIf
- EndMethod
- Public Method.i Gadget()
- ProcedureReturn me\_pb_object
- EndMethod
- Public Method.i Type()
- If me\_pb_object
- ProcedureReturn GadgetType(me\_pb_object)
- EndIf
- EndMethod
- Public Method.i IsGadget()
- If me\_pb_object
- ProcedureReturn IsGadget(me\_pb_object)
- EndIf
- EndMethod
- Public Method Free()
- If me\_pb_object
- FreeGadget(me\_pb_object)
- me\_pb_object = 0
- EndIf
- EndMethod
- Public Method Close()
- me\Free()
- EndMethod
- Public Method Disable(state=1)
- me\_disabled = state
- If me\_pb_object
- DisableGadget(me\_pb_object, state)
- EndIf
- EndMethod
- Public Method Enable(state=1)
- state!1
- me\_disabled = state
- If me\_pb_object
- DisableGadget(me\_pb_object,state)
- EndIf
- EndMethod
- Public Method Hide(state=1)
- me\_hidden = state
- If me\_pb_object
- HideGadget(me\_pb_object, state)
- EndIf
- EndMethod
- Public Method Show(state=1)
- state!1
- me\_hidden = state
- If me\_pb_object
- HideGadget(me\_pb_object, state)
- EndIf
- EndMethod
- Public Method Resize(x,y,width,height)
- me\_x(Str(#PB_Gadget_ContainerCoordinate)) = x
- me\_y(Str(#PB_Gadget_ContainerCoordinate)) = y
- me\_width = width
- me\_height = height
- If me\_pb_object
- ResizeGadget(me\_pb_object,x,y,width,height)
- EndIf
- EndMethod
- Public Method Activate()
- If me\_pb_object
- SetActiveGadget(me\_pb_object)
- EndIf
- EndMethod
- Public Method.i IsActivated()
- If me\_pb_object
- If GetActiveGadget() = me\_pb_object
- ProcedureReturn #True
- EndIf
- EndIf
- ProcedureReturn #False
- EndMethod
- Public Method.i GetWidth()
- If me\_pb_object
- me\_width = GadgetWidth(me\_pb_object)
- EndIf
- ProcedureReturn me\_width
- EndMethod
- Public Method SetWidth(width)
- me\_width = width
- If me\_pb_object
- ResizeGadget(me\_pb_object,#PB_Ignore,#PB_Ignore,width,#PB_Ignore)
- EndIf
- EndMethod
- Public Method.i GetHeight()
- If me\_pb_object
- me\_height = GadgetHeight(me\_pb_object)
- EndIf
- ProcedureReturn me\_height
- EndMethod
- Public Method SetHeight(height)
- me\_height = height
- If me\_pb_object
- ResizeGadget(me\_pb_object,#PB_Ignore,#PB_Ignore,#PB_Ignore,height)
- EndIf
- EndMethod
- Public Method GetX(flags=#PB_Gadget_ContainerCoordinate)
- If me\_pb_object
- me\_x(Str(flags)) = GadgetX(me\_pb_object,flags)
- EndIf
- ProcedureReturn me\_x(Str(flags))
- EndMethod
- Public Method SetX(x)
- me\_x(Str(#PB_Gadget_ContainerCoordinate)) = x
- If me\_pb_object
- ResizeGadget(me\_pb_object,x,#PB_Ignore,#PB_Ignore,#PB_Ignore)
- EndIf
- EndMethod
- Public Method GetY(flags=#PB_Gadget_ContainerCoordinate)
- If me\_pb_object
- me\_y(Str(flags)) = GadgetY(me\_pb_object,flags)
- EndIf
- ProcedureReturn me\_y(Str(flags))
- EndMethod
- Public Method SetY(y)
- me\_y(Str(#PB_Gadget_ContainerCoordinate)) = y
- If me\_pb_object
- ResizeGadget(me\_pb_object,#PB_Ignore,y,#PB_Ignore,#PB_Ignore)
- EndIf
- EndMethod
- Public Method SetSize(width,height)
- me\_width = width
- me\_height = height
- If me\_pb_object
- ResizeGadget(me\_pb_object,#PB_Ignore,#PB_Ignore,width,height)
- EndIf
- EndMethod
- Public Method SetPosition(x,y)
- me\_x(Str(#PB_Gadget_ContainerCoordinate)) = x
- me\_y(Str(#PB_Gadget_ContainerCoordinate)) = y
- If me\_pb_object
- ResizeGadget(me\_pb_object,x,y,#PB_Ignore,#PB_Ignore)
- EndIf
- EndMethod
- Public Method.s GetText()
- If me\_pb_object
- me\_text = GetGadgetText(me\_pb_object)
- EndIf
- ProcedureReturn me\_text
- EndMethod
- Public Method SetText(text.s)
- me\_text = text
- If me\_pb_object
- SetGadgetText(me\_pb_object, text)
- EndIf
- EndMethod
- Public Method.i GetState()
- If me\_pb_object
- me\_state = GetGadgetState(me\_pb_object)
- EndIf
- ProcedureReturn me\_state
- EndMethod
- Public Method SetState(state)
- me\_state = state
- If me\_pb_object
- SetGadgetState(me\_pb_object, state)
- EndIf
- EndMethod
- Public Method.i GetFlags()
- ProcedureReturn me\_flags
- EndMethod
- Public Method SetFlags(flags)
- me\_flags = flags ; re-create on flag change?
- ;If me\_pb_object
- ; ; re-create the gadget
- ;EndIf
- EndMethod
- Public Method.i GetData(index=0)
- ;If me\_pb_object
- ; ProcedureReturn GetGadgetData(me\_pb_object)
- ;EndIf
- ProcedureReturn me\_data(Str(index))
- EndMethod
- Public Method SetData(value, index=0)
- ;If me\_pb_object
- ; SetGadgetData(me\_pb_object, value)
- ;EndIf
- me\_data(Str(index)) = value
- EndMethod
- Public Method.i GetAttribute(attribute)
- If me\_pb_object
- me\_attributes(Str(attribute)) = GetGadgetAttribute(me\_pb_object, attribute)
- EndIf
- ProcedureReturn me\_attributes(Str(attribute))
- EndMethod
- Public Method SetAttribute(attribute, value)
- me\_attributes(Str(attribute)) = value
- If me\_pb_object
- SetGadgetAttribute(me\_pb_object, attribute, value)
- EndIf
- EndMethod
- Public Method.i GetFont()
- If me\_pb_object
- me\_fontID = GetGadgetFont(me\_pb_object)
- EndIf
- ProcedureReturn me\_fontID
- EndMethod
- Public Method SetFont(fontID)
- me\_fontID = fontID
- If me\_pb_object
- SetGadgetFont(me\_pb_object, fontID)
- EndIf
- EndMethod
- Public Method.s GetTooltip()
- ProcedureReturn me\_tooltip
- EndMethod
- Public Method SetTooltip(text.s)
- me\_tooltip = text
- If me\_pb_object
- GadgetToolTip(me\_pb_object, text)
- EndIf
- EndMethod
- Public Method.i GetColor(colorType)
- ;If me\_pb_object
- ; me\_colors(Str(colorType)) = GetGadgetColor(me\_pb_object, colorType)
- ;EndIf
- ProcedureReturn me\_colors(Str(colorType))
- EndMethod
- Public Method SetColor(colorType, color)
- me\_colors(Str(colorType)) = color
- If me\_pb_object
- SetGadgetColor(me\_pb_object, colorType, color)
- EndIf
- EndMethod
- Private Method __create()
- EndMethod
- Private Method __init()
- If me\_pb_object
- SetGadgetData(me\_pb_object,me)
- If me\_disabled
- DisableGadget(me\_pb_object, 1)
- EndIf
- If me\_hidden
- HideGadget(me\_pb_object, 1)
- EndIf
- If me\_tooltip <> ""
- GadgetToolTip(me\_pb_object, me\_tooltip)
- EndIf
- If me\_state
- SetGadgetState(me\_pb_object, me\_state)
- EndIf
- If me\_fontID <> 0 And me\_fontID <> #PB_Default
- SetGadgetFont(me\_pb_object, me\_fontID)
- EndIf
- ForEach me\_attributes()
- SetGadgetAttribute(me\_pb_object, Val(MapKey(me\_attributes())), me\_attributes())
- Next
- ForEach me\_colors()
- SetGadgetColor(me\_pb_object, Val(MapKey(me\_colors())), me\_colors())
- Next
- ; init Map _data.i() ? Not required as long we dont use SetGadgetData()!
- EndIf
- EndMethod
- EndClass
- Class ItemStateGadget Extends GadgetBase
- Public Method.i GetItemState(item)
- If me\_pb_object
- ProcedureReturn GetGadgetItemState(me\_pb_object, item)
- EndIf
- EndMethod
- Public Method SetItemState(item, state)
- If me\_pb_object
- SetGadgetItemState(me\_pb_object, item, state)
- EndIf
- EndMethod
- EndClass
- Class ItemGadget Extends GadgetBase
- Public Method.i ItemID(item)
- If me\_pb_object
- ProcedureReturn GadgetItemID(me\_pb_object, item)
- EndIf
- EndMethod
- Public Method AddItem(position, text.s, imageID=0, flags=0)
- If me\_pb_object
- AddGadgetItem(me\_pb_object, position, text.s, imageID, flags)
- EndIf
- EndMethod
- Public Method RemoveItem(position)
- If me\_pb_object
- RemoveGadgetItem(me\_pb_object, position)
- EndIf
- EndMethod
- Public Method ClearItems()
- If me\_pb_object
- ClearGadgetItems(me\_pb_object)
- EndIf
- EndMethod
- Public Method.i CountItems()
- If me\_pb_object
- ProcedureReturn CountGadgetItems(me\_pb_object)
- EndIf
- EndMethod
- Public Method SetItemText(item, text.s, column=0)
- If me\_pb_object
- SetGadgetItemText(me\_pb_object, item, text, column)
- EndIf
- EndMethod
- Public Method.s GetItemText(item, column=0)
- If me\_pb_object
- ProcedureReturn GetGadgetItemText(me\_pb_object, item, column)
- EndIf
- EndMethod
- Public Method SetItemData(item, value)
- If me\_pb_object
- SetGadgetItemData(me\_pb_object, item, value)
- EndIf
- EndMethod
- Public Method.i GetItemData(item)
- If me\_pb_object
- ProcedureReturn GetGadgetItemData(me\_pb_object, item)
- EndIf
- EndMethod
- Public Method SetItemAttribute(item, attribute, value, column=0)
- If me\_pb_object
- SetGadgetItemAttribute(me\_pb_object, item, attribute, value, column)
- EndIf
- EndMethod
- Public Method.i GetItemAttribute(item, attribute, column=0)
- If me\_pb_object
- ProcedureReturn GetGadgetItemAttribute(me\_pb_object, item, attribute, column)
- EndIf
- EndMethod
- Public Method SetItemColor(item, colorType, color, column=0)
- If me\_pb_object
- SetGadgetItemColor(me\_pb_object, item, colorType, color, column)
- EndIf
- EndMethod
- Public Method.i GetItemColor(item, colorType, column=0)
- If me\_pb_object
- ProcedureReturn GetGadgetItemColor(me\_pb_object, item, colorType, column)
- EndIf
- EndMethod
- Public Method SetItemImage(item, imageID)
- If me\_pb_object
- SetGadgetItemImage(me\_pb_object, item, imageID)
- EndIf
- EndMethod
- EndClass
- Class ItemStateItemGadget Extends ItemGadget
- Public Method.i GetItemState(item)
- If me\_pb_object
- ProcedureReturn GetGadgetItemState(me\_pb_object, item)
- EndIf
- EndMethod
- Public Method SetItemState(item, state)
- If me\_pb_object
- SetGadgetItemState(me\_pb_object, item, state)
- EndIf
- EndMethod
- EndClass
- Class ImageButton Extends GadgetBase
- Public Method Constructor(x, y, width, height, imageID, flags=0)
- EndMethod
- EndClass
- Class ImageGadget Extends GadgetBase
- Public Method Constructor(x, y, width, height, imageID, flags=0)
- EndMethod
- EndClass
- Class StringGadget Extends GadgetBase
- Public Method Constructor(x, y, width, height, text.s, flags=0)
- me\SetPosition(x,y)
- me\SetSize(width,height)
- me\SetText(text)
- me\SetFlags(flags)
- EndMethod
- EndClass
- Class TextGadget Extends GadgetBase
- Public Method Constructor(x, y, width, height, text.s, flags=0)
- me\SetPosition(x,y)
- me\SetSize(width,height)
- me\SetText(text)
- me\SetFlags(flags)
- EndMethod
- EndClass
- Class CheckBox Extends GadgetBase
- Public Method Constructor(x, y, width, height, text.s, flags=0)
- me\SetPosition(x,y)
- me\SetSize(width,height)
- me\SetText(text)
- me\SetFlags(flags)
- EndMethod
- EndClass
- Class Option Extends GadgetBase
- Public Method Constructor(x, y, width, height, text.s)
- me\SetPosition(x,y)
- me\SetSize(width,height)
- me\SetText(text)
- EndMethod
- EndClass
- Class Frame3D Extends GadgetBase
- Public Method Constructor(x, y, width, height, text.s, flags=0)
- me\SetPosition(x,y)
- me\SetSize(width,height)
- me\SetText(text)
- me\SetFlags(flags)
- EndMethod
- EndClass
- Class ProgressBar Extends GadgetBase
- Public Method Constructor(x, y, width, height, minimum, maximum, flags=0)
- EndMethod
- EndClass
- Class TrackBar Extends GadgetBase
- Public Method Constructor(x, y, width, height, minimum, maximum, flags=0)
- EndMethod
- EndClass
- Class ScrollBar Extends GadgetBase
- Public Method Constructor(x, y, width, height, minimum, maximum, pageLength, flags=0)
- EndMethod
- EndClass
- Class Spin Extends GadgetBase
- Public Method Constructor(x, y, width, height, minimum, maximum, flags=0)
- EndMethod
- EndClass
- Class Splitter Extends GadgetBase
- Public Method Constructor(x, y, width, height, gadget1, gadget2, flags=0)
- EndMethod
- EndClass
- Class Hyperlink Extends GadgetBase
- Public Method Constructor(x, y, width, height, text.s, color, flags=0)
- EndMethod
- EndClass
- Class IPAddress Extends GadgetBase
- Public Method Constructor(x, y, width, height)
- me\SetPosition(x,y)
- me\SetSize(width,height)
- EndMethod
- EndClass
- Class Shortcut Extends GadgetBase
- Public Method Constructor(x, y, width, height, shortcut)
- EndMethod
- EndClass
- Class Container Extends GadgetBase
- Public Method Constructor(x, y, width, height, flags=0)
- me\SetPosition(x,y)
- me\SetSize(width,height)
- me\SetFlags(flags)
- ;CloseGadgetList()
- EndMethod
- EndClass
- Class ScrollArea Extends GadgetBase
- Public Method Constructor(x, y, width, height, scrollAreaWidth, scrollAreaHeight, scrollStep=10, flags=0)
- ;CloseGadgetList()
- EndMethod
- EndClass
- Class Date Extends GadgetBase
- Public Method Constructor(x, y, width, height, mask.s="", date=0, flags=0)
- EndMethod
- EndClass
- Class ExplorerCombo Extends GadgetBase
- Public Method Constructor(x, y, width, height, directory.s, flags=0)
- EndMethod
- EndClass
- Class ExplorerTree Extends GadgetBase
- Public Method Constructor(x, y, width, height, directory.s, flags=0)
- EndMethod
- EndClass
- Class WebGadget Extends GadgetBase
- Public Method Constructor(x, y, width, height, url.s, flags=0)
- EndMethod
- ;SetItemText(item, text.s, Column=0)
- ;GetItemText(item, column=0)
- EndClass
- ; Class ComboBox Extends ItemGadget
- ; Public Method Constructor(x, y, width, height, flags=0)
- ; EndMethod
- ; EndClass
- ;
- ; Class Panel Extends ItemGadget
- ; Public Method Constructor(x, y, width, height)
- ; EndMethod
- ; EndClass
- ;
- ; Class Editor Extends ItemGadget
- ; Public Method Constructor(x, y, width, height, flags=0)
- ; EndMethod
- ; EndClass
- ;
- ; Class MDI Extends ItemGadget
- ; Public Method Constructor(x, y, width, height, subMenu, menuItem, flags=0)
- ; EndMethod
- ; EndClass
- ;
- ;
- ;
- ; Class Calendar Extends ItemStateGadget
- ; Public Method Constructor(x, y, width, height, date=0, flags=0)
- ; EndMethod
- ; EndClass
- ;
- ;
- ;
- ; Class ExplorerList Extends ItemStateItemGadget
- ; Public Method Constructor(x, y, width, height, directory.s, flags=0)
- ; EndMethod
- ;
- ; ;AddColumn(position, title.s, titleWidth)
- ; ;RemoveColumn(column)
- ; EndClass
- ;
- ; Class ListIcon Extends ItemStateItemGadget
- ; Public Method Constructor(x, y, width, height, title.s, titleWidth, flags=0)
- ; EndMethod
- ;
- ; ;AddColumn(position, title.s, titleWidth)
- ; ;RemoveColumn(column)
- ; EndClass
- ;
- ; Class ListView Extends ItemStateItemGadget
- ; Public Method Constructor(x, y, width, height, flags=0)
- ; EndMethod
- ; EndClass
- ;
- ; Class TreeGadget Extends ItemStateItemGadget
- ; Public Method Constructor(x, y, width, height, flags=0)
- ; EndMethod
- ; EndClass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement