From: Robert Roebling Date: Sun, 27 Dec 1998 14:44:40 +0000 (+0000) Subject: Compilation fixes for OGL X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/bec3e8601ddda938e451d3418a0dbfa8ccd12663?ds=inline Compilation fixes for OGL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/ogl/Makefile b/utils/ogl/Makefile new file mode 100644 index 0000000000..3f7a4dce0d --- /dev/null +++ b/utils/ogl/Makefile @@ -0,0 +1 @@ +include ../../setup/general/makedirs diff --git a/utils/ogl/samples/ogledit/bitmaps/arrow.xpm b/utils/ogl/samples/ogledit/bitmaps/arrow.xpm new file mode 100644 index 0000000000..d3807cbf4e --- /dev/null +++ b/utils/ogl/samples/ogledit/bitmaps/arrow.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static char *arrow_xpm[] = { +/* columns rows colors chars-per-pixel */ +"22 22 16 1", +" c Gray0", +". c #bf0000", +"X c #00bf00", +"o c #bfbf00", +"O c #0000bf", +"+ c #bf00bf", +"@ c #00bfbf", +"# c #c0c0c0", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"######################", +"######################", +"######################", +"######################", +"######################", +"####### ##############", +"####### #############", +"####### ############", +"####### ###########", +"####### ##########", +"####### #########", +"####### ########", +"####### #######", +"####### ##########", +"####### # ##########", +"####### ### #########", +"########### #########", +"############ ########", +"############ ########", +"######################", +"######################", +"######################" +}; diff --git a/utils/ogl/samples/ogledit/bitmaps/tool1.xpm b/utils/ogl/samples/ogledit/bitmaps/tool1.xpm new file mode 100644 index 0000000000..89a313d94c --- /dev/null +++ b/utils/ogl/samples/ogledit/bitmaps/tool1.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static char *tool1_xpm[] = { +/* columns rows colors chars-per-pixel */ +"22 22 16 1", +" c Gray0", +". c #bf0000", +"X c #00bf00", +"o c #bfbf00", +"O c #0000bf", +"+ c #bf00bf", +"@ c #00bfbf", +"# c #c0c0c0", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"######################", +"######################", +"# ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ##", +"######################", +"######################", +"######################" +}; diff --git a/utils/ogl/samples/ogledit/bitmaps/tool2.xpm b/utils/ogl/samples/ogledit/bitmaps/tool2.xpm new file mode 100644 index 0000000000..612dbf01bb --- /dev/null +++ b/utils/ogl/samples/ogledit/bitmaps/tool2.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static char *tool2_xpm[] = { +/* columns rows colors chars-per-pixel */ +"22 22 16 1", +" c Gray0", +". c #bf0000", +"X c #00bf00", +"o c #bfbf00", +"O c #0000bf", +"+ c #bf00bf", +"@ c #00bfbf", +"# c #c0c0c0", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"######################", +"######################", +"#### #####", +"### ::::::::::::: ####", +"## ::::::::::::::: ###", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"## ::::::::::::::: ###", +"### ::::::::::::: ####", +"#### #####", +"######################", +"######################", +"######################" +}; diff --git a/utils/ogl/samples/ogledit/bitmaps/tool3.xpm b/utils/ogl/samples/ogledit/bitmaps/tool3.xpm new file mode 100644 index 0000000000..7ba078573c --- /dev/null +++ b/utils/ogl/samples/ogledit/bitmaps/tool3.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static char *tool3_xpm[] = { +/* columns rows colors chars-per-pixel */ +"22 22 16 1", +" c Gray0", +". c #bf0000", +"X c #00bf00", +"o c #bfbf00", +"O c #0000bf", +"+ c #bf00bf", +"@ c #00bfbf", +"# c #c0c0c0", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"######################", +"######################", +"######################", +"######################", +"####### ########", +"#### ::::::: #####", +"### ::::::::::::: ####", +"## ::::::::::::::: ###", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"# ::::::::::::::::: ##", +"## ::::::::::::::: ###", +"### ::::::::::::: ####", +"#### ::::::: #####", +"###### ########", +"######################", +"######################", +"######################", +"######################", +"######################", +"######################" +}; diff --git a/utils/ogl/samples/ogledit/bitmaps/tool4.xpm b/utils/ogl/samples/ogledit/bitmaps/tool4.xpm new file mode 100644 index 0000000000..154e93b832 --- /dev/null +++ b/utils/ogl/samples/ogledit/bitmaps/tool4.xpm @@ -0,0 +1,44 @@ +/* XPM */ +static char *tool4_xpm[] = { +/* columns rows colors chars-per-pixel */ +"22 22 16 1", +" c Gray0", +". c #bf0000", +"X c #00bf00", +"o c #bfbf00", +"O c #0000bf", +"+ c #bf00bf", +"@ c #00bfbf", +"# c #c0c0c0", +"$ c #808080", +"% c Red", +"& c Green", +"* c Yellow", +"= c Blue", +"- c Magenta", +"; c Cyan", +": c Gray100", +/* pixels */ +"######################", +"######################", +"######################", +"########## ##########", +"######### :: #########", +"######## :::: ########", +"####### :::::: #######", +"###### :::::::: ######", +"##### :::::::::: #####", +"#### :::::::::::: ####", +"### :::::::::::::: ###", +"### :::::::::::::: ###", +"#### :::::::::::: ####", +"##### :::::::::: #####", +"###### :::::::: ######", +"####### :::::: #######", +"######## :::: ########", +"######### :: #########", +"########## ##########", +"######################", +"######################", +"######################" +}; diff --git a/utils/ogl/samples/ogledit/ogl.xpm b/utils/ogl/samples/ogledit/ogl.xpm new file mode 100644 index 0000000000..2a8c61e578 --- /dev/null +++ b/utils/ogl/samples/ogledit/ogl.xpm @@ -0,0 +1,45 @@ +/* XPM */ +static char * ogl_xpm[] = { +/* width height ncolors chars_per_pixel */ +"32 32 7 1", +/* colors */ +" s None c None", +". c #000000", +"+ c #000080", +"@ c #ff0000", +"# c #00ff00", +"$ c #00ffff", +"% c #ffffff", +/* pixels */ +"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%", +"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%", +"%............%%%%%%........%%%%%", +"%.@@@@@@@@@@.%%%%..$$$$$$$$..%%%", +"%.@@@@@@@@@@.%%%.$$$$$$$$$$$$.%%", +"%.@@@@@@@@@@.+++.$$$$$$$$$$$$.%%", +"%.@@@@@@@@@@.+++.$$$$$$$$$$$$.%%", +"%.@@@@@@@@@@.%%%.$$$$$$$$$$$$.%%", +"%.@@@@@@@@@@.%%%%..$$$$$$$$..%%%", +"%............%%%%%.........%%%%%", +"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%", +"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%", +"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%", +"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%", +"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%", +"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%", +"%%%%%%+.%%%%%%%%%%%%%%++%%%%%%%%", +"%%%%%%.+.%%%%%%%%%%%%.++..%%%%%%", +"%%%%%.+++.%%%%%%%%%..#####..%%%%", +"%%%%.+++++.%%%%%%%.#########.%%%", +"%%%.+++++++.%%%%%%.#########.%%%", +"%%.+++++++++.%%%%.###########.%%", +"%.+++++++++++.++++###########.%%", +"%%.+++++++++.+++++###########.%%", +"%%%.+++++++.%%%%%%.#########.%%%", +"%%%%.+++++.%%%%%%%.#########.%%%", +"%%%%%.+++.%%%%%%%%%..#####..%%%%", +"%%%%%%.+.%%%%%%%%%%%%.....%%%%%%", +"%%%%%%%.%%%%%%%%%%%%%%%%%%%%%%%%", +"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%", +"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%", +"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"}; diff --git a/utils/ogl/samples/ogledit/palette.cpp b/utils/ogl/samples/ogledit/palette.cpp index 2150d8ec62..944afcb80a 100644 --- a/utils/ogl/samples/ogledit/palette.cpp +++ b/utils/ogl/samples/ogledit/palette.cpp @@ -55,7 +55,9 @@ EditorToolPalette::EditorToolPalette(wxWindow* parent, const wxPoint& pos, const { currentlySelected = -1; +#ifndef __WXGTK__ SetMaxRowsCols(1000, 1); +#endif } bool EditorToolPalette::OnLeftClick(int toolIndex, bool toggled) diff --git a/utils/ogl/samples/ogledit/palette.h b/utils/ogl/samples/ogledit/palette.h index 6159266230..3d0c7ff614 100644 --- a/utils/ogl/samples/ogledit/palette.h +++ b/utils/ogl/samples/ogledit/palette.h @@ -18,7 +18,11 @@ #include #include +#ifdef __WXGTK__ +#include +#else #include +#endif /* * Object editor tool palette @@ -28,7 +32,11 @@ // TODO for wxWin: wxToolBar95 cannot be moved to a non-0,0 position! // Needs to have a parent window... // So use a simple toolbar at present. +#ifdef __WXGTK__ +#define TOOLPALETTECLASS wxToolBar +#else #define TOOLPALETTECLASS wxToolBarSimple +#endif class EditorToolPalette: public TOOLPALETTECLASS { diff --git a/utils/ogl/src/Makefile b/utils/ogl/src/Makefile new file mode 100644 index 0000000000..35ce1069fd --- /dev/null +++ b/utils/ogl/src/Makefile @@ -0,0 +1 @@ +include ../../../setup/general/makedirs diff --git a/utils/ogl/src/Makefile.in b/utils/ogl/src/Makefile.in new file mode 100644 index 0000000000..79e3df01ff --- /dev/null +++ b/utils/ogl/src/Makefile.in @@ -0,0 +1,69 @@ +# +# wGLCanvas source makefile for Unix +# +# Copyright 1998, Robert Roebling +# + +# wxWindows base directory +WXBASEDIR=@WXBASEDIR@ + +# set the OS type for compilation +OS=@OS@ + +# compile a library only +RULE=gslib + +# needed for unactivated +NONE= + +# define library name +LIB_TARGET=wx_ogl_gtk +LIB_MAJOR=0 +LIB_MINOR=1 + +# define library sources + +LIB_CPP_SRC= \ +\ + basic.cpp basic2.cpp bmpshape.cpp canvas.cpp \ + composit.cpp divided.cpp drawn.cpp lines.cpp \ + mfutils.cpp misc.cpp ogldiag.cpp + +#define library objects +LIB_OBJ= \ +\ + $(LIB_CPP_SRC:.cpp=.o) + +all:: + +clean:: + +#additional things needed for compile +ADD_COMPILE= + +# include the definitions now +include ../../../../template.mak + +install:: + @echo "Installing library files and headers for libwx_ogl_gtk.." + @echo " Creating directory.." + @$(WXBASEDIR)/mkinstalldirs /usr/local/include/wx_ogl + @echo " Copying headers from /include/wx" + @cd $(WXBASEDIR)/utils/ogl/src ; \ + for f in *.h ; do \ + rm -f /usr/local/include/wx_ogl/$$f ; \ + $(INSTALL_DATA) $$f /usr/local/include/wx_ogl/$$f ; \ + done + @echo " Copying static library files to /usr/local/lib" + @cd $(WXBASEDIR)/lib/$(OS) ; \ + for f in libwx_ogl_gtk.a ; do \ + rm -f /usr/local/lib/$$f ; \ + $(INSTALL_DATA) $$f /usr/local/lib/$$f ; \ + done + @echo " Copying shared libraries to /usr/local/lib" + @cd $(WXBASEDIR)/lib/$(OS) ; \ + for f in libwx_ogl_gtk.so* ; do \ + rm -f /usr/local/lib/$$f ; \ + $(INSTALL_PROGRAM) $$f /usr/local/lib/$$f ; \ + done +