summaryrefslogtreecommitdiff
path: root/FL/Fl_Window.H
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2014-06-16 11:39:32 +0000
committerPierre Ossman <ossman@cendio.se>2014-06-16 11:39:32 +0000
commitf58b1a91b37e5ad758b3d0a3d9be950e8feb5d0c (patch)
treeca7ebd90423d4d9267da62703e282f79a9793131 /FL/Fl_Window.H
parent332dc1b7acfedbf80b71cc6f538a14f24d435df3 (diff)
Add ability to set custom icons for windows. STR #2816.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10197 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL/Fl_Window.H')
-rw-r--r--FL/Fl_Window.H30
1 files changed, 29 insertions, 1 deletions
diff --git a/FL/Fl_Window.H b/FL/Fl_Window.H
index c26f474d2..92e76676f 100644
--- a/FL/Fl_Window.H
+++ b/FL/Fl_Window.H
@@ -22,6 +22,10 @@
#ifndef Fl_Window_H
#define Fl_Window_H
+#ifdef WIN32
+#include <windows.h>
+#endif
+
#include "Fl_Group.H"
#define FL_WINDOW 0xF0 ///< window type id all subclasses have type() >= this
@@ -89,9 +93,19 @@ class FL_EXPORT Fl_Window : public Fl_Group {
friend class Fl_X;
Fl_X *i; // points at the system-specific stuff
+ struct icon_data {
+ const void *legacy_icon;
+ Fl_RGB_Image **icons;
+ int count;
+#ifdef WIN32
+ HICON big_icon;
+ HICON small_icon;
+#endif
+ };
+
const char* iconlabel_;
char* xclass_;
- const void* icon_;
+ struct icon_data *icon_;
// size_range stuff:
int minw, minh, maxw, maxh;
int dw, dh, aspect;
@@ -141,6 +155,8 @@ protected:
*/
int force_position() const { return ((flags() & FORCE_POSITION)?1:0); }
+ void free_icons();
+
public:
/**
@@ -370,6 +386,18 @@ public:
static const char *default_xclass();
const char* xclass() const;
void xclass(const char* c);
+
+ static void default_icon(const Fl_RGB_Image*);
+ static void default_icons(const Fl_RGB_Image*[], int);
+ void icon(const Fl_RGB_Image*);
+ void icons(const Fl_RGB_Image*[], int);
+
+#ifdef WIN32
+ static void default_icons(HICON big_icon, HICON small_icon);
+ void icons(HICON big_icon, HICON small_icon);
+#endif
+
+ /* for legacy compatibility */
const void* icon() const;
void icon(const void * ic);