|
From: <sm...@us...> - 2009-02-20 07:36:57
|
Revision: 9562
http://plplot.svn.sourceforge.net/plplot/?rev=9562&view=rev
Author: smekal
Date: 2009-02-20 07:36:49 +0000 (Fri, 20 Feb 2009)
Log Message:
-----------
The wxWidgets driver considers now the position settings of the geometry option.
Modified Paths:
--------------
trunk/drivers/wxwidgets.cpp
trunk/drivers/wxwidgets.h
Modified: trunk/drivers/wxwidgets.cpp
===================================================================
--- trunk/drivers/wxwidgets.cpp 2009-02-19 22:52:21 UTC (rev 9561)
+++ trunk/drivers/wxwidgets.cpp 2009-02-20 07:36:49 UTC (rev 9562)
@@ -128,6 +128,8 @@
comcount = 0;
m_frame=NULL;
+ xpos=0;
+ ypos=0;
// width, height are set in plD_init_wxwidgets
// bm_width, bm_height are set in install_buffer
@@ -405,7 +407,7 @@
}
#endif
- /* initialize device storage */
+ /* initialize frame size and position */
if( pls->xlength <= 0 || pls->ylength <=0 )
plspage( 0.0, 0.0, (PLINT)(CANVAS_WIDTH*DEVICE_PIXELS_PER_IN),
(PLINT)(CANVAS_HEIGHT*DEVICE_PIXELS_PER_IN), 0, 0 );
@@ -415,6 +417,12 @@
dev->clipminx=pls->xlength;
dev->clipminy=pls->ylength;
+ if( pls->xoffset!=0 || pls->yoffset!=0) {
+ dev->xpos = (int)(pls->xoffset);
+ dev->ypos = (int)(pls->yoffset);
+ }
+
+
/* If portrait mode, apply a rotation and set freeaspect */
if( pls->portrait ) {
plsdiori( (PLFLT)(4 - ORIENTATION) );
@@ -1224,7 +1232,14 @@
}
dev->m_frame = new wxPLplotFrame( title, pls );
wxPLGetApp().AddFrame( dev->m_frame );
+
+ /* set size and position of window */
dev->m_frame->SetClientSize( dev->width, dev->height );
+ if( dev->xpos!=0 || dev->ypos!=0)
+ dev->m_frame->SetSize( dev->xpos, dev->ypos,
+ wxDefaultCoord, wxDefaultCoord,
+ wxSIZE_USE_EXISTING );
+
if( dev->showGUI ) {
dev->m_frame->Show( true );
dev->m_frame->Raise();
Modified: trunk/drivers/wxwidgets.h
===================================================================
--- trunk/drivers/wxwidgets.h 2009-02-19 22:52:21 UTC (rev 9561)
+++ trunk/drivers/wxwidgets.h 2009-02-20 07:36:49 UTC (rev 9562)
@@ -125,6 +125,8 @@
int comcount;
wxPLplotFrame* m_frame;
+ PLINT xpos;
+ PLINT ypos;
PLINT width;
PLINT height;
PLINT bm_width;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|