[quote=Killmaster,Sep 6 2004, 10:42 PM]Does anyone else have the problem of the albumlist panel's scrollbar not resizing with the window? The bottom of the scrollbar is there when I maximize foobar, but it's hidden otherwise :/
[/quote]
Not sure exactly what you mean, but its working fine here. What OS are you using?
[quote=foosion,Sep 7 2004, 02:00 AM]As promised, here's a list of things I'd like to see changed.
Problems1) I find it a little irritating that the host can "invade" a panels context menu. I have my context menu configured so that the most commonly used entries are located at the top, where they can be easily reached. Now in a panel, the host can insert commands. In the current implementation, a whole six lines are added at the top. Now in most cases, I don't want to close the playlist switcher, when I rightclick an entry in it. (Well, in alpha 3 another item is at the top, but I think you see my point.)
1) Distinguish sidebar extensions and toolbar extensions. Sidebar panels should have a titlebar with their name on it. Panel management commands are only shown in the contextmenu of this titlebar, some may be available as buttons (like "Close"). Sidebar extensions do all contextmenu handling in their client area themselves
[/quote]
I didnt really intend on requiring panels to let the host insert its items.
Anyhow, are you infering that the host (i.e. sidebar) should draw these titlebars? Certainly, this would clean up the context menu which is obscenely bloated.
As for distinguish panels/toolbars, it isn't always possible (e.g. what would the vis come under)? I don't think its necessary for this solution anyway, any such panels can handle their own WM_CONTEXTMENU messages as necessary, and showing titlebars can be optional for each panel, maybe.
[quote=foosion,Sep 7 2004, 02:00 AM]Now what's worse, this behaviour isn't consistent: In the database explorer panel, when I click on a tree element, I get a context menu with entries only from the panel. When I click on the background in the same panel, I get a menu with only host-provided commands.[/quote]You must have written that sometime ago, certainly is not the current behaviour.
[quote=foosion,Sep 7 2004, 02:00 AM]2) Having a toolbar panel - like playback buttons or visualisation - in the sidebar may be nice, but I don't think that being able to put the playlist switcher or history panel into the toolbar serves a purpose. These panels usually aren't designed for such a limited height.
2) Already mentioned in the solution for 1): make sidebar and toolbar extensions distinguishable on API level. If a host wishes to open a toolbar extension in a sidebar or vice versa, it may do so. (Even if I still don't like the idea of having sidebar extensions in a toolbar...)[/quote]
I think adding a function to the ui_extension class like this is easier than attempting to differentiate them.
Like maybe bool get_limited_size_supported(unsigned orientation)
If orientation is veritcal, its if it supports limited width (im thinking vertical rebar or something), if orientation is horizontal, its if it supports limited height. i think its better than inferring it from whether they are intended for the toolbars or sidebar. Unless you can see a reason to just categorise them instead?
[quote=foosion,Sep 7 2004, 02:00 AM]Furthermore, I'd like to be able to toggle panels in the sidebar like it is already possible with panels in the toolbar (but this already links to my third point).[/quote]
I would agree, but it does also remove the ability to have e.g. two album list panels, with two different views. Not that I do that.. Actually it would simplify things, as you dont have to right click on a specific panel to remove it, so I will probably change it.
[quote=foosion,Sep 7 2004, 02:00 AM]3) This one is about various issues with the API, pertaining (but not limited) to single-instance extensions. I had a vague feeling that something was missing right now, and after thinking about it for some time, I got to the conclusion that I want to be able to programmatically activate an instance of a given ui_extension, either an existing one or a new one. Just showing a specific ui_extension through a hotkey could be solved by the host providing an appropriate menu command. However that does not help in the case when the command needs to do more than just showing a window/panel (read: the "Search for same [em]X[/em]" kind of commands in foo_dbsearch).
3) Add a method for showing an existing instance and one for adding a new instance of a ui_extension to the ui_extension_host interface. Also add methods for retrieving the identity, name and the status of the host, i.e. get_host_guid(), get_name(), and is_avalaible(). A host could be unavailable due to belonging to a currently inactive user interface component. [/quote]
Im not sure I follow you exactly; you want to be able to insert panels yourself into a host, correct? Including idx to insert at, and height/width?
I certainly see how it would be useful. If you want control over which index to insert it at, it would require more interfaces to be exposed in the ui_extension_host api though (get_count() for a start).
[quote=foosion,Sep 7 2004, 02:00 AM]It might be a good idea to split the methods that are only called from an owned ui_extension instance into a separate ui_extension_callback interface.[/quote]It would look cleaner probably, but then a ui_extension may want to pull info from the ui_extension_host interface, in which case separating them would just complicate things.
[quote=foosion,Sep 7 2004, 02:00 AM]4) Something I noticed just today: When rightclicking on a non-panel part of the Rebar control, the contextmenu includes the "Remove toobar" command, even though it does nothing when selected.[/quote]Thanks, I knew I'd seen that, but couldnt work out how to make it happen

[quote=foosion,Sep 7 2004, 02:00 AM]
Other suggestions- Remove get_[min|max]_[width|height] from ui_extension, use WM_GETMINMAXINFO instead. This should simplify porting existing dialog to the ui_extension API.
- Replace notify_[min|max]_[width|height]_change in ui_extension_host with a single method on_size_limit_changed, indicate changed value(s) with flags. (All four methods call the same check_size method in my experimental ui_extension_host implementation (see below)).
- Pass host pointer as ui_extension_host* (or ui_extension_callback*) in ui_extension::initialise().
[/quote]
Yes, that's all fine. I wanted to combine all that min max stuff anyway.
[quote=foosion,Sep 7 2004, 02:00 AM]
foo_floater: Opens panels as always-on-top toolbox dialogs, dialogs can act as target of drag&drop operations. Use at your own risk. Delete it if it causes problems. Ugly, quickly hacked up source code available to dedicated individuals on request.[/quote]
Interesting

[quote=foosion,Sep 7 2004, 02:00 AM]Thanks again to musicmusic for putting so much effort into this component; your work is greatly appreciated.
[/quote]Your welcome

Thank you for taking the time to input on this as well, its appreciated.

I agree with most of it, so all that's left it to implement it, I guess.
As a sidenote: most of the popup dialogs in foobar repaint multiple times/unnecessarily when resized, causing much flickering, because they don't have the WS_CLIPCHILDREN style set. Foo_history and foo_dbsearch included, the former of which setting it kills all flickering (except for the problem I mention below). If you did make history/dbsearch support panels, it would be nice if you could change this to reduce flickering in teh main window, unless there is a reason you don't set this style? (I know it doesnt work properly with group boxes)
Wrong topic, but I also noticed a wierd bug in the foo_history ui; you can see a horizontal scrollbar showing when you resize it narrower.
[quote=anza,Sep 7 2004, 03:56 PM]edit: It also seems to give some metadb_leaks.
[/quote]
foosion: I think your not destroying the windows using ui_extension::destroy_window() or missing a service_release() somewhere.