Page 3 of 3
Re: RibbonBar designer - work in progress
Posted: Thu Jun 09, 2011 8:37 am
by Antonio Linares
Re: RibbonBar designer - work in progress
Posted: Thu Jun 09, 2011 11:58 pm
by Antonio Linares
Enhanced version that already saves and restore the buttons menus:
http://code.google.com/p/fivewin-contributions/downloads/detail?name=rbdesign19.zip&can=2&q=Example of the generated source code:
Code: Select all | Expand
#include "FiveWin.ch"
#include "ribbon.ch"
function BuildRibbonBar( oWnd, _oRBar )
local oRBar, oGr1_1, oGr2_1, oBtn1_1_1, oBtn2_1_1, oBtn1_2_1
DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "One", "Two", "Three" HEIGHT 138 TOPMARGIN 25
ADD GROUP oGr1_1 RIBBON oRBar TO OPTION 1 PROMPT "new" WIDTH 205
@ 3, 3 ADD BUTTON oBtn1_1_1 PROMPT "new" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 POPUP TOP MENU BuildMenu1_1_1()
@ 3, 83 ADD BUTTON oBtn2_1_1 PROMPT "new" GROUP oGr1_1 ACTION MsgInfo( "click" ) SIZE 80, 83 POPUP TOP MENU BuildMenu2_1_1()
ADD GROUP oGr2_1 RIBBON oRBar TO OPTION 1 PROMPT "new" WIDTH 203
@ 3, 3 ADD BUTTON oBtn1_2_1 PROMPT "new" GROUP oGr2_1 ACTION MsgInfo( "click" ) SIZE 80, 85 POPUP TOP MENU BuildMenu1_2_1()
return _oRBar := oRBar
static function BuildMenu1_1_1()
local oMenu
MENU oMenu POPUP
MENUITEM "New"
MENUITEM "New"
MENUITEM "New"
MENUITEM "New"
ENDMENU
return oMenu
static function BuildMenu2_1_1()
local oMenu
MENU oMenu POPUP
MENUITEM "New"
MENUITEM "New"
MENUITEM "New"
MENUITEM "New"
ENDMENU
return oMenu
static function BuildMenu1_2_1()
local oMenu
MENU oMenu POPUP
MENUITEM "one"
MENUITEM "two"
MENUITEM "three"
ENDMENU
return oMenu
Re: RibbonBar designer - work in progress
Posted: Fri Jun 10, 2011 12:35 pm
by Antonio Linares
Re: RibbonBar designer - work in progress
Posted: Fri Jun 10, 2011 4:35 pm
by Euclides
Antonio,
http://imageshack.us/photo/my-images/23/error1gr.jpgIf asking for the source, gives this error (persists several versions before)
Path and name: F:\FWH\rbdesign\rbdesign.exe (32 bits)
Size: 2,270,720 bytes
Time from start: 0 hours 0 mins 44 secs
Error occurred at: 06/10/11, 13:15:40
Error description: Error BASE/1081 Argument error: +
Args:
[ 1] = C MENUITEM "
[ 2] = U
Stack Calls
===========
Called from: .\source\classes\MENU.PRG => GENSUBMENU(424)
Called from: .\source\classes\MENU.PRG => TMENU:CGENPRG(410)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:CGENBUTTONMENUS(529)
Called from: c:\fwteam\samples\rbdesign.prg => (b)RIBBONBAROPTIONS(87)
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE(517)
Called from: c:\fwteam\samples\rbdesign.prg => RIBBONBAROPTIONS(102)
Called from: c:\fwteam\samples\rbdesign.prg => (b)SETRIBBONEDITABLE(36)
Called from: .\source\classes\WINDOW.PRG => TCONTROL:RBUTTONDOWN(1914)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:RBUTTONDOWN(1500)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1565)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:HANDLEEVENT(1172)
Called from: .\source\classes\WINDOW.PRG => _FWH(3434)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(995)
Called from: c:\fwteam\samples\rbdesign.prg => MAIN(26)
Regards, Euclides
Re: RibbonBar designer - work in progress
Posted: Mon Jun 13, 2011 3:47 pm
by Otto
Hello Antonio,
thank you for your work on ribbonbar designer.
I would like to ask you how you suggest to integrate the use of the designer for an existing project.
I mean would you have a ribbonbar.prg which you link with your program. Would the ribbonbar navigation be a application class or what would be best?
Thanks in advance
Otto
Re: RibbonBar designer - work in progress
Posted: Mon Jun 13, 2011 6:13 pm
by Antonio Linares
Otto,
My idea is to turn the RibbonBar designer functions into new Methods for the Class TRibbonBar so we can easily turn editing mode on or off from our apps

Re: RibbonBar designer - work in progress
Posted: Tue Jun 14, 2011 5:25 am
by fraxzi
Dear Mr. Antonio,
I tried to compile this from my FHW11.05 project generated by "rbdesign.exe"
Code: Select all | Expand
function BuildRibbonBar()
local oRBar, oGr1_1
DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "One", "Two", "Three" HEIGHT 134 TOPMARGIN 25
ADD GROUP oGr1_1 RIBBON oRBar TO OPTION 1 PROMPT "new" WIDTH 201 GRADIANT { { 0.06, RGB( 218, 229, 243 ), RGB( 218, 229, 103 ) }, { 0.12, RGB( 218, 229, 103 ), RGB( 218, 229, 103 ) }, { 0.24, RGB( 218, 229, 103 ), RGB( 218, 229, 168 ) }, { 0.56, RGB( 218, 229, 168 ), RGB( 255, 255, 255 ) } }
return nil
I got:
Unresolved external '_HB_FUN_GRADIANT'
Re: RibbonBar designer - work in progress
Posted: Tue Jun 14, 2011 6:07 am
by Antonio Linares
Frances,
There are some required changes in some classes and also in Ribbon.ch that will be distributed with FWH 11.06.
In the meantime please comment out // GRADIANT ...
Re: RibbonBar designer - work in progress
Posted: Thu Jun 16, 2011 1:14 am
by Antonio Linares
Euclides,
Arreglado, gracias!

Euclides wrote:Antonio,
http://imageshack.us/photo/my-images/23/error1gr.jpgIf asking for the source, gives this error (persists several versions before)
Path and name: F:\FWH\rbdesign\rbdesign.exe (32 bits)
Size: 2,270,720 bytes
Time from start: 0 hours 0 mins 44 secs
Error occurred at: 06/10/11, 13:15:40
Error description: Error BASE/1081 Argument error: +
Args:
[ 1] = C MENUITEM "
[ 2] = U
Stack Calls
===========
Called from: .\source\classes\MENU.PRG => GENSUBMENU(424)
Called from: .\source\classes\MENU.PRG => TMENU:CGENPRG(410)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:CGENBUTTONMENUS(529)
Called from: c:\fwteam\samples\rbdesign.prg => (b)RIBBONBAROPTIONS(87)
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE(517)
Called from: c:\fwteam\samples\rbdesign.prg => RIBBONBAROPTIONS(102)
Called from: c:\fwteam\samples\rbdesign.prg => (b)SETRIBBONEDITABLE(36)
Called from: .\source\classes\WINDOW.PRG => TCONTROL:RBUTTONDOWN(1914)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:RBUTTONDOWN(1500)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1565)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:HANDLEEVENT(1172)
Called from: .\source\classes\WINDOW.PRG => _FWH(3434)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(995)
Called from: c:\fwteam\samples\rbdesign.prg => MAIN(26)
Regards, Euclides
Re: RibbonBar designer - work in progress
Posted: Tue Jun 21, 2011 3:34 pm
by Otto
Hello Antonio,
to reproduce the errorL:
rbdesign.exe
Add a group
Add a button
Select bitmap
right mouse click
Source code
Best regards,
Otto
Code: Select all | Expand
Application
===========
Path and name: C:\fwh\samples\rbdesign.exe (32 bits)
Size: 2,270,720 bytes
Time from start: 0 hours 6 mins 17 secs
Error occurred at: 06/21/11, 17:28:04
Error description: Error BASE/1081 Argument error: +
Args:
[ 1] = C MENUITEM "
[ 2] = U
Stack Calls
===========
Called from: .\source\classes\MENU.PRG => GENSUBMENU(424)
Called from: .\source\classes\MENU.PRG => TMENU:CGENPRG(410)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:CGENBUTTONMENUS(529)
Called from: c:\fwteam\samples\rbdesign.prg => (b)RIBBONBAROPTIONS(87)
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE(517)
Called from: c:\fwteam\samples\rbdesign.prg => RIBBONBAROPTIONS(102)
Called from: c:\fwteam\samples\rbdesign.prg => (b)SETRIBBONEDITABLE(36)
Called from: .\source\classes\WINDOW.PRG => TCONTROL:RBUTTONDOWN(1914)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:RBUTTONDOWN(1500)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1565)
Called from: .\source\classes\TRIBBON.PRG => TRIBBONBAR:HANDLEEVENT(1172)
Called from: .\source\classes\WINDOW.PRG => _FWH(3434)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE(995)
Called from: c:\fwteam\samples\rbdesign.prg => MAIN(26)
Re: RibbonBar designer - work in progress
Posted: Tue Jun 21, 2011 3:36 pm
by Otto
Hello Antonio,
how to handle "Edit prompt" - "Edit button lable" if you want 2 or 3 textlines?
Thanks in advance
Otto
Re: RibbonBar designer - work in progress
Posted: Tue Jun 21, 2011 3:46 pm
by Otto
Hello Antonio,
Load from...
errors out:
msgbox c:\fwh\include\FiveWin.ch(10) Error E0022 Invalid lvalue ':'
Best regards,
Otto
Re: RibbonBar designer - work in progress
Posted: Wed Jun 22, 2011 7:59 am
by Otto
Hello Antonio,
if I try to compile a saved source I get:
Error: Unresolved external '_HB_FUN_GRADIANT' referenced from C:\
Best regards,
Otto