Skip to content
Snippets Groups Projects
Commit 1c8f6fc7 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent 4ad7319f
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "GUI.h" #include "GUI.h"
#include "Callbacks.h" #include "Callbacks.h"
#include "Bitmaps.h" #include "Bitmaps.h"
#include "GetOptions.h"
extern Context_T CTX; extern Context_T CTX;
extern List_T *Post_ViewList; extern List_T *Post_ViewList;
...@@ -353,8 +354,8 @@ GUI::GUI() { ...@@ -353,8 +354,8 @@ GUI::GUI() {
} }
g_status_label[0] = new Fl_Box(x,502,(700-x)/3,16); g_status_label[0] = new Fl_Box(x,502,(700-x)/3,16);
g_status_label[1] = new Fl_Box(x+(700-x)/3,5022,(700-x)/3,16); g_status_label[1] = new Fl_Box(x+(700-x)/3,502,(700-x)/3,16);
g_status_label[2] = new Fl_Box(x+2*(700-x)/3,5022,(700-x)/3-2,16); g_status_label[2] = new Fl_Box(x+2*(700-x)/3,502,(700-x)/3-2,16);
for(i = 0 ; i<3 ; i++){ for(i = 0 ; i<3 ; i++){
g_status_label[i]->box(FL_FLAT_BOX); g_status_label[i]->box(FL_FLAT_BOX);
g_status_label[i]->labelsize(CTX.fontsize); g_status_label[i]->labelsize(CTX.fontsize);
...@@ -390,6 +391,13 @@ void GUI::set_anim(int mode){ ...@@ -390,6 +391,13 @@ void GUI::set_anim(int mode){
} }
} }
// Set the status messages
void GUI::set_status(char *msg, int num){
g_status_label[num]->label(msg);
g_status_label[num]->redraw();
}
// Draw the opengl window // Draw the opengl window
void GUI::draw_gl(){ void GUI::draw_gl(){
...@@ -996,7 +1004,6 @@ void GUI::help_short(){ ...@@ -996,7 +1004,6 @@ void GUI::help_short(){
void GUI::help_about(){ void GUI::help_about(){
static int init_help_about = 0; static int init_help_about = 0;
extern char TextAbout[1024];
if(!init_help_about){ if(!init_help_about){
init_help_about = 1 ; init_help_about = 1 ;
...@@ -1012,7 +1019,15 @@ void GUI::help_about(){ ...@@ -1012,7 +1019,15 @@ void GUI::help_about(){
about_bmp->label(o); about_bmp->label(o);
Fl_Button *o2 = new Fl_Button(WB+80, WB, width-2*WB-80, height-2*WB); Fl_Button *o2 = new Fl_Button(WB+80, WB, width-2*WB-80, height-2*WB);
o2->label(TextAbout);
// Text for about window
static char buffer[1024];
sprintf(buffer, " %s\n \n %s%.2f\n %s\n %s\n %s\n %s\n %s\n %s\n \n %s"
"\n \n Type 'gmsh -help' for command line options",
gmsh_progname, gmsh_version, GMSH_VERSION,
gmsh_os, gmsh_date, gmsh_host, gmsh_packager,
gmsh_url, gmsh_email, gmsh_copyright);
o2->label(buffer);
o2->box(FL_FLAT_BOX); o2->box(FL_FLAT_BOX);
o2->labelsize(CTX.fontsize); o2->labelsize(CTX.fontsize);
o2->labelfont(FL_COURIER); o2->labelfont(FL_COURIER);
......
// $Id: Main.cpp,v 1.3 2001-01-09 08:58:38 geuzaine Exp $ // $Id: Main.cpp,v 1.4 2001-01-09 09:52:16 geuzaine Exp $
#include <signal.h> #include <signal.h>
...@@ -25,7 +25,6 @@ GUI *WID ; ...@@ -25,7 +25,6 @@ GUI *WID ;
int main(int argc, char *argv[]){ int main(int argc, char *argv[]){
int i, nbf; int i, nbf;
extern char TextAbout[1024];
// Gmsh default context options // Gmsh default context options
...@@ -90,14 +89,6 @@ int main(int argc, char *argv[]){ ...@@ -90,14 +89,6 @@ int main(int argc, char *argv[]){
CTX.interactive = -1 ; // The GUI is not ready yet for interactivity CTX.interactive = -1 ; // The GUI is not ready yet for interactivity
// Text for about window
sprintf(TextAbout, " %s\n \n %s%.2f\n %s\n %s\n %s\n %s\n %s\n %s\n \n %s"
"\n \n Type 'gmsh -help' for command line options",
gmsh_progname, gmsh_version, GMSH_VERSION,
gmsh_os, gmsh_date, gmsh_host, gmsh_packager,
gmsh_url, gmsh_email, gmsh_copyright);
// Create the GUI // Create the GUI
WID = new GUI(); WID = new GUI();
......
// $Id: Message.cpp,v 1.1 2001-01-08 08:16:27 geuzaine Exp $ // $Id: Message.cpp,v 1.2 2001-01-09 09:52:16 geuzaine Exp $
#include <signal.h> #include <signal.h>
#include <sys/resource.h> #include <sys/resource.h>
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
#include "GmshUI.h" #include "GmshUI.h"
#include "Version.h" #include "Version.h"
#include "Context.h" #include "Context.h"
#include "GUI.h"
extern GUI *WID;
extern Context_T CTX; extern Context_T CTX;
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
...@@ -41,13 +43,10 @@ void Signal (int sig_num){ ...@@ -41,13 +43,10 @@ void Signal (int sig_num){
/* M s g */ /* M s g */
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
char *TextBuffer, TextAbout[1024];
#define PUT_IN_COMMAND_WIN \ #define PUT_IN_COMMAND_WIN \
vfprintf(stderr, fmt, args); \ vfprintf(stderr, fmt, args); \
fprintf(stderr, "\n"); fprintf(stderr, "\n");
void Msg(int level, char *fmt, ...){ void Msg(int level, char *fmt, ...){
va_list args; va_list args;
int abort=0; int abort=0;
...@@ -108,13 +107,9 @@ void Msg(int level, char *fmt, ...){ ...@@ -108,13 +107,9 @@ void Msg(int level, char *fmt, ...){
} }
} }
else{ else{
PUT_IN_COMMAND_WIN ; static char buffer[128];
/* vsprintf(buffer, fmt, args);
vsprintf(TextBuffer, fmt, args); WID->set_status(buffer, 1) ;
XtVaSetValues(WID.G.infoLabel, XmNlabelString,
XmStringCreateSimple(TextBuffer), NULL);
XmUpdateDisplay(WID.G.infoLabel);
*/
} }
break; break;
case SELECT : case SELECT :
...@@ -126,13 +121,9 @@ void Msg(int level, char *fmt, ...){ ...@@ -126,13 +121,9 @@ void Msg(int level, char *fmt, ...){
} }
} }
else{ else{
PUT_IN_COMMAND_WIN ; static char buffer[128];
/* vsprintf(buffer, fmt, args);
vsprintf(TextBuffer, fmt, args); WID->set_status(buffer, 0) ;
XtVaSetValues(WID.G.selectLabel, XmNlabelString,
XmStringCreateSimple(TextBuffer), NULL);
XmUpdateDisplay(WID.G.selectLabel);
*/
} }
break; break;
case STATUS : case STATUS :
...@@ -144,13 +135,9 @@ void Msg(int level, char *fmt, ...){ ...@@ -144,13 +135,9 @@ void Msg(int level, char *fmt, ...){
} }
} }
else{ else{
PUT_IN_COMMAND_WIN ; static char buffer[128];
/* vsprintf(buffer, fmt, args);
vsprintf(TextBuffer, fmt, args); WID->set_status(buffer, 2) ;
XtVaSetValues(WID.G.statusLabel, XmNlabelString,
XmStringCreateSimple(TextBuffer), NULL);
XmUpdateDisplay(WID.G.statusLabel);
*/
} }
break; break;
case PARSER_ERROR : case PARSER_ERROR :
......
// $Id: OpenFile.cpp,v 1.1 2001-01-08 08:08:47 geuzaine Exp $ // $Id: OpenFile.cpp,v 1.2 2001-01-09 09:52:17 geuzaine Exp $
#include "Gmsh.h" #include "Gmsh.h"
#include "Const.h" #include "Const.h"
#include "Context.h" #include "Context.h"
...@@ -33,7 +33,7 @@ void ParseFile(char *f){ ...@@ -33,7 +33,7 @@ void ParseFile(char *f){
yylineno=1; yylineno=1;
if(!(yyin = fopen(yyname,"r"))){ if(!(yyin = fopen(yyname,"r"))){
Msg(INFO, "File '%s' Does not Exist", f); //Msg(INFO, "File '%s' Does not Exist", f);
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment