![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * S p l a s h W i n d o w * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 2004,2009 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published by * 00010 * the Free Software Foundation; either version 3 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with this program. If not, see <http://www.gnu.org/licenses/> * 00020 ********************************************************************************* 00021 * $Id: FXSplashWindow.h,v 1.16 2009/01/06 13:07:27 fox Exp $ * 00022 ********************************************************************************/ 00023 #ifndef FXSPLASHWINDOW_H 00024 #define FXSPLASHWINDOW_H 00025 00026 #ifndef FXTOPWINDOW_H 00027 #include "FXTopWindow.h" 00028 #endif 00029 00030 namespace FX { 00031 00032 00033 /// Splash Window options 00034 enum { 00035 SPLASH_SIMPLE = 0, /// Simple rectangular splash window 00036 SPLASH_SHAPED = 0x02000000, /// Shaped splash window 00037 SPLASH_OWNS_ICON = 0x04000000, /// Splash window will own the icon and destroy it 00038 SPLASH_DESTROY = 0x08000000 /// Splash window will destroy itself when timer expires 00039 }; 00040 00041 00042 /** 00043 * The Splash Window is a window typically shown during startup 00044 * of an application. It comprises a large icon, which is also 00045 * used as the shape of the window if SPLASH_SHAPED is passed; 00046 * with the SPLASH_SIMPLE option the window will be simply rectangular. 00047 */ 00048 class FXAPI FXSplashWindow : public FXTopWindow { 00049 FXDECLARE(FXSplashWindow) 00050 protected: 00051 FXIcon *icon; // Really big icon 00052 FXTime delay; // Delay before hiding 00053 protected: 00054 FXSplashWindow(); 00055 private: 00056 FXSplashWindow(const FXSplashWindow&); 00057 FXSplashWindow &operator=(const FXSplashWindow&); 00058 public: 00059 long onPaint(FXObject*,FXSelector,void*); 00060 public: 00061 00062 /** 00063 * Construct splash window; the window will be automatically hidden (or deleted 00064 * if SPLASH_DESTROY is passed) after a given delay, specified in nanoseconds). 00065 * The splash window is free floating. Use this constructor when the splash window 00066 * is to be displayed before the main window appears. 00067 */ 00068 FXSplashWindow(FXApp* ap,FXIcon* ic,FXuint opts=SPLASH_SIMPLE,FXTime ns=2000000000); 00069 00070 /** 00071 * Construct splash window; the window will be automatically hidden (or deleted 00072 * if SPLASH_DESTROY is passed) after a given delay, specified in nanoseconds). 00073 * The splash window stays on top of its owner window, which must already have been 00074 * created previously. 00075 */ 00076 FXSplashWindow(FXWindow* ow,FXIcon* ic,FXuint opts=SPLASH_SIMPLE,FXTime ns=2000000000); 00077 00078 /// Create 00079 virtual void create(); 00080 00081 /// Detach 00082 virtual void detach(); 00083 00084 /// Show splash window 00085 virtual void show(); 00086 00087 /// Show splash window with a given placement 00088 virtual void show(FXuint placement); 00089 00090 /// Hide splash window 00091 virtual void hide(); 00092 00093 /// Return the default width of this window 00094 virtual FXint getDefaultWidth(); 00095 00096 /// Return the default height of this window 00097 virtual FXint getDefaultHeight(); 00098 00099 /// Set the icon for the splash window 00100 void setIcon(FXIcon* ic); 00101 00102 /// Get the icon for this splash window 00103 FXIcon* getIcon() const { return icon; } 00104 00105 /// Set or change delay in nanoseconds 00106 void setDelay(FXTime ns); 00107 00108 /// Return delay 00109 FXTime getDelay() const { return delay; } 00110 00111 /// Save label to a stream 00112 virtual void save(FXStream& store) const; 00113 00114 /// Load label from a stream 00115 virtual void load(FXStream& store); 00116 00117 /// Destroy splash window 00118 virtual ~FXSplashWindow(); 00119 }; 00120 00121 } 00122 00123 #endif
![]() |