]> git.saurik.com Git - wxWidgets.git/commitdiff
Compilation fixes for OGL
authorRobert Roebling <robert@roebling.de>
Sun, 27 Dec 1998 14:44:40 +0000 (14:44 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 27 Dec 1998 14:44:40 +0000 (14:44 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/ogl/Makefile [new file with mode: 0644]
utils/ogl/samples/ogledit/bitmaps/arrow.xpm [new file with mode: 0644]
utils/ogl/samples/ogledit/bitmaps/tool1.xpm [new file with mode: 0644]
utils/ogl/samples/ogledit/bitmaps/tool2.xpm [new file with mode: 0644]
utils/ogl/samples/ogledit/bitmaps/tool3.xpm [new file with mode: 0644]
utils/ogl/samples/ogledit/bitmaps/tool4.xpm [new file with mode: 0644]
utils/ogl/samples/ogledit/ogl.xpm [new file with mode: 0644]
utils/ogl/samples/ogledit/palette.cpp
utils/ogl/samples/ogledit/palette.h
utils/ogl/src/Makefile [new file with mode: 0644]
utils/ogl/src/Makefile.in [new file with mode: 0644]

diff --git a/utils/ogl/Makefile b/utils/ogl/Makefile
new file mode 100644 (file)
index 0000000..3f7a4dc
--- /dev/null
@@ -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 (file)
index 0000000..d3807cb
--- /dev/null
@@ -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 (file)
index 0000000..89a313d
--- /dev/null
@@ -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 (file)
index 0000000..612dbf0
--- /dev/null
@@ -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 (file)
index 0000000..7ba0785
--- /dev/null
@@ -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 (file)
index 0000000..154e93b
--- /dev/null
@@ -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 (file)
index 0000000..2a8c61e
--- /dev/null
@@ -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 */
+"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+"%............%%%%%%........%%%%%",
+"%.@@@@@@@@@@.%%%%..$$$$$$$$..%%%",
+"%.@@@@@@@@@@.%%%.$$$$$$$$$$$$.%%",
+"%.@@@@@@@@@@.+++.$$$$$$$$$$$$.%%",
+"%.@@@@@@@@@@.+++.$$$$$$$$$$$$.%%",
+"%.@@@@@@@@@@.%%%.$$$$$$$$$$$$.%%",
+"%.@@@@@@@@@@.%%%%..$$$$$$$$..%%%",
+"%............%%%%%.........%%%%%",
+"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%",
+"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%",
+"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%",
+"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%",
+"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%",
+"%%%%%%++%%%%%%%%%%%%%%++%%%%%%%%",
+"%%%%%%+.%%%%%%%%%%%%%%++%%%%%%%%",
+"%%%%%%.+.%%%%%%%%%%%%.++..%%%%%%",
+"%%%%%.+++.%%%%%%%%%..#####..%%%%",
+"%%%%.+++++.%%%%%%%.#########.%%%",
+"%%%.+++++++.%%%%%%.#########.%%%",
+"%%.+++++++++.%%%%.###########.%%",
+"%.+++++++++++.++++###########.%%",
+"%%.+++++++++.+++++###########.%%",
+"%%%.+++++++.%%%%%%.#########.%%%",
+"%%%%.+++++.%%%%%%%.#########.%%%",
+"%%%%%.+++.%%%%%%%%%..#####..%%%%",
+"%%%%%%.+.%%%%%%%%%%%%.....%%%%%%",
+"%%%%%%%.%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
+"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"};
index 2150d8ec6214c8727793a1bfa691b67844df62e3..944afcb80ac340c9e83253a46e3f52bdf5364691 100644 (file)
@@ -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)
index 6159266230fc4a4d2994022ad5b235583d4e2e1d..3d0c7ff6146697c2afcfbedbfb1b2c47380a41fd 100644 (file)
 
 #include <wx/wx.h>
 #include <wx/string.h>
+#ifdef __WXGTK__
+#include <wx/toolbar.h>
+#else
 #include <wx/tbarsmpl.h>
+#endif
 
 /*
  * Object editor tool palette
 // 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 (file)
index 0000000..35ce106
--- /dev/null
@@ -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 (file)
index 0000000..79e3df0
--- /dev/null
@@ -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
+