9 #define GL_GLEXT_LEGACY
26 #define GL_GLEXT_PROTOTYPES
30 #include <QtGui/QMouseEvent>
31 #include <QtCore/QTimer>
32 #include <QtGui/QCursor>
33 #include <QtGui/QApplication>
43 #include <mach-o/dyld.h>
48 # define WIN32_LEAN_AND_MEAN 1
53 #include <OpenGL/gl.h>
54 #include <OpenGL/glu.h>
55 #undef GL_GLEXT_LEGACY
58 #define GLX_GLXEXT_LEGACY
73 #if !defined(GL_EXT_framebuffer_object) || !defined(GL_EXT_framebuffer_multisample)
74 #error "Error. Your header files do not define the OpenGL macros necessary to compile this program. For further information please see http://www.gamedev.net/community/forums/showfaq.asp?forum_id=25#q5."
75 #endif // GL_EXT_framebuffer_object
85 : QGLWidget(format, parent),
87 mMinX(std::numeric_limits<double>::
max()),
88 mMinY(std::numeric_limits<double>::
max()),
89 mMaxX(-std::numeric_limits<double>::
max()),
90 mMaxY(-std::numeric_limits<double>::
max()),
92 mCurrentPositionX(mMinX),
93 mCurrentPositionY(mMinY),
97 mMousePressPosition(),
98 mMouseCurrentPosition(),
100 mMouseButton(Qt::NoButton),
104 glCheckFramebufferStatusEXTPtr(NULL),
105 glGenFramebuffersEXTPtr(NULL),
106 glGenRenderbuffersEXTPtr(NULL),
107 glDeleteFramebuffersEXTPtr(NULL),
108 glDeleteRenderbuffersEXTPtr(NULL),
109 glBindFramebufferEXTPtr(NULL),
110 glBindRenderbufferEXTPtr(NULL),
111 glRenderbufferStorageEXTPtr(NULL),
112 glFramebufferRenderbufferEXTPtr(NULL),
113 glRenderbufferStorageMultisampleEXTPtr(NULL),
114 glBlitFramebufferEXTPtr(NULL)
117 this->setMouseTracking(
true);
131 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
137 glEnable(GL_POLYGON_SMOOTH);
139 glShadeModel(GL_SMOOTH);
155 glViewport(0, 0, (GLint)w, (GLint)h);
156 glMatrixMode(GL_PROJECTION);
159 (GLdouble)(mCurrentPositionX + w),
162 glMatrixMode(GL_MODELVIEW);
168 if (this->isVisible())
172 this->
resizeGL(this->width(), this->height());
175 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
194 QMessageBox::Ok | QMessageBox::Default,
195 QMessageBox::NoButton);
208 if (this->isVisible())
210 this->
resizeGL(this->width(), this->height());
251 this->
resizeGL(this->width(), this->height());
350 setBounds(rect.left(), rect.top(), rect.right(), rect.bottom());
383 if (pLayout == NULL)
return;
396 pLayout->
moveBy(differenceToOrigin);
430 if (this->isVisible())
432 this->
resizeGL(this->width(), this->height());
447 if (dynamic_cast<const CLLocalRenderInformation*>(pRenderInfo))
476 this->
mpRenderer->
change_style(dynamic_cast<const CLGlobalRenderInformation*>(pRenderInfo), defaultStyle);
479 if (this->isVisible())
505 if (QApplication::keyboardModifiers() != Qt::ShiftModifier &&
506 QApplication::keyboardModifiers() != Qt::ControlModifier)
513 std::multiset<CLGraphicalObject*, compareGraphicalObjectsBySize>::iterator it = hits.begin(), endit = hits.end();
517 if (dynamic_cast<CLTextGlyph*>(*it) == NULL)
518 if (dynamic_cast<CLCompartmentGlyph*>(*it) == NULL)
528 QTimer::singleShot(QApplication::startDragTime(),
this, SLOT(
timeout()));
547 std::multiset<CLGraphicalObject*, compareGraphicalObjectsBySize>
removeTextGlyphs(std::multiset<CLGraphicalObject*, compareGraphicalObjectsBySize>& hits)
549 std::multiset<CLGraphicalObject*, compareGraphicalObjectsBySize> result;
550 std::multiset<CLGraphicalObject*, compareGraphicalObjectsBySize>::iterator it = hits.begin();
552 while (it != hits.end())
557 if (glyph == NULL && refGlyph == NULL)
575 if (pMouseEvent->buttons() == Qt::NoButton)
592 std::vector<CLGraphicalObject*>::iterator it = objects.begin(), endit = objects.end();
593 Qt::KeyboardModifiers modifiers = pMouseEvent->modifiers();
595 if (modifiers == Qt::NoModifier)
605 else if (modifiers == (Qt::ControlModifier | Qt::ShiftModifier))
612 if (selection.find(*it) == selection.end())
620 else if (modifiers == Qt::ControlModifier)
627 if (selection.find(*it) != selection.end())
635 else if (modifiers == Qt::ShiftModifier)
642 if (selection.find(*it) == selection.end())
654 if (selection.size() == 1 &&
655 ((
dynamic_cast<const CLMetabReferenceGlyph*
>(*selection.begin()) && static_cast<const CLMetabReferenceGlyph*>(*selection.begin())->getCurve().getNumCurveSegments() != 0) ||
656 (dynamic_cast<const CLReactionGlyph*>(*selection.begin()) && static_cast<const CLReactionGlyph*>(*selection.begin())->getCurve().getNumCurveSegments())
670 if (this->isVisible())
686 double dx = coords1.first - coords2.first;
687 double dy = coords1.second - coords2.second;
699 if (pMouseEvent->modifiers() & Qt::ControlModifier)
711 if (this->isVisible())
733 if ((pMouseEvent->modifiers() & Qt::ControlModifier) && !(pMouseEvent->modifiers() & Qt::ShiftModifier))
738 std::multiset<CLGraphicalObject*, compareGraphicalObjectsBySize>::iterator it = hits.begin(), endit = hits.end();
746 if (this->isVisible())
757 else if ((pMouseEvent->modifiers() & Qt::ShiftModifier) && !(pMouseEvent->modifiers() & Qt::ControlModifier))
763 std::multiset<CLGraphicalObject*, compareGraphicalObjectsBySize>::iterator it = hits.begin(), endit = hits.end();
771 if (this->isVisible())
789 std::multiset<CLGraphicalObject*, compareGraphicalObjectsBySize>::iterator pos;
797 if (pos == hits.end())
806 pObject = *(hits.begin());
812 if (this->isVisible())
824 if (this->isVisible())
833 if (selection.size() == 1 &&
834 ((
dynamic_cast<const CLMetabReferenceGlyph*
>(*selection.begin()) && static_cast<const CLMetabReferenceGlyph*>(*selection.begin())->getCurve().getNumCurveSegments() != 0) ||
835 (dynamic_cast<const CLReactionGlyph*>(*selection.begin()) && static_cast<const CLReactionGlyph*>(*selection.begin())->getCurve().getNumCurveSegments() != 0)
885 if (this->isVisible())
899 double dx = coords1.first - coords2.first;
900 double dy = coords1.second - coords2.second;
911 if (pMouseEvent->modifiers() & Qt::ControlModifier)
924 if (this->isVisible())
946 if (selection.size() == 1)
974 CLPoint pressPoint(coords.first, coords.second);
976 for (i = 0; i < iMax ; ++i)
1025 std::multiset<CLGraphicalObject*, compareGraphicalObjectsBySize>::iterator it = hits.begin(), endit = hits.end();
1029 if (selection.find(*it) != selection.end())
1057 if (this->isVisible())
1085 Qt::CursorShape shape = Qt::ArrowCursor;
1090 shape = Qt::ClosedHandCursor;
1091 emit
status_message(
"Drag item(s) out of their parent to break merge.", 0);
1096 shape = Qt::CrossCursor;
1102 bool selectedHit =
false;
1108 if (!selection.empty())
1112 if (selection.size() == 1)
1135 CLPoint currentPoint(coords.first, coords.second);
1141 for (i = 0; i < iMax ; ++i)
1173 std::multiset<CLGraphicalObject*, compareGraphicalObjectsBySize>::iterator it = hits.begin(), endit = hits.end(), pos;
1175 while (it != endit && !selectedHit)
1177 selectedHit = (selection.find(*it) != selection.end());
1189 shape = Qt::OpenHandCursor;
1198 shape = Qt::CrossCursor;
1210 if (this->cursor().shape() != shape)
1212 this->setCursor(shape);
1225 if (selection.size() == 1)
1227 if (dynamic_cast<const CLMetabReferenceGlyph*>(*selection.begin()) && static_cast<const CLMetabReferenceGlyph*>(*selection.begin())->getCurve().getNumCurveSegments() != 0)
1233 if (this->isVisible())
1238 else if (dynamic_cast<const CLReactionGlyph*>(*selection.begin()) && static_cast<const CLReactionGlyph*>(*selection.begin())->getCurve().getNumCurveSegments() != 0)
1244 if (this->isVisible())
1289 std::set<CLGraphicalObject*> sel;
1325 double aspect = 0.0;
1341 this->makeCurrent();
1342 GLubyte* pImageData = NULL;
1343 const char* extensionsString = (
const char*)glGetString(GL_EXTENSIONS);
1347 if (std::string(extensionsString).find(
"GL_EXT_framebuffer_object") == std::string::npos)
1351 tr(
"This version of OpenGL does not support the framebuffer extension.\nSorry, can't create the bitmap."));
1356 double size = imageWidth * imageHeight * 4;
1364 tr(
"Sorry, refusing to create images that are larger than 500MB."));
1369 QCursor cursor = this->cursor();
1370 this->setCursor(Qt::BusyCursor);
1374 std::set<CLGraphicalObject*> selection;
1384 GLint chunk_size = 0;
1393 GLuint blitFBOName = 0;
1394 GLuint* rbuffers = NULL;
1395 GLuint* multisampleBuffers = NULL;
1396 bool multisample_supported =
false;
1399 if (std::string(extensionsString).find(
"GL_EXT_framebuffer_multisample") != std::string::npos)
1402 multisample_supported =
true;
1406 samples = (samples > 4) ? 4 : samples;
1409 if (!multisample_supported || samples < 2)
1412 tr(
"Your implementation does not support multisampling of\nframebuffer objects. The resulting\bitmap might not look very nice."));
1419 if (imageWidth > (
unsigned int)chunk_size || imageHeight > (
unsigned int)chunk_size)
1421 double currentX = x;
1422 double currentY = y;
1427 pImageData =
new GLubyte[imageWidth * imageHeight * 4];
1432 tr(
"Could not create image. Maybe you ran out of memory."));
1434 this->setCursor(cursor);
1438 unsigned int xSteps = imageWidth / chunk_size;
1439 unsigned int ySteps = imageHeight / chunk_size;
1440 unsigned int restX = imageWidth % chunk_size;
1441 unsigned int restY = imageHeight % chunk_size;
1442 unsigned int i = 0, j = 0;
1444 double xModelStep = chunk_size * width / imageWidth;
1445 double yModelStep = chunk_size * height / imageHeight;
1446 const uchar* pSrc = NULL;
1450 GLubyte* pTmpData = NULL;
1451 bool success =
true;
1453 for (i = 0; i < ySteps && success; ++i)
1457 for (j = 0; j < xSteps && success; ++j)
1459 success = this->
draw_bitmap(currentX, currentY, xModelStep, yModelStep, chunk_size, chunk_size, fboName, blitFBOName, &rbuffers, &multisampleBuffers, &pTmpData, samples);
1463 for (k = 0; k < chunk_size; ++k)
1466 pSrc = pTmpData + k * chunk_size * 4;
1467 pDst = pImageData + (i * chunk_size + k) * imageWidth * 4 + j * chunk_size * 4;
1468 memcpy(pDst, pSrc, 4 * chunk_size);
1472 currentX += xModelStep;
1475 currentY += yModelStep;
1479 this->
destroy_buffers(fboName, rbuffers, blitFBOName, multisampleBuffers);
1481 if (rbuffers != NULL)
1487 if (multisampleBuffers != NULL)
1489 delete[] multisampleBuffers;
1490 multisampleBuffers = NULL;
1494 if (success && restX != 0)
1496 double tmpWidth = restX * width / imageWidth;
1500 for (i = 0; i < ySteps && success ; ++i)
1502 success = this->
draw_bitmap(currentX, currentY, tmpWidth, yModelStep, restX, chunk_size, fboName, blitFBOName, &rbuffers, &multisampleBuffers, &pTmpData, samples);
1508 for (k = 0; k < chunk_size; ++k)
1511 pSrc = pTmpData + k * restX * 4;
1512 pDst = pImageData + (i * chunk_size + k) * imageWidth * 4 + j * chunk_size * 4;
1513 memcpy(pDst, pSrc, 4 * restX);
1517 currentY += yModelStep;
1521 this->
destroy_buffers(fboName, rbuffers, blitFBOName, multisampleBuffers);
1523 if (rbuffers != NULL)
1529 if (multisampleBuffers != NULL)
1531 delete[] multisampleBuffers;
1532 multisampleBuffers = NULL;
1536 if (success && restY != 0)
1539 double tmpHeight = restY * height / imageHeight;
1542 for (j = 0; j < xSteps; ++j)
1544 success = this->
draw_bitmap(currentX, currentY, xModelStep, tmpHeight, chunk_size, restY, fboName, blitFBOName, &rbuffers, &multisampleBuffers, &pTmpData, samples);
1548 for (k = 0; k < (int)restY; ++k)
1551 pSrc = pTmpData + k * chunk_size * 4;
1552 pDst = pImageData + (i * chunk_size + k) * imageWidth * 4 + j * chunk_size * 4;
1553 memcpy(pDst, pSrc, 4 * chunk_size);
1557 currentX += xModelStep;
1561 this->
destroy_buffers(fboName, rbuffers, blitFBOName, multisampleBuffers);
1563 if (rbuffers != NULL)
1569 if (multisampleBuffers != NULL)
1571 delete[] multisampleBuffers;
1572 multisampleBuffers = NULL;
1576 if (success && restX != 0)
1578 double tmpWidth = restX * width / imageWidth;
1580 success = this->
draw_bitmap(currentX, currentY, tmpWidth, tmpHeight, restX, restY, fboName, blitFBOName, &rbuffers, &multisampleBuffers, &pTmpData, samples);
1584 for (k = 0; k < (int)restY; ++k)
1587 pSrc = pTmpData + k * restX * 4;
1588 pDst = pImageData + (i * chunk_size + k) * imageWidth * 4 + j * chunk_size * 4;
1589 memcpy(pDst, pSrc, 4 * restX);
1594 this->
destroy_buffers(fboName, rbuffers, blitFBOName, multisampleBuffers);
1596 if (rbuffers != NULL)
1602 if (multisampleBuffers != NULL)
1604 delete[] multisampleBuffers;
1605 multisampleBuffers = NULL;
1614 if (pImageData != NULL)
delete[] pImageData;
1619 if (pTmpData != NULL)
delete[] pTmpData;
1624 bool success = this->
draw_bitmap(x, y, width, height, imageWidth, imageHeight, fboName, blitFBOName, &rbuffers, &multisampleBuffers, &pImageData, samples);
1628 if (!success && pImageData != NULL)
1630 delete[] pImageData;
1635 this->
destroy_buffers(fboName, rbuffers, blitFBOName, multisampleBuffers);
1637 if (rbuffers != NULL)
delete[] rbuffers;
1639 if (multisampleBuffers != NULL)
delete[] multisampleBuffers;
1649 if (!selection.empty())
1655 if (pImageData != NULL)
1657 unsigned int i, iMax = imageWidth * imageHeight;
1659 for (i = 0; i < iMax; ++i)
1666 ((GLuint*)pImageData)[i] = pImageData[i * 4 + 3] * 16777216 | ((GLuint)pImageData[i * 4]) * 65536 | ((GLuint)pImageData[i * 4 + 1]) * 256 | ((GLuint)pImageData[i * 4 + 2]);
1672 this->setCursor(cursor);
1684 bool CQGLLayoutPainter::draw_bitmap(
double x,
double y,
double width,
double height,
unsigned int imageWidth,
unsigned int imageHeight, GLuint& fbo, GLuint& multiFBO, GLuint** rbuffers, GLuint** multiRBuffers, GLubyte** pImageData, GLuint samples)
1693 this->makeCurrent();
1700 (*glGenFramebuffersEXTPtr)(1, &fbo);
1706 if ((*rbuffers) == NULL)
1710 (*rbuffers) =
new GLuint[2];
1711 (*glGenRenderbuffersEXTPtr)(2, (*rbuffers));
1712 assert((*rbuffers)[0] != 0);
1713 assert((*rbuffers)[1] != 0);
1719 (*glRenderbufferStorageEXTPtr)(
GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, imageWidth, imageHeight);
1740 (*glGenFramebuffersEXTPtr)(1, &multiFBO);
1741 assert(multiFBO != 0);
1746 if ((*multiRBuffers) == NULL)
1750 (*multiRBuffers) =
new GLuint[2];
1751 (*glGenRenderbuffersEXTPtr)(2, (*multiRBuffers));
1753 assert((*multiRBuffers)[0] != 0);
1754 assert((*multiRBuffers)[1] != 0);
1756 (*glRenderbufferStorageMultisampleEXTPtr)(
GL_RENDERBUFFER_EXT, samples, GL_RGBA, imageWidth, imageHeight);
1759 (*glRenderbufferStorageMultisampleEXTPtr)(
GL_RENDERBUFFER_EXT, samples, GL_DEPTH_COMPONENT, imageWidth, imageHeight);
1772 QString messageHeader, message;
1775 if (fail ==
false && (*pImageData) == NULL)
1779 (*pImageData) =
new GLubyte[imageWidth * imageHeight * 4];
1783 messageHeader = tr(
"Error creating image");
1784 message = tr(
"Could not create image. Maybe you ran out of memory.");
1786 (*pImageData) = NULL;
1793 bool visible = this->isVisible();
1797 this->setVisible(
false);
1806 double zoom = (double)imageHeight / height;
1807 double aspect = (double)imageWidth / (width * zoom);
1811 this->
resizeGL(imageWidth, imageHeight);
1834 (*glBlitFramebufferEXTPtr)(0, 0, imageWidth, imageHeight, 0, 0, imageWidth, imageHeight, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT, GL_NEAREST);
1845 glReadPixels(0, 0, imageWidth, imageHeight, GL_RGBA, GL_UNSIGNED_BYTE, *pImageData);
1847 GLubyte* pTmpData =
new GLubyte[imageWidth * 4];
1848 unsigned int i, iMax = imageHeight / 2;
1850 for (i = 0; i < iMax; ++i)
1853 memcpy(pTmpData, (*pImageData) + i * 4 * imageWidth, imageWidth * 4);
1855 memcpy((*pImageData) + i * 4 * imageWidth, (*pImageData) + (imageHeight - 1 - i)*imageWidth * 4, imageWidth * 4);
1857 memcpy((*pImageData) + (imageHeight - 1 - i) * 4 * imageWidth, pTmpData, imageWidth * 4);
1865 this->
resizeGL(origWidth, origHeight);
1869 this->setVisible(
true);
1892 if (rbuffers != NULL)(*glDeleteRenderbuffersEXTPtr)(2, rbuffers);
1894 if (multiRBuffers != NULL)(*glDeleteRenderbuffersEXTPtr)(2, multiRBuffers);
1896 (*glDeleteFramebuffersEXTPtr)(1, &fbo);
1897 (*glDeleteFramebuffersEXTPtr)(1, &multiFBO);
1910 bool success =
false;
1911 messageHeader = tr(
"Error creating image");
1924 message = tr(
"Could not create framebuffer object (INCOMPLETE_ATTACHMENT). ");
1928 message = tr(
"Could not create framebuffer object (INCOMPLETE_DIMENSIONS). ");
1932 message = tr(
"Could not create framebuffer object (INCOMPLETE_MISSING_ATTACHMENT).");
1936 message = tr(
"Could not create framebuffer object (INCOMPLETE_UNSUPPORTED). ");
1940 message = tr(
"Could not create framebuffer object (UNKNOWN). ");
2013 #ifndef COPASI_MAC_USE_DEPRECATED_LOOKUP
2016 void * CQGLLayoutPainter::MyNSGLGetProcAddress(
const char *name)
2018 #ifndef COPASI_MAC_USE_DEPRECATED_LOOKUP
2019 return dlsym(RTLD_DEFAULT, name);
2023 symbolName = (
char*)malloc(strlen(name) + 2);
2025 strcpy(symbolName + 1, name);
2027 symbolName[0] =
'_';
2030 if (NSIsSymbolNameDefined(symbolName))
2032 symbol = NSLookupAndBindSymbol(symbolName);
2037 return symbol ? NSAddressOfSymbol(symbol) : NULL;
unsigned int getViewportHeight() const
void move_selection(double dx, double dy, bool moveAssociated=true)
PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXT glRenderbufferStorageMultisampleEXTPtr
static const CCopasiMessage & peekLastMessage()
void setSelection(const std::set< CLGraphicalObject * > &selection)
bool check_fbo_status(QString &messageHeader, QString &message)
double getCurrentHeight() const
const C_FLOAT64 & getZ() const
void setCurrentPosition(double x, double y)
double getCurrentPositionY() const
const C_FLOAT64 & getWidth() const
void setBounds(double minX, double minY, double maxX, double maxY)
QPoint mMouseCurrentPosition
const GLfloat * getHighlightColor() const
void(* PFNGLBLITFRAMEBUFFEREXT)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
PFNGLGENRENDERBUFFERSEXT glGenRenderbuffersEXTPtr
void status_message(const QString &message, int timeout)
void(* PFNGLGENRENDERBUFFERSEXT)(GLsizei n, GLuint *renderbuffers)
virtual void initializeGL()
PFNGLGENFRAMEBUFFERSEXT glGenFramebuffersEXTPtr
const GLfloat * getFogColor() const
void clear_extension_functions()
std::multiset< CLGraphicalObject *, compareGraphicalObjectsBySize > getObjectsAtViewportPosition(unsigned int x, unsigned int y)
void setX(const C_FLOAT64 &x)
GLfloat getFogDensity() const
virtual void mousePressEvent(QMouseEvent *pMouseEvent)
#define GL_COLOR_ATTACHMENT0_EXT
void(* PFNGLDELETEFRAMEBUFFERSEXT)(GLsizei n, GLuint *framebuffers)
#define GL_FRAMEBUFFER_COMPLETE_EXT
void(* PFNGLFRAMEBUFFERRENDERBUFFEREXT)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
const std::set< const CLGraphicalObject * > & getHighlightedObjects() const
static double distance(const CLPoint &p1, const CLPoint &p2)
void setHighlightFlag(bool flag)
void update_status_and_cursor()
static std::string getAllMessageText(const bool &chronological=true)
#define GL_MAX_RENDERBUFFER_SIZE_EXT
#define GL_DEPTH_ATTACHMENT_EXT
void setHighlightColor(const GLfloat c[4])
PFNGLBLITFRAMEBUFFEREXT glBlitFramebufferEXTPtr
unsigned int mViewportHeight
void setY(const C_FLOAT64 &y)
void calculateAndAssignBounds(CLayout *pLayout)
void setAspect(double aspect)
const std::set< const CLGraphicalObject * > & getHighlightedObjects() const
double getCurrentPositionX() const
virtual void mouseMoveEvent(QMouseEvent *pMouseEvent)
void setCurrentPositionX(double x)
std::multiset< CLGraphicalObject *, compareGraphicalObjectsBySize > removeTextGlyphs(std::multiset< CLGraphicalObject *, compareGraphicalObjectsBySize > &hits)
CQGLLayoutPainter(const QGLFormat &format, QWidget *parent=0)
void initialize_extension_functions()
#define GL_FRAMEBUFFER_UNSUPPORTED_EXT
PFNGLRENDERBUFFERSTORAGEEXT glRenderbufferStorageEXTPtr
const CLPoint & getBase1() const
void resize(GLsizei w, GLsizei h)
void setSelectionBox(const CLBoundingBox *pBox)
void destroy_buffers(GLuint &fbo, GLuint *rbuffers, GLuint &multiFBO, GLuint *multiRBuffers)
bool getHighlightFlag() const
void setCurrentPositionY(double y)
void setFogDensity(GLfloat dens)
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT
double getZoomFactor() const
double getCurrentWidth() const
QPoint mMousePressPosition
const CLDimensions & getDimensions() const
QPoint mMouseLastPosition
void setHeight(const C_FLOAT64 &h)
void setZoomFactor(double zoomFactor)
static StandardButton warning(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
const GLfloat * getHighlightColor() const
const CLPoint & getBase2() const
void setHighlightColor(const GLfloat c[4])
const CLPoint & getEnd() const
void addToSelection(CLGraphicalObject *pObject)
void setImageTexturizer(CLImageTexturizer *pTexturizer)
PFNGLFRAMEBUFFERRENDERBUFFEREXT glFramebufferRenderbufferEXTPtr
const C_FLOAT64 & getX() const
void toggleHighlightFlag()
void setHighlightedObjects(const std::set< const CLGraphicalObject * > &highlightedObjects)
const CLPoint & getPosition() const
void setZoomFactor(double)
void change_style(const CLRenderInformationBase *pRenderInfo, bool defaultStyle=false)
void(* PFNGLGENFRAMEBUFFERSEXT)(GLsizei n, GLuint *framebuffers)
bool getHighlightFlag() const
static CLCurve * revert_curve(const CLCurve *pCurve)
void setFogColor(const GLfloat c[4])
CLBoundingBox calculateBoundingBox() const
virtual void resizeGL(int w, int h)
void setFogColor(const GLfloat c[4])
GLubyte * export_bitmap(double x, double y, double width, double height, unsigned int imageWidth, unsigned int imageHeight, bool drawSelection)
CListOfLayouts * getListOfLayouts()
void(* PFNGLBINDFRAMEBUFFEREXT)(GLenum target, GLuint framebuffer)
void removeFromSelection(CLGraphicalObject *pObject)
PFNGLCHECKFRAMEBUFFERSTATUSEXT glCheckFramebufferStatusEXTPtr
PFNGLDELETERENDERBUFFERSEXT glDeleteRenderbuffersEXTPtr
Qt::MouseButton mMouseButton
#define GL_RENDERBUFFER_EXT
unsigned int getViewportWidth() const
#define GL_DRAW_FRAMEBUFFER_EXT
std::pair< double, double > convert_to_model_space(double x, double y) const
PFNGLDELETEFRAMEBUFFERSEXT glDeleteFramebuffersEXTPtr
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT
const C_FLOAT64 & getY() const
#define GL_MAX_SAMPLES_EXT
void change_style(const CLGlobalRenderInformation *pRenderInformation, bool defaultStyle=false)
const GLfloat * getFogColor() const
void setFogDensity(GLfloat dens)
void singleCurveSelected(bool)
static StandardButton critical(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
double getZoomFactor() const
const C_FLOAT64 & getHeight() const
std::vector< CLGraphicalObject * > getObjectsInBoundingBox(double lx, double ly, double rx, double ry, bool partial=true)
void(* PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXT)(GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height)
#define GL_FRAMEBUFFER_EXT
const CLLineSegment * getSegmentAt(size_t i) const
bool isSelected(const CLGraphicalObject *) const
virtual void moveBy(const CLPoint &p)
GLfloat getFogDensity() const
PFNGLBINDFRAMEBUFFEREXT glBindFramebufferEXTPtr
void setAspect(double aspect)
virtual void mouseReleaseEvent(QMouseEvent *pMouseEvent)
void setHighlightFlag(bool flag)
PFNGLBINDRENDERBUFFEREXT glBindRenderbufferEXTPtr
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT
GLenum(* PFNGLCHECKFRAMEBUFFERSTATUSEXT)(GLenum target)
std::set< CLGraphicalObject * > & getSelection()
void(* PFNGLRENDERBUFFERSTORAGEEXT)(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height)
void set_font_renderer(CLFontRendererBase *pFontRenderer)
#define GL_READ_FRAMEBUFFER_EXT
std::set< CLGraphicalObject * > getSelection()
void(* PFNGLDELETERENDERBUFFERSEXT)(GLsizei n, GLuint *renderbuffers)
bool draw_bitmap(double x, double y, double width, double height, unsigned int imageWidth, unsigned int imageHeight, GLuint &fbo, GLuint &multiFBO, GLuint **rbuffers, GLuint **multiRBuffers, GLubyte **pImageData, GLuint samples=0)
const CLCurve & getCurve() const
size_t getNumCurveSegments() const
void toggleHighlightFlag()
unsigned int mViewportWidth
const CLDimensions & getDimensions() const
const CLPoint & getStart() const
void setWidth(const C_FLOAT64 &w)
void setHighlightedObjects(const std::set< const CLGraphicalObject * > &highlightedObjects)
CLLayoutRenderer * mpRenderer
void(* PFNGLBINDRENDERBUFFEREXT)(GLenum target, GLuint renderbuffer)
const CCopasiVector< CLGlobalRenderInformation > & getListOfGlobalRenderInformationObjects() const