How do I programmatically find an Eclipse view toolbar control? - eclipse-plugin

I would like to support drag and drop of a file resource onto some plugin view toolbar buttons: this would involve attaching a DropTarget to the underlying Control (a Button). However it is unclear to me how programmatically to retrieve the Button - I can give it a unique id in the plugin.xml but what API calls would I use to then find it? Ideas welcome, thanks!
Update: the code fragment at Eclipse RCP obtain toolbar contributions programmatically shows how to navigate to get to the relevant IContributionItem, but then I need the model/widget...

Related

creating a horizontal menu in social engine php

I have created a menu and inserted the generic menu widget onto a newly created page. I think by default it gives a verticle menu. I have tried various css codes found on the web to change it to a horizontal menu, but upon saving and refreshing the page I am not seeing any changes.
Can anyone advise me as to how I enable my generic menu to display the navigation links horizontally instead of vertically?
If I delete the menu and insert an html widget with code and links for a horizontal menu, other items such as my mini menu and footer menu display differently.
Thank you for your time
Regards
Amanda

Share to mail and messages

Where can I find any info about how to share image to mail or messages? Just like for example preview share function. Here is photos:
Is there any frameworks or something to achieve it easily, or there are some others methods?
Use the new share menu. Note that this is a new feature in Mountain Lion.
To create a Share menu in Interface Builder, select the appropriate
button. Then, in the Attributes pane of the inspector, specify
NSImageNameShareTemplate for the image. To create one using AppKit
programming interfaces, use NSImageNameShareTemplate to add an image
to a button
(NSButton).
If you create a Share button programmatically, in order for the Share
menu to behave as users expect, you need to set
sendActionOn:NSLeftMouseDownMask.

How do I add buttons to Aero Peek in VB6?

I'm working on a program that can play songs off an iPod. I want to be able to put functional Back, Play/Pause and Next buttons on its Aero Peek thumbnail like this:
For those who can't see it: http://i45.tinypic.com/1yua0m.png
How would I do this in VB6?
EDIT: Can I also create a jump list for my app? For this app, I only need taskbar jump lists. For others, I'll need taskbar and start menu jump lists so posting code to achieve both would be appreciated.
EDIT 2: I have uploaded a sample of how to use the ITaskBarList3 interface to add buttons to the window preview (and handle their click events), add an icon overlay, clip the window preview and add a progress bar to the program's taskbutton. Download it here.
Look at the Taskbar Thumbnail Toolbar feature of Windows Explorer. This does use a COM interface so I don't know how practical it is to use for VB but I beliver the IDLs are available if you look.
You can also find a C# example and the UI guidelines on MSDN.
The Jumplist information is also covered on the same pages.

Menu bar button panels in Cocoa?

When I click on buttons in the menu bar (such as "About Program") when the program is running a new window pops up displaying information. How do I edit the windows associated with the buttons?
In Interface builder I manage to load "Main Menu" which allows me to customize the menu bar, but it doesn't allow me to work with the windows associated with the buttons. How would I edit these windows?
Mac OSX Snow Leopard, Xcode 3.2.6
EDIT: I am not specifically asking for steps for the "About Panel". I am looking for a general procedure for editing panels associated with buttons in the menu bar. In addition to the "About" panel I would also want to work with panels such as the "Help" panel. The "About" panel was just an example.
The standard About panel isn't in your nib; it's generated within the framework.
You can change the text of the panel by writing a Credits.rtf or Credits.html file and including that in your app bundle. (You may already have Credits.rtf supplied by the project template. If so, you should just edit that.)
If you want to make more radical changes, you'll need to create your own panel and change your About menu item to show it instead.
As far as a general procedure...no, there's no single procedure that would let you customize any standard panel in the same way. They all have their own mechanisms (e.g. some can display more panes when plug-in components are installed; some provide APIs to hide or show certain parts; some, like the About box, use bundle filename conventions to decide what to do).
For the Help panel specifically...you can't change anything about it except the web page (i.e. the help content). The toolbar, etc. is all handled by Apple. I suggest looking at this documentation for more, which also links to other important documents:
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/OnlineHelp/Concepts/ComprehenHelp.html%23//apple_ref/doc/uid/20000017-BBCCFHAC

Suggestion for dragster/dropzone like dock menu

I'd like to create a dragster/dropzone like dock menu. Looks a bit like a stack with a nsview in it.
After a lot if documentation searching and googling I've found a way to determine a dock icon's location.
(http://cocoadev.com/forums/comments.php?DiscussionID=1431)
Is nzbdrop creating a view which just looks like an stack to display it's menu or is there a better way of creating this?
Additional info:
I'm not looking for the drop like functionality just the nice way the DropBox window is displayed as an bubble/stack menu on top of it's app icon.
For anyone wanting to create something similar;
Matt Gemmell created a nice solution for this called MAAttachedWindow:
http://mattgemmell.com/source
Not exactly sure I understand your question but the Dragster and Dropzone apps clearly work something like this:
They have an application icon in the dock.
They respond to a drop request in the standard fashion.
Upon receiving a drop request, they open an application window above the dock which also accepts a drop request.
According to the link you provided, they use the accessibility API to locate their dock icon so they can open the application window above the dock icon.
The window is just a standard application window although most likely modal and floating (like a help window.) It can have any appearance you wish.