diff --git a/Common/Bitmaps.h b/Common/Bitmaps.h index 7449b93d4661d0655d5dcffa7a1cc38d4e77bd7a..7d341e776b529c41a679bcb58d5cb2bf9f75bb1f 100644 --- a/Common/Bitmaps.h +++ b/Common/Bitmaps.h @@ -156,28 +156,4 @@ static char stop_bits[] = { 0x00,0xfe,0xee,0xfe,0xaa,0xfe,0xaa,0xfe,0xaa,0xfe,0xaa,0xfe,0xaa,0xfe,0xaa, 0xfe,0xaa,0xfe,0xaa,0xfe,0xaa,0xfe,0xee,0xfe,0x00,0xfe}; -// 'Gmsh' (Windows) icon - -static char gmsh_and_bits[] = { - 0xff,0xff,0xdf,0xff,0xff,0xff,0x8f,0xff,0xff,0xff,0x87,0xff,0xff,0x1f,0x80, - 0xff,0xff,0xe7,0xc3,0xff,0xff,0xf3,0x81,0xff,0xff,0xf8,0x81,0xff,0x7f,0xf8, - 0x01,0xff,0x7f,0xf8,0x01,0xff,0x3f,0xf0,0x05,0xff,0x1f,0xf0,0x0e,0xef,0x1f, - 0x00,0x8f,0xf3,0x1f,0x80,0x9f,0xf8,0x1f,0xc0,0x5f,0xfc,0x1f,0xe0,0x0f,0xfe, - 0x3f,0xf8,0x8f,0xff,0xff,0xff,0xc3,0xff,0xff,0xff,0xe1,0xff,0xff,0xff,0xe0, - 0xff,0xff,0x7f,0xf0,0xff,0xff,0x3f,0xf0,0xff,0xff,0x1f,0xf8,0xff,0xff,0x0f, - 0xfc,0xff,0xff,0x07,0xfc,0xff,0xff,0x03,0xfe,0xff,0xff,0x03,0xff,0xff,0xff, - 0x01,0xff,0xff,0xff,0x81,0xff,0xff,0xff,0xc1,0xff,0xff,0xff,0xe1,0xff,0xff, - 0xff,0xf9,0xff,0xff,0xff,0xff,0xff,0xff}; - -static char gmsh_xor_bits[] = { - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; - #endif diff --git a/Common/Icon.h b/Common/Icon.h new file mode 100644 index 0000000000000000000000000000000000000000..1b35c1ddef9c32193271d44d993635e888fe6268 --- /dev/null +++ b/Common/Icon.h @@ -0,0 +1 @@ +#define IDI_ICON 101 diff --git a/Common/Icon.ico b/Common/Icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..1bb9e16f521d4dc86b2832d2f3af1b284cd24b1d Binary files /dev/null and b/Common/Icon.ico differ diff --git a/Common/Icon.rc b/Common/Icon.rc new file mode 100644 index 0000000000000000000000000000000000000000..5c885f15cfb3f5c01e38e8c3cc697ca48e198ddc --- /dev/null +++ b/Common/Icon.rc @@ -0,0 +1,5 @@ + +#include "Icon.h" + +IDI_ICON ICON DISCARDABLE "Icon.ico" + diff --git a/Common/Icon.res b/Common/Icon.res new file mode 100644 index 0000000000000000000000000000000000000000..b7a582b34fee548b8be31da622c098e8d4769c0e Binary files /dev/null and b/Common/Icon.res differ diff --git a/Common/Makefile b/Common/Makefile index b3fcef83a391e84d56d767cab6c14bd2682db7cd..62c551bb42743bd8acc40766bb65685ad496db84 100644 --- a/Common/Makefile +++ b/Common/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.18 2001-04-23 10:38:07 geuzaine Exp $ +# $Id: Makefile,v 1.19 2001-05-08 16:53:03 geuzaine Exp $ # # Makefile for "libCommon.a" # @@ -50,6 +50,9 @@ clean: lint: $(LINT) $(CFLAGS) $(SRC) +res: + windres Icon.rc -O coff Icon.res + depend: (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \ $(CC) -MM $(CFLAGS) ${SRC} \ diff --git a/Fltk/GUI.cpp b/Fltk/GUI.cpp index 64ac42ae4a12e4173b1bca03cf4cef86a2ebe43e..9dad2b4ee07ac9183ed85890db20ac142d7dbdf7 100644 --- a/Fltk/GUI.cpp +++ b/Fltk/GUI.cpp @@ -1,4 +1,4 @@ -// $Id: GUI.cpp,v 1.74 2001-05-08 12:09:31 geuzaine Exp $ +// $Id: GUI.cpp,v 1.75 2001-05-08 16:53:03 geuzaine Exp $ // To make the interface as visually consistent as possible, please: // - use the BH, BW, WB, IW values for button heights/widths, window borders, etc. @@ -19,9 +19,9 @@ #include "GUI.h" #include "Callbacks.h" #include "Bitmaps.h" +#include "Icon.h" #include "GetOptions.h" - #define WINDOW_BOX FL_FLAT_BOX #define IW (10*CTX.fontsize) // input field width @@ -472,14 +472,8 @@ GUI::GUI(int argc, char **argv) { create_graphic_window(argc, argv); #ifdef WIN32 - HICON icon = CreateIcon(NULL, - GetSystemMetrics(SM_CXICON), - GetSystemMetrics(SM_CYICON), - 1, 1, - (CONST BYTE *)gmsh_and_bits, - (CONST BYTE *)gmsh_xor_bits); - //m_window->icon((char *)icon); - //g_window->icon((char *)icon); + m_window->icon((char *)LoadImage(fl_display, MAKEINTRESOURCE(IDI_ICON), + IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)); #else fl_open_display(); Pixmap p1 = XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display), diff --git a/Makefile b/Makefile index 73ff5270e16119724b0f9e3ea970b2d63a345284..6c3a0cbbea803618f7c9e632e6cbfb91330a5a46 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.97 2001-05-07 07:35:40 geuzaine Exp $ +# $Id: Makefile,v 1.98 2001-05-08 16:53:03 geuzaine Exp $ # ---------------------------------------------------------------------- # Makefile for Gmsh # ---------------------------------------------------------------------- @@ -511,7 +511,7 @@ fltk_mingw: tag "GL_INCLUDE=$(OPENGL_INC)" \ "GUI_INCLUDE=$(FLTK_INC)" \ ); done - g++ -mno-cygwin -L/mingw/lib -o $(GMSH_BIN_DIR)/gmsh.exe $(GMSH_FLTK_LIB) \ + g++ -mno-cygwin -L/mingw/lib -o $(GMSH_BIN_DIR)/gmsh.exe $(GMSH_FLTK_LIB) Common/Icon.res \ $(HOME)/SOURCES/fltk/lib/libfltk.a -lglu32 -lopengl32 -lgdi32 -lwsock32 -lm fltk_cygwin: tag @@ -523,7 +523,7 @@ fltk_cygwin: tag "GL_INCLUDE=$(OPENGL_INC)" \ "GUI_INCLUDE=$(FLTK_INC)" \ ); done - g++ -Wl,--subsystem,windows -o $(GMSH_BIN_DIR)/gmsh.exe $(GMSH_FLTK_LIB) \ + g++ -Wl,--subsystem,windows -o $(GMSH_BIN_DIR)/gmsh.exe $(GMSH_FLTK_LIB) Common/Icon.res \ $(HOME)/SOURCES/fltk/lib/libfltk.a -lglu32 -lopengl32 -lgdi32 -lwsock32 -lm strip $(GMSH_BIN_DIR)/gmsh.exe @@ -536,7 +536,7 @@ fltk_cygwin_gertha_buro: tag "GL_INCLUDE=$(OPENGL_INC)" \ "GUI_INCLUDE=$(FLTK_INC_GERTHA_BURO)" \ ); done - g++ -Wl,--subsystem,windows -o $(GMSH_BIN_DIR)/gmsh.exe $(GMSH_FLTK_LIB) \ + g++ -Wl,--subsystem,windows -o $(GMSH_BIN_DIR)/gmsh.exe $(GMSH_FLTK_LIB) Common/Icon.res \ ../fltk/lib/libfltk.a -lglu32 -lopengl32 -lgdi32 -lwsock32 -lm strip $(GMSH_BIN_DIR)/gmsh.exe @@ -549,12 +549,10 @@ fltk_cygwin_laptopjf: "GL_INCLUDE=$(OPENGL_INC)" \ "GUI_INCLUDE=$(FLTK_INC_LAPTOPJF)" \ ); done - g++ -Wl,--subsystem,windows -o $(GMSH_BIN_DIR)/gmsh-cyg.exe $(GMSH_FLTK_LIB) \ + g++ -Wl,--subsystem,windows -o $(GMSH_BIN_DIR)/gmsh-cyg.exe $(GMSH_FLTK_LIB) Common/Icon.res \ ../fltk-1.0.9/lib/libfltk.a -lglu32 -lopengl32 -lgdi32 -lwsock32 -lm # strip $(GMSH_BIN_DIR)/gmsh-cyg.exe fltk_cygwin_laptopjf_tag: tag fltk_cygwin_laptopjf - -