Skip to content

WIP Widgets version2, compilation tests #882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 78 commits into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
53625db
Merge pull request #81 from gnudatalanguage/master
GillesDuvert Aug 24, 2020
86d5734
Merge pull request #82 from gnudatalanguage/master
GillesDuvert Sep 12, 2020
5205efd
initial import, new version Widgets using wxWidgets
GillesDuvert Feb 4, 2021
7c869df
oops, this must be made simpler, for the moment, lets use the old com…
GillesDuvert Feb 4, 2021
f386939
ok, needs checkvalid!
GillesDuvert Feb 4, 2021
8cff78f
no use to patch winstream to mimic [w]xstream behaviour, this device …
GillesDuvert Feb 5, 2021
2c08bc5
force wx when wxwidgets is present.
GillesDuvert Feb 5, 2021
c33d7f5
better graphics device initialisation?
GillesDuvert Feb 5, 2021
8ce47f6
removed windows-only ifdef that apparently is not supported contrary …
GillesDuvert Feb 5, 2021
643fb75
try using wxAutoBufferedPaintDC for plots/draw 1) seems to make it 10…
GillesDuvert Feb 6, 2021
23b9b49
solved a few remaining problems. Enabled plots wider than the screen,…
GillesDuvert Feb 6, 2021
a45999d
test with paintDC see if pleases windows
GillesDuvert Feb 6, 2021
11ad534
remove old test_widgets; try wxClientDC for windows to avoid wxFAIL_M…
GillesDuvert Feb 6, 2021
de5e0cb
try fixing Windows problems
GillesDuvert Feb 6, 2021
79acbab
Be X always
GillesDuvert Feb 6, 2021
88f78af
try forcing setFont on all widgets
GillesDuvert Feb 7, 2021
a35246f
test without UpdateGui() . corrects bug destruction of tabbed bases.
GillesDuvert Feb 7, 2021
10a5549
assure some fontsize if cannot retrieve it from system?
GillesDuvert Feb 7, 2021
12bb8c4
corrected how DEVICE,get_fontname behaves (should not give NULL) and …
GillesDuvert Feb 8, 2021
a16faa7
added option --widget-free when strict size compatibility with IDL is…
GillesDuvert Feb 8, 2021
4b12963
force test windows
GillesDuvert Feb 8, 2021
897c3ff
again
GillesDuvert Feb 8, 2021
faa090b
again, test
GillesDuvert Feb 8, 2021
32b7f89
simplified fontSize treatment, see how it works on Windows.
GillesDuvert Feb 9, 2021
29bbdc8
shoudl return nativefontinfoUSERdesc.
GillesDuvert Feb 9, 2021
76e0ec5
Added widget_info,string_size=[...,...] and other string-size related…
GillesDuvert Feb 9, 2021
a397bf6
patches tentatively adressing windows-specific problems
GillesDuvert Feb 10, 2021
03e4563
simplify, complexify...
GillesDuvert Feb 10, 2021
0b06610
oops this shoudl be done differently --- I'll leave it to somebody wi…
GillesDuvert Feb 10, 2021
87ba560
add wx.rc to sources
pjb7687 Feb 13, 2021
ec2da52
Merge branch 'master' into WidgetsVersion2
pjb7687 Feb 13, 2021
cea2102
improve compilation release builds
pjb7687 Feb 13, 2021
621558f
removed old slow and nonportable findfile (still used in many codes),…
GillesDuvert Feb 17, 2021
b3fd568
Merge origin/WidgetsVersion2 into WidgetsVersion2
GillesDuvert Feb 17, 2021
dec504d
gdl: default is to use system fonts, added --widget-compat for compat…
GillesDuvert Feb 19, 2021
921f6e2
changed 'Debug' to 'Release' for speed tests
GillesDuvert Feb 20, 2021
2948a5d
prevent ALL widgets to get focus at creation.
GillesDuvert Feb 20, 2021
b99b437
pushed old devices in a separate directory
GillesDuvert Feb 20, 2021
a879e2a
Merge origin/WidgetsVersion2 into WidgetsVersion2
GillesDuvert Feb 20, 2021
e4981e4
oops.
GillesDuvert Feb 20, 2021
9c1498d
insure wxwidgets driver of plplot is found when compiling ---> will f…
GillesDuvert Feb 22, 2021
464cd4f
removed unused variables
GillesDuvert Feb 22, 2021
ccbcd83
removed gcc warning
GillesDuvert Feb 22, 2021
b6e6af8
simplified code
GillesDuvert Feb 22, 2021
b0463d3
removed oodles of unused variables
GillesDuvert Feb 22, 2021
5497900
removed oodles of unused variables
GillesDuvert Feb 22, 2021
3231bc8
enable --notebook (GDL uses SVG only) and permit a GDL without xwin, …
GillesDuvert Feb 22, 2021
f3fa09d
oops
GillesDuvert Feb 23, 2021
2c69e22
removed complications due to 'our' wxApp . should have done that sinc…
GillesDuvert Feb 26, 2021
94181db
finally OK on all 3 platforms. Uses ToolBar instead of menuBar (same …
GillesDuvert Mar 2, 2021
72ff618
removed zenity oldies.
GillesDuvert Mar 5, 2021
88bd196
bunch of simple obsolete commands (found in many old instrument pipel…
GillesDuvert Mar 6, 2021
1a9c6e9
rewrote to express the priority for wxWidgets and still permit recons…
GillesDuvert Mar 6, 2021
93e3e2b
X11 is not set per default now.
GillesDuvert Mar 6, 2021
0f69903
try to get wxwidgets driver in plplot, at least under unix!
GillesDuvert Mar 6, 2021
cd9d756
try again
GillesDuvert Mar 6, 2021
2ff26bc
avoid strange cmake messages?
GillesDuvert Mar 6, 2021
c837d42
try again
GillesDuvert Mar 6, 2021
621f8f5
looked into some python problems.
GillesDuvert Mar 8, 2021
28c7e71
add DINTERACTIVE_GRAPHICS=OFF for 'MINI' rebuilds
GillesDuvert Mar 8, 2021
864ee9c
oops the hell with the complicated cmake syntax...
GillesDuvert Mar 8, 2021
4eba006
trick to have the PS and SVG outputs always (?) correctly closed, thu…
GillesDuvert Mar 10, 2021
e8b88e3
typo was fatal to clever brew trick!
GillesDuvert Mar 10, 2021
011b872
modified or sorted test procedures. Some are modified to pass on all …
GillesDuvert Mar 10, 2021
15a9ce9
special test for osx
GillesDuvert Mar 10, 2021
15f7b63
revert, I'll never understand anything to these scripts.
GillesDuvert Mar 10, 2021
ad56fbc
removed test_random, which is interactive.
GillesDuvert Mar 10, 2021
f2226bc
corrected small bug preventing to have INTS instead of DOUBLEs when s…
GillesDuvert Mar 13, 2021
10a86f2
raise plot panel after creation (no focus)
GillesDuvert Mar 14, 2021
6bf286f
erase working (wxwidgets), channel erase TO BE DONE.
GillesDuvert Mar 14, 2021
1affc32
correct margins for wxwidgetw plots
GillesDuvert Mar 14, 2021
ea7fa01
added warning
GillesDuvert Mar 14, 2021
bf8f333
solved a few unicode font problems, including the angstrom bug #862.
GillesDuvert Mar 14, 2021
5f3210c
try have wxwidgets installed BEFORE plplot...
GillesDuvert Mar 15, 2021
d03525a
say if x11 is present
GillesDuvert Mar 15, 2021
d2396ca
try be more, eh, precise?
GillesDuvert Mar 15, 2021
5318849
Merge branch 'master' into WidgetsVersion2
GillesDuvert Mar 17, 2021
bc15cbf
try to enable at least a compilation on OSX.
GillesDuvert Mar 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 85 additions & 61 deletions src/devicewx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@

#include "graphicsdevice.hpp"
#include "gdlwxstream.hpp"
#include <wx/settings.h>
#include <wx/gdicmn.h>
#include "initsysvar.hpp"
#include "gdlexception.hpp"

Expand Down Expand Up @@ -78,8 +76,8 @@ class DeviceWX : public GraphicsMultiDevice {
TidyWindowsList();

// set initial window size
int xleng;
int yleng;
int x_scroll_size;
int y_scroll_size;
int xoff;
int yoff;

Expand All @@ -91,34 +89,91 @@ class DeviceWX : public GraphicsMultiDevice {
xPos = max(1, xPos); //starts at 1 to avoid problems plplot!
yPos = max(1, yPos);

xleng = min(xSize, xMaxSize);
if (xPos + xleng > xMaxSize) xPos = xMaxSize - xleng - 1;
yleng = min(ySize, yMaxSize);
if (yPos + yleng > yMaxSize) yPos = yMaxSize - yleng - 1;
bool scrolled = false;
if (xSize > xMaxSize || ySize > yMaxSize) scrolled = true;

if (scrolled) {
x_scroll_size = min(xSize, xMaxSize/2);
y_scroll_size = min(ySize, yMaxSize/2);
} else {
x_scroll_size = min(xSize, xMaxSize);
y_scroll_size = min(ySize, yMaxSize);
}
if (xPos + x_scroll_size > xMaxSize) xPos = xMaxSize - x_scroll_size - 1;
if (yPos + y_scroll_size > yMaxSize) yPos = yMaxSize - y_scroll_size - 1;
// dynamic allocation needed!
PLINT Quadx[4] = {xMaxSize - xleng - 1, xMaxSize - xleng - 1, 1, 1};
PLINT Quady[4] = {1, yMaxSize - yleng - 1, 1, yMaxSize - yleng - 1};
PLINT Quadx[4] = {xMaxSize - x_scroll_size - 1, xMaxSize - x_scroll_size - 1, 1, 1};
PLINT Quady[4] = {1, yMaxSize - y_scroll_size - 1, 1, yMaxSize - y_scroll_size - 1};
if (noPosx && noPosy) { //no init given, use 4 quadrants:
xoff = Quadx[wIx % 4];
yoff = Quady[wIx % 4];
} else if (noPosx) {
xoff = Quadx[wIx % 4];
yoff = yMaxSize - yPos - yleng;
yoff = yMaxSize - yPos - y_scroll_size;
} else if (noPosy) {
xoff = xPos;
yoff = Quady[wIx % 4];
} else {
xoff = xPos;
yoff = yMaxSize - yPos - yleng;
yoff = yMaxSize - yPos - y_scroll_size;
}

//1) a frame
wxString titleWxString = wxString(title.c_str(), wxConvUTF8);
long style = (wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxRESIZE_BORDER | wxCAPTION | wxCLOSE_BOX);
gdlwxPlotFrame* plotFrame = new gdlwxPlotFrame(titleWxString, wxDefaultPosition, wxDefaultSize, style, scrolled);
//Base Frame inherits default font -- then each widget will possibly get its own font when /FONT is possible
//topFrame->SetFont(defaultFont);
// Associate a sizer immediately
wxSizer* tfSizer = new wxBoxSizer(wxVERTICAL);
plotFrame->SetSizer(tfSizer);

// 3) Sizes:
wxSize wSize = wxSize(xSize, ySize);
wxSize wScrollSize = wxSize(x_scroll_size, y_scroll_size);
gdlwxPlotPanel* plot = new gdlwxPlotPanel(plotFrame);
if (scrolled) {
plot->SetMinClientSize(wScrollSize);
plot->SetClientSize(wScrollSize);
} else {
plot->SetMinClientSize(wSize);
plot->SetSize(wSize);
}
plot->SetVirtualSize(wSize);
plot->InitDrawSize(wSize);

if (scrolled) {
plot->SetScrollbars(gdlSCROLL_RATE, gdlSCROLL_RATE, wSize.x / gdlSCROLL_RATE, wSize.y / gdlSCROLL_RATE);
plot->ShowScrollbars(wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS);
}

WidgetIDT mbarID = 0;
GDLWidgetGraphicWindowBase* base = new GDLWidgetGraphicWindowBase(mbarID, xoff, yoff, title);
GDLWidgetDraw* draw = new GDLWidgetDraw(base->WidgetID(), NULL, wIx, xleng, yleng, -1, -1, false, 0);
base->setWindow(static_cast<GDLDrawPanel*>(draw->GetWxWidget()));
base->Realize(!hide); //just avoid to map the widget.
if(hide) winList[ wIx]->UnMapWindow(); //needed: will set the "pixmap" property
// else { winList[ wIx]->UnsetFocus(); winList[wIx]->Raise();}
plot->SetCursor(wxCURSOR_CROSS);
tfSizer->Add(plot, DONOTALLOWSTRETCH, wxALL, 0);

//create stream
GDLWXStream* me = new GDLWXStream(xSize, ySize);
me->SetCurrentFont(fontname);
winList[ wIx] = me;
oList[ wIx] = oIx++;
// sets actWin and updates !D
SetActWin(wIx);
//associate stream with plot panel both ways:
me->SetGdlxwGraphicsPanel(plot, true);
plot->SetStream(me);
plot->SetPStreamIx(wIx);

plotFrame->Fit();
if (hide) {
plotFrame->Hide();
winList[ wIx]->UnMapWindowAndSetPixmapProperty(); //needed: will set the "pixmap" property
} else {
plotFrame->ShowWithoutActivating();
}
plotFrame->Realize();
// these widget specific events are always set:
plot->Connect(wxEVT_PAINT, wxPaintEventHandler(gdlwxGraphicsPanel::OnPaint));
plotFrame->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(gdlwxPlotFrame::OnUnhandledClosePlotFrame));
plotFrame->Connect(wxEVT_SIZE, wxSizeEventHandler(gdlwxPlotFrame::OnPlotSizeWithTimer));
return true;
}

Expand Down Expand Up @@ -289,22 +344,22 @@ class DeviceWX : public GraphicsMultiDevice {
*xSize = wxSystemSettings::GetMetric(wxSYS_SCREEN_X);
*ySize = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y);
}

bool GUIOpen( int wIx, int xSize, int ySize)//, int xPos, int yPos)
{
if( wIx >= winList.size() || wIx < 0) return false;

if( winList[ wIx] != NULL) winList[ wIx]->SetValid(false);
TidyWindowsList();
GDLGStream* GUIOpen( int wIx, int xSize, int ySize, void* draw)
{
if( wIx >= winList.size() || wIx < 0) return NULL;

winList[ wIx] = new GDLWXStream( xSize, ySize);
if( winList[ wIx] != NULL) winList[ wIx]->SetValid(false); TidyWindowsList();
GDLWXStream* me=new GDLWXStream( xSize, ySize);
me->SetCurrentFont(fontname);
me->SetGdlxwGraphicsPanel( static_cast<gdlwxGraphicsPanel*>(draw), false );
winList[ wIx] = me;
oList[ wIx] = oIx++;
winList[ wIx]->SetCurrentFont(fontname);
// sets actWin and updates !D
SetActWin( wIx);
return true;
} // GUIOpen
return winList[ wIx];
} // GUIOpen

bool SetCharacterSize( DLong x, DLong y) {
DStructGDL* dStruct=SysVar::D();
int tagx = dStruct->Desc()->TagIndex( "X_CH_SIZE");
Expand All @@ -326,37 +381,6 @@ bool SetCharacterSize( DLong x, DLong y) {
return true;
}

//Please find how to specialize TidyWindowsList for wx and x11 widgets when this function is called
//as GraphicsDevice::GetDevice()->TidyWindowsList(); which does not return a specialized version.
// Util then, do not uncomment the following.
// void TidyWindowsList() {
// int wLSize = winList.size();
// for (int i = 0; i < wLSize; i++) if (winList[i] != NULL && !winList[i]->GetValid()) {
// if (dynamic_cast<GDLWXStream*> (winList[i]) != NULL) {
// GDLDrawPanel* panel = NULL;
// panel = dynamic_cast<GDLDrawPanel*> (static_cast<GDLWXStream*> (winList[i])->GetGDLDrawPanel());
// //test if stream is associated to graphic window or widget_draw. If graphic, destroy directly TLB widget.
// GDLWidgetDraw *draw = panel->GetGDLWidgetDraw();
// if (draw) {
// //parent of panel may be a GDLFrame. If frame is actually made by the WOpen function, destroy everything.
// GDLWidgetBase* container = NULL;
// container = static_cast<GDLWidgetBase*> (draw->GetTopLevelBaseWidget(draw->WidgetID()));
// if (container && container->IsGraphicWindowFrame()) container->SelfDestroy();
// else delete draw;
// } else delete winList[i];
// } else delete winList[i];
// winList[i] = NULL;
// oList[i] = 0;
// }
// // set new actWin IF NOT VALID ANY MORE
// if (actWin < 0 || actWin >= wLSize || winList[actWin] == NULL || !winList[actWin]->GetValid()) {
// // set to most recently created
// std::vector< long>::iterator mEl = std::max_element(oList.begin(), oList.end());
// if (*mEl == 0) { // no window open
// SetActWin(-1); //sets oIx = 1;
// } else SetActWin(GraphicsDevice::GetDevice()->GetNonManagedWidgetActWin(false)); //get first non-managed window. false is needed.
// }
// }
};
#endif

Expand Down
6 changes: 2 additions & 4 deletions src/devicex.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ class DeviceX : public GraphicsMultiDevice {

if( wIx >= winList.size() || wIx < 0) return false;

if( winList[ wIx] != NULL) winList[ wIx]->SetValid(false);

TidyWindowsList();
if( winList[ wIx] != NULL) winList[ wIx]->SetValid(false); TidyWindowsList();

// set initial window size
PLFLT xp; PLFLT yp;
Expand Down Expand Up @@ -162,7 +160,7 @@ class DeviceX : public GraphicsMultiDevice {
//otherwise our direct X11 color commands work well and are faster than plplot's.
if (!this->isStatic()){
PLINT r[ctSize], g[ctSize], b[ctSize];
GDLCT* myCT=GraphicsDevice::GetGUIDevice( )->GetCT();
GDLCT* myCT=GraphicsDevice::GetDevice( )->GetCT();
myCT->Get( r, g, b);
winList[ wIx]->scmap0( r, g, b, ctSize); //set colormap 0 to 256 values
}
Expand Down
15 changes: 2 additions & 13 deletions src/dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ namespace lib {
return new DIntGDL(1);
}

BaseGDL* dialog_pickfile_wxwidgets(EnvT* e)
{
if (!GDLWidget::wxIsStarted()){
if( ! wxInitialize( ) ) e->Throw("Unable to initialize wxWidgets");
GDLWidget::SetWxStarted();
}
BaseGDL* dialog_pickfile_wxwidgets(EnvT* e) {
/*
results = DIALOG_PICKFILE_WXWIDGETS(DEFAULT_EXTENSION=default_extension, $
DIRECTORY=directory, DIALOG_PARENT=dialog_parent, $
Expand Down Expand Up @@ -351,13 +346,7 @@ namespace lib {
return res;
}

BaseGDL* dialog_message_wxwidgets(EnvT* e)
{

if (!GDLWidget::wxIsStarted()){
if( ! wxInitialize( ) ) e->Throw("Unable to initialize wxWidgets");
GDLWidget::SetWxStarted();
}
BaseGDL* dialog_message_wxwidgets(EnvT* e) {

#ifdef HAVE_LOCALE_H
setlocale(LC_ALL, "C");
Expand Down
27 changes: 14 additions & 13 deletions src/dimension.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,20 @@ class dimension
rank = 2;
stride[0] = 0; // not set
}
// dimension(const SizeT d0, const SizeT d1, const SizeT d2)
// {
// assert( d0 != 0);
// dim[0] = d0;
// assert( d1 != 0);
// dim[1] = d1;
// assert( d2 != 0);
// dim[2] = d2;
// rank = 3;
// // stride[0] = 1; // set
// // stride[1] = d0; // set
// // stride[1] = d0 * d1; // set
// }
dimension(const SizeT d0, const SizeT d1, const SizeT d2)
{
assert( d0 != 0);
dim[0] = d0;
assert( d1 != 0);
dim[1] = d1;
assert( d2 != 0);
dim[2] = d2;
rank = 3;
stride[0] = 0; // not set
// stride[0] = 1; // set
// stride[1] = d0; // set
// stride[1] = d0 * d1; // set
}

// operators
// assignment
Expand Down
66 changes: 35 additions & 31 deletions src/gdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,48 +217,51 @@ int main(int argc, char *argv[])
bool syntaxOptionSet=false;

//start with a default value:
useWxWidgetsForGraphics = false;
#ifdef HAVE_LIBWXWIDGETS
useWxWidgetsForGraphics = true;
#else
useWxWidgetsForGraphics = true;
#endif
bool force_no_wxgraphics = false;
useDSFMTAcceleration = true;
#ifdef _WIN32
lib::posixpaths = false;
#endif
for( SizeT a=1; a< argc; ++a)
{
if( string( argv[a]) == "--help" | string( argv[a]) == "-h")
{
cerr << "Usage: gdl [ OPTIONS ] [ batch_file ... ]" << endl;
cerr << "Start the GDL interpreter (incremental compiler)" << endl;
cerr << endl;
cerr << "GDL options:" << endl;
cerr << " --help (-h) display this message" << endl;
cerr << " --version (-V, -v) show version information" << endl;
cerr << " --fakerelease X.y pretend that !VERSION.RELEASE is X.y" << endl;
cerr << " --fussy implies that procedures adhere with modern IDL, where \"()\" are for functions and \"[]\" are for arrays." <<endl;
if( string( argv[a]) == "--help" | string( argv[a]) == "-h") {
cerr << "Usage: gdl [ OPTIONS ] [ batch_file ... ]" << endl;
cerr << "Start the GDL interpreter (incremental compiler)" << endl;
cerr << endl;
cerr << "GDL options:" << endl;
cerr << " --help (-h) display this message" << endl;
cerr << " --version (-V, -v) show version information" << endl;
cerr << " --fakerelease X.y pretend that !VERSION.RELEASE is X.y" << endl;
cerr << " --fussy implies that procedures adhere with modern IDL, where \"()\" are for functions and \"[]\" are for arrays." << endl;
cerr << " This speeds up (sometimes terribly) compilation but choke on every use of \"()\" with arrays." << endl;
cerr << " Conversion of procedures to modern IDL can be done with D. Landsman's idlv4_to_v5 procedure." << endl;
cerr << " Use enviromnment variable \"GDL_IS_FUSSY\" to set up permanently this feature." << endl;
cerr << " --sloppy Sets the traditional (default) compiling option where \"()\" can be used both with functions and arrays." << endl;
cerr << " --sloppy Sets the traditional (default) compiling option where \"()\" can be used both with functions and arrays." << endl;
cerr << " Needed to counteract temporarily the effect of the enviromnment variable \"GDL_IS_FUSSY\"." << endl;
cerr << " --use-wx Tells GDL to use WxWidgets graphics instead of X11 or Windows. (nicer plots)." << endl;
cerr << " Also enabled by setting the environment variable GDL_USE_WX to a non-null value." << endl;
cerr << " --no-use-wx Tells GDL no to use WxWidgets graphics, even if env. var. \"GDL_USE_WX\" is set." << endl;
cerr << " --use-wx (default if GDL is linked with wxWidgets): Tells GDL to use WxWidgets graphics instead of X11 or Windows. (nicer plots)." << endl;
cerr << " --no-use-wx Tells GDL not to use WxWidgets graphics." << endl;
cerr << " Also enabled by setting the environment variable GDL_DISABLE_WX_PLOTS to a non-null value." << endl;
cerr << " --no-dSFMT Tells GDL not to use double precision SIMD oriented Fast Mersenne Twister(dSFMT) for random doubles." << endl;
cerr << " Also disable by setting the environment variable GDL_NO_DSFMT to a non-null value." << endl;
cerr << endl;
cerr << "IDL-compatible options:" << endl;
cerr << " -arg value tells COMMAND_LINE_ARGS() to report" << endl;
cerr << " the following argument (may be specified more than once)" << endl;
cerr << " -args ... tells COMMAND_LINE_ARGS() to report " << endl;
cerr << " all following arguments" << endl;
cerr << " -e value execute given statement and exit (last occurrence taken into account only," << endl;
cerr << " executed after startup file, may not be specified together with batch files)" << endl;
cerr << " -pref=/path/to/params_file loads the specified preference file" << endl;
cerr << " -quiet (--quiet, -q) suppress welcome messages" << endl;
cerr << endl;
cerr << "Homepage: http://gnudatalanguage.sf.net" << endl;
return 0;
}
cerr << "IDL-compatible options:" << endl;
cerr << " -arg value tells COMMAND_LINE_ARGS() to report" << endl;
cerr << " the following argument (may be specified more than once)" << endl;
cerr << " -args ... tells COMMAND_LINE_ARGS() to report " << endl;
cerr << " all following arguments" << endl;
cerr << " -e value execute given statement and exit (last occurrence taken into account only," << endl;
cerr << " executed after startup file, may not be specified together with batch files)" << endl;
cerr << " -pref=/path/to/params_file loads the specified preference file" << endl;
cerr << " -quiet (--quiet, -q) suppress welcome messages" << endl;
cerr << endl;
cerr << "Homepage: http://gnudatalanguage.sf.net" << endl;
return 0;
}
else if (string(argv[a])=="--version" | string(argv[a])=="-v" | string(argv[a])=="-V")
{
cerr << "GDL - GNU Data Language, Version " << VERSION << endl;
Expand Down Expand Up @@ -347,7 +350,8 @@ int main(int argc, char *argv[])
#endif
else if (string(argv[a]) == "--no-use-wx")
{
force_no_wxgraphics = true;
useWxWidgetsForGraphics = false;
force_no_wxgraphics = true;
}
else if (string(argv[a]) == "--fakerelease")
{
Expand Down Expand Up @@ -376,8 +380,8 @@ int main(int argc, char *argv[])
}

//before InitGDL() as InitGDL() starts graphic!
std::string useWX=GetEnvString("GDL_USE_WX");
if ( useWX.length() > 0) useWxWidgetsForGraphics=true; //not necessary "YES".
std::string disableWXPlots=GetEnvString("GDL_DISABLE_WX_PLOTS");
if ( disableWXPlots.length() > 0) useWxWidgetsForGraphics=false; //not necessary "YES".
if (force_no_wxgraphics) useWxWidgetsForGraphics=false; //this has the last answer, whatever the setup.


Expand Down
2 changes: 1 addition & 1 deletion src/gdleventhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int GDLEventHandler()
GraphicsDevice::HandleEvents();

#ifdef HAVE_LIBWXWIDGETS
GDLWidget::HandleEvents();
GDLWidget::HandleWidgetEvents();
#endif
const long OS_X_DELAY_NS = 20000000; // 20ms
//ONLY APPLE? or WIN? Why? (GD)
Expand Down
Loading