Add remaining files
[juce-lv2.git] / juce / source / src / gui / components / special / juce_SystemTrayIconComponent.h
blob27c71c9c8a4c45e9b896264b733dc16680c7bb21
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCE_SYSTEMTRAYICONCOMPONENT_JUCEHEADER__
27 #define __JUCE_SYSTEMTRAYICONCOMPONENT_JUCEHEADER__
29 #if JUCE_WINDOWS || JUCE_LINUX || DOXYGEN
31 #include "../juce_Component.h"
34 //==============================================================================
35 /**
36 On Windows only, this component sits in the taskbar tray as a small icon.
38 To use it, just create one of these components, but don't attempt to make it
39 visible, add it to a parent, or put it on the desktop.
41 You can then call setIconImage() to create an icon for it in the taskbar.
43 To change the icon's tooltip, you can use setIconTooltip().
45 To respond to mouse-events, you can override the normal mouseDown(),
46 mouseUp(), mouseDoubleClick() and mouseMove() methods, and although the x, y
47 position will not be valid, you can use this to respond to clicks. Traditionally
48 you'd use a left-click to show your application's window, and a right-click
49 to show a pop-up menu.
51 class JUCE_API SystemTrayIconComponent : public Component
53 public:
54 //==============================================================================
55 SystemTrayIconComponent();
57 /** Destructor. */
58 ~SystemTrayIconComponent();
60 //==============================================================================
61 /** Changes the image shown in the taskbar.
63 void setIconImage (const Image& newImage);
65 /** Changes the tooltip that Windows shows above the icon. */
66 void setIconTooltip (const String& tooltip);
68 #if JUCE_LINUX
69 /** @internal */
70 void paint (Graphics& g);
71 #endif
74 private:
75 //==============================================================================
76 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (SystemTrayIconComponent);
80 #endif
81 #endif // __JUCE_SYSTEMTRAYICONCOMPONENT_JUCEHEADER__