Skip to content
Snippets Groups Projects
Commit 82bdb248 authored by Maxime Graulich's avatar Maxime Graulich
Browse files

Add the tools window for ONELAB2

parent 309e3ec0
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,7 @@ typedef unsigned long intptr_t; ...@@ -31,6 +31,7 @@ typedef unsigned long intptr_t;
#include "contextWindow.h" #include "contextWindow.h"
#ifdef HAVE_ONELAB2 #ifdef HAVE_ONELAB2
#include "onelab2Group.h" #include "onelab2Group.h"
#include "OnelabWindow.h"
#else #else
#include "onelabGroup.h" #include "onelabGroup.h"
#endif #endif
...@@ -78,8 +79,7 @@ static int globalShortcut(int event) ...@@ -78,8 +79,7 @@ static int globalShortcut(int event)
int FlGui::lock() int FlGui::lock()
{ {
_in_main_thread++; _in_main_thread++;
Fl::lock(); return Fl::lock();
return _in_main_thread;
} }
void FlGui::unlock() void FlGui::unlock()
...@@ -429,6 +429,9 @@ FlGui::FlGui(int argc, char **argv) ...@@ -429,6 +429,9 @@ FlGui::FlGui(int argc, char **argv)
// create all other windows // create all other windows
options = new optionWindow(CTX::instance()->deltaFontSize); options = new optionWindow(CTX::instance()->deltaFontSize);
#if defined(HAVE_ONELAB2)
onelab2 = new onelabWindow();
#endif
fields = new fieldWindow(CTX::instance()->deltaFontSize); fields = new fieldWindow(CTX::instance()->deltaFontSize);
plugins = new pluginWindow(CTX::instance()->deltaFontSize); plugins = new pluginWindow(CTX::instance()->deltaFontSize);
stats = new statisticsWindow(CTX::instance()->deltaFontSize); stats = new statisticsWindow(CTX::instance()->deltaFontSize);
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
class graphicWindow; class graphicWindow;
class openglWindow; class openglWindow;
class optionWindow; class optionWindow;
class onelabWindow;
class fieldWindow; class fieldWindow;
class pluginWindow; class pluginWindow;
class statisticsWindow; class statisticsWindow;
...@@ -59,6 +60,7 @@ class FlGui{ ...@@ -59,6 +60,7 @@ class FlGui{
public: public:
std::vector<graphicWindow*> graph; std::vector<graphicWindow*> graph;
optionWindow *options; optionWindow *options;
onelabWindow *onelab2;
fieldWindow *fields; fieldWindow *fields;
pluginWindow *plugins; pluginWindow *plugins;
statisticsWindow *stats; statisticsWindow *stats;
......
...@@ -72,13 +72,19 @@ void onelab_cb(Fl_Widget *w, void *data) ...@@ -72,13 +72,19 @@ void onelab_cb(Fl_Widget *w, void *data)
if(!data) return; if(!data) return;
std::string action((const char*)data); std::string action((const char*)data);
Msg::Info("Try to %s", action.c_str());
if(action == "refresh"){ if(action == "refresh"){
updateGraphs(); updateGraphs();
return; return;
} }
if(action == "stop"){ // TODO send stop if server is not local
//FlGui::instance()->onelab->stop(true);
FlGui::instance()->onelab->setButtonMode("", ""); // wait for the client to stop
OnelabServer::instance()->stopClients();
return;
}
if(FlGui::instance()->onelab->isBusy()){ if(FlGui::instance()->onelab->isBusy()){
Msg::Info("I'm busy! Ask me that later..."); Msg::Info("I'm busy! Ask me that later...");
return; return;
...@@ -86,7 +92,10 @@ void onelab_cb(Fl_Widget *w, void *data) ...@@ -86,7 +92,10 @@ void onelab_cb(Fl_Widget *w, void *data)
if(action == "reset"){ if(action == "reset"){
OnelabDatabase::instance()->clear(); // TODO keep persitant OnelabDatabase::instance()->clear(); // TODO keep persitant
return; OnelabDatabase::instance()->run(action, "Gmsh");
FlGui::instance()->onelab->clearTree(true);
action = "check";
} }
Msg::ResetErrorCounter(); Msg::ResetErrorCounter();
...@@ -95,8 +104,6 @@ void onelab_cb(Fl_Widget *w, void *data) ...@@ -95,8 +104,6 @@ void onelab_cb(Fl_Widget *w, void *data)
OnelabDatabase::instance()->run(action); OnelabDatabase::instance()->run(action);
drawContext::global()->draw(); drawContext::global()->draw();
FlGui::instance()->onelab->setButtonMode("check", "compute");
} }
void onelab_option_cb(Fl_Widget *w, void *data) void onelab_option_cb(Fl_Widget *w, void *data)
...@@ -122,7 +129,7 @@ void onelab_option_cb(Fl_Widget *w, void *data) ...@@ -122,7 +129,7 @@ void onelab_option_cb(Fl_Widget *w, void *data)
CTX::instance()->solver.autoShowLastStep = val; CTX::instance()->solver.autoShowLastStep = val;
else if(what == "invisible"){ else if(what == "invisible"){
CTX::instance()->solver.showInvisibleParameters = val; CTX::instance()->solver.showInvisibleParameters = val;
FlGui::instance()->onelab->rebuildTree(true); //FlGui::instance()->onelab->rebuildTree(true);
} }
} }
...@@ -135,6 +142,7 @@ void solver_cb(Fl_Widget *w, void *data) ...@@ -135,6 +142,7 @@ void solver_cb(Fl_Widget *w, void *data)
int num = (intptr_t)data; int num = (intptr_t)data;
if(num >= 0){ if(num >= 0){
onelab_cb(0, (void*)"reset");
std::string name = opt_solver_name(num, GMSH_GET, ""); std::string name = opt_solver_name(num, GMSH_GET, "");
if(name.empty()) return;// TODO if(name.empty()) return;// TODO
std::string exe = opt_solver_executable(num, GMSH_GET, ""); std::string exe = opt_solver_executable(num, GMSH_GET, "");
...@@ -190,7 +198,7 @@ onelabGroup::onelabGroup(int x, int y, int w, int h, const char *l) ...@@ -190,7 +198,7 @@ onelabGroup::onelabGroup(int x, int y, int w, int h, const char *l)
int dw = Fl::box_dw(box()); int dw = Fl::box_dw(box());
int dh = Fl::box_dh(box()); int dh = Fl::box_dh(box());
_tree = new Fl_Tree(x + dx, y + dy + 6*BH, w - dw, h - dh - BH - 2 * WB - 6*BH); _tree = new Fl_Tree(x + dx, y + dy, w - dw, h - dh - BH - 2 * WB - 6*BH);
_tree->color(col); _tree->color(col);
// TODO _tree->callback(onelab_tree_cb); // TODO _tree->callback(onelab_tree_cb);
_tree->connectorstyle(FL_TREE_CONNECTOR_SOLID); _tree->connectorstyle(FL_TREE_CONNECTOR_SOLID);
...@@ -200,20 +208,6 @@ onelabGroup::onelabGroup(int x, int y, int w, int h, const char *l) ...@@ -200,20 +208,6 @@ onelabGroup::onelabGroup(int x, int y, int w, int h, const char *l)
_tree->add("0Post-processing/"); _tree->add("0Post-processing/");
_tree->end(); _tree->end();
Fl_Check_Button *useServer = new Fl_Check_Button(x+WB, y, w-2*WB, BH, "Use a remote server");
useServer->callback(useserver_cb, this);
new Fl_Box(x+WB , y+BH, w-2*WB, BH, "Server IP address:");
server_ip = new Fl_Input(x+WB, y+2*BH, w-2*WB, BH, "");
server_ip->value("127.0.0.1");
server_ip->readonly(true);
new Fl_Box(x+WB , y+3*BH, w-2*WB, BH, "Server port:");
server_port = new Fl_Input(x+WB, y+4*BH, w-2*WB, BH, "");
server_port->value("1148");
server_port->readonly(true);
Fl_Button *connect_btn = new Fl_Button(x+WB, y+5*BH, w-2*WB, BH, "Connect");
connect_btn->callback(connect_cb, this);
_computeWidths(); _computeWidths();
_widgetLabelRatio = 0.48; _widgetLabelRatio = 0.48;
...@@ -296,6 +290,7 @@ void onelabGroup::clearTree(bool deleteWidgets) ...@@ -296,6 +290,7 @@ void onelabGroup::clearTree(bool deleteWidgets)
for(unsigned int i = 0; i < delStrings.size(); i++) for(unsigned int i = 0; i < delStrings.size(); i++)
free(delStrings[i]); free(delStrings[i]);
} }
_tree->redraw();
} }
void onelabGroup::openTreeItem(const std::string &name) void onelabGroup::openTreeItem(const std::string &name)
...@@ -430,7 +425,7 @@ void onelabGroup::rebuildSolverList() ...@@ -430,7 +425,7 @@ void onelabGroup::rebuildSolverList()
} }
setButtonVisibility(); setButtonVisibility();
rebuildTree(true); //refreshTree(true);
} }
void onelabGroup::addSolver(const std::string &name, const std::string &executable, void onelabGroup::addSolver(const std::string &name, const std::string &executable,
...@@ -480,6 +475,7 @@ void onelabGroup::addParameter(onelab::parameter &p) ...@@ -480,6 +475,7 @@ void onelabGroup::addParameter(onelab::parameter &p)
Fl_Color c; Fl_Color c;
if(getFlColor(p.getAttribute("Highlight"), c)) highlight = true; if(getFlColor(p.getAttribute("Highlight"), c)) highlight = true;
Fl_Tree_Item *n = _tree->add(p.getName().c_str()); Fl_Tree_Item *n = _tree->add(p.getName().c_str());
if(!n) return;
n->labelsize(FL_NORMAL_SIZE + 4); n->labelsize(FL_NORMAL_SIZE + 4);
_tree->begin(); _tree->begin();
int ww = _baseWidth - (n->depth() + 1) * _indent; int ww = _baseWidth - (n->depth() + 1) * _indent;
...@@ -533,20 +529,22 @@ static void setGmshOption(T &n) ...@@ -533,20 +529,22 @@ static void setGmshOption(T &n)
{ {
std::string opt = n.getAttribute("GmshOption"); std::string opt = n.getAttribute("GmshOption");
if(opt.empty()) return; if(opt.empty()) return;
/*if(opt == "ResetDatabase"){ // special option to reset the onelab db if(opt == "ResetDatabase"){ // special option to reset the onelab db
resetDb(false); OnelabDatabase::instance()->clear();
FlGui::instance()->rebuildTree(false); //TODO OnelabDatabase::instance()->reset(false);
//FlGui::instance()->rebuildTree(false);
return; return;
} }
if(opt == "Reset"){ // reset db + models except current one if(opt == "Reset"){ // reset db + models except current one
resetDb(false); OnelabDatabase::instance()->clear();
for(int i = PView::list.size() - 1; i >= 0; i--) //TODO OnelabDatabase::instance()->reset(false);
delete PView::list[i]; //for(int i = PView::list.size() - 1; i >= 0; i--)
for(int i = GModel::list.size() - 1; i >= 0; i--) // delete PView::list[i];
if(GModel::list[i] != GModel::current()) delete GModel::list[i]; //for(int i = GModel::list.size() - 1; i >= 0; i--)
FlGui::instance()->rebuildTree(false); // if(GModel::list[i] != GModel::current()) delete GModel::list[i];
//FlGui::instance()->rebuildTree(false);
return; return;
}*/ }
std::string::size_type dot = opt.find('.'); std::string::size_type dot = opt.find('.');
if(dot == std::string::npos) return; if(dot == std::string::npos) return;
GmshSetOption(opt.substr(0, dot), opt.substr(dot + 1), n.getValue()); GmshSetOption(opt.substr(0, dot), opt.substr(dot + 1), n.getValue());
...@@ -1001,10 +999,13 @@ void onelabGroup::_addSolverMenu(int num) ...@@ -1001,10 +999,13 @@ void onelabGroup::_addSolverMenu(int num)
void onelabGroup::_addViewMenu(int num) void onelabGroup::_addViewMenu(int num)
{ {
// FIXME SEGFAULT in n->depth() with pend.py
std::ostringstream path; std::ostringstream path;
path << "0Post-processing/View" << num; path << "0Post-processing/View" << num;
Fl_Tree_Item *n = _tree->add(path.str().c_str()); Fl_Tree_Item *n;
if((n = _tree->find_item(path.str().c_str())) != NULL) { // check if the item already exists
_tree->remove(n);
}
n = _tree->add(path.str().c_str());
int ww = _baseWidth - (n->depth() + 1) * _indent; int ww = _baseWidth - (n->depth() + 1) * _indent;
int hh = n->labelsize() + 4; int hh = n->labelsize() + 4;
_tree->begin(); _tree->begin();
...@@ -1028,3 +1029,17 @@ viewButton *onelabGroup::getViewButton(int num) ...@@ -1028,3 +1029,17 @@ viewButton *onelabGroup::getViewButton(int num)
} }
return 0; return 0;
} }
void onelabGroup::openCloseViewButton(int num)
{
//std::string path = getViewPathName(num);
//if(path.empty()) return;
//Fl_Tree_Item *n = _tree->find_item(path.c_str());
//if(n){
// if(PView::list[num]->getOptions()->closed)
// n->parent()->close();
// else
// n->parent()->open();
// _tree->redraw();
//}
}
...@@ -48,7 +48,7 @@ public: ...@@ -48,7 +48,7 @@ public:
void updateGearMenu(); void updateGearMenu();
void rebuildSolverList(); void rebuildSolverList();
void addLastPostProcessing(); void addLastPostProcessing();
void rebuildTree(bool deleteWidgets){} // useless in ONELAB2 ? void rebuildTree(bool deleteWidgets) {}
void enableTreeWidgetResize(bool value){ _enableTreeWidgetResize = value; } void enableTreeWidgetResize(bool value){ _enableTreeWidgetResize = value; }
void clearTree(bool deleteWidgets=true); void clearTree(bool deleteWidgets=true);
void openTreeItem(const std::string &name); void openTreeItem(const std::string &name);
...@@ -84,12 +84,12 @@ public: ...@@ -84,12 +84,12 @@ public:
return _manuallyClosed.find(path) != _manuallyClosed.end(); return _manuallyClosed.find(path) != _manuallyClosed.end();
} }
viewButton *getViewButton(int num); viewButton *getViewButton(int num);
void openCloseViewButton(int num);
}; };
void connect_cb(Fl_Widget *w, void *arg); void connect_cb(Fl_Widget *w, void *arg);
void onelab_cb(Fl_Widget *w, void *data); void onelab_cb(Fl_Widget *w, void *data);
inline void onelab_cb(void *data) {onelab_cb(0, data);} inline void onelab_cb(void *data) {onelab_cb(0, data);}
void solver_cb(Fl_Widget *w, void *data); void solver_cb(Fl_Widget *w, void *data);
inline void solver_batch_cb(void *data){} // TODO ?
#endif #endif
#include <FL/Fl.H>
#include <FL/Fl_Tabs.H>
#include <FL/Fl_Check_Button.H>
#include <FL/Fl_Button.H>
#include <FL/Fl_Input_Choice.H>
#include <FL/Fl_Choice.H>
#include <FL/Fl_Browser.H>
#include <FL/Fl_Scroll.H>
#include <iostream>
#include "OnelabWindow.h"
#include "OnelabDatabase.h"
#include "OnelabServer.h"
#include "FlGui.h"
#include "paletteWindow.h"
#include "Context.h"
#include "Options.h"
void onelab_listen_tcp_cb(Fl_Widget *w, void *data);
void onelab_listen_unix_cb(Fl_Widget *w, void *data);
#ifdef HAVE_UDT
void onelab_listen_udt_cb(Fl_Widget *w, void *data);
#endif
void onelab_connect_remote_server_cb(Fl_Widget *w, void *data);
onelabWindow::onelabWindow(int deltaFontSize)
{
FL_NORMAL_SIZE -= deltaFontSize;
int width = 34 * FL_NORMAL_SIZE + WB;
int height = 12 * BH + 4 * WB;
win = new paletteWindow(width, height, CTX::instance()->nonModalWindows ? true : false);
win->box(GMSH_WINDOW_BOX);
win->label("ONELAB2");
Fl_Tabs *o = new Fl_Tabs(WB, WB, width - 2 * WB, height - 2 * WB);
{
Fl_Group *o = new Fl_Group(
WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Network (server)");
_listenOnUNIX = new Fl_Check_Button(2*WB, 2*WB + 1*BH, width-2*WB, BH, "Listen on UNIX socket");
_sockUNIX = new Fl_Input(2*WB, 2*WB + 2*BH, width/2-2*WB, BH, "UNIX base socket name");
_listenOnUNIX->callback(onelab_listen_unix_cb, _sockUNIX);
_sockUNIX->align(FL_ALIGN_RIGHT);
_listenOnTCP = new Fl_Check_Button(2*WB, 2*WB + 3*BH, width-2*WB, BH, "Listen on TCP socket");
_sockTCP = new Fl_Input(2*WB, 2*WB + 4*BH, width/2-2*WB, BH, "TCP port (0 to let the system choose)");
_listenOnTCP->callback(onelab_listen_tcp_cb, _sockTCP);
_sockTCP->align(FL_ALIGN_RIGHT);
#ifdef HAVE_UDT
_listenOnUDT = new Fl_Check_Button(2*WB, 2*WB + 5*BH, width-2*WB, BH, "Listen on UDT (UDP) socket");
_sockUDT = new Fl_Input(2*WB, 2*WB + 6*BH, width/2-2*WB, BH, "UDP port (0 to let the system choose)");
_listenOnUDT->callback(onelab_listen_udt_cb, _sockUDT);
_sockUDT->align(FL_ALIGN_RIGHT);
#else
_listenOnUDT = new Fl_Check_Button(2*WB, 2*WB + 5*BH, width-2*WB, BH, "Listen on UDT (UDP) socket");
_sockUDT = new Fl_Input(2*WB, 2*WB + 6*BH, width/2-2*WB, BH, "UDP port (0 to let the system choose)");
_sockUDT->align(FL_ALIGN_RIGHT);
#endif
refreshServers();
o->end();
}
{
Fl_Group *o = new Fl_Group(
0, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Clients (server)");
_solvers = new Fl_Choice(2*WB, 2*WB + 1*BH, width/2-2*WB, BH, "Solver");
_solvers->align(FL_ALIGN_RIGHT);
rebuildSolverList();
_clients = new Fl_Browser(2*WB, 2*WB + 3*BH, width/2-2*WB, 5*BH, "Connected clients");
_clients->align(FL_ALIGN_RIGHT);
o->end();
}
{
Fl_Group *o = new Fl_Group(
WB, WB + BH, width - 2 * WB, height - 2 * WB - BH, "Network (client)");
_remoteServer = new Fl_Input(2*WB, 2*WB + 1*BH, width/2-2*WB, BH, "Server address (IPv4:port)");
_remoteServer->align(FL_ALIGN_RIGHT);
_connectRemoteServer = new Fl_Button(2*WB, 3*WB + 2*BH, width/2-2*WB, BH, "Connect");
_connectRemoteServer->callback(onelab_connect_remote_server_cb, _remoteServer);
}
}
void onelabWindow::refresh(){
refreshServers();
rebuildSolverList();
refreshRemoteServer();
}
void onelabWindow::refreshServers()
{
if(OnelabDatabase::instance()->isNetworkClient()) {
_listenOnUNIX->deactivate();
_listenOnTCP->deactivate();
_listenOnUDT->deactivate();
_sockUNIX->deactivate();
_sockUDT->deactivate();
_sockTCP->deactivate();
return;
}
_sockUNIX->value(CTX::instance()->onelab.unixSock.c_str());
_sockTCP->value(CTX::instance()->onelab.tcpSock.c_str());
#ifdef HAVE_UDT
_sockUDT->value(CTX::instance()->onelab.udtSock.c_str());
#else
_sockUDT->value("Not compiled with UDT library");
#endif
if(CTX::instance()->onelab.unixConnected) {
_listenOnUNIX->value(1);
_sockUNIX->deactivate();
}
else {
_listenOnUNIX->value(0);
_sockUNIX->activate();
}
if(CTX::instance()->onelab.tcpConnected) {
_listenOnTCP->value(1);
_sockTCP->deactivate();
}
else {
_listenOnTCP->value(0);
_sockTCP->activate();
}
if(CTX::instance()->onelab.udtConnected) {
_listenOnUDT->value(1);
_sockUDT->deactivate();
}
else {
_listenOnUDT->value(0);
_sockUDT->activate();
}
}
void onelabWindow::rebuildSolverList()
{
_solvers->clear();
for(int i = 0; i < NUM_SOLVERS; i++){
if(opt_solver_name(i, GMSH_GET, "").size())
_solvers->add(opt_solver_name(i, GMSH_GET, "").c_str());
}
if(CTX::instance()->solverToRun >= 0) _solvers->value(CTX::instance()->solverToRun);
}
void onelabWindow::refreshRemoteServer()
{
if(OnelabDatabase::instance()->isNetworkClient()) {
_remoteServer->value();
//TODO size_t colon = sockname.find(':');
//if(colon != std::string::npos) {
// address = ip4_inet_pton(sockname.substr(0,colon).c_str());
// port = atoi(sockname.substr(colon+1).c_str());
//}
//GmshNetworkClient *c = OnelabDatabase::instance()->useAsNetworkClient(address, port, name);
//if(c == NULL) {
// Error("Unable to connect ONELAB server (%s)", sockname.c_str());
// Exit(1);
//}
}
}
void onelab_listen_tcp_cb(Fl_Widget *w, void *data)
{
Fl_Check_Button *checkbutton = (Fl_Check_Button *)w;
Fl_Input *sockTCP = (Fl_Input *)data;
if(checkbutton->value() == 1) {
sockTCP->deactivate();
CTX::instance()->onelab.tcpSock = sockTCP->value();
std::size_t colon = CTX::instance()->onelab.tcpSock.find(":");
OnelabServer::instance()->listenOnTcp(
ip4_inet_pton(CTX::instance()->onelab.tcpSock.substr(0, colon).c_str()),
atoi(CTX::instance()->onelab.tcpSock.substr(colon+1, CTX::instance()->onelab.tcpSock.size()-colon-1).c_str()));
}
else {
sockTCP->activate();
OnelabServer::instance()->stopTcp();
}
}
void onelab_listen_unix_cb(Fl_Widget *w, void *data)
{
Fl_Check_Button *checkbutton = (Fl_Check_Button *)w;
Fl_Input *sockUNIX = (Fl_Input *)data;
if(checkbutton->value() == 1) {
sockUNIX->deactivate();
CTX::instance()->onelab.unixSock = sockUNIX->value();
std::size_t colon = CTX::instance()->onelab.unixSock.find(":");
std::ostringstream tmp;
tmp << CTX::instance()->homeDir << CTX::instance()->onelab.unixSock;
OnelabServer::instance()->listenOnUnix(tmp.str().c_str());
}
else {
sockUNIX->activate();
OnelabServer::instance()->stopUnix();
}
}
#ifdef HAVE_UDT
void onelab_listen_udt_cb(Fl_Widget *w, void *data)
{
Fl_Check_Button *checkbutton = (Fl_Check_Button *)w;
Fl_Input *sockUDT = (Fl_Input *)data;
if(checkbutton->value() == 1) {
sockUDT->deactivate();
CTX::instance()->onelab.udtSock = sockUDT->value();
std::size_t colon = CTX::instance()->onelab.udtSock.find(":");
OnelabServer::instance()->listenOnTcp(
ip4_inet_pton(CTX::instance()->onelab.udtSock.substr(0, colon).c_str()),
atoi(CTX::instance()->onelab.udtSock.substr(colon+1, CTX::instance()->onelab.udtSock.size()-colon-1).c_str()));
}
else {
sockUDT->activate();
OnelabServer::instance()->stopUdt();
}
}
#endif
void onelab2_cb(Fl_Widget *w, void *data)
{
FlGui::instance()->onelab2->refresh();
FlGui::instance()->onelab2->win->show();
}
void onelab_connect_remote_server_cb(Fl_Widget *w, void *data)
{
Fl_Input *serverAddr = (Fl_Input *)data;
std::string address = serverAddr->value();
std::size_t colon = address.find(":");
GmshNetworkClient *c = OnelabDatabase::instance()->useAsNetworkClient(
ip4_inet_pton(address.substr(0, colon).c_str()),
atoi(address.substr(colon+1, address.size()-colon-1).c_str()),
"GUI");
if(c == NULL) {
Msg::Error("Unable to connect ONELAB server (%s)", address.c_str());
Msg::Exit(1);
}
else if(FlGui::available()) // FIXME
c->setCallback(FlGui::instance()->onelab);
}
#ifndef _ONELAB_WINDOW_H_
#define _ONELAB_WINDOW_H_
class Fl_Window;
class Fl_Check_Button;
class Fl_Input;
class Fl_Choice;
class Fl_Browser;
class Fl_Button;
class onelabWindow{
private:
Fl_Check_Button *_listenOnUNIX, *_listenOnTCP, *_listenOnUDT;
Fl_Input *_sockUNIX, *_sockTCP, *_sockUDT;
Fl_Choice *_solvers;
Fl_Browser *_clients;
Fl_Check_Button *_useRemoteServer;
Fl_Input *_remoteServer;
Fl_Button *_connectRemoteServer;
public:
Fl_Window *win;
onelabWindow(int deltaFontSize=0);
void refresh();
void refreshServers();
void rebuildSolverList();
void refreshRemoteServer();
};
void onelab2_cb(Fl_Widget *w, void *data);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment