 | | From: | Vervain Speller | | Subject: | Console Mode wxWidgets | | Date: | Sun, 23 Jan 2005 09:29:00 +0000 |
|
|
 | Is there a way I can write a wxWidgets application that (say given a --nogui command line option) will run as a console program?
I have tried to write one that doesn't open a window or anything but it still tries to attatch to X. Exiting with a Gtk-WARNING **: cannot open display:
This app only has to run under linux conditions so there are little constraints there.
Anyway - if it can be done inside the wxWidgets model without wrapping around it I would appreciate a tip.
-- Remove Tinned Sea Product from address to mail.
|
|
 | | From: | Michalis Kabrianis | | Subject: | Re: Console Mode wxWidgets | | Date: | Sun, 23 Jan 2005 11:52:10 +0200 |
|
|
 | Vervain Speller wrote: > Is there a way I can write a wxWidgets application that (say given a --nogui > command line option) will run as a console program? > > I have tried to write one that doesn't open a window or anything but it > still tries to attatch to X. Exiting with a Gtk-WARNING **: cannot open > display: > > This app only has to run under linux conditions so there are little > constraints there. > > Anyway - if it can be done inside the wxWidgets model without wrapping > around it I would appreciate a tip. >
Sure, you should use wxBase and not wxGTK. Not all functionality is there of course, but most of it must be available. Depending on you situation, you are not expecting to meet and shortcomings (most of them must be put by your application anyway).
Unless you mean a "dialog" interface...
Michalis
|
|
 | | From: | Vervain Speller | | Subject: | Re: Console Mode wxWidgets | | Date: | Sun, 23 Jan 2005 09:51:19 +0000 |
|
|
 | Michalis Kabrianis wrote:
> Vervain Speller wrote: >> Is there a way I can write a wxWidges application that (say given a >> --nogui command line option) will run as a console program? >> >> Anyway - if it can be done inside the wxWidgets model without wrapping >> around it I would appreciate a tip. >> > > Sure, you should use wxBase and not wxGTK.
I should have mentioned... any way with wxGTK? I don't think that wxBase is an option.
> Not all functionality is there of course, but most of it must be > available. Depending on you situation, you are not expecting to meet and > shortcomings (most of them must be put by your application anyway). > > Unless you mean a "dialog" interface...
I have a computer simulation that takes advantage of wxGLCanvas to display some activity in real time, but I need to run in console mode on remote machines to collect larger sets of data by writing to files.
The technique that people before me have used is to have two sets of source and compile up separate gui/console applications.
-- Remove Tinned Sea Product from address to mail.
|
|
 | | From: | Otto Wyss | | Subject: | Re: Console Mode wxWidgets | | Date: | Sun, 23 Jan 2005 09:49:55 +0000 (UTC) |
|
|
 | > Anyway - if it can be done inside the wxWidgets model without wrapping > around it I would appreciate a tip.
You can, see "http://cvs.sourceforge.net/viewcvs.py/wyodesktop/wyoDesktop/checkdfb/sr c/app.cpp?view=markup" and look for wxAppConsole. You can get the sources from here "http://wyodesktop.sourceforge.net/index.php?page=checkapp.html".
O. Wyss
-- Development of frame buffer drivers: http://linux-fbdev.sf.net Sample code snippets for wxWidgets: http://wxcode.sf.net How to build well-designed applications: http://wxguide.sf.net Desktop with a consistent look and feel: http://wyodesktop.sf.net
--------------------------------------------------------------------- To unsubscribe, e-mail: wx-users-unsubscribe@lists.wxwidgets.org For additional commands, e-mail: wx-users-help@lists.wxwidgets.org
|
|