Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-06-2012, 04:21   #1
Registered User

Join Date: Jan 2011
Location: Martigues, FRANCE
Boat: GibSea 28Q
Posts: 40
Developers: Need Help on v2.5.0 to Change Fade Tool Bar to Hide

Hello all,

I actualy work on compile OpenCpn 2.5.0 for a low power open chart platform.

On this platform, the resolution is 800x600.
I made bigger icon ( for easy touchscreen use) on the tool bar and add configuration to optionnaly remove some icon (like that the tool bar stay on 1 line)

The problem is on my platform, fade not work. so the tool bar stay on screen and take place on the map.

I would like to hide the tool bar unstead fade.

I understand that I could use Hide() function.
But I made several test and I didn't realy understand where I need to modify the code.

Is there some developpers to make me on the way?

Best regards

Emmanuel
__________________

__________________
manuprenlair is offline   Reply With Quote
Old 01-06-2012, 06:49   #2
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Developpers: Need help on v2.5.0 to change fade tool bar to hide

Quote:
Originally Posted by manuprenlair View Post
Hello all,

I actualy work on compile OpenCpn 2.5.0 for a low power open chart platform.

On this platform, the resolution is 800x600.
I made bigger icon ( for easy touchscreen use) on the tool bar and add configuration to optionnaly remove some icon (like that the tool bar stay on 1 line)

The problem is on my platform, fade not work. so the tool bar stay on screen and take place on the map.

I would like to hide the tool bar unstead fade.

I understand that I could use Hide() function.
But I made several test and I didn't realy understand where I need to modify the code.

Is there some developpers to make me on the way?

Best regards

Emmanuel
I am working on the toolbar for post 3.0 UI redesign, I might be able to give you some tips but I can't understand completely what you want to do.

If you were to hide the toolbar, how would it come back again when needed?

/jesper
__________________

__________________
JesperWe is offline   Reply With Quote
Old 01-06-2012, 07:12   #3
Registered User

Join Date: Jan 2011
Location: Martigues, FRANCE
Boat: GibSea 28Q
Posts: 40
Re: Developpers: Need help on v2.5.0 to change fade tool bar to hide

Hi Jesper


Like you understand, my GPU does not support transparency.

What I want to do is same as near as when the tool bar is fade.
When you touch the screen (move the mouse) the tool bar become visible.

The scenario is:

same principle as fade, after a delay the tool bar become hide.
move the mouse and the tool bar come.
stop to move, then a delay start and the the bar is hide.

(in fact is like you fade the tool bar with a full transparency, but you dont use transparence function ;-)

I found in the code where the delay start for fade function but I am not able to correctly add the hide function unstead.

I hope I explain better what I want to do.
Thanks to give me the way

Emmanuel
France
__________________
manuprenlair is offline   Reply With Quote
Old 01-06-2012, 08:12   #4
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Developpers: Need help on v2.5.0 to change fade tool bar to hide

OK I see. When you Hide() the toolbar, now there is no toolbar for the mouse to enter, so the old logic for getting it back will not work. In this case you need to hide it (use the Submerge() method which also takes care of tooltips) when the fade timer triggers, and then show it again when there is mouse movement.

The following patch might work, I havn't tested it, but if it doesn't at least it shows you where to go. It is in the 3.0 source tree so your linenumbers are probably different. I don't have 2.5 source.


/jesper

Code:
diff --git a/src/chart1.cpp b/src/chart1.cpp
index 59fabae..76d8a57 100644
--- a/src/chart1.cpp
+++ b/src/chart1.cpp
@@ -1482,8 +1482,8 @@
 
 void ocpnFloatingToolbarDialog::FadeTimerEvent(wxTimerEvent& event)
 {
-      if(g_bTransparentToolbar && !g_bopengl)
-            DoFade(128);
+      if(g_bTransparentToolbar)
+            Submerge();
 
       m_fade_timer.Start(5000);           // retrigger the continuous timer
 }
diff --git a/src/chcanv.cpp b/src/chcanv.cpp
index 8411f59..2bef5c8 100644
--- a/src/chcanv.cpp
+++ b/src/chcanv.cpp
@@ -7692,6 +7692,7 @@
                       }
                 }
         }
+        g_FloatingToolbarDialog->Surface();
 #endif
 
         //  Send the current cursor lat/lon to all PlugIns requesting it
__________________
JesperWe is offline   Reply With Quote
Old 01-06-2012, 08:42   #5
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Developpers: Need help on v2.5.0 to change fade tool bar to hide

I had to wait a little for my foresails to dry before I can fold them, so I did take a look at 2.5 source and got a bit confused, since the 2.5 source does not have transparent toolbar support, so you must be using some other version??
__________________
JesperWe is offline   Reply With Quote
Old 01-06-2012, 09:36   #6
Registered User

Join Date: Jan 2011
Location: Martigues, FRANCE
Boat: GibSea 28Q
Posts: 40
Re: Developpers: Need help on v2.5.0 to change fade tool bar to hide

Well done Jesper !

I will take a look to that code.

Well, I am a little confuse too !
I just come back to my project after 6 month ...

So perhaps I use a beta version just after the 2.5.0 release...hum strange I remembered to take decision to modify only the release version because Beta move too fast..

Well I will check the version tomororow !

Whatever many thanks for your help !

Regards

Emmanuel
Kia Ora
__________________
manuprenlair is offline   Reply With Quote
Old 03-06-2012, 03:19   #7
Registered User

Join Date: Jan 2011
Location: Martigues, FRANCE
Boat: GibSea 28Q
Posts: 40
Re: Developpers: Need help on v2.5.0 to change fade tool bar to hide

Hello Jesper,

I just check now, the version I work on is 2.5.0.
In etc tab, you have an option for toolbar to activate transparency.

I said "Fade" but perhaps I would said "transparency".

Ok, I will try your code, because your right with Hide() function, after the bar is hide, I am not able to show it again by mooving the mouse for reason you explain.

I will work on my boat now and test the code this evening.

Thanks for your help.

Emmanuel
__________________
manuprenlair is offline   Reply With Quote
Old 03-06-2012, 07:22   #8
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Developpers: Need help on v2.5.0 to change fade tool bar to hide

True. I must have hit the wrong button when I checked out 2.5.0 before. Good luck!
__________________
JesperWe is offline   Reply With Quote
Old 03-06-2012, 15:07   #9
Registered User

Join Date: Jan 2011
Location: Martigues, FRANCE
Boat: GibSea 28Q
Posts: 40
Re: Developers: Need help on v2.5.0 to change fade tool bar to hide

Hello,

I try your code Jesper, but it not working!
The tool bar disappear but I could not make it appear again....

I take a long time to search the solution but I understand just a very fractional part of how it work..

Please need help

Best regards.

Emmanuel
__________________
manuprenlair is offline   Reply With Quote
Old 03-06-2012, 15:17   #10
Registered User

Join Date: Jan 2011
Location: Martigues, FRANCE
Boat: GibSea 28Q
Posts: 40
Re: Developers: Need help on v2.5.0 to change fade tool bar to hide

Hello again,
Finaly I look better my compilation log.
I use codeblocks and I have an error when I add
Code:
g_FloatingToolbarDialog->Surface();
in chcanv.cpp

(like g_FloatingToolbarDialog was not know in this scope I add the definition as extern, like that:

Code:
extern ocpnFloatingToolbarDialog     *g_FloatingToolbarDialog;
So I have this error:

Code:
/home/manu/OpenCPN-2.5.0/src/chcanv.cpp|6861|erreur: invalid use of incomplete type ‘struct ocpnFloatingToolbarDialog’|
/home/manu/OpenCPN-2.5.0/include/chart1.h|67|erreur: forward declaration of ‘struct ocpnFloatingToolbarDialog’|
What's wrong ??

Emmanuel
__________________
manuprenlair is offline   Reply With Quote
Old 03-06-2012, 15:32   #11
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Developers: Need help on v2.5.0 to change fade tool bar to hide

The datatype is not known in chcanv.cpp.

Try gFrame->SurfaceToolbar() instead, gFrame is known in chcanv.cpp but implemented in chart1.cpp so it should work.

(I told you I hadn't tested the code )
__________________
JesperWe is offline   Reply With Quote
Old 04-06-2012, 09:45   #12
Registered User

Join Date: Jan 2011
Location: Martigues, FRANCE
Boat: GibSea 28Q
Posts: 40
Re: Developers: Need Help on v2.5.0 to Change Fade Tool Bar to Hide

Hello Jesper,

I am at work now and I will test that this evening.

Well, Pavel, just told me version 3.0 will come very soon :-)

I think I will try to compile it for my Lubuntu 10.04 low power computer.

So I will try also to use hide unstead transparency with this last version... I think it will be more easy for you to help like you work on it ??

is it easy??

Best Regards.

Emmanuel

ps: If i am able to do that...humm I have a nice surprise for the communauty.. an OpenChart Plotter hardware ;-)
__________________
manuprenlair is offline   Reply With Quote
Old 04-06-2012, 10:06   #13
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Developers: Need Help on v2.5.0 to Change Fade Tool Bar to Hide

In this case 3.0 is same as 2.5, nothing changes in the toolbar transparency logic. Try to get it working in the setup you have before going to 3.0 would be my advice.
/j
__________________
JesperWe is offline   Reply With Quote
Old 04-06-2012, 12:35   #14
Registered User

Join Date: Jan 2011
Location: UK/France
Boat: Gib'Sea 402
Posts: 217
Re: Developers: Need Help on v2.5.0 to Change Fade Tool Bar to Hide

Quote:
Originally Posted by JesperWe View Post
In this case 3.0 is same as 2.5, nothing changes in the toolbar transparency logic. ... ... ...
I think there is some change, as transparency does not work for me with OpenGL selected on XP SP3 or W7 - three different machines!
OK on 2.5.0
__________________
hoolie is offline   Reply With Quote
Old 04-06-2012, 12:40   #15
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Re: Developers: Need Help on v2.5.0 to Change Fade Tool Bar to Hide

Quote:
Originally Posted by hoolie View Post
I think there is some change, as transparency does not work for me with OpenGL selected on XP SP3 or W7 - three different machines!
OK on 2.5.0
Now you are mixing different issues. 2.5.0 did not have OpenGL at all and this has no bearing on this thread, which is about how to hide the toolbar in DC rendering mode in 2.5. The logic for hiding the toolbar in DC Rendering mode is the same in 3.0 as it was in 2.5.
/j
__________________

__________________
JesperWe is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 18:33.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.