FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RibbonBar designer - work in progress
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: RibbonBar designer - work in progress

Posted: Thu Jun 09, 2011 08:37 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: RibbonBar designer - work in progress

Posted: Thu Jun 09, 2011 11:58 PM
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 (fw): Select all Collapse
#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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: RibbonBar designer - work in progress

Posted: Fri Jun 10, 2011 12:35 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 159
Joined: Wed Mar 28, 2007 01:19 PM

Re: RibbonBar designer - work in progress

Posted: Fri Jun 10, 2011 04:35 PM
Antonio,
http://imageshack.us/photo/my-images/23/error1gr.jpg

If 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
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: RibbonBar designer - work in progress

Posted: Mon Jun 13, 2011 03:47 PM

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

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: RibbonBar designer - work in progress

Posted: Mon Jun 13, 2011 06:13 PM

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 :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 811
Joined: Tue May 06, 2008 04:28 AM

Re: RibbonBar designer - work in progress

Posted: Tue Jun 14, 2011 05:25 AM
Dear Mr. Antonio,

I tried to compile this from my FHW11.05 project generated by "rbdesign.exe"

Code (fw): Select all Collapse
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'
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: RibbonBar designer - work in progress

Posted: Tue Jun 14, 2011 06:07 AM

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 ...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: RibbonBar designer - work in progress

Posted: Thu Jun 16, 2011 01:14 AM
Euclides,

Arreglado, gracias! :-)

Euclides wrote:Antonio,
http://imageshack.us/photo/my-images/23/error1gr.jpg

If 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: RibbonBar designer - work in progress

Posted: Tue Jun 21, 2011 03:34 PM
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 (fw): Select all Collapse
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)
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: RibbonBar designer - work in progress

Posted: Tue Jun 21, 2011 03:36 PM

Hello Antonio,
how to handle "Edit prompt" - "Edit button lable" if you want 2 or 3 textlines?
Thanks in advance
Otto

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: RibbonBar designer - work in progress

Posted: Tue Jun 21, 2011 03:46 PM
Hello Antonio,
Load from...

errors out:

msgbox c:\fwh\include\FiveWin.ch(10) Error E0022 Invalid lvalue ':'

Best regards,
Otto
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: RibbonBar designer - work in progress

Posted: Wed Jun 22, 2011 07:59 AM

Hello Antonio,
if I try to compile a saved source I get:

Error: Unresolved external '_HB_FUN_GRADIANT' referenced from C:\

Best regards,
Otto

Continue the discussion