Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for dead/diplomovka/xgrafix/src/xgsetup.c between version 1.1 and 1.2

version 1.1, 2001/09/20 14:12:00 version 1.2, 2002/07/07 23:57:58
Line 9  void RedrawWindow(WindowType theWindow)
Line 9  void RedrawWindow(WindowType theWindow)
                 XG_Setup_Pixmap(theWindow);                  XG_Setup_Pixmap(theWindow);
         (*(theWindow->paint_function)) (theWindow);          (*(theWindow->paint_function)) (theWindow);
         if (Is_Crosshair_On(theWindow) && !Is_Irr_Surf(theWindow->data) &&          if (Is_Crosshair_On(theWindow) && !Is_Irr_Surf(theWindow->data) &&
                                                         !Is_Scatter(theWindow->data)) {                          !Is_Scatter(theWindow->data)) {
                 DrawCrosshair(theWindow,theWindow->data->xCoord,theWindow->data->yCoord);                  DrawCrosshair(theWindow,theWindow->data->xCoord,theWindow->data->yCoord);
         }          }
         else          else
Line 35  Tcl_DoWhenIdle(DoMain,(ClientData)NULL);
Line 35  Tcl_DoWhenIdle(DoMain,(ClientData)NULL);
 #ifdef Tcl74_Tk40  #ifdef Tcl74_Tk40
 Tk_DoWhenIdle(DoMain,(ClientData)NULL);  Tk_DoWhenIdle(DoMain,(ClientData)NULL);
 #endif  #endif
                  */  */
         }          }
         else {          else {
                 Tcl_Eval(interp,"update idletasks");                  Tcl_Eval(interp,"update idletasks");
Line 47  Tk_DoWhenIdle(DoMain,(ClientData)NULL);
Line 47  Tk_DoWhenIdle(DoMain,(ClientData)NULL);
 } // }}}  } // }}}
 // Function void XGSetupWindow() {{{  // Function void XGSetupWindow() {{{
 void XGSetupWindow(char *Win_Title, char *State, int ulx, int uly, int WinType,  void XGSetupWindow(char *Win_Title, char *State, int ulx, int uly, int WinType,
                                                 DataType data_ptr, LabelType label_ptr, int PlotType)                  DataType data_ptr, LabelType label_ptr, int PlotType)
 {  {
         char type;          char type;
   
Line 95  void XGSetupWindow(char *Win_Title, char
Line 95  void XGSetupWindow(char *Win_Title, char
                 theNewWindow->ascii_print_function = Ascii_ThreeD_Window;                  theNewWindow->ascii_print_function = Ascii_ThreeD_Window;
                 theNewWindow->xgrafix_print_function = Bin_ThreeD_Window;                  theNewWindow->xgrafix_print_function = Bin_ThreeD_Window;
                 if (PlotType == LOG_LIN_LIN || PlotType == LOG_LIN_LOG ||                  if (PlotType == LOG_LIN_LIN || PlotType == LOG_LIN_LOG ||
                                                                 PlotType == LOG_LOG_LIN || PlotType == LOG_LOG_LOG)                                  PlotType == LOG_LOG_LIN || PlotType == LOG_LOG_LOG)
                         Set_X_Log(theNewWindow);                          Set_X_Log(theNewWindow);
                 if (PlotType == LIN_LOG_LIN || PlotType == LIN_LOG_LOG ||                  if (PlotType == LIN_LOG_LIN || PlotType == LIN_LOG_LOG ||
                                                                 PlotType == LOG_LOG_LIN || PlotType == LOG_LOG_LOG)                                  PlotType == LOG_LOG_LIN || PlotType == LOG_LOG_LOG)
                         Set_Y_Log(theNewWindow);                          Set_Y_Log(theNewWindow);
                 if (PlotType == LIN_LIN_LOG || PlotType == LIN_LOG_LOG ||                  if (PlotType == LIN_LIN_LOG || PlotType == LIN_LOG_LOG ||
                                                                 PlotType == LOG_LIN_LOG || PlotType == LOG_LOG_LOG)                                  PlotType == LOG_LIN_LOG || PlotType == LOG_LOG_LOG)
                         Set_Z_Log(theNewWindow);                          Set_Z_Log(theNewWindow);
         }          }
         else if (WinType == VECD) {          else if (WinType == VECD) {
Line 138  void XGSetupWindow(char *Win_Title, char
Line 138  void XGSetupWindow(char *Win_Title, char
         if (theRunWithXFlag == FALSE)          if (theRunWithXFlag == FALSE)
                 return;                  return;
   
         sprintf(TclCommand, "SetupWindow \"%s\" %s %d %d %c %.3g %.3g %d %.3g %.3g %d %.3g %.3g %d %s %.3g %.3g %d %d %d %d %d %d %s \"%s\" \"%s\"\n",          if (snprintf(TclCommand, TclCommand_MAX, "SetupWindow "
                                                         Win_Title, State, ulx, uly, type, label_ptr->X_Min,                          "\"%s\" %s %d %d %c %.3g %.3g %d "
                                                         label_ptr->X_Max, Is_X_AutoRescale(theNewWindow), label_ptr->Y_Min,                          "%.3g %.3g %d %.3g %.3g %d %s %.3g "
                                                         label_ptr->Y_Max, Is_Y_AutoRescale(theNewWindow), label_ptr->Z_Min,                          "%.3g %d %d %d %d %d %d %s \"%s\" \"%s\"\n",
                                                         label_ptr->Z_Max, Is_Z_AutoRescale(theNewWindow),                          Win_Title, State, ulx, uly, type, label_ptr->X_Min,
                                                         theNewWindow->eps_file_name, init_theta, init_phi,                          label_ptr->X_Max, Is_X_AutoRescale(theNewWindow), label_ptr->Y_Min,
                                                         Is_Shading_On(theNewWindow), Is_ColorCode_On(theNewWindow),                          label_ptr->Y_Max, Is_Y_AutoRescale(theNewWindow), label_ptr->Z_Min,
                                                         Is_Grid_On(theNewWindow), Is_X_Log(theNewWindow),                          label_ptr->Z_Max, Is_Z_AutoRescale(theNewWindow),
                                                         Is_Y_Log(theNewWindow), Is_Z_Log(theNewWindow), theDumpFile,                          theNewWindow->eps_file_name, init_theta, init_phi,
                                                         label_ptr->X_Label, label_ptr->Y_Label);                          Is_Shading_On(theNewWindow), Is_ColorCode_On(theNewWindow),
                           Is_Grid_On(theNewWindow), Is_X_Log(theNewWindow),
                           Is_Y_Log(theNewWindow), Is_Z_Log(theNewWindow), theDumpFile,
                           label_ptr->X_Label, label_ptr->Y_Label) == -1) {
                   fprintf(stderr, "Warning: TclCommand truncated at %s:%d\n", __FILE__, __LINE__);
           }
         if (Tcl_Eval(interp,TclCommand) != TCL_OK) {          if (Tcl_Eval(interp,TclCommand) != TCL_OK) {
                 printf("Error creating window\n");                  printf("Error creating window\n");
                 if (interp->result != NULL) {                  if (interp->result != NULL) {
Line 157  void XGSetupWindow(char *Win_Title, char
Line 162  void XGSetupWindow(char *Win_Title, char
 } // }}}  } // }}}
 // Function int C_CreateWindowProc(cl, interp, int argc, char **argv) {{{  // Function int C_CreateWindowProc(cl, interp, int argc, char **argv) {{{
 int C_CreateWindowProc(ClientData cl, Tcl_Interp *interp, int argc,  int C_CreateWindowProc(ClientData cl, Tcl_Interp *interp, int argc,
                                                 char **argv)                  char **argv)
 {  {
         XGCValues       theGCValues;          XGCValues       theGCValues;
         XSetWindowAttributes theWindowAttributes;          XSetWindowAttributes theWindowAttributes;
Line 209  void ReallocateWindows()
Line 214  void ReallocateWindows()
 {  {
         sizeOfWindowArray += sizeIncrement;          sizeOfWindowArray += sizeIncrement;
         theWindowArray = (WindowType *)realloc(theWindowArray,          theWindowArray = (WindowType *)realloc(theWindowArray,
                                                         sizeof(struct window_struct)*                          sizeof(struct window_struct)*
                                                         sizeOfWindowArray);                          sizeOfWindowArray);
         if (theWindowArray == NULL) {          if (theWindowArray == NULL) {
                 printf("Error: Not enough memory to reallocate new window array\n");                  printf("Error: Not enough memory to reallocate new window array\n");
                 exit(1);                  exit(1);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top