Page 1 of 1

ProGUI Library V0.54 Beta Released!

Posted: Tue Oct 31, 2006 3:24 am
by PrincieD
Hi Guys!

Heres a new PureBasic V4 compatible update with separate UserLibrary version :)

Lots of internal rework and fixes in this release.

Current Version 0.54 Beta

http://www.hashdesign.co.uk/ProGUI.rar

Examples:

http://www.hashdesign.co.uk/ProGUI_Examples.rar

Thanks!

Chris.

Posted: Tue Oct 31, 2006 4:46 am
by GeoTrail
Very cool. Seems simple to use too :)

Posted: Tue Oct 31, 2006 6:45 am
by mskuma
This is a very minor pickup. There seems to be a spelling issue regarding 'PannelEx' - it's referred to in the help as PanelEx in places, and PannelEx in others. I guess it's the latter which is a bit confusing since this feature seems to be a UI variant of Panel, so shouldn't it be spelt as PanelEx (the 'Ex' part being enough to distinguish it from Panel)?

Posted: Tue Oct 31, 2006 12:02 pm
by ts-soft
good lib :D

for using the dll in unicode i have changed the includefile to prototypes

Code: Select all

#LVM_SETEXTENDEDLISTVIEWSTYLE = (#LVM_FIRST+54)
#LVS_EX_SUBITEMIMAGES = $2
#LVM_SETICONSPACING = (#LVM_FIRST+53)
#LVS_EX_UNDERLINEHOT = $800
#LVS_EX_TRACKSELECT = $8
#LVS_EX_ONECLICKACTIVATE = $40
#LVS_EX_REGIONAL = $200

#RBBS_SIZEABLE = $60000
#RBBS_VERTICALRESIZEABLE = $800000

#TVS_TRACKSELECT = $200
#TVM_SETITEMHEIGHT = (#TV_FIRST+27)

#TBSTYLE_BUTTON = $0
#TBSTYLE_SEP = $1
#TBSTYLE_CHECK = $2
#TBSTYLE_GROUP = $4
#TBSTYLE_CHECKGROUP = (#TBSTYLE_GROUP | #TBSTYLE_CHECK)
#TBSTYLE_DROPDOWN = $8
#TBSTYLE_AUTOSIZE = $10
#TBSTYLE_NOPREFIX = $20
#TBSTYLE_TOOLTIPS = $100
#TBSTYLE_WRAPABLE = $200
#TBSTYLE_ALTDRAG = $400
#TBSTYLE_FLAT = $800
#TBSTYLE_LIST = $1000
#TBSTYLE_CUSTOMERASE = $2000
#TBSTYLE_REGISTERDROP = $4000
#TBSTYLE_TRANSPARENT = $8000
#TBSTYLE_EX_DRAWDDARROWS = $1
#TBSTYLE_EX_UNDOC1 = $4
#TBSTYLE_EX_MIXEDBUTTONS = $8
#TBSTYLE_EX_HIDECLIPPEDBUTTONS = $10
#TBSTYLE_EX_DOUBLEBUFFER = $80

#BTNS_BUTTON = #TBSTYLE_BUTTON
#BTNS_SEP = #TBSTYLE_SEP
#BTNS_CHECK = #TBSTYLE_CHECK
#BTNS_GROUP = #TBSTYLE_GROUP
#BTNS_CHECKGROUP = #TBSTYLE_CHECKGROUP
#BTNS_DROPDOWN = #TBSTYLE_DROPDOWN
#BTNS_AUTOSIZE = #TBSTYLE_AUTOSIZE
#BTNS_NOPREFIX = #TBSTYLE_NOPREFIX
#BTNS_SHOWTEXT = $40
#BTNS_WHOLEDROPDOWN = $80

#TB_SETIMAGELIST = (#WM_USER + 48)
#TB_SETHOTIMAGELIST = (#WM_USER+52)
#TB_SETDISABLEDIMAGELIST = (#WM_USER+54)
CompilerIf Defined(TB_ADDSTRING, #PB_Constant) = #False
#TB_ADDSTRING = (#WM_USER + 28)
CompilerEndIf
#TB_GETBUTTONSIZE = #WM_USER + 58
#TB_GETRECT = (#WM_USER+51)
#TB_HITTEST = (#WM_USER+69)
#TB_GETHOTITEM = (#WM_USER+71)
#TB_SETHOTITEM = (#WM_USER+72)
#TB_MARKBUTTON = (#WM_USER+6)
#TB_SETANCHORHIGHLIGHT = (#WM_USER+73)
#TB_SETDRAWTEXTFLAGS = (#WM_USER+70)
#TB_SETPADDING = (#WM_USER+87)
#TB_SETEXTENDEDSTYLE = (#WM_USER+84)
#TB_SETPADDING = (#WM_USER+87)
#TB_GETBUTTON = (#WM_USER+23)
#TB_GETPADDING = (#WM_USER+86)
#TB_SETBUTTONWIDTH = (#WM_USER+59)
CompilerIf Defined(TB_SETBUTTONINFO, #PB_Constant) = #False
#TB_SETBUTTONINFO = (#WM_USER+66)
CompilerEndIf
#TB_GETIMAGELIST = (#WM_USER+49)
CompilerIf Defined(TB_GETBUTTONINFO, #PB_Constant) = #False
#TB_GETBUTTONINFO = (#WM_USER+65)
CompilerEndIf
#TBSTYLE_EX_DOUBLEBUFFER = $80
#TBSTYLE_CUSTOMERASE = $2000
#TBIF_TEXT = $00000002
#TBIF_STYLE = $00000008

#WS_EX_COMPOSITED = $02000000
#RBBS_USECHEVRON = $00000200
#RBN_CHEVRONPUSHED = (#RBN_FIRST - 10)
#TBN_DROPDOWN = (#TBN_FIRST-10)
#I_IMAGENONE = -2

#TBDDRET_DEFAULT      = 0 ; The drop-down was handled.
#TBDDRET_NODEFAULT    = 1 ; The drop-down was not handled.
#TBDDRET_TREATPRESSED = 2 ; The drop-down was handled, but treat the button like a regular button.

#TPM_VERTICAL = $40
#TPM_HORIZONTAL = 0
#TPM_NOANIMATION = $04000

#TBN_HOTITEMCHANGE = (#TBN_FIRST-13)

#TBIF_SIZE = $00000040

#CDDS_ITEM = $00010000
#CDDS_PREPAINT = $00000001
#CDDS_POSTPAINT = $00000002
#CDDS_POSTERASE = $00000004
#CDDS_PREERASE = $00000003
#CDDS_ITEMPREPAINT = (#CDDS_ITEM | #CDDS_PREPAINT)
#CDDS_ITEMPOSTPAINT = (#CDDS_ITEM | #CDDS_POSTPAINT)
#CDIS_HOT = $0040
#CDIS_DEFAULT = $0020
#CDIS_CHECKED = $0008
#CDIS_DISABLED = $0004
#CDIS_FOCUS = $0010
#CDIS_GRAYED = $0002
#CDIS_INDETERMINATE = $0100
#CDIS_MARKED = $0080
#CDIS_SELECTED = $0001
#CDIS_SHOWKEYBOARDCUES = $0200

#CDRF_NOTIFYITEMDRAW = $00000020
#CDRF_SKIPDEFAULT = $00000004
#CDRF_DODEFAULT = $00000000
#CDRF_NEWFONT = $00000002

#TBCDRF_HILITEHOTTRACK = $00020000
#TBCDRF_NOEDGES = $00010000
#TBCDRF_NOOFFSET = $00040000

#COLOR_MENUHILIGHT = 29

#WM_EXITSIZEMOVE = $232

#MIIM_ID = $00000002
#MIIM_TYPE = $00000010
#MIIM_STRING = $00000040
#MIIM_FTYPE = $00000100
#MIIM_STATE = $00000001
#MIIM_DATA = $00000020
#MIIM_SUBMENU = $00000004
#WM_MENUCOMMAND = $126

#MSGF_MENU = 2

; textcontrol flags
#TCX_TRANSPARENT = $70000
#TCX_BK_FILL = $1000
#TCX_BK_GRADIENT = $2000
#TCX_CENTRE = $10
#TCX_VCENTRE = $20

; pannelex style flags
#PNLX_CENTRE = $10
#PNLX_VCENTRE = $20

Prototype.l StartProGUI(user.p-ascii, k1.l, k2.l, k3.l, k4.l, k5.l, k6.l)
Prototype.f ProGUIVersion()
Prototype.l CreateMenuEx(MenuID.l, WindowID.l, style.b)
Prototype.l CreatePopupMenuEx(MenuID.l)
Prototype.l MenuTitleEx(title.p-ascii)
Prototype.l MenuItemEx(MenuItemID.l, text.p-ascii, normalImageID.l, hotImageID.l, disabledImageID.l, submenu.l)
Prototype.l SetMenuExImageSize(width.l, height.l)
Prototype.l DisableMenuItemEx(menu.l, itemId.l, state.b)
Prototype.l MenuBarEx()
Prototype.l MenuExID(id.l)
Prototype.l FreeMenuEx(menu.l)
Prototype.l CalcMenuItemWidth(menu.l)
Prototype.l CreateToolBarEx(id.l, WindowID.l, iconWidth.l, iconHeight.l, Style.l)
Prototype.l FreeToolBarEx(toolbar.l)
Prototype.l ToolBarImageButtonEx(buttonID.l, text.p-ascii, normalImageID.l, hotImageID.l, disabledImageID.l, Style.l)
Prototype.l ToolBarButtonEx(buttonID.l, text.p-ascii, Style.l)
Prototype.l ToolBarDropdownImageButtonEx(buttonID.l, MenuID.l, text.p-ascii, normalImageID.l, hotImageID.l, disabledImageID.l, Style.l)
Prototype.l ToolBarExAttachDropdownMenu(toolbar.l, buttonID.l, menu.l)
Prototype.l DisableToolbarExButton(toolbar.l, buttonID.l, state)
Prototype.l SelectToolbarExButton(toolbar.l, buttonID.l, state.b)
Prototype.l CreateRebar(id.l, WindowID.l, barColour.l, textColour.l, style.l, doublebuffer.b)
Prototype.l AddRebarGadget(gadgetID.l, text.p-ascii, width.l, minWidth.l, height.l, style.l)
Prototype.l showRebarBand(rebar.l, band.l, state.l)
Prototype.l RebarID(id.l)
Prototype.l TextControlEx(window.l, id.l, x, y, width.l, height.l, text.p-ascii, flags.l)
Prototype.l setTextControlExPadding(leftPadding.l, topPadding.l, rightPadding.l, bottomPadding.l)
Prototype.l setTextControlExFont(fontID.l, antialiased.b)
Prototype.l setTextControlExColour(textColour.l, backColour.l)
Prototype.l setTextControlExGradient(textColour.l, backColour.l)
Prototype.l setTextControlExText(id.l, text.p-ascii)
Prototype.l changeListiconSubIcon(listicon.l, itempos.l, subitempos.l, image.l)
Prototype.l CreatePannelEx(PannelID.l, WindowID.l, x.l, y.l, width.l, height.l, usercallback.l)
Prototype.l AddPannelExPage(background.l)
Prototype.l AddPannelExImagePage(background.l, backgroundImg.l, imageX.l, imageY.l, imageWidth.l, imageHeight.l, style.l)
Prototype.l ShowPannelExPage(Pannel.l, index.l)
Prototype.l PannelExID(Pannel.l, index.l)
Prototype.l PannelExPageIndex(Pannel.l)

Procedure StartProGUI(user.s, k1.l, k2.l, k3.l, k4.l, k5.l, k6.l)
  Static ProGUI.l

  If Not ProGUI
    ProGUI = OpenLibrary(#PB_Any, "ProGUI.dll")
  EndIf

  If Not ProGUI
    MessageRequester("Error!", "Could not open ProGUI.dll", #PB_MessageRequester_Ok)
    End
  Else
    Global ProGUIVersion.ProGUIVersion = GetFunction(ProGUI, "ProGUIVersion")
    Global CreateMenuEx.CreateMenuEx = GetFunction(ProGUI, "CreateMenuEx")
    Global CreatePopupMenuEx.CreatePopupMenuEx = GetFunction(ProGUI, "CreatePopupMenuEx")
    Global MenuTitleEx.MenuTitleEx = GetFunction(ProGUI, "MenuTitleEx")
    Global MenuItemEx.MenuItemEx = GetFunction(ProGUI, "MenuItemEx")
    Global SetMenuExImageSize.SetMenuExImageSize = GetFunction(ProGUI, "SetMenuExImageSize")
    Global DisableMenuItemEx.DisableMenuItemEx = GetFunction(ProGUI, "DisableMenuItemEx")
    Global MenuBarEx.MenuBarEx = GetFunction(ProGUI, "MenuBarEx")
    Global MenuExID.MenuExID = GetFunction(ProGUI, "MenuExID")
    Global FreeMenuEx.FreeMenuEx = GetFunction(ProGUI, "FreeMenuEx")
    Global CalcMenuItemWidth.CalcMenuItemWidth = GetFunction(ProGUI, "CalcMenuItemWidth")
    Global CreateToolBarEx.CreateToolBarEx = GetFunction(ProGUI, "CreateToolBarEx")
    Global FreeToolBarEx.FreeToolBarEx = GetFunction(ProGUI, "FreeToolBarEx")
    Global ToolBarImageButtonEx.ToolBarImageButtonEx = GetFunction(ProGUI, "ToolBarImageButtonEx")
    Global ToolBarButtonEx.ToolBarButtonEx = GetFunction(ProGUI, "ToolBarButtonEx")
    Global ToolBarDropdownImageButtonEx.ToolBarDropdownImageButtonEx = GetFunction(ProGUI, "ToolBarDropdownImageButtonEx")
    Global ToolBarExAttachDropdownMenu.ToolBarExAttachDropdownMenu = GetFunction(ProGUI, "ToolBarExAttachDropdownMenu")
    Global DisableToolbarExButton.DisableToolbarExButton = GetFunction(ProGUI, "DisableToolbarExButton")
    Global SelectToolbarExButton.SelectToolbarExButton = GetFunction(ProGUI, "SelectToolbarExButton")
    Global CreateRebar.CreateRebar = GetFunction(ProGUI, "CreateRebar")
    Global AddRebarGadget.AddRebarGadget = GetFunction(ProGUI, "AddRebarGadget")
    Global showRebarBand.showRebarBand = GetFunction(ProGUI, "showRebarBand")
    Global RebarID.RebarID = GetFunction(ProGUI, "RebarID")
    Global TextControlEx.TextControlEx = GetFunction(ProGUI, "TextControlEx")
    Global setTextControlExPadding.setTextControlExPadding = GetFunction(ProGUI, "setTextControlExPadding")
    Shared setTextControlExFont_.setTextControlExFont
    setTextControlExFont_ = GetFunction(ProGUI, "setTextControlExFont")
    Global setTextControlExColour.setTextControlExColour = GetFunction(ProGUI, "setTextControlExColour")
    Global setTextControlExGradient.setTextControlExGradient = GetFunction(ProGUI, "setTextControlExGradient")
    Global setTextControlExText.setTextControlExText = GetFunction(ProGUI, "setTextControlExText")
    Shared changeListiconSubIcon_.changeListiconSubIcon
    changeListiconSubIcon_ = GetFunction(ProGUI, "changeListiconSubIcon")
    Global CreatePannelEx.CreatePannelEx = GetFunction(ProGUI, "CreatePannelEx")
    Shared AddPannelExPage_.AddPannelExPage
    AddPannelExPage_ = GetFunction(ProGUI, "AddPannelExPage")
    Shared AddPannelExImagePage_.AddPannelExImagePage
    AddPannelExImagePage_ = GetFunction(ProGUI, "AddPannelExImagePage")
    Global ShowPannelExPage.ShowPannelExPage = GetFunction(ProGUI, "ShowPannelExPage")
    Global PannelExID.PannelExID = GetFunction(ProGUI, "PannelExID")
    Global PannelExPageIndex.PannelExPageIndex = GetFunction(ProGUI, "PannelExPageIndex")

    Protected StartProGUI_.StartProGUI = GetFunction(ProGUI, "StartProGUI")
    ProcedureReturn StartProGUI_(user.s, k1.l, k2.l, k3.l, k4.l, k5.l, k6.l)
  EndIf
EndProcedure

Procedure setTextControlExFont(fontID.l, antialiased.b)
  Shared setTextControlExFont_.setTextControlExFont
  If IsFont(fontID)
    fontID = FontID(fontID)
  EndIf
  ProcedureReturn setTextControlExFont_(fontID.l, antialiased.b)
EndProcedure

Procedure changeListiconSubIcon(listicon.l, itempos.l, subitempos.l, image.l)
  Shared changeListiconSubIcon_.changeListiconSubIcon
  If IsGadget(listicon)
    listicon = GadgetID(listicon)
  EndIf
  ProcedureReturn changeListiconSubIcon_(listicon.l, itempos.l, subitempos.l, image.l)
EndProcedure

Procedure AddPannelExPage(background.l)
  Shared AddPannelExPage_.AddPannelExPage
  Protected dllReturnVal.l = AddPannelExPage_(background)
  If dllReturnVal <> 0
    UseGadgetList(dllReturnVal)
  EndIf
  ProcedureReturn dllReturnVal
EndProcedure

Procedure AddPannelExImagePage(background.l, backgroundImg.l, imageX.l, imageY.l, imageWidth.l, imageHeight.l, style.l)
  Shared AddPannelExImagePage_.AddPannelExImagePage
  Protected dllReturnVal.l = AddPannelExImagePage_(background.l, backgroundImg.l, imageX.l, imageY.l, imageWidth.l, imageHeight.l, style.l)
  If dllReturnVal <> 0
    UseGadgetList(dllReturnVal)
  EndIf
  ProcedureReturn dllReturnVal
EndProcedure
All examples works fine

Posted: Tue Oct 31, 2006 2:10 pm
by PrincieD
mskuma: Ooops! Yes I'll change it to PanelEx :)

ts-soft: Excellent work! thanks :)

Cheers guys!

Posted: Tue Oct 31, 2006 4:27 pm
by PrincieD
Re-uploaded with fixed docs and PannelEx commands renamed to PanelEx.
Replaced the DLL include file with ts-soft's modified Unicode compatible include file (thanks again! your in the credits!).

Chris.