RibbonBar designer - work in progress

User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: RibbonBar designer - work in progress

Post by Antonio Linares »

Enhanced version, Buttons menus editor:

http://code.google.com/p/fivewin-contri ... p&can=2&q=
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: RibbonBar designer - work in progress

Post by Antonio Linares »

Enhanced version that already saves and restore the buttons menus:

http://code.google.com/p/fivewin-contri ... p&can=2&q=

Example of the generated source code:

Code: Select all

#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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: RibbonBar designer - work in progress

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Euclides
Posts: 144
Joined: Wed Mar 28, 2007 1:19 pm

Re: RibbonBar designer - work in progress

Post by Euclides »

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
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: RibbonBar designer - work in progress

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: RibbonBar designer - work in progress

Post 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 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Re: RibbonBar designer - work in progress

Post by fraxzi »

Dear Mr. Antonio,

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

Code: Select all

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: RibbonBar designer - work in progress

Post 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 ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: RibbonBar designer - work in progress

Post by Antonio Linares »

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
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: RibbonBar designer - work in progress

Post 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

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)
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: RibbonBar designer - work in progress

Post by Otto »

Hello Antonio,
how to handle "Edit prompt" - "Edit button lable" if you want 2 or 3 textlines?
Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: RibbonBar designer - work in progress

Post by Otto »

Hello Antonio,
Load from...

errors out:

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

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: RibbonBar designer - work in progress

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
Post Reply