IPB

Welcome Guest ( Log In | Register )

> foobar2000 Development Forum Rules

This forum is for developer discussions only. If you have a problem / bug report / idea / feature request that isn't related to foobar2000 SDK, post it in an appropiate forum instead - tech support questions go to support forum, everything else goes to general forum.
All non-developer posts on this forum will be removed. Continued abuse of this forum will result in admin actions (warnings, account suspension).

 
Reply to this topicStart new topic
Trying to make a button UI element for DUI toolbar, Is this possible or not? Does the SDK support such a feature?
derty2
post Sep 23 2013, 15:59
Post #1





Group: Members
Posts: 585
Joined: 5-June 11
Member No.: 91257



Hi guys,

I have asked a friend who can code in C++ to make me a button which I may add to the DUI default toolbar. I want this button to be a selectable in the default toolbar context menu and be placed on the toolbar as another UI element just like all the others seen in the toolbar context menu. This button would do only one thing; open a specified external path when clicked . . . that's it, nothing more!

In a nutshell, I am trying to have made a Default UI component which does the same thing as this here:

My developer friend has put WAY MORE effort into this than I expected . . . I thought this was going to be a straightforward easy component to make compared to other components out there. He managed to compile a first build of this component . . . It started up with foobar2000 without a problem. I went to fb2k Preferences and the component had a Preference page and it was registered as an "Installed component" . . . . going to the fb2k toolbar, I right-clicked to select the item but its menu entry was non-existent !!!!!!

My developer friend is scratching his head wondering what the problem is . . . he has read the foobar2000 SDK back-to-front, he has looked at the source code of other components for clues . . . he is trying hard to figure this out and refuses to give up. I must give this guy A LOT of credit because he has dived right into this without any previous knowledge of foobar2000 !!

I have conducted an exhaustive web search for some discussions on this, and have come up with nothing useful. I am starting to think that I am making this guy bark up a tree that does not exist !!

Can a developer who has solid knowledge of foobar2000 component development please answer this:

Is it possible to create a UI element/button with corresponding context menu for the foobar2000 DUI default toolbar? YES or NO

If the answer is YES, can you PLEASE offer some notes, tips and guidelines for creating this button.
If the answer is NO, can you PLEASE offer a few words explaining why.

I plan to send my friend here to read this discussion.

Thanks for your time +++++
derty2

Go to the top of the page
+Quote Post
marc2003
post Sep 23 2013, 17:53
Post #2





Group: Members
Posts: 4882
Joined: 27-January 05
From: England
Member No.: 19379



your friend can make a main menu command for whatever action you want to perform. then it should appear when you add a button to a standard buttons toolbar.

you cannot create any kind of custom toolbar as the SDK doesn't support it. the columns UI SDK does. why? you'll have to wait for someone else to answer that... tongue.gif
Go to the top of the page
+Quote Post
NEMO7538
post Sep 23 2013, 19:58
Post #3





Group: Developer
Posts: 820
Joined: 28-November 03
Member No.: 10088



QUOTE (derty2 @ Sep 23 2013, 16:59) *
This button would do only one thing; open a specified external path when clicked . . . that's it, nothing more!

Why don't you use foo_run, that should be straightforward without the need for developing a component.

This post has been edited by NEMO7538: Sep 23 2013, 20:03
Go to the top of the page
+Quote Post
derty2
post Sep 23 2013, 20:53
Post #4





Group: Members
Posts: 585
Joined: 5-June 11
Member No.: 91257



NEMO7538 -- I know about foo_run. As a developer who has tried going down this road himself, can you share your insights and experiences on the matter of this topic.
You asked a similar question once upon a time at another thread...but all you got was one useless reply...the topic fizzed out to oblivion.
My friend and I have spent many hours attempting to place a custom button on the toolbar and I want to discover some "truths".
I want the limits of foobar2000 DUI component development to be clearly defined.
If nothing else, this topic may prevent somebody else from wasting his time attempting something like this . . .

marc2003 -- can you please clarify this statement:
"..can make a main menu command for whatever action you want to perform. then it should appear when you add a button to a standard buttons toolbar."
I'm not exactly sure what you are saying....."when you add a button" means I can add an extra button to the standard button array? (ie, Stop, Play, Pause, ..., MyButton).

I specifically wanted to have another menu item of my own immediately to the right of "Help"; I wanted the font to be exactly like the default menu items (File, Edit, View, ..., Help, MyButton). When "MyButton" was clicked I was going to launch an external popup menu, specifically: PopSel by Horst Schaeffer (Germany).

FYI: Menu extra - Wikipedia
Go to the top of the page
+Quote Post
marc2003
post Sep 23 2013, 21:06
Post #5





Group: Members
Posts: 4882
Joined: 27-January 05
From: England
Member No.: 19379



QUOTE (derty2 @ Sep 23 2013, 20:53) *
I'm not exactly sure what you are saying....."when you add a button" means I can add an extra button to the standard button array? (ie, Stop, Play, Pause, ..., MyButton).


yes. right click>customise buttons.



as you can see, it has to be bound to an existing main menu or context command. this is something any component developer can add.

you won't ever be able to make a menu item to integrate with the default one so that idea is a complete non starter.

edit: you can make popup menus for buttons with WSH panel mod (or your own custom component panel of course). for example, i made this some time ago...



when you click the help button, a menu pops up like this. all items are opened in your browser.



This post has been edited by marc2003: Sep 23 2013, 21:20
Go to the top of the page
+Quote Post
derty2
post Sep 23 2013, 21:43
Post #6





Group: Members
Posts: 585
Joined: 5-June 11
Member No.: 91257



Thanks for the explanation marc +++++
I guess the fundamental driving force behind my quest is the burning desire to practically utilize all the blank space to the right of "Help"...everything on one slim toolbar.
I HATE double-toolbars as in your screenshots; to me it's a critical waste of vertical space; I want everything on one toolbar.
I have a Columns UI layout which uses one toolbar for all. I really was crossing my fingers that I could achieve this with Default UI.
It's a real shame that foobar2000 has this limitation. I hope the SDK can be updated one day to allow such customization.
Go to the top of the page
+Quote Post
marc2003
post Sep 23 2013, 21:50
Post #7





Group: Members
Posts: 4882
Joined: 27-January 05
From: England
Member No.: 19379



well you can put standard buttons toolbar to the right of the main menu. remove the buttons you don't want and then use foo_run as NEMO suggested. with foo_run being context based, you must have a playlist item selected for it to work but that's not really an issue.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd December 2014 - 06:45