Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXSplashWindow.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * S p l a s h W i n d o w *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2004,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXSplashWindow.h,v 1.10 2006/01/22 17:58:09 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXSPLASHWINDOW_H
25 #define FXSPLASHWINDOW_H
26 
27 #ifndef FXTOPWINDOW_H
28 #include "FXTopWindow.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /// Splash Window options
35 enum {
36  SPLASH_SIMPLE = 0, /// Simple rectangular splash window
37  SPLASH_SHAPED = 0x02000000, /// Shaped splash window
38  SPLASH_OWNS_ICON = 0x04000000, /// Splash window will own the icon and destroy it
39  SPLASH_DESTROY = 0x08000000 /// Splash window will destroy itself when timer expires
40  };
41 
42 
43 /**
44 * The Splash Window is a window typically shown during startup
45 * of an application. It comprises a large icon, which is also
46 * used as the shape of the window if SPLASH_SHAPED is passed;
47 * with the SPLASH_SIMPLE option the window will be simply rectangular.
48 */
49 class FXAPI FXSplashWindow : public FXTopWindow {
51 protected:
52  FXIcon *icon; // Really big icon
53  FXuint delay; // Delay before hiding
54 protected:
56 private:
58  FXSplashWindow &operator=(const FXSplashWindow&);
59 public:
60  long onPaint(FXObject*,FXSelector,void*);
61 public:
62 
63  /// Construct splash window
64  FXSplashWindow(FXApp* ap,FXIcon* ic,FXuint opts=SPLASH_SIMPLE,FXuint ms=5000);
65 
66  /// Construct splash window
68 
69  /// Create
70  virtual void create();
71 
72  /// Detach
73  virtual void detach();
74 
75  /// Show splash window
76  virtual void show();
77 
78  /// Show splash window with a given placement
79  virtual void show(FXuint placement);
80 
81  /// Hide splash window
82  virtual void hide();
83 
84  /// Return the default width of this window
85  virtual FXint getDefaultWidth();
86 
87  /// Return the default height of this window
88  virtual FXint getDefaultHeight();
89 
90  /// Set the icon for the splash window
91  void setIcon(FXIcon* ic);
92 
93  /// Get the icon for this splash window
94  FXIcon* getIcon() const { return icon; }
95 
96  /// Set or change delay
97  void setDelay(FXuint ms);
98 
99  /// Return delay
100  FXuint getDelay() const { return delay; }
101 
102  /// Save label to a stream
103  virtual void save(FXStream& store) const;
104 
105  /// Load label from a stream
106  virtual void load(FXStream& store);
107 
108  /// Destroy splash window
109  virtual ~FXSplashWindow();
110  };
111 
112 }
113 
114 #endif
Simple rectangular splash window.
Definition: FXSplashWindow.h:39
Base class for all windows.
Definition: FXWindow.h:115
unsigned int FXuint
Definition: fxdefs.h:396
Splash window will own the icon and destroy it.
Definition: FXSplashWindow.h:41
FXuint FXSelector
Association key.
Definition: FXObject.h:53
#define FXAPI
Definition: fxdefs.h:122
Application Object.
Definition: FXApp.h:158
Splash window will destroy itself when timer expires.
Definition: FXSplashWindow.h:42
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:99
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:397
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:45
Abstract base class for all top-level windows.
Definition: FXTopWindow.h:106
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
The Splash Window is a window typically shown during startup of an application.
Definition: FXSplashWindow.h:56
Shaped splash window.
Definition: FXSplashWindow.h:40
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92

Copyright © 1997-2005 Jeroen van der Zijp