FXTrayApp.h

00001 /*
00002 FoxTray, system tray icon for the FOX Toolkit
00003 
00004 Copyright (c) 2008, Hendrik Rittich
00005 All rights reserved.
00006 
00007 Redistribution and use in source and binary forms, with or without 
00008 modification, are permitted provided that the following conditions are
00009 met:
00010 
00011     * Redistributions of source code must retain the above copyright
00012       notice, this list of conditions and the following disclaimer.
00013     * Redistributions in binary form must reproduce the above copyright
00014       notice, this list of conditions and the following disclaimer in 
00015       the documentation and/or other materials provided with the 
00016       distribution.
00017 
00018 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
00019 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00020 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00021 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
00022 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00023 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00024 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00025 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00026 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00027 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00028 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029 */
00030 #ifndef FX_TRAY_APP
00031 #define FX_TRAY_APP
00032 
00033 #include "fx.h"
00034 #include "FXArray.h"
00035 
00036 namespace FX {
00037 
00038 class FXTrayIcon;
00039 
00044 class FXTrayApp : public FXApp
00045 {
00046     FXDECLARE(FXTrayApp)
00047 public:
00048     FXTrayApp(const FXString& name="Application",
00049         const FXString& vendor="FoxDefault");
00050 
00051     void create();
00052 
00054     FXID getTrayManager();
00055     void createTrayAtom();
00056 
00057     void registerIcon(FXTrayIcon* ic);
00058     void unregisterIcon(FXTrayIcon* ic);
00059 protected:
00060     bool dispatchEvent(FXRawEvent& ev);
00062 private:
00063     FXObjectListOf<FXTrayIcon> mIcons;
00064     FXID manager_id;
00065     FXID mManagerAtom;
00066     FXID mTrayAtom;
00067     FXID mXembedAtom;
00068 };
00069 
00070 }
00071 
00072 #endif
00073 

Generated on Sat Oct 18 14:30:53 2008 for FoxTray by  doxygen 1.5.1