[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r8338 - trunk/gnue-designer/src/forms/PagePainter
From: |
jcater |
Subject: |
[gnue] r8338 - trunk/gnue-designer/src/forms/PagePainter |
Date: |
Mon, 3 Apr 2006 18:25:04 -0500 (CDT) |
Author: jcater
Date: 2006-04-02 11:53:01 -0500 (Sun, 02 Apr 2006)
New Revision: 8338
Removed:
trunk/gnue-designer/src/forms/PagePainter/PagePainterOGL.py
Log:
removed a test file as I'm not goin that route now
Deleted: trunk/gnue-designer/src/forms/PagePainter/PagePainterOGL.py
===================================================================
--- trunk/gnue-designer/src/forms/PagePainter/PagePainterOGL.py 2006-04-02
16:45:34 UTC (rev 8337)
+++ trunk/gnue-designer/src/forms/PagePainter/PagePainterOGL.py 2006-04-02
16:53:01 UTC (rev 8338)
@@ -1,113 +0,0 @@
-#
-# Copyright 2001-2006 Free Software Foundation
-#
-# This file is part of GNU Enterprise
-#
-# GNU Enterprise is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
-# version 2, or (at your option) any later version.
-#
-# GNU Enterprise is distributed in the hope that it will be
-# useful, but WITHOUT ANY WARRANTY; without even the implied
-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-# PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public
-# License along with program; see the file COPYING. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place
-# - Suite 330, Boston, MA 02111-1307, USA.
-#
-# $Id: TriggerEditor.py 8210 2006-03-07 00:04:31Z jcater $
-
-__all__ = ['PagePainter']
-
-#----------------------------------------------------------------------------
-# System Imports
-#----------------------------------------------------------------------------
-import sys
-import math
-
-#--------------------------------------------------------------------------
-# GNUe Imports
-#--------------------------------------------------------------------------
-from gnue.designer.base.EditorBase import EditorBase
-
-#--------------------------------------------------------------------------
-# External Imports
-#--------------------------------------------------------------------------
-import wx
-from wx.glcanvas import GLCanvas
-
-from OpenGL.GLUT import *
-from OpenGL.GLU import *
-from OpenGL.GL import *
-
-
-
-# ===========================================================================
-# The PagePainter class
-# ===========================================================================
-class PagePainter (EditorBase):
-
- runtime_section = "FormsPagePainter"
- icon = 'painter'
-
- def init(self, object):
-
- canvas = self.canvas = GLCanvas(self)
- self.document.app.ui.autoSizer(self, canvas)
-
- self.object = object
-
- self.setCaption(hasattr(object,'caption') and object.caption \
- or object.name)
-
-
- #----------------------------------------------------------------------
- # wxPython + OpenGL integration
- #----------------------------------------------------------------------
- wx.EVT_SIZE(canvas,self.__onResize)
- wx.EVT_PAINT(canvas,self.__onPaint)
- wx.EVT_ERASE_BACKGROUND(canvas, self.__onEraseBackground)
-
-
- #--------------------------------------------------------------------------
- # wxPython + OpenGL integration
- #--------------------------------------------------------------------------
- def drawCanvas(self):
- print "Drawing!"
-
-
- #--------------------------------------------------------------------------
- # wxPython + OpenGL integration
- #--------------------------------------------------------------------------
- def __onResize(self, event):
- size = self.canvas.GetClientSize()
- if self.canvas.GetContext():
- self.canvas.SetCurrent()
- glViewport(0, 0, size.width, size.height)
-
- def __onEraseBackground(self, event):
- pass # Avoids flicker
-
- def __onPaint(self, *args):
- dc = wx.PaintDC(self.canvas)
- self.__redraw(None)
-
- def __redraw(self, *args):
- #dc = wxPaintDC(self)
- dc = wx.ClientDC(self.canvas)
- self.canvas.SetCurrent()
-
- mode = glGetDouble(GL_MATRIX_MODE)
- glMatrixMode(GL_PROJECTION)
-
- glPushMatrix()
- self.drawCanvas()
- glFlush()
- glPopMatrix()
- self.canvas.SwapBuffers()
-
- glMatrixMode(mode)
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r8338 - trunk/gnue-designer/src/forms/PagePainter,
jcater <=