Page 1 of 1

ProGUI Library V0.55 Beta Released!

Posted: Fri Nov 17, 2006 9:50 pm
by PrincieD
New in ProGUI V0.55:

- Updated AddPanelExImagePage, now supports any image format of any size as a background image.

- Updated PanelEx example.

- Windows Vista redraw optimizations.

- Updated docs.


Current Version 0.55 Beta

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

Examples:

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

Thanks!

Chris.

Posted: Fri Nov 17, 2006 10:47 pm
by ts-soft
UserLib doesn't work in PB4.01

In PB4.01 is a bug with Global in Procedures, so i have changed the "ProGUI_PB.pb"

"ButtonExample1.pb" doesn't work

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
#PNLX_MASKED = $1000

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 CreatePanelEx(PanelID.l, WindowID.l, x.l, y.l, width.l, height.l, usercallback.l)
Prototype.l AddPanelExPage(background.l)
Prototype.l AddPanelExImagePage(background.l, backgroundImg.l, imageX.l, imageY.l, imageWidth.l, imageHeight.l, style.l)
Prototype.l ShowPanelExPage(Panel.l, index.l)
Prototype.l PanelExID(Panel.l, index.l)
Prototype.l PanelExPageIndex(Panel.l)
Prototype.l ImageButtonEx(WindowID.l, buttonID.l, x.l, y.l, normalImageID.l, hotImageID.l, disabledImageID.l)

Global ProGUIVersion.ProGUIVersion
Global CreateMenuEx.CreateMenuEx
Global CreatePopupMenuEx.CreatePopupMenuEx
Global MenuTitleEx.MenuTitleEx
Global MenuItemEx.MenuItemEx
Global SetMenuExImageSize.SetMenuExImageSize
Global DisableMenuItemEx.DisableMenuItemEx
Global MenuBarEx.MenuBarEx
Global MenuExID.MenuExID
Global FreeMenuEx.FreeMenuEx
Global CalcMenuItemWidth.CalcMenuItemWidth
Global CreateToolBarEx.CreateToolBarEx
Global FreeToolBarEx.FreeToolBarEx
Global ToolBarImageButtonEx.ToolBarImageButtonEx
Global ToolBarButtonEx.ToolBarButtonEx
Global ToolBarDropdownImageButtonEx.ToolBarDropdownImageButtonEx
Global ToolBarExAttachDropdownMenu.ToolBarExAttachDropdownMenu
Global DisableToolbarExButton.DisableToolbarExButton
Global SelectToolbarExButton.SelectToolbarExButton
Global CreateRebar.CreateRebar
Global AddRebarGadget.AddRebarGadget
Global showRebarBand.showRebarBand
Global RebarID.RebarID
Global TextControlEx.TextControlEx
Global setTextControlExPadding.setTextControlExPadding
Global setTextControlExColour.setTextControlExColour
Global setTextControlExGradient.setTextControlExGradient
Global setTextControlExText.setTextControlExText
Global CreatePanelEx.CreatePanelEx
Global ShowPanelExPage.ShowPanelExPage
Global PanelExID.PanelExID
Global PanelExPageIndex.PanelExPageIndex
Global ImageButtonEx.ImageButtonEx

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
    ProGUIVersion = GetFunction(ProGUI, "ProGUIVersion")
    CreateMenuEx = GetFunction(ProGUI, "CreateMenuEx")
    CreatePopupMenuEx = GetFunction(ProGUI, "CreatePopupMenuEx")
    MenuTitleEx = GetFunction(ProGUI, "MenuTitleEx")
    MenuItemEx = GetFunction(ProGUI, "MenuItemEx")
    SetMenuExImageSize = GetFunction(ProGUI, "SetMenuExImageSize")
    DisableMenuItemEx = GetFunction(ProGUI, "DisableMenuItemEx")
    MenuBarEx = GetFunction(ProGUI, "MenuBarEx")
    MenuExID = GetFunction(ProGUI, "MenuExID")
    FreeMenuEx = GetFunction(ProGUI, "FreeMenuEx")
    CalcMenuItemWidth = GetFunction(ProGUI, "CalcMenuItemWidth")
    CreateToolBarEx = GetFunction(ProGUI, "CreateToolBarEx")
    FreeToolBarEx = GetFunction(ProGUI, "FreeToolBarEx")
    ToolBarImageButtonEx = GetFunction(ProGUI, "ToolBarImageButtonEx")
    ToolBarButtonEx = GetFunction(ProGUI, "ToolBarButtonEx")
    ToolBarDropdownImageButtonEx = GetFunction(ProGUI, "ToolBarDropdownImageButtonEx")
    ToolBarExAttachDropdownMenu = GetFunction(ProGUI, "ToolBarExAttachDropdownMenu")
    DisableToolbarExButton = GetFunction(ProGUI, "DisableToolbarExButton")
    SelectToolbarExButton = GetFunction(ProGUI, "SelectToolbarExButton")
    CreateRebar = GetFunction(ProGUI, "CreateRebar")
    AddRebarGadget = GetFunction(ProGUI, "AddRebarGadget")
    showRebarBand = GetFunction(ProGUI, "showRebarBand")
    RebarID = GetFunction(ProGUI, "RebarID")
    TextControlEx = GetFunction(ProGUI, "TextControlEx")
    setTextControlExPadding = GetFunction(ProGUI, "setTextControlExPadding")
    Shared setTextControlExFont_.setTextControlExFont
    setTextControlExFont_ = GetFunction(ProGUI, "setTextControlExFont")
    setTextControlExColour = GetFunction(ProGUI, "setTextControlExColour")
    setTextControlExGradient = GetFunction(ProGUI, "setTextControlExGradient")
    setTextControlExText = GetFunction(ProGUI, "setTextControlExText")
    Shared changeListiconSubIcon_.changeListiconSubIcon
    changeListiconSubIcon_ = GetFunction(ProGUI, "changeListiconSubIcon")
    CreatePanelEx = GetFunction(ProGUI, "CreatePanelEx")
    Shared AddPanelExPage_.AddPanelExPage
    AddPanelExPage_ = GetFunction(ProGUI, "AddPanelExPage")
    Shared AddPanelExImagePage_.AddPanelExImagePage
    AddPanelExImagePage_ = GetFunction(ProGUI, "AddPanelExImagePage")
    ShowPanelExPage = GetFunction(ProGUI, "ShowPanelExPage")
    PanelExID = GetFunction(ProGUI, "PanelExID")
    PanelExPageIndex = GetFunction(ProGUI, "PanelExPageIndex")
    ImageButtonEx = GetFunction(ProGUI, "ImageButtonEx")
    
    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 AddPanelExPage(background.l)
  Shared AddPanelExPage_.AddPanelExPage
  Protected dllReturnVal.l = AddPanelExPage_(background)
  If dllReturnVal <> 0
    UseGadgetList(dllReturnVal)
  EndIf
  ProcedureReturn dllReturnVal
EndProcedure

Procedure AddPanelExImagePage(background.l, backgroundImg.l, imageX.l, imageY.l, imageWidth.l, imageHeight.l, style.l)
  Shared AddPanelExImagePage_.AddPanelExImagePage
  Protected dllReturnVal.l = AddPanelExImagePage_(background.l, backgroundImg.l, imageX.l, imageY.l, imageWidth.l, imageHeight.l, style.l)
  If dllReturnVal <> 0
    UseGadgetList(dllReturnVal)
  EndIf
  ProcedureReturn dllReturnVal
EndProcedure 
regards
Thomas

Posted: Fri Nov 17, 2006 11:17 pm
by PrincieD
thanks ts-soft!

Don't worry about the button example, it shouldn't be there yet lol still under development!

Posted: Wed Nov 22, 2006 3:01 pm
by wayne-c
Well done! I really like this lib and I am currently evaluating if I should use it in the future (I use Danilos ToolbarPRO right now).
Doing my tests I noticed a few things:

- When you work with two monitors and move the window to the secondary screen, the menus open in the primary screen

- You should be noticed when rebars are moved/resized (from to rows to one single row, e.g.) to be able to resize the other gadgets (ListIcon) as well

- The compiled sample of Rebar2, using the dll, can't be started on my Vista RC1 (or crashes immediately after startup)

- I did not manage to get the toolbar button's text to the right side of the images (TBpro_ListView style)

- The WholeDropDown is working (it's in the example) but I need the DropDown feature that "splits" the button into two (like Back button in IE)


I would really like to see these bugs fixed / features included because the overall look-and-feel is a really good one, IMO.

Posted: Thu Nov 23, 2006 9:46 pm
by PrincieD
Hi wayne-c!

Thanks for the kind comments :)

"- When you work with two monitors and move the window to the secondary screen, the menus open in the primary screen"

Currently working on a fix for this.

"- You should be noticed when rebars are moved/resized (from to rows to one single row, e.g.) to be able to resize the other gadgets (ListIcon) as well "

ProGUI rebars should automatically resize ListIcons and other gadgets with the size of the band. Could you describe in more detail what you would like implemented?

"- The compiled sample of Rebar2, using the dll, can't be started on my Vista RC1 (or crashes immediately after startup)"

Fixed! :)

"- I did not manage to get the toolbar button's text to the right side of the images (TBpro_ListView style)"

Will be added in next update.

"- The WholeDropDown is working (it's in the example) but I need the DropDown feature that "splits" the button into two (like Back button in IE)"

Will be added in next update :)

Thanks for reporting these bugs/feature requests, I'm currently working on them. Expect a new update soon! :)

Cheers!

Chris Deeney.

Posted: Fri Nov 24, 2006 7:29 am
by ts-soft
I miss ReBarHeight(myReBar)
Without it, is no change to move and resize my other Gadgets

Posted: Sun Nov 26, 2006 8:54 pm
by PrincieD
Just to keep you guys informed!

Heres a list of fixes and improvments currently implemented in the soon to be released update:

Fixed access violation bug in Vista.

Fixed chevron popup position bug when chevron behind left of screen.

Fixed multiple monitor menu position bug.

Improved Menu tracking.

Fixed bug with submenus in CalcMenuItemWidth.

ReBarHeight(myReBar) will be included in the next update also along with the other requested improvments :)

Cheers!

Chris.

Posted: Mon Nov 27, 2006 2:26 pm
by wayne-c
Sounds good!
Can't wait for your next release! :)

Need those things fixed before I register... :wink: