DAS  3.1.6 - 18/09/2017
Functions | Variables
CreateForms.c File Reference

DAS GUI Creation. More...

#include <windows.h>
#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <direct.h>
#include <ctype.h>
#include <math.h>
#include "mgui.h"
#include "dscud.h"
#include "DAS_Spatram.h"
#include "dcl.h"
#include "dil.h"
#include "wsc.h"
#include "dxl.h"
#include "bil.h"
#include "DOAS.h"
#include "portio32.h"
+ Include dependency graph for CreateForms.c:

Go to the source code of this file.

Functions

void ActMvAzimCB (MOBJECT edit, char *text, void *ed)
 
void ActMvAzimDegCB (MOBJECT edit, char *text, void *ed)
 
void ActMvGratCB (MOBJECT edit, char *text, void *ed)
 Move Grating of a free steps number callback.
. More...
 
void ActMvZenCB (MOBJECT edit, char *text, void *ed)
 
void ActMvZenDegCB (MOBJECT edit, char *text, void *ed)
 
void CloseShCB (MOBJECT p, void *od, void *ad)
 
void D_XProfile (void)
 
void D_YProfile (void)
 
int DB_Ask (char *tit, char *bmp, char *label, char *pre, int len, char *pbtype)
 Input Shell Create an input box. More...
 
void DB_Ask_SheelESC (MOBJECT obj, MKeyEvent *pe, void *a_data)
 Input Shell Callback Callback for the Input Shell destruction at the pression of the ESC key. More...
 
void DB_AskCB (MOBJECT p, void *od, void *ad)
 Input Shell Callback Callback for the Input Shell. More...
 
void DB_ChooseButtons (int w)
 
void DB_Close_Sh (MOBJECT p, void *od, void *ad)
 
void DB_CloseAsk (MOBJECT p, void *od, void *ad)
 Input Shell Callback Callback for the Input Shell destruction. More...
 
void DB_dirCB (MOBJECT o, void *id, void *a_data)
 
void DB_Esc_CB (MOBJECT p, void *od, void *ad)
 
void DB_Fil_CB (MOBJECT p, void *od, void *ad)
 callback for filter wheel positioning in Filter shell
More...
 
void DB_FilSelButtKB_CB (MOBJECT obj, MKeyEvent *pe, void *a_data)
 callback for select a specified filter push button with the keyboard
More...
 
void DB_FilSelButtMouse_CB (MOBJECT obj, MMouseEvent *pe, void *a_data)
 callback changing the bakground color of the push button passing the mouse over it
More...
 
int DB_FindChar (int mod, char *string, int ch)
 
void DB_GratPosMode_CB (MOBJECT o, void *a, void *v)
 
void DB_Home_CB (MOBJECT p, void *od, void *ad)
 
void DB_HomeSelButtKB_CB (MOBJECT obj, MKeyEvent *pe, void *a_data)
 
void DB_HomeSelButtMouse_CB (MOBJECT obj, MMouseEvent *pe, void *a_data)
 
void DB_HorComm_CB (MOBJECT p, void *od, void *ad)
 
void DB_KB_ButtonActive (int mod)
 Enable/Disable Push buttons on the Control Panel. More...
 
void DB_KeyB_CB (MOBJECT p, void *od, void *ad)
 Push buttons callback
. More...
 
void DB_KeyComSelButtKB_CB (MOBJECT obj, MKeyEvent *pe, void *a_data)
 callback for selsct a specified push button with the keyboard
More...
 
void DB_KeyComSelButtMouse_CB (MOBJECT obj, MMouseEvent *pe, void *a_data)
 callback for selsct a specified push button with the keyboard
More...
 
void DB_LampSelButtMouse_CB (MOBJECT obj, MMouseEvent *pe, void *a_data)
 callback for selsct a specified push button with the keyboard
More...
 
void DB_Mir_CB (MOBJECT p, void *od, void *ad)
 callback for input mirror positioning in Mirror shell
More...
 
void DB_MirSelButtKB_CB (MOBJECT obj, MKeyEvent *pe, void *a_data)
 callback for selsct a specified mirror push button with the keyboard
More...
 
void DB_MirSelButtMouse_CB (MOBJECT obj, MMouseEvent *pe, void *a_data)
 callback changing the bakground color of the push button passing the mouse over it
More...
 
void DB_NDFil_CB (MOBJECT p, void *od, void *ad)
 callback for filter wheel positioning in Filter shell
More...
 
void DB_NDFilSelButtKB_CB (MOBJECT obj, MKeyEvent *pe, void *a_data)
 callback for select a specified filter push button with the keyboard
More...
 
void DB_NDFilSelButtMouse_CB (MOBJECT obj, MMouseEvent *pe, void *a_data)
 callback changing the bakground color of the push button passing the mouse over it
More...
 
void DB_PasWd (void)
 
void DB_Pause (void)
 
void DB_PushButtonMouse (int mod, int event, MOBJECT obj, struct pbutt *ppbutt)
 
void DB_PushButtonMouse_CB (MOBJECT obj, MMouseEvent *pe, void *a_data)
 
void DB_RecGio_CB (MOBJECT o, void *a, void *v)
 
void DB_Redraw_CB (MOBJECT obj, MMouseEvent *pe, void *a_data)
 
void DB_SheelESC (MOBJECT obj, MKeyEvent *pe, void *a_data)
 
void DB_StepGratEnc_CB (MOBJECT o, void *a, void *v)
 
void DB_Tools ()
 
void DB_ToolsKeyB_CB (MOBJECT p, void *od, void *ad)
 
void DB_Wl_CB (MOBJECT p, void *od, void *ad)
 callback for grating positioning in Wavelength shell
More...
 
void DB_WlSelButtKB_CB (MOBJECT obj, MKeyEvent *pe, void *a_data)
 callback for selsct a specified wavelength push button with the keyboard
More...
 
void DB_WlSelButtMouse_CB (MOBJECT obj, MMouseEvent *pe, void *a_data)
 callback changing the bakground color of the push button passing the mouse over it
More...
 
void DB_WriteMode (int mod)
 
void DT_ShutterCB (MOBJECT p, void *od, void *ad)
 
void ExecSimPosCB (MOBJECT p, void *od, void *ad)
 
void FrmBuildTemperature (MOBJECT pf)
 
void ListTargetCB (MOBJECT p, LIST_ACT *la, void *ad)
 
MOBJECT MDCreate_CP (void)
 Create Spectrometer Control Panel. Procedure that build the Control Panel for checking the spectrometer operations such as temperature monitoring, stepper motor positioning, data acquisition ... More...
 
MOBJECT MDCreateHorMeas (void)
 
void MDCreateMoveAzim (void)
 
void MDCreateMoveAzimDeg (void)
 
void MDCreateMoveGrat (void)
 Free Grating positioning. Procedure that build the shell for Free Grating positioning. More...
 
void MDCreateMoveZen (void)
 
void MDCreateMoveZenAzimDeg (void)
 
void MDCreateMoveZenDeg (void)
 
int MDCreateSh_Fil (void)
 Create the shell for the available Filters. Procedure that build the shell for the positioning of the filter wheel. They are installed during the instrument setup. More...
 
int MDCreateSh_Home (void)
 
int MDCreateSh_Mir (void)
 Create the shell for the available Mirror Positions. Procedure that build the shell for the positioning of the Input Mirror.
They are: 1) Zenith 2) Horizontal Right 3) Calibra (Down for the calibration sphere) 4) Horizontal Left. More...
 
int MDCreateSh_NDFil (void)
 
int MDCreateSh_SimPos (void)
 
int MDCreateSh_Wl (void)
 Create the shell for the available Wavelength. Procedure that build the shell for the availables wavelength. They are fixed and setted during the testing phase. More...
 
float MIGEAz (float p)
 
float MIGEZen (float p)
 
void MIGEZenAzPos_CB (MOBJECT o, void *a, void *v)
 
void PopUpAdvCal_CB (MOBJECT obj, void *item, void *data)
 
void PupAdvCal_CB (MOBJECT obj, MEvent *pe, void *pdown)
 
void ShutCB (MOBJECT p, void *od, void *ad)
 
void ShutDOWN (void)
 Creates shell for Shutting down the instrument
. More...
 
void SimPosShClose_CB (MOBJECT p, void *od, void *ad)
 
void StepperPagForm (int p, int q)
 

Variables

MTFont alfont
 
char * AskBuff
 
static int AskFlg =0
 
AzimuthSt AST
 
bil BIL
 
config Cfg
 
int Com
 
MOBJECT CP_Sh
 
das DAS
 
ccd DC_CCD
 
ptf DC_HP
 
int DefPWD_OK = 0
 
d_geo DGEO
 
dil DIL
 
palette DPAL
 
dpwd DPWD
 
DSCB dscb
 
DXL_par DXL
 
const char * FilBuff
 
static int FilFlg =0
 
int FilSet = 0
 filter wheel position definition - for SD_FilterW More...
 
flag FLAG
 
MTFont font
 
static int GratFlg =0
 
int GrDIR
 
GratingSt GRS
 
char * HomeBuff
 
static int HomeFlg =0
 
MENU_ITEM item_advc
 
const char * MirBuff
 
static int MirFlg =0
 
int MirSet = 0
 mirror position definition - for SD_Mirror More...
 
const char * NDFilBuff
 
static int NDFilFlg =0
 
int NDFilSet = 0
 ND filter wheel position definition - for SD_NDFilterW. More...
 
MTFont newfont
 
char NFileNameF [_MAX_PATH]
 
int NumRip
 
paramini PARAM
 
MTFont plfont
 
MOBJECT popup_advcalib
 
char PrgFile [16]
 Name of the PRG file. More...
 
MOBJECT sdsh
 
MOBJECT shell_1
 
long STEPS
 
tools TOOLS
 
char * WlBuff
 
static int WlFlg =0
 
static XProfOn = 0
 
static YProfOn = 0
 
ZenithSt ZST
 

Detailed Description

DAS GUI Creation.

Author
Daniele Bortoli

Definition in file CreateForms.c.

Function Documentation

§ ActMvAzimCB()

void ActMvAzimCB ( MOBJECT  edit,
char *  text,
void *  ed 
)

Definition at line 3067 of file CreateForms.c.

References stepm::Addr, controlpanel::Albl_LS, AMS3, gui::ContrPanel, DB_StepMotor(), False, GratFlg, GrDIR, das::Gui, controlpanel::LedSM, MEditSetTextExt(), MObjectSetText(), MPixmapSetImageFile(), stepm::SM_B, SMfraz(), stepm::step, and das::StepM.

Referenced by MDCreateMoveAzim().

3068 {
3069  static int notify;
3070  long x, dp = 500;
3071  char buf[32];
3072  int er = 0, id;
3073  float k;
3074  long period = 5000;
3075 
3076  id = DAS.StepM.Addr[AMS3];
3077 
3078  k = SMfraz(DAS.StepM.step[id][DAS.StepM.SM_B]);
3079 
3080  x = (long) atoi(text);// * (long) 4; //c'era un * k, 4 e' la riduzione;
3081 
3082 // if(GrDIR == 0) //si va verso l'UV
3083 // {
3084 // x += dp; // add fixed step number for backlash recovery
3085 // }
3086  if(x)
3087  {
3088  er = DB_StepMotor(AMS3, 5, x, GrDIR);
3089  if (er)
3090  {
3091  MPixmapSetImageFile(DAS.Gui.ContrPanel.LedSM[id][DAS.StepM.SM_B], "SYS\\ledGreen.bmp");
3092  sprintf(buf, "%s", "Done");
3094  }
3095  }
3096 
3097  //Se ci si e' mossi verso l'UV si fa il recupero del gioco
3098 
3099 // if(GrDIR == 0) // faccio recupero gioco
3100 // {
3101 // er = DB_StepMotor(AMS3, 5, dp, 1);
3102 // if (er)
3103 // {
3104 // MPixmapSetImageFile(DAS.Gui.ContrPanel.LedSM[id][DAS.StepM.SM_B], "SYS\\ledGreen.bmp");
3105 // sprintf(buf, "%s", "Done");
3106 // MObjectSetText(DAS.Gui.ContrPanel.Albl_LS[5], buf);
3107 // }
3108 // }
3109 // }
3110  GratFlg = 1;
3111  sprintf(text, "", "");
3112  notify ^= 1;
3113  MEditSetTextExt((MOBJECT) ed, text, False, notify);
3114 }
stepm StepM
Stepper motors parameters structure.
gui Gui
Graphic User Interface Structure.
MOBJECT LedSM[AMSMAX][2]
Leds for stepper motors status.
MOBJECT Albl_LS[8]
Active Control Panel Labels for LIS status.
void MEditSetTextExt(MOBJECT edit, const char *text, int validated, int notify)
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
#define False
Definition: Mguidefs.h:236
void MObjectSetText(MOBJECT obj, const char *text)
int Addr[AMSMAX]
address of AMs
int SM_B
Motor B (su Y12) respectively: ID=0->Grating,ID=1->Not Connected,ID=2->Azimuth.
controlpanel ContrPanel
Control Panel Structure.
das DAS
Definition: CreateForms.c:98
int step[AMSMAX][2]
Stepper Motors Step.
void * MOBJECT
Definition: Mguidefs.h:192
int GrDIR
Definition: CreateForms.c:64
static int GratFlg
Definition: CreateForms.c:60
float SMfraz(int t)
denominator value of the stepping ratio
Definition: Spat_Device.c:129
#define AMS3
AMS3 address.
int DB_StepMotor(int id, int motor, long step, int dir)
Send steps to the selected stepper motor. .
Definition: Dxl.c:816
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ActMvAzimDegCB()

void ActMvAzimDegCB ( MOBJECT  edit,
char *  text,
void *  ed 
)

Definition at line 3530 of file CreateForms.c.

References False, GratFlg, MEditSetTextExt(), MIGEAz(), and SD_Azimuth().

Referenced by MDCreateMoveAzimDeg().

3531 {
3532  static int notify;
3533  float x;
3534 // char buf[32];
3535  int er = 0;
3536  float k;
3537  long period = 5000;
3538 
3539 
3540  x = (float) atof(text);
3541 
3542  k=MIGEAz(x);
3543 
3544  SD_Azimuth(k, x);
3545  //SD_Azimuth(x, x);
3546 
3547  GratFlg = 1;
3548  sprintf(text, "", "");
3549  notify ^= 1;
3550  MEditSetTextExt((MOBJECT) ed, text, False, notify);
3551 }
void MEditSetTextExt(MOBJECT edit, const char *text, int validated, int notify)
#define False
Definition: Mguidefs.h:236
int SD_Azimuth(float ang, float raz)
Positioning Azimuth. The Zenith reaches the position specified by ang.
Definition: Spat_Device.c:3110
void * MOBJECT
Definition: Mguidefs.h:192
static int GratFlg
Definition: CreateForms.c:60
float MIGEAz(float p)
Definition: CreateForms.c:3475
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ActMvGratCB()

void ActMvGratCB ( MOBJECT  edit,
char *  text,
void *  ed 
)

Move Grating of a free steps number callback.
.

Parameters
editEdit MObject where the number of steps are typed
*textNumber of steps
Returns
void

Definition at line 2691 of file CreateForms.c.

References controlpanel::Albl_LS, AMS1, flag::backlashrec, gui::ContrPanel, DB_StepMotor(), GratingSt::dp, False, das::Flag, GratFlg, flag::gratposmode, GrDIR, das::Gui, controlpanel::LedSM, MEditSetTextExt(), MObjectSetText(), MPixmapSetImageFile(), stepm::multiplier, stepm::SM_B, SM_stepr(), stepm::step, flag::stepgratenc, and das::StepM.

Referenced by MDCreateMoveGrat().

2692 {
2693  static int notify;
2694  long npt, x, dp = 500;
2695  char buf[32];
2696  int er = 0, id;
2697  float k;
2698  long period = 5000;
2699 
2700  //id = DAS.StepM.Addr[AMS1];
2701  id=0;
2702 
2703 
2704 
2705 
2706  if(DAS.Flag.gratposmode == 0) //Step
2707  {
2708  if( DAS.Flag.stepgratenc == 0) // No Parametrization
2709  {
2710  // OLD
2711  x = (long) atoi(text);
2712  }
2713  else
2714  {
2715  // New
2716  k = (float)SM_stepr(DAS.StepM.step[id][1])/3200;
2717  npt = (long) atoi(text);
2718  x = (long)(float) (npt * DAS.StepM.multiplier[id][1] * k);
2719  }
2720  }
2721  else if(DAS.Flag.gratposmode == 1) //Wl
2722  {
2723  k = (float)SM_stepr(DAS.StepM.step[id][1])/3200;
2724  npt = (long) atoi(text);
2725  x = (long) (npt * 24.33 * DAS.StepM.multiplier[id][1] * k);
2726 
2727  }
2728 
2729  if(x)
2730  {
2731  if(DAS.Flag.backlashrec==0) // Perform backlash recovery
2732  {
2733  if(GrDIR == 0)
2734  {
2735  x += GRS.dp;
2736  }
2737 
2738  er = DB_StepMotor(AMS1, 1, x, GrDIR);
2739  if (er)
2740  {
2741  MPixmapSetImageFile(DAS.Gui.ContrPanel.LedSM[id][DAS.StepM.SM_B], "SYS\\ledGreen.bmp");
2742  sprintf(buf, "%s", "Done");
2744  }
2745  //Se ci si e' mossi verso l'UV si fa il recupero del gioco
2746  if(GrDIR == 0) // faccio recupero gioco
2747  {
2748  er = DB_StepMotor(AMS1, 1, GRS.dp, 1);
2749  if (er)
2750  {
2751  MPixmapSetImageFile(DAS.Gui.ContrPanel.LedSM[id][DAS.StepM.SM_B], "SYS\\ledGreen.bmp");
2752  sprintf(buf, "%s", "Done");
2754  }
2755  }
2756  }
2757  else // DO NOT Perform backlash recovery
2758  {
2759  er = DB_StepMotor(AMS1, 1, x, GrDIR);
2760  if (er)
2761  {
2762  MPixmapSetImageFile(DAS.Gui.ContrPanel.LedSM[id][DAS.StepM.SM_B], "SYS\\ledGreen.bmp");
2763  sprintf(buf, "%s", "Done");
2765  }
2766 
2767  }
2768 
2769  }
2770 
2771 
2772  GratFlg = 1;
2773  sprintf(text, "", "");
2774  notify ^= 1;
2775  MEditSetTextExt((MOBJECT) ed, text, False, notify);
2776 }
stepm StepM
Stepper motors parameters structure.
gui Gui
Graphic User Interface Structure.
MOBJECT LedSM[AMSMAX][2]
Leds for stepper motors status.
MOBJECT Albl_LS[8]
Active Control Panel Labels for LIS status.
void MEditSetTextExt(MOBJECT edit, const char *text, int validated, int notify)
int gratposmode
Grating position mode flag: = 0 step mode; = 1 Wl mode.
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
flag Flag
Structure for different flags.
#define False
Definition: Mguidefs.h:236
float multiplier[AMSMAX][2]
multiplier, > 0 multiplier, < 0 demultiplier
void MObjectSetText(MOBJECT obj, const char *text)
long dp
Grating backslash recovery steps.
int backlashrec
flag for backlash recovery: =0 perform backlash rec.; = 1 DO NOT perform backlash rec...
int SM_B
Motor B (su Y12) respectively: ID=0->Grating,ID=1->Not Connected,ID=2->Azimuth.
controlpanel ContrPanel
Control Panel Structure.
das DAS
Definition: CreateForms.c:98
#define AMS1
AMS1 address.
int step[AMSMAX][2]
Stepper Motors Step.
void * MOBJECT
Definition: Mguidefs.h:192
int GrDIR
Definition: CreateForms.c:64
static int GratFlg
Definition: CreateForms.c:60
int stepgratenc
step to the grating mode: = 0 typed steps sent to the stepper; = 1 typed step are parametrized ...
int SM_stepr(int t)
AMS &#39;steps/round&#39; value return the AMS &#39;steps/round&#39; value (microstepping) depending on the setted st...
Definition: Spat_Device.c:209
GratingSt GRS
Definition: CreateForms.c:82
int DB_StepMotor(int id, int motor, long step, int dir)
Send steps to the selected stepper motor. .
Definition: Dxl.c:816
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ActMvZenCB()

void ActMvZenCB ( MOBJECT  edit,
char *  text,
void *  ed 
)

Definition at line 3116 of file CreateForms.c.

References stepm::Addr, controlpanel::Albl_LS, AMS3, gui::ContrPanel, DB_StepMotor(), False, GratFlg, GrDIR, das::Gui, controlpanel::LedSM, MEditSetTextExt(), MObjectSetText(), MPixmapSetImageFile(), stepm::SM_A, SMfraz(), stepm::step, and das::StepM.

Referenced by MDCreateMoveZen().

3117 {
3118  static int notify;
3119  long x, dp = 500;
3120  char buf[32];
3121  int er = 0, id;
3122  float k;
3123  long period = 5000;
3124 
3125  id = DAS.StepM.Addr[AMS3];
3126 
3127  k = SMfraz(DAS.StepM.step[id][DAS.StepM.SM_A]);
3128 
3129 
3130 // k = SMfraz(DAS.StepM.step[4]);
3131 
3132  x = (long) atoi(text);// * (long) 4; //c'era un * k, 4 e' la riduzione;
3133 
3134 // if(GrDIR == 0) //si va verso l'UV
3135 // {
3136 // x += dp; // add fixed step number for backlash recovery
3137 // }
3138 
3139  if(x)
3140  {
3141 
3142  er = DB_StepMotor(AMS3, 4, x, GrDIR);
3143  if (er)
3144  {
3145  MPixmapSetImageFile(DAS.Gui.ContrPanel.LedSM[id][DAS.StepM.SM_A], "SYS\\ledGreen.bmp");
3146  sprintf(buf, "%s", "Done");
3148  }
3149  }
3150 
3151  //Se ci si e' mossi verso l'UV si fa il recupero del gioco
3152 
3153 /* if(GrDIR == 0) // faccio recupero gioco
3154  {
3155  er = DB_StepMotor(AMS3, 4, dp, 1);
3156  if (er)
3157  {
3158  MPixmapSetImageFile(DAS.Gui.ContrPanel.LedSM[id][DAS.StepM.SM_A], "SYS\\ledGreen.bmp");
3159  sprintf(buf, "%s", "Done");
3160  MObjectSetText(DAS.Gui.ContrPanel.Albl_LS[4], buf);
3161  }
3162  }
3163 */
3164 // }
3165  GratFlg = 1;
3166  sprintf(text, "", "");
3167  notify ^= 1;
3168  MEditSetTextExt((MOBJECT) ed, text, False, notify);
3169 }
stepm StepM
Stepper motors parameters structure.
gui Gui
Graphic User Interface Structure.
MOBJECT LedSM[AMSMAX][2]
Leds for stepper motors status.
MOBJECT Albl_LS[8]
Active Control Panel Labels for LIS status.
void MEditSetTextExt(MOBJECT edit, const char *text, int validated, int notify)
int SM_A
Motor A (su Y11) respectively: ID=0->InputMirror,ID=1->FilterWheel,ID=2->Zenith.
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
#define False
Definition: Mguidefs.h:236
void MObjectSetText(MOBJECT obj, const char *text)
int Addr[AMSMAX]
address of AMs
controlpanel ContrPanel
Control Panel Structure.
das DAS
Definition: CreateForms.c:98
int step[AMSMAX][2]
Stepper Motors Step.
void * MOBJECT
Definition: Mguidefs.h:192
int GrDIR
Definition: CreateForms.c:64
static int GratFlg
Definition: CreateForms.c:60
float SMfraz(int t)
denominator value of the stepping ratio
Definition: Spat_Device.c:129
#define AMS3
AMS3 address.
int DB_StepMotor(int id, int motor, long step, int dir)
Send steps to the selected stepper motor. .
Definition: Dxl.c:816
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ActMvZenDegCB()

void ActMvZenDegCB ( MOBJECT  edit,
char *  text,
void *  ed 
)

Definition at line 3172 of file CreateForms.c.

References False, GratFlg, MEditSetTextExt(), and SD_Zenith().

Referenced by MDCreateMoveZenDeg().

3173 {
3174  static int notify;
3175  float x;
3176 // char buf[32];
3177  int er = 0;
3178 // float k;
3179 // long period = 5000;
3180 
3181 
3182  x = (float) atof(text);
3183 
3184  SD_Zenith(x);
3185 
3186  GratFlg = 1;
3187  sprintf(text, "", "");
3188  notify ^= 1;
3189  MEditSetTextExt((MOBJECT) ed, text, False, notify);
3190 }
void MEditSetTextExt(MOBJECT edit, const char *text, int validated, int notify)
#define False
Definition: Mguidefs.h:236
int SD_Zenith(float ang)
Positioning Zenith. The Zenith reaches the position specified by ang.
Definition: Spat_Device.c:2916
void * MOBJECT
Definition: Mguidefs.h:192
static int GratFlg
Definition: CreateForms.c:60
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CloseShCB()

void CloseShCB ( MOBJECT  p,
void *  od,
void *  ad 
)

Definition at line 4320 of file CreateForms.c.

References MShellDestroy(), and MShellUnrealize().

Referenced by MDCreateSh_SimPos(), ShutCB(), and ShutDOWN().

4321 {
4322  int c = (int) ad;
4323 
4324  switch(c)
4325  {
4326  case 0:
4327  MShellUnrealize(p);
4328  MShellDestroy(p);
4329  break;
4330  case 1:
4331  MShellUnrealize(p);
4332  MShellDestroy(p);
4333  break;
4334  case 2:
4335  MShellUnrealize(p);
4336  MShellDestroy(p);
4337  break;
4338  case 3:
4339  MShellUnrealize(p);
4340  MShellDestroy(p);
4341  break;
4342  case 4:
4343  MShellUnrealize(p);
4344  MShellDestroy(p);
4345  break;
4346 
4347  }
4348 
4349 }
void MShellUnrealize(MOBJECT obj)
void MShellDestroy(MOBJECT obj)
static double p
Definition: SOLPOS.C:131
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ D_XProfile()

void D_XProfile ( void  )

Definition at line 2656 of file CreateForms.c.

References das::Gui, dil::Img, pushbutt::KeyB, MObjectSetText(), image::Prof, gui::PushButt, Server, and XProfOn.

Referenced by DB_KeyB_CB().

2657 {
2658 
2659  if (XProfOn == 0)
2660  {
2661  XProfOn = 1;
2662  DIL.Img.Prof[Server]=2;
2663  MObjectSetText(DAS.Gui.PushButt.KeyB[22], "P X On");
2664  }
2665  else
2666  {
2667  XProfOn = 0;
2668  DIL.Img.Prof[Server]=0;
2669  MObjectSetText(DAS.Gui.PushButt.KeyB[22], "P X Off");
2670  }
2671 }
gui Gui
Graphic User Interface Structure.
int Server
Definition: DAS_Spat.c:253
MOBJECT KeyB[28]
Keyboard Buttons.
void MObjectSetText(MOBJECT obj, const char *text)
image Img
Definition: Dildef.h:675
U8 Prof[MAXIMG]
Definition: Dildef.h:561
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
dil DIL
Definition: CreateForms.c:87
static XProfOn
Definition: CreateForms.c:2655
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ D_YProfile()

void D_YProfile ( void  )

Definition at line 2638 of file CreateForms.c.

References das::Gui, dil::Img, pushbutt::KeyB, MObjectSetText(), image::Prof, gui::PushButt, Server, and YProfOn.

Referenced by DB_KeyB_CB().

2639 {
2640  if (YProfOn == 0)
2641  {
2642  YProfOn = 1;
2643  DIL.Img.Prof[Server]=1;
2644  MObjectSetText(DAS.Gui.PushButt.KeyB[23], "P Y On");
2645  }
2646  else
2647  {
2648  YProfOn = 0;
2649  DIL.Img.Prof[Server]=0;
2650  MObjectSetText(DAS.Gui.PushButt.KeyB[23], "P Y Off");
2651  }
2652 
2653 }
gui Gui
Graphic User Interface Structure.
int Server
Definition: DAS_Spat.c:253
MOBJECT KeyB[28]
Keyboard Buttons.
void MObjectSetText(MOBJECT obj, const char *text)
image Img
Definition: Dildef.h:675
U8 Prof[MAXIMG]
Definition: Dildef.h:561
pushbutt PushButt
Push buttons.
static YProfOn
Definition: CreateForms.c:2637
das DAS
Definition: CreateForms.c:98
dil DIL
Definition: CreateForms.c:87
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_Ask()

int DB_Ask ( char *  tit,
char *  bmp,
char *  label,
char *  pre,
int  len,
char *  pbtype 
)

Input Shell Create an input box.

Returns
int

Definition at line 5373 of file CreateForms.c.

References AskBuff, AskFlg, CENTER_ALIGN, DB_AskCB(), palette::DB_BG, palette::DB_BG_Plbl, DB_CloseAsk(), palette::DB_FG_Plbl, palette::DB_UnSel, F_ATT_NONE, False, FIXED_SMALL, HELV_SMALL, lbl, MBottomAttach(), MCreateClippedEdit(), MCreateColForm(), MCreateEdit(), MCreateLabel(), MCreatePButton(), MCreatePixmapFromFile(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MEditSetActCallback(), MLabelSetAlignment(), MLoopWhileFlag(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MPButtonSetCallback(), MShellDestroy(), MShellRealizeXY(), MShellSetWMCloseCallback(), MShellUnrealize(), SF_MODAL, TOP_ALIGN, True, UNDEF_ALIGN, WS_ETCHED_OUT, and WS_NONE.

Referenced by DB_HorComm_CB(), and DB_KeyB_CB().

5374 {
5375 
5376  MOBJECT _shell005;
5377  MOBJECT _rowform005;
5378  MOBJECT _colform005;
5379  MOBJECT _tablefrm005;
5380  MOBJECT pbut;
5381  MOBJECT edt;
5382  MOBJECT pix;
5383  MOBJECT lbl;
5384 
5385  int er = 0;
5386 
5387  AskBuff = pre;
5388 
5389 
5390  _shell005 = MCreateShell(tit, SF_MODAL);
5391  MObjectSetBackgroundRGB(_shell005, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
5392 
5393 
5394  _colform005 = MCreateColForm(_shell005);
5395  MObjectSetBackgroundRGB(_colform005, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
5396  MObjectSetShadow(_colform005, WS_NONE, 0, 0);
5397 
5398  _rowform005 = MCreateRowForm(_colform005);
5399  MBottomAttach(_rowform005, F_ATT_NONE, 1, NULL);
5400  MObjectAlign(_rowform005, UNDEF_ALIGN, TOP_ALIGN);
5401  MObjectSetBackgroundRGB(_rowform005, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
5402  MObjectSetShadow(_rowform005, WS_NONE, 0, 0);
5403  MObjectSetResize(_rowform005, True, True);
5404 
5405 
5406  _tablefrm005 = MCreateTableForm(_rowform005, 2);
5407  MObjectSetBackgroundRGB(_tablefrm005, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
5408  MObjectSetResize(_tablefrm005, True, False);
5409 
5410  lbl = MCreateLabel(_tablefrm005, label, FIXED_SMALL);
5414 
5415  if(strlen(bmp) > 0)
5416  pix = MCreatePixmapFromFile(_tablefrm005, bmp);
5417 
5418  if(len < 16)
5419  {
5420  edt = MCreateEdit(_tablefrm005, pre, len, FIXED_SMALL);
5421  MObjectSetForegroundRGB(edt, 255, 255, 255);
5422  MObjectSetBackgroundRGB(edt, 0, 0, 0);
5423  MObjectSetShadow(edt, WS_ETCHED_OUT, 2, 1);
5424  //MObjectSetCompositeWidth(edt, 150);
5425 
5426 
5427  }
5428  else
5429  {
5430  edt = MCreateClippedEdit(_tablefrm005, pre, len, 18, FIXED_SMALL);
5431  MObjectSetForegroundRGB(edt, 255, 255, 255);
5432  MObjectSetBackgroundRGB(edt, 0, 0, 0);
5433  MObjectSetShadow(edt, WS_ETCHED_OUT, 2, 1);
5434  MObjectSetCompositeWidth(edt, 150);
5435  }
5436 
5438 // MObjectAddEventNotifyCallback(_shell005, (OBJ_EVENT_CB) DB_Ask_SheelESC, EM_KEY_PRESS, NULL);
5439 
5440 
5441  pbut = MCreatePButton(_colform005, pbtype, HELV_SMALL);
5442  MPButtonSetCallback(pbut, DB_AskCB, (void *) edt);
5444  MObjectSetCompositeWidth(pbut, 90);
5445 
5446 
5447 
5448  MShellSetWMCloseCallback(_shell005, DB_CloseAsk, NULL);
5449 
5450 
5451  MShellRealizeXY(_shell005, 0, 0);
5452 
5453  AskFlg = 0;
5454  MLoopWhileFlag(&AskFlg, 0);
5455  if(AskBuff[0] == 0) er = 1;
5456 
5457  MShellUnrealize(_shell005);
5458  MShellDestroy(_shell005);
5459 // MShellRaise(LIS.Sh_KeyB);
5460  return er;
5461 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
#define WS_NONE
Definition: Mguidefs.h:956
MOBJECT MCreatePixmapFromFile(MOBJECT parent, const char *fname)
MOBJECT lbl
Definition: DFileMan.c:42
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
void MBottomAttach(MOBJECT child, int att_type, int off, MOBJECT obj)
#define WS_ETCHED_OUT
Definition: Mguidefs.h:960
void DB_CloseAsk(MOBJECT p, void *od, void *ad)
Input Shell Callback Callback for the Input Shell destruction.
Definition: CreateForms.c:5483
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void DB_AskCB(MOBJECT p, void *od, void *ad)
Input Shell Callback Callback for the Input Shell.
Definition: CreateForms.c:5462
MOBJECT MCreateClippedEdit(MOBJECT parent, const char *text, int len, int clip_len, MTFont font)
void MShellUnrealize(MOBJECT obj)
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void(* OBJ_STRING_CB)(MOBJECT obj, char *str, void *ad)
Definition: Mguidefs.h:1457
void MShellDestroy(MOBJECT obj)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define HELV_SMALL
Definition: Mguidefs.h:881
char * AskBuff
Definition: CreateForms.c:5369
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
#define FIXED_SMALL
Definition: Mguidefs.h:878
#define SF_MODAL
Definition: Mguidefs.h:1019
MOBJECT MCreateColForm(MOBJECT parent)
palette DPAL
Definition: CreateForms.c:88
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
void MShellRealizeXY(MOBJECT obj, int x, int y)
MOBJECT MCreateShell(const char *title, int flags)
short DB_BG[3]
Default Background Color.
static int AskFlg
Definition: CreateForms.c:5370
void MLabelSetAlignment(MOBJECT p, int align)
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
void MLoopWhileFlag(int *pflag, int value)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
MOBJECT MCreateRowForm(MOBJECT parent)
#define TOP_ALIGN
Definition: Mguidefs.h:918
#define F_ATT_NONE
Definition: Mguidefs.h:1106
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_Ask_SheelESC()

void DB_Ask_SheelESC ( MOBJECT  p,
MKeyEvent pe,
void *  a_data 
)

Input Shell Callback Callback for the Input Shell destruction at the pression of the ESC key.

Returns
int

Definition at line 5496 of file CreateForms.c.

References AskBuff, AskFlg, ESC, and MKeyEvent::keycode.

5497 {
5498 
5499  switch (pe->keycode)
5500  {
5501  case ESC:
5502  {
5503  AskBuff[0] = 0;
5504  AskFlg = 1;
5505  }
5506  }
5507 }
unsigned int keycode
Code for the pressed key.
Definition: Mguidefs.h:541
#define ESC
Definition: KEYCODES.H:265
char * AskBuff
Definition: CreateForms.c:5369
static int AskFlg
Definition: CreateForms.c:5370

§ DB_AskCB()

void DB_AskCB ( MOBJECT  p,
void *  od,
void *  ad 
)

Input Shell Callback Callback for the Input Shell.

Returns
int

Definition at line 5462 of file CreateForms.c.

References AskBuff, AskFlg, DB_GetCCD(), MObjectGetText(), and TExp.

Referenced by DB_Ask().

5463 {
5464 
5465  char buff[32], tb[32];
5466 
5467  MOBJECT c = ad;
5468 
5469  MObjectGetText(c, buff);
5470 
5471  MObjectGetText(p, tb);
5472 
5473  AskBuff[0] = 0;
5474  AskFlg = 1;
5475 
5476 
5477  sscanf(buff, "%lf", &TExp);
5478  if(strcmp(tb, "Get Light") == 0)
5479  DB_GetCCD(1);
5480  else if(strcmp(tb, "Get Dark") == 0)
5481  DB_GetCCD(0);
5482 }
char * MObjectGetText(MOBJECT obj, char *text)
char * AskBuff
Definition: CreateForms.c:5369
double TExp
CCD Exposure time.
Definition: DAS_Spat.c:130
static int AskFlg
Definition: CreateForms.c:5370
static double p
Definition: SOLPOS.C:131
void * MOBJECT
Definition: Mguidefs.h:192
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_ChooseButtons()

void DB_ChooseButtons ( int  w)

Definition at line 2560 of file CreateForms.c.

References DB_KB_ButtonActive(), DBDEMO, HELP, MANUAL, OFFLINEPLOT, PRGFILE, TEMPORIZED, TESTAD, TESTAMS, and TESTCCD.

Referenced by SZA_FirstCalc().

2561 {
2562 
2563  int c = w;
2564 
2565  switch(c)
2566  {
2567  case TEMPORIZED :
2568  break;
2569  case PRGFILE:
2570  break;
2571  case TESTAMS:
2572  //DB_KB_ButtonActive(c);
2573  break;
2574  case OFFLINEPLOT:
2575  DB_KB_ButtonActive(c);
2576 
2577  break;
2578  case TESTCCD:
2579  break;
2580  case HELP:
2581  break;
2582  case DBDEMO :
2583  break;
2584  case MANUAL:
2585  break;
2586  case TESTAD:
2587  break;
2588 
2589  }
2590 
2591 
2592 
2593 }
void DB_KB_ButtonActive(int mod)
Enable/Disable Push buttons on the Control Panel.
Definition: CreateForms.c:3810
#define TESTCCD
execution for testing CCD Camera
#define HELP
Help mode.
#define DBDEMO
execution in demo mode
#define TEMPORIZED
execution driven by MASTER file
#define OFFLINEPLOT
execution for archived data visualisation
#define PRGFILE
execution driven by *.prg file
#define TESTAD
execution for testing PC 104 AD converter
#define TESTAMS
execution for testing AMS&#39;s devices
#define MANUAL
execution in manual mode (for lab use)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_Close_Sh()

void DB_Close_Sh ( MOBJECT  p,
void *  od,
void *  ad 
)

Definition at line 5511 of file CreateForms.c.

References FilBuff, FilFlg, MirBuff, MirFlg, NDFilBuff, NDFilFlg, WlBuff, and WlFlg.

Referenced by MDCreateSh_Fil(), MDCreateSh_Mir(), MDCreateSh_NDFil(), and MDCreateSh_Wl().

5512 {
5513  int c = (int) ad;
5514  switch(c)
5515  {
5516  case 0:
5517  MirBuff = "0";
5518  MirFlg = 1;
5519  break;
5520 
5521  case 1:
5522  WlBuff = "0";
5523  WlFlg = 1;
5524  break;
5525 
5526  case 2:
5527  FilBuff = "0";
5528  FilFlg = 1;
5529  break;
5530 
5531  case 3:
5532  NDFilBuff = "0";
5533  NDFilFlg = 1;
5534  break;
5535 
5536 
5537  }
5538 }
static int FilFlg
Definition: CreateForms.c:50
static int MirFlg
Definition: CreateForms.c:47
static int NDFilFlg
Definition: CreateForms.c:53
char * WlBuff
Definition: CreateForms.c:45
static int WlFlg
Definition: CreateForms.c:44
const char * MirBuff
Definition: CreateForms.c:48
const char * NDFilBuff
Definition: CreateForms.c:54
const char * FilBuff
Definition: CreateForms.c:51
+ Here is the caller graph for this function:

§ DB_CloseAsk()

void DB_CloseAsk ( MOBJECT  p,
void *  od,
void *  ad 
)

Input Shell Callback Callback for the Input Shell destruction.

Returns
int

Definition at line 5483 of file CreateForms.c.

References AskFlg, MObjectGetText(), and TExp.

Referenced by DB_Ask().

5484 {
5485 
5486  char buff[80];
5487 
5488  MObjectGetText(p, buff);
5489  sscanf(buff, "%lf", &TExp);
5490 
5491 // AskBuff[0] = 0;
5492  AskFlg = 1;
5493 
5494 }
char * MObjectGetText(MOBJECT obj, char *text)
double TExp
CCD Exposure time.
Definition: DAS_Spat.c:130
static int AskFlg
Definition: CreateForms.c:5370
static double p
Definition: SOLPOS.C:131
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_dirCB()

void DB_dirCB ( MOBJECT  o,
void *  id,
void *  a_data 
)

Definition at line 2673 of file CreateForms.c.

References GrDIR.

Referenced by MDCreateMoveAzim(), MDCreateMoveGrat(), and MDCreateMoveZen().

2674 {
2675 
2676  int c = (int) a_data;
2677 
2678  switch(c)
2679  {
2680  case 0 :
2681  GrDIR = 0;
2682  break;
2683  case 1:
2684  GrDIR = 1;
2685  break;
2686 
2687  }
2688 }
int GrDIR
Definition: CreateForms.c:64
+ Here is the caller graph for this function:

§ DB_Esc_CB()

void DB_Esc_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

Definition at line 5540 of file CreateForms.c.

References FilBuff, FilFlg, MirBuff, MirFlg, NDFilBuff, NDFilFlg, WlBuff, and WlFlg.

5541 {
5542  int c = (int) ad;
5543  switch(c)
5544  {
5545  case 0:
5546  MirBuff = "0";
5547  MirFlg = 1;
5548  break;
5549 
5550  case 1:
5551  WlBuff = "0";
5552  WlFlg = 1;
5553  break;
5554 
5555  case 2:
5556  FilBuff = "0";
5557  FilFlg = 1;
5558  break;
5559 
5560  case 3:
5561  NDFilBuff = "0";
5562  NDFilFlg = 1;
5563  break;
5564 
5565 
5566  }
5567 }
static int FilFlg
Definition: CreateForms.c:50
static int MirFlg
Definition: CreateForms.c:47
static int NDFilFlg
Definition: CreateForms.c:53
char * WlBuff
Definition: CreateForms.c:45
static int WlFlg
Definition: CreateForms.c:44
const char * MirBuff
Definition: CreateForms.c:48
const char * NDFilBuff
Definition: CreateForms.c:54
const char * FilBuff
Definition: CreateForms.c:51

§ DB_Fil_CB()

void DB_Fil_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

callback for filter wheel positioning in Filter shell

Parameters
pcalling push button MObject
*adcalling push button number

Definition at line 6120 of file CreateForms.c.

References paramini::EqType, Fil_Code, Fil_Code8H, Fil_CodeNG, Fil_CodeNG1, Fil_CodeTropo, FilBuff, FilFlg, FilSet, GASCODNG1, GASCODNG2, GASCODNG3, GASCODNG4, LIS_, das::Paramini, and TROPOGAS.

Referenced by MDCreateSh_Fil(), and MDCreateSh_NDFil().

6121 {
6122  int c = (int) ad;
6123 
6124  if(DAS.Paramini.EqType == LIS_)
6125  FilBuff = Fil_Code8H[c];
6126  else
6127  {
6128  if(DAS.Paramini.EqType == TROPOGAS)
6129  FilBuff = Fil_CodeTropo[c];
6131  FilBuff = Fil_CodeNG[c];
6132  else if (DAS.Paramini.EqType == GASCODNG1)
6133  FilBuff = Fil_CodeNG1[c];
6134  else
6135  FilBuff = Fil_Code[c];
6136  }
6137 
6138  FilSet = c;
6139  FilFlg = 1;
6140 }
static int FilFlg
Definition: CreateForms.c:50
char * Fil_Code8H[]
const char array for the realisation of the Filters buttons in the Filter shell
Definition: DAS_Spat.c:204
#define LIS_
Lampedusa Island Spectrometer - ENEA.
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
char * Fil_CodeNG[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG2 and NG3...
Definition: DAS_Spat.c:216
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
#define GASCODNG4
GASCODNG 4.
char * Fil_CodeNG1[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG1 instrum...
Definition: DAS_Spat.c:213
char * Fil_Code[]
const char array for the realisation of the Filters buttons in the Filter shell
Definition: DAS_Spat.c:207
das DAS
Definition: CreateForms.c:98
char * Fil_CodeTropo[]
const char array for the realisation of the Filters buttons in the Filter shell for TROPOGAS instrume...
Definition: DAS_Spat.c:210
int FilSet
filter wheel position definition - for SD_FilterW
Definition: CreateForms.c:5992
int EqType
Spectrometer Type.
const char * FilBuff
Definition: CreateForms.c:51
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the caller graph for this function:

§ DB_FilSelButtKB_CB()

void DB_FilSelButtKB_CB ( MOBJECT  obj,
MKeyEvent pe,
void *  a_data 
)

callback for select a specified filter push button with the keyboard

Definition at line 6166 of file CreateForms.c.

References D_A, palette::DB_Sel, palette::DB_UnSel, pushbutt::Fil, das::Gui, MKeyEvent::keycode, L_A, MObjectSetBackgroundRGB(), gui::PushButt, R_A, and U_A.

Referenced by MDCreateSh_Fil(), and MDCreateSh_NDFil().

6167 {
6168 
6169  int c = (int) a_data;
6170 
6171  switch (pe->keycode)
6172  {
6173  case R_A:
6175  if (c == (sizeof DAS.Gui.PushButt.Fil / sizeof DAS.Gui.PushButt.Fil[0]) - 1)
6176  {
6178  break;
6179  }
6180  else
6181  {
6183  break;
6184  }
6185  case D_A:
6187  if (c == (sizeof DAS.Gui.PushButt.Fil / sizeof DAS.Gui.PushButt.Fil[0]) - 1)
6188  {
6190  break;
6191  }
6192  else
6193  {
6195  break;
6196  }
6197 
6198  case L_A:
6200  if (c == 0)
6201  {
6203  break;
6204  }
6205  else
6206  {
6208  break;
6209  }
6210  case U_A:
6212  if (c == 0)
6213  {
6215  break;
6216  }
6217  else
6218  {
6220  break;
6221  }
6222  }
6223 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
unsigned int keycode
Code for the pressed key.
Definition: Mguidefs.h:541
#define R_A
Definition: KEYCODES.H:280
short DB_Sel[3]
Selected Buttons Colors.
#define U_A
Definition: KEYCODES.H:278
MOBJECT Fil[6]
Filter Buttons.
#define L_A
Definition: KEYCODES.H:281
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
#define D_A
Definition: KEYCODES.H:279
short DB_UnSel[3]
Unselected Buttons Colors.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_FilSelButtMouse_CB()

void DB_FilSelButtMouse_CB ( MOBJECT  obj,
MMouseEvent pe,
void *  a_data 
)

callback changing the bakground color of the push button passing the mouse over it

Definition at line 6144 of file CreateForms.c.

References MMouseEvent::button, palette::DB_Sel, palette::DB_UnSel, pushbutt::Fil, das::Gui, MObjectSetBackgroundRGB(), and gui::PushButt.

6145 {
6146 
6147  int c = (int) a_data, i;
6148 
6149  for (i=0; i<(sizeof DAS.Gui.PushButt.Fil / sizeof DAS.Gui.PushButt.Fil[0]); i++)
6150  {
6152  }
6153 
6154  switch (pe->button)
6155  {
6156 
6157  case (Button1):
6158  {
6160  break;
6161  }
6162  }
6163 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
short DB_Sel[3]
Selected Buttons Colors.
MOBJECT Fil[6]
Filter Buttons.
unsigned int button
button pressed/released (Button1, Button2 or Button3), 0 if no button involved
Definition: Mguidefs.h:622
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
short DB_UnSel[3]
Unselected Buttons Colors.
+ Here is the call graph for this function:

§ DB_FindChar()

int DB_FindChar ( int  mod,
char *  string,
int  ch 
)

Definition at line 4295 of file CreateForms.c.

References result.

4296 {
4297 
4298  int result;
4299  char *pdest;
4300 
4301  if (mod) /* Search backward. */
4302  {
4303  pdest = strrchr( string, ch );
4304  result = pdest - string + 1;
4305  return result;
4306  }
4307  else
4308  {
4309  pdest = strchr( string, ch );
4310  result = pdest - string + 1;
4311  return result;
4312  }
4313 
4314  return -1;
4315 }
static double ch
Definition: SOLPOS.C:120
BYTE result
Definition: Dscad.c:30

§ DB_GratPosMode_CB()

void DB_GratPosMode_CB ( MOBJECT  o,
void *  a,
void *  v 
)

Definition at line 2778 of file CreateForms.c.

References gui::ContrPanel, das::Flag, flag::gratposmode, das::Gui, controlpanel::lbl_mvgratmode, MObjectSetSensitive(), MObjectSetText(), MObjectSetUnsensitive(), MRButtonGetActivationStatus(), controlpanel::rbStepGratEnc, and flag::stepgratenc.

Referenced by MDCreateMoveGrat().

2779 {
2780 
2781  int er = 0;
2782  int c = (int) v;
2783 
2784 
2786 
2787  if(er)
2788  {
2789  switch (c)
2790  {
2791  case 0:
2792  DAS.Flag.gratposmode = 0; //step
2796 
2797  break;
2798  case 1:
2799  DAS.Flag.gratposmode = 1; //wl
2803  DAS.Flag.stepgratenc = 0;
2804  ;
2805  break;
2806  }
2807  }
2808 
2809 }
gui Gui
Graphic User Interface Structure.
MOBJECT rbStepGratEnc[2]
radio buttons for steps encoding (move Grating free positioning)
void MObjectSetUnsensitive(MOBJECT obj)
int gratposmode
Grating position mode flag: = 0 step mode; = 1 Wl mode.
MOBJECT lbl_mvgratmode
Active Control Panel Labels for Sunset.
flag Flag
Structure for different flags.
void MObjectSetText(MOBJECT obj, const char *text)
int MRButtonGetActivationStatus(MOBJECT o)
controlpanel ContrPanel
Control Panel Structure.
das DAS
Definition: CreateForms.c:98
void MObjectSetSensitive(MOBJECT obj)
int stepgratenc
step to the grating mode: = 0 typed steps sent to the stepper; = 1 typed step are parametrized ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_Home_CB()

void DB_Home_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

Definition at line 6552 of file CreateForms.c.

References AMS1, AMS2, AMS3, AMS_Default(), AMS_dirfin(), DB_InitAMS(), DB_KB_ButtonActive(), das::Gui, MShellDestroy(), MShellUnrealize(), stepm::power, shells::Sh_Home, gui::Shells, stepm::slope, stepm::SM_A, stepm::SM_B, stepm::speed, stepm::step, and das::StepM.

Referenced by MDCreateSh_Home().

6553 {
6554  int c = (int) ad ;
6555  int er = 0;
6556 
6557 
6558  switch (c)
6559  {
6560  //Home Mirror
6561  case 0:
6562  //Disattiva i pulsanti sulla keyboard
6563  DB_KB_ButtonActive(0);
6564  er = DB_InitAMS(AMS1, 2, DAS.StepM.power[AMS1][DAS.StepM.SM_A],
6569  //Attiva i pulsanti sulla keyboard
6570  DB_KB_ButtonActive(1);
6571  break;
6572  //Home Grating
6573  case 1:
6574  //Disattiva i pulsanti sulla keyboard
6575  DB_KB_ButtonActive(0);
6576  AMS_Default(AMS1);
6582  //Attiva i pulsanti sulla keyboard
6583  DB_KB_ButtonActive(1);
6584  break;
6585 
6586  //Home Filter Wheel
6587  case 2:
6588  //Disattiva i pulsanti sulla keyboard
6589  DB_KB_ButtonActive(0);
6590  //HomeFiltersFast();
6591  AMS_Default(AMS2);
6592  er = DB_InitAMS(AMS2, 4, DAS.StepM.power[AMS2][DAS.StepM.SM_A],
6597  //Attiva i pulsanti sulla keyboard
6598  DB_KB_ButtonActive(1);
6599  break;
6600 
6601  //Home Neutral density Filter Wheel
6602  case 3:
6603  DB_KB_ButtonActive(0);
6604  AMS_Default(AMS2);
6605  er = DB_InitAMS(AMS2, 7, DAS.StepM.power[AMS2][DAS.StepM.SM_A],
6610  //Attiva i pulsanti sulla keyboard
6611  DB_KB_ButtonActive(1);
6612 
6613  break;
6614  //Home Zenith
6615  case 4:
6616  //Disattiva i pulsanti sulla keyboard
6617  DB_KB_ButtonActive(0);
6618  AMS_Default(AMS3);
6619  er = DB_InitAMS(AMS3, 5, DAS.StepM.power[AMS3][DAS.StepM.SM_A],
6624  AMS_dirfin(AMS3, 0, 1);
6625  //Attiva i pulsanti sulla keyboard
6626  DB_KB_ButtonActive(1);
6627  break;
6628 
6629  //Home Azimuth
6630  case 5:
6631  //Disattiva i pulsanti sulla keyboard
6632  DB_KB_ButtonActive(0);
6633  AMS_Default(AMS3);
6634  er = DB_InitAMS(AMS3, 6, DAS.StepM.power[AMS3][DAS.StepM.SM_A],
6639  //Attiva i pulsanti sulla keyboard
6640  DB_KB_ButtonActive(1);
6641  break;
6642 
6643  //Close panel
6644  case 6:
6647 
6648  break;
6649 
6650 
6651 
6652 
6653 
6654  }
6655 
6656 
6657 
6658 }
stepm StepM
Stepper motors parameters structure.
gui Gui
Graphic User Interface Structure.
void DB_KB_ButtonActive(int mod)
Enable/Disable Push buttons on the Control Panel.
Definition: CreateForms.c:3810
shells Shells
Shells structure.
#define AMS2
AMS2 address.
int DB_InitAMS(int nid, int mod, int powera, int stepa, int slopea, int speeda, int powerb, int stepb, int slopeb, int speedb)
Init selected AMS.
Definition: Init.c:1391
int SM_A
Motor A (su Y11) respectively: ID=0->InputMirror,ID=1->FilterWheel,ID=2->Zenith.
MOBJECT Sh_Home
Home Shell.
int slope[AMSMAX][2]
Stepper Motors Slope.
void AMS_Default(int id)
Set default values to AMS parameters Procedure for setting the default values of power.speed, stepping and slope to the selected AMS adapter.
Definition: Dxl.c:174
void MShellUnrealize(MOBJECT obj)
void MShellDestroy(MOBJECT obj)
int SM_B
Motor B (su Y12) respectively: ID=0->Grating,ID=1->Not Connected,ID=2->Azimuth.
das DAS
Definition: CreateForms.c:98
#define AMS1
AMS1 address.
int speed[AMSMAX][2]
Stepper Motors Speed.
int step[AMSMAX][2]
Stepper Motors Step.
int AMS_dirfin(int id, int dira, int dirb)
Set Final Directions .
Definition: Dxl.c:457
#define AMS3
AMS3 address.
int power[AMSMAX][2]
Stepper Motors Power.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_HomeSelButtKB_CB()

void DB_HomeSelButtKB_CB ( MOBJECT  obj,
MKeyEvent pe,
void *  a_data 
)

Definition at line 6490 of file CreateForms.c.

References D_A, palette::DB_Sel, palette::DB_UnSel, das::Gui, pushbutt::HomePos, MKeyEvent::keycode, L_A, MObjectSetBackgroundRGB(), gui::PushButt, R_A, and U_A.

6491 {
6492 
6493  int c = (int) a_data;
6494 
6495  switch (pe->keycode)
6496  {
6497  case R_A:
6499  if (c == (sizeof DAS.Gui.PushButt.HomePos / sizeof DAS.Gui.PushButt.HomePos[0])-1)
6500  {
6502  break;
6503  }
6504  else
6505  {
6507  break;
6508  }
6509  case D_A:
6511  if (c == (sizeof DAS.Gui.PushButt.HomePos / sizeof DAS.Gui.PushButt.HomePos[0])-1)
6512  {
6514  break;
6515  }
6516  else
6517  {
6519  break;
6520  }
6521 
6522  case L_A:
6524  if (c == 0)
6525  {
6527  break;
6528  }
6529  else
6530  {
6532  break;
6533  }
6534  case U_A:
6536  if (c == 0)
6537  {
6539  break;
6540  }
6541  else
6542  {
6544  break;
6545  }
6546  }
6547 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
unsigned int keycode
Code for the pressed key.
Definition: Mguidefs.h:541
#define R_A
Definition: KEYCODES.H:280
short DB_Sel[3]
Selected Buttons Colors.
#define U_A
Definition: KEYCODES.H:278
#define L_A
Definition: KEYCODES.H:281
MOBJECT HomePos[7]
Reference Position Buttons.
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
#define D_A
Definition: KEYCODES.H:279
short DB_UnSel[3]
Unselected Buttons Colors.
+ Here is the call graph for this function:

§ DB_HomeSelButtMouse_CB()

void DB_HomeSelButtMouse_CB ( MOBJECT  obj,
MMouseEvent pe,
void *  a_data 
)

Definition at line 6468 of file CreateForms.c.

References MMouseEvent::button, palette::DB_Sel, palette::DB_UnSel, das::Gui, pushbutt::HomePos, MObjectSetBackgroundRGB(), and gui::PushButt.

6469 {
6470 
6471  int c = (int) a_data, i;
6472 
6473  for (i=0; i<(sizeof DAS.Gui.PushButt.HomePos / sizeof DAS.Gui.PushButt.HomePos[0]); i++)
6474  {
6476  }
6477 
6478  switch (pe->button)
6479  {
6480 
6481  case (Button1):
6482  {
6484  break;
6485  }
6486  }
6487 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
short DB_Sel[3]
Selected Buttons Colors.
unsigned int button
button pressed/released (Button1, Button2 or Button3), 0 if no button involved
Definition: Mguidefs.h:622
MOBJECT HomePos[7]
Reference Position Buttons.
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
short DB_UnSel[3]
Unselected Buttons Colors.
+ Here is the call graph for this function:

§ DB_HorComm_CB()

void DB_HorComm_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

Definition at line 506 of file CreateForms.c.

References _MAX_PATH, controlpanel::Albl_CS, FB_PREFS::allow_dir_create, FB_PREFS::allow_dir_delete, FB_PREFS::allow_dir_rename, AutoRange(), FB_PREFS::bg_image_file, FB_PREFS::button_font, FB_PREFS::change_cwd, gui::ContrPanel, D_Average(), D_Calibra(), D_Saving(), d_fileman::DATADIRECTORY, DB_Ask(), DB_GetCCD(), DB_KB_ButtonActive(), DB_Save(), d_fileman::DBFILENAME, bil::DFILEM, DI_FindExtName(), DI_Lens(), das::DOption, flag::extlamp, ExtLamp(), ExtShutt(), flag::extshutter, False, optionini::filename, das::Flag, FB_PREFS::font, das::Gui, HELV_SMALL, d_fileman::HOMEDIRECTORY, gui::HorizMeas, horizmeas::lbl, horizmeas::led, flag::manhormeas, MFileBrowseExt(), MMessageDialog(), MObjectSetText(), MPixmapSetImageFile(), MShellDestroy(), MShellUnrealize(), NFileNameF, SaveCnt, optionini::savingmode, horizmeas::shell, TExp, FB_PREFS::transparent_tree, True, and ViewPlot().

Referenced by MDCreateHorMeas().

507 {
508  int c = (int) ad;
509  int er = 0;
510  char buf[_MAX_PATH];
511  char fext[4];
512 
513  FB_PREFS fbp;
514 
515  memset (&fbp, 0, sizeof (fbp));
516 
517  fbp.change_cwd = True;
518  fbp.allow_dir_create = True;
519  fbp.allow_dir_rename = True;
520  fbp.allow_dir_delete = True;
521  fbp.transparent_tree = False;
522  fbp.font = HELV_SMALL;
523  fbp.button_font = HELV_SMALL;
524  //Set Img file
525  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" );
526  fbp.bg_image_file =buf;
527 
528 
529  switch(c)
530  {
531  // External Lamp
532  case 3:
533  ExtLamp(0);
534  if(FLAG.extlamp == 0)
535  {
536  FLAG.extlamp = 1;
537  MObjectSetText(DAS.Gui.HorizMeas.lbl[3], " ON ");
538  MPixmapSetImageFile(DAS.Gui.HorizMeas.led[0], "SYS\\ledonQJ.bmp");
539 
540 
541  }
542  else
543  {
544  FLAG.extlamp = 0;
545  MObjectSetText(DAS.Gui.HorizMeas.lbl[3], " OFF ");
546  MPixmapSetImageFile(DAS.Gui.HorizMeas.led[0], "SYS\\ledoff.bmp");
547 
548  }
549  break;
550 
551  // External Shutter
552  case 4:
554  if(FLAG.extshutter == 0)
555  {
556  FLAG.extshutter = 1;
557  MObjectSetText(DAS.Gui.HorizMeas.lbl[4], "Close ");
558  MPixmapSetImageFile(DAS.Gui.HorizMeas.led[1], "SYS\\ledoff.bmp");
559 
560 
561  }
562  else
563  {
564  FLAG.extshutter = 0;
565  MObjectSetText(DAS.Gui.HorizMeas.lbl[4], "Open ");
566  MPixmapSetImageFile(DAS.Gui.HorizMeas.led[1], "SYS\\ledonQJ.bmp");
567 
568  }
569  break;
570 
571  // Calib
572  case 5:
573  D_Calibra();
574  break;
575 
576  //Autoranging
577  case 6:
578  AutoRange(0);
579  break;
580  //GetCCD
581  case 7:
582  sprintf(buf, "%.3lf", TExp);
583  er = DB_Ask("DOWNLOAD IMAGE", "", "Time Exposure: ", buf, 6, "Get Light");
584  if(er == 0)
585  {
586  DB_GetCCD(1);
587  }
588  break;
589  //Average
590  case 8:
591  D_Average(1);
592  break;
593  //Dark
594  case 9:
595  strcpy(buf, "1.0");
596  er = DB_Ask("DOWNLOAD DARK", "", "Time Exposure: ", buf, 6, "Get Dark");
597  if(er == 0)
598  {
599  DB_GetCCD(0);
600  }
601  break;
602 
603  //Save CCD Data
604  case 10:
605 
606  if(DAS.DOption.filename) // Automatic file Names
607  {
608  D_Saving();
609  }
610  else // free choice
611  {
613  er = MFileBrowseExt ("Save File as...", "*.bif", NFileNameF, BIL.DFILEM.DATADIRECTORY, &fbp);
614  else
615  er = MFileBrowseExt ("Save File as...", "*.dat", NFileNameF, BIL.DFILEM.DATADIRECTORY, &fbp);
616  if(er)
617  {
618  //check the presence of the extension
619  DI_FindExtName(NFileNameF, fext);
620  if( strcmp(fext,"") == 0 )
621  {
623  strcat(NFileNameF, ".bif");
624  else
625  strcat(NFileNameF, ".dat");
626  }
627  //check the the extension
628  DI_FindExtName(NFileNameF, fext);
629  if( (strcmp(fext,".dat") == 0) | (strcmp(fext,".Dat") == 0) )
630  {
633  }
634  else if( (strcmp(fext,".bif") == 0) | (strcmp(fext,".Bif") == 0) )
635  {
638  }
639  else
640  {
641  sprintf(buf, "The extension is not recognaized! Please re-type",fext);
642  MMessageDialog("DAS information", buf, " Ok ", NULL);
643  break;
644  }
645  }
646 
647 
648  sprintf(buf, "%s", NFileNameF );
650  sprintf(buf, "%05d", SaveCnt);
652  SaveCnt++;
653 
654  }
655  break;
656 
657  //On line Plot
658  case 11:
659  ViewPlot(1);
660  break;
661 
662  // ZOOM
663  case 12:
664  DI_Lens();
665  break;
666  //Close
667  case 13:
671  DAS.Flag.manhormeas = 0;
672 
673  break;
674 
675 
676  }
677 }
flag FLAG
Definition: CreateForms.c:84
gui Gui
Graphic User Interface Structure.
void DB_KB_ButtonActive(int mod)
Enable/Disable Push buttons on the Control Panel.
Definition: CreateForms.c:3810
int ExtLamp(int mod)
change the status of the external lamp change the status of the external lamp (ON or OFF) through a r...
Definition: Exec.c:1117
optionini DOption
Options for DAS execution.
int extlamp
0 = external lamp OFF; 1 = external lamp ON
int savingmode
Flag to set saving mode: 0=ASCII, 1=Binary.
CARD8 change_cwd
Definition: Mguidefs.h:1485
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
CARD8 allow_dir_create
Definition: Mguidefs.h:1487
int DB_Ask(char *tit, char *bmp, char *label, char *pre, int len, char *pbtype)
Input Shell Create an input box.
Definition: CreateForms.c:5373
int SaveCnt
Definition: Procedures.c:49
bil BIL
Definition: CreateForms.c:83
MTFont button_font
Definition: Mguidefs.h:1501
CARD8 allow_dir_delete
Definition: Mguidefs.h:1493
flag Flag
Structure for different flags.
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
MTFont font
Definition: Mguidefs.h:1499
#define False
Definition: Mguidefs.h:236
void D_Average(int mod)
Performs averaged measurements .
Definition: Procedures.c:2655
char DATADIRECTORY[_MAX_PATH]
Definition: bildef.h:201
MOBJECT Albl_CS[4]
Active Control Panel Labels for Camera Status 4.
void MShellUnrealize(MOBJECT obj)
void DB_Save(char *tit, int mod)
Save the acquired spectrum. Procedure that Save the acquired spectrum.
Definition: Save.c:552
void MObjectSetText(MOBJECT obj, const char *text)
void MShellDestroy(MOBJECT obj)
File Browser Preferences. Used by the Utility functions MFileBowserExt() and MDirBowserExt().
Definition: Mguidefs.h:1482
horizmeas HorizMeas
Structure for Horizontal Measurements.
void D_Saving(void)
Saving image. Procedure for saving the CCD Image Used since version 2.1.0. The coiche between binary ...
Definition: Procedures.c:1369
MOBJECT shell
Horizontal measurements shell.
CARD8 transparent_tree
Definition: Mguidefs.h:1495
d_fileman DFILEM
Definition: bildef.h:257
int D_Calibra(void)
Spectral Calibration Procedure for the spectral calibration with HG lamp. Shift of HG spectral line a...
Definition: Procedures.c:2313
#define HELV_SMALL
Definition: Mguidefs.h:881
char NFileNameF[_MAX_PATH]
Definition: CreateForms.c:71
int ViewPlot(int mod)
Create the plot shell. Procedure that build the plot shell for the data visualization.
Definition: Spat_Plot.c:3775
int ExtShutt(int mod)
change the status of the external shutter change the status of the external shutter (OPEN or CLOSED) ...
Definition: Exec.c:1155
char DBFILENAME[_MAX_PATH]
Definition: bildef.h:204
int MFileBrowseExt(const char *t, const char *ext, char *fname, char *dname, FB_PREFS *prefs)
double AutoRange(int mod)
Calculate the exposure time The optimum exposure time (TExp) is calculated with an initial TExpAR=0...
Definition: Procedures.c:899
MOBJECT led[2]
led[0] = Lamp, led[1] = Shutter
const char * bg_image_file
Definition: Mguidefs.h:1519
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
double TExp
CCD Exposure time.
Definition: DAS_Spat.c:130
controlpanel ContrPanel
Control Panel Structure.
das DAS
Definition: CreateForms.c:98
int manhormeas
1 = horizontal measurements in manual mode
#define True
Definition: Mguidefs.h:235
C_DEF void DI_FindExtName(char *fullname, char *fext)
int filename
Flag to set file name mode 0=Free choice, 1 = Automatic.
CARD8 allow_dir_rename
Definition: Mguidefs.h:1490
MOBJECT lbl[15]
generic labels for hor meas shell
int extshutter
0 = external shutter open; 1 = external shutter closed
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
C_DEF void DI_Lens(void)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_KB_ButtonActive()

void DB_KB_ButtonActive ( int  mod)

Enable/Disable Push buttons on the Control Panel.

Parameters
mod
  • 0 –> Disable all buttons
  • 1 –> Enable all buttons
  • 2 –> Enable the buttons for the execution in TEST AMS Mode
  • 3 –> Enable the buttons for the execution in OFFLINEPLOT Mode

Definition at line 3810 of file CreateForms.c.

References paramini::EqType, GASCODNG1, GASCODNG2, GASCODNG3, GASCODNG4, das::Gui, pushbutt::KeyB, mige::linked, LIS_, das::MIGE, MObjectSetSensitive(), MObjectSetUnsensitive(), das::Paramini, gui::PushButt, SPATRAM, SPATRAM2, SPATRAM3, SPATRAMPLUS, and TROPOGAS.

Referenced by ApplyChCB(), DB_ChooseButtons(), DB_Home_CB(), DB_HorComm_CB(), DB_Pause(), E_Home_SM4(), E_Home_SM6(), InitCCD_AMS(), MDCreate_CP(), MDCreateHorMeas(), SD_Azimuth(), SD_FilterW(), SD_Grating(), SD_Mirror(), SD_NDFilterW(), SD_Zenith(), SD_Zenith_H(), and SZA_FirstCalc().

3811 {
3812  int i;
3813  int eqtype;
3814  eqtype = DAS.Paramini.EqType;
3815 
3816  if(mod == 1)
3817  {
3818  for (i=0; i < (sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
3819  {
3820 
3821  MObjectSetSensitive(DAS.Gui.PushButt.KeyB[i]); // Set all buttons as Sensitive
3822  if (eqtype == TROPOGAS)
3823  {
3824 
3825  }
3826  if (eqtype == SPATRAMPLUS ||
3827  eqtype == GASCODNG1 ||
3828  eqtype == GASCODNG2 ||
3829  eqtype == GASCODNG3 ||
3830  eqtype == GASCODNG4 ||
3831  eqtype == SPATRAM2 ||
3832  eqtype == SPATRAM3)
3833  if(i==11 )
3834  MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[i]); // Horiz Measur
3835  if(i==8 || i==9)
3836  {
3837  if(DAS.MIGE.linked == 0)
3838  {
3840  //MObjectSetBackgroundRGB(optedit, 192, 192, 192);
3841 
3842  }
3843  }
3844 
3845 
3847  {
3848  if(i==3 || i==4 || i==8 || i==9 || i==10 || i== 11)
3850  }
3851  //if (DAS.Paramini.EqType == GASCODNG)
3852  // if(i==4 || i==5 || i==10 || i== 11)
3853  // MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[i]);
3854 
3855  }
3856  }
3857  else if(mod == 0)
3858  {
3859  for (i=0; i < (sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]) - 1; i++)
3860  {
3861 
3862  MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[i]); // Set all buttons as Unsensitive
3863  }
3864 
3865  }
3866  else if(mod == 3) //Case off lineplot
3867  {
3868  for (i=0; i < (sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
3869  {
3870 
3871  MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[i]); // Set all buttons as Unsensitive
3872  }
3873 
3880 
3881  }
3882 
3883  else if(mod == 2) //Case TEST AMS
3884  {
3885  for (i=0; i < (sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
3886  {
3887 
3888  MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[i]); // Set all buttons as Unensitive
3889  }
3890 
3906 
3907  }
3908 
3909  else if(mod == 4) //Case Horizontal Measurements (Deactivation)
3910  {
3911 
3915  //MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[3]);
3916 
3917  for (i=14; i < 22; i++)
3918  {
3919 
3920  MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[i]); // Set all buttons as Unensitive
3921  }
3922 
3923 
3924  }
3925 
3926  else if(mod == 5) //Case Horizontal Measurements (Activation)
3927  {
3928 
3933 
3934  for (i=14; i < 22; i++)
3935  {
3936 
3937  MObjectSetSensitive(DAS.Gui.PushButt.KeyB[i]); // Set all buttons as Unensitive
3938  }
3939 
3940 
3941  }
3942 
3943 
3944 }
#define SPATRAM
SPectrometer for Atmospheric TRAcers Measurements - CGE-UE Portugal.
gui Gui
Graphic User Interface Structure.
MOBJECT KeyB[28]
Keyboard Buttons.
void MObjectSetUnsensitive(MOBJECT obj)
#define LIS_
Lampedusa Island Spectrometer - ENEA.
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
mige MIGE
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
pushbutt PushButt
Push buttons.
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
#define GASCODNG4
GASCODNG 4.
int linked
#define SPATRAM3
SPATRAM3.
das DAS
Definition: CreateForms.c:98
int EqType
Spectrometer Type.
void MObjectSetSensitive(MOBJECT obj)
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_KeyB_CB()

void DB_KeyB_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

Push buttons callback
.

Parameters
pcalling push button MObject
*adcalling push button number

Definition at line 4693 of file CreateForms.c.

References _MAX_PATH, AboutCB(), controlpanel::Albl_CS, FB_PREFS::allow_dir_create, FB_PREFS::allow_dir_delete, FB_PREFS::allow_dir_rename, AMS3, AutoRange(), FB_PREFS::bg_image_file, FB_PREFS::button_font, FB_PREFS::change_cwd, ChkDigIO(), ChkWinInstance(), gui::ContrPanel, D_Average(), D_Calibra(), D_Saving(), D_XProfile(), D_YProfile(), d_fileman::DATADIRECTORY, DB_Ask(), DB_GetCCD(), DB_PasWd(), DB_Pause(), DB_Save(), DB_Tools(), d_fileman::DBFILENAME, bil::DFILEM, DI_FindExtName(), DI_Lens(), das::DOption, False, FANECU(), FDOUBLE, optionini::filename, FilSet, optionini::filtertype, FB_PREFS::font, FPLUS, das::Gui, HELV_SMALL, HGFlg, HgLamp(), d_fileman::HOMEDIRECTORY, MDCreateHorMeas(), MDCreateMoveGrat(), MDCreateMoveZenAzimDeg(), MDCreateSh_Fil(), MDCreateSh_Home(), MDCreateSh_Mir(), MDCreateSh_NDFil(), MDCreateSh_SimPos(), MDCreateSh_Wl(), MFileBrowseExt(), MirSet, MMessageDialog(), MObjectSetText(), NDFilSet, NFileNameF, stepm::OOP, QJFlg, QjLamp(), SaveCnt, optionini::savingmode, SD_FilterW(), SD_FNTorqueM(), SD_Grating(), SD_Mirror(), SD_NDFilterW(), shells::Sh_Home, shells::Sh_mg, tools::Sh_Tools, gui::Shells, ShutDOWN(), das::StepM, TExp, TMFlg, FB_PREFS::transparent_tree, True, ViewPlot(), and WlSet.

Referenced by MDCreate_CP(), and MDCreateHorMeas().

4694 {
4695  int c = (int) ad;
4696  int er = 0;
4697  char buf[_MAX_PATH];
4698  char fext[4];
4699 
4700  FB_PREFS fbp;
4701 
4702  memset (&fbp, 0, sizeof (fbp));
4703 
4704  fbp.change_cwd = True;
4705  fbp.allow_dir_create = True;
4706  fbp.allow_dir_rename = True;
4707  fbp.allow_dir_delete = True;
4708  fbp.transparent_tree = False;
4709  fbp.font = HELV_SMALL;
4710  fbp.button_font = HELV_SMALL;
4711  //Set Img file
4712  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" );
4713  fbp.bg_image_file =buf;
4714 
4715 
4716  switch(c)
4717  {
4718  //Mirror Shell
4719  case 0 :
4720  er = MDCreateSh_Mir();
4721  if(er == 0)
4722  {
4723  SD_Mirror(MirSet);
4724 // if(er) Status("Ready");
4725  }
4726  break;
4727  //Wavelwngth Shell
4728  case 1:
4729  er = MDCreateSh_Wl();
4730  if(er == 0)
4731  {
4732  er = SD_Grating(WlSet);
4733 // if(er) Status("Ready");
4734  }
4735  break;
4736  //Filter Shell
4737  case 2:
4738  er = MDCreateSh_Fil();
4739  if(er == 0)
4740  {
4741  SD_FilterW(FilSet);
4742 // if(er) Status("Ready");
4743  }
4744  break;
4745  // NDFilter shell
4746  case 3:
4747 
4748  if(DAS.DOption.filtertype == FPLUS )
4749  {
4750  if(TMFlg)
4751  SD_FNTorqueM(0);
4752  else
4753  SD_FNTorqueM(1);
4754  }
4755  if(DAS.DOption.filtertype == FDOUBLE)
4756  {
4757  er = MDCreateSh_NDFil();
4758  if(er == 0)
4759  {
4761 // if(er) Status("Ready");
4762  }
4763  }
4764 
4765  break;
4766 
4767  // Move Zenith Azimuth of a Free step number
4768  case 4:
4770  break;
4771  //Home Mirror
4772  case 5:
4773  // Reference position of All devices
4774  // er = MDCreateSh_Home();
4775  sprintf(buf, "%s", "SET HOME POSITION");
4776  er = ChkWinInstance(buf, DAS.Gui.Shells.Sh_Home);
4777  if (er==0)
4778  MDCreateSh_Home();
4779 /*
4780 
4781  //Disattiva i pulsanti sulla keyboard
4782  DB_KB_ButtonActive(0);
4783  er = DB_InitAMS(AMS1, 2, DAS.StepM.power[AMS1][DAS.StepM.SM_A],
4784  DAS.StepM.step[AMS1][DAS.StepM.SM_A], DAS.StepM.slope[AMS1][DAS.StepM.SM_A],
4785  DAS.StepM.speed[AMS1][DAS.StepM.SM_A], DAS.StepM.power[AMS1][DAS.StepM.SM_B],
4786  DAS.StepM.step[AMS1][DAS.StepM.SM_B], DAS.StepM.slope[AMS1][DAS.StepM.SM_B],
4787  DAS.StepM.speed[AMS1][DAS.StepM.SM_B]);
4788  //Attiva i pulsanti sulla keyboard
4789  DB_KB_ButtonActive(1);
4790 */
4791  break;
4792  //Home Grating
4793  case 6:
4794 
4795  er = ChkDigIO(DAS.StepM.OOP[AMS3], 1);
4796  if (er)
4797  {
4798  FANECU(0);
4799  }
4800  else
4801  {
4802  FANECU(1);
4803  }
4804  // Setto direzioni finali
4805  //AMS_dirfin(AMS1, 0, 0);
4806  // Set default values
4807  //Disattiva i pulsanti sulla keyboard
4808  /* DB_KB_ButtonActive(0);
4809  AMS_Default(AMS1);
4810  er = DB_InitAMS(AMS1, 3, DAS.StepM.power[AMS1][DAS.StepM.SM_A],
4811  DAS.StepM.step[AMS1][DAS.StepM.SM_A], DAS.StepM.slope[AMS1][DAS.StepM.SM_A],
4812  DAS.StepM.speed[AMS1][DAS.StepM.SM_A], DAS.StepM.power[AMS1][DAS.StepM.SM_B],
4813  DAS.StepM.step[AMS1][DAS.StepM.SM_B], DAS.StepM.slope[AMS1][DAS.StepM.SM_B],
4814  DAS.StepM.speed[AMS1][DAS.StepM.SM_B]);
4815  //Attiva i pulsanti sulla keyboard
4816  DB_KB_ButtonActive(1);
4817  */
4818  break;
4819 
4820  //Home Filter
4821  case 7:
4822  //Disattiva i pulsanti sulla keyboard
4823  /*
4824  DB_KB_ButtonActive(0);
4825  //HomeFiltersFast();
4826  AMS_Default(AMS2);
4827  er = DB_InitAMS(AMS2, 4, DAS.StepM.power[AMS2][DAS.StepM.SM_A],
4828  DAS.StepM.step[AMS2][DAS.StepM.SM_A], DAS.StepM.slope[AMS2][DAS.StepM.SM_A],
4829  DAS.StepM.speed[AMS2][DAS.StepM.SM_A], DAS.StepM.power[AMS2][DAS.StepM.SM_B],
4830  DAS.StepM.step[AMS2][DAS.StepM.SM_B], DAS.StepM.slope[AMS2][DAS.StepM.SM_B],
4831  DAS.StepM.speed[AMS2][DAS.StepM.SM_B]);
4832  //Attiva i pulsanti sulla keyboard
4833  DB_KB_ButtonActive(1);
4834  */
4835  break;
4836 
4837 
4838 
4839 
4840  //Home Zenith
4841  case 8:
4842  /*
4843  //Disattiva i pulsanti sulla keyboard
4844  DB_KB_ButtonActive(0);
4845  AMS_Default(AMS3);
4846  er = DB_InitAMS(AMS3, 5, DAS.StepM.power[AMS3][DAS.StepM.SM_A],
4847  DAS.StepM.step[AMS3][DAS.StepM.SM_A], DAS.StepM.slope[AMS3][DAS.StepM.SM_A],
4848  DAS.StepM.speed[AMS3][DAS.StepM.SM_A], DAS.StepM.power[AMS3][DAS.StepM.SM_B],
4849  DAS.StepM.step[AMS3][DAS.StepM.SM_B], DAS.StepM.slope[AMS3][DAS.StepM.SM_B],
4850  DAS.StepM.speed[AMS3][DAS.StepM.SM_B]);
4851  AMS_dirfin(AMS3, 0, 1);
4852  //Attiva i pulsanti sulla keyboard
4853  DB_KB_ButtonActive(1);
4854  */
4855  break;
4856 
4857  //Home Azimuth
4858  case 9:
4859  /*
4860  //Disattiva i pulsanti sulla keyboard
4861  DB_KB_ButtonActive(0);
4862  AMS_Default(AMS3);
4863  er = DB_InitAMS(AMS3, 6, DAS.StepM.power[AMS3][DAS.StepM.SM_A],
4864  DAS.StepM.step[AMS3][DAS.StepM.SM_A], DAS.StepM.slope[AMS3][DAS.StepM.SM_A],
4865  DAS.StepM.speed[AMS3][DAS.StepM.SM_A], DAS.StepM.power[AMS3][DAS.StepM.SM_B],
4866  DAS.StepM.step[AMS3][DAS.StepM.SM_B], DAS.StepM.slope[AMS3][DAS.StepM.SM_B],
4867  DAS.StepM.speed[AMS3][DAS.StepM.SM_B]);
4868  //Attiva i pulsanti sulla keyboard
4869  DB_KB_ButtonActive(1);
4870  */
4871  break;
4872 
4873  // Spectrometer Devices Simultaneous Positioning
4874  case 10:
4875  er = MDCreateSh_SimPos();
4876  break;
4877  //Horizontal Measurement shell
4878  case 11:
4879  MDCreateHorMeas();
4880  break;
4881 
4882  // Move Grating Free step number
4883  case 12:
4884  sprintf(buf, "%s", "MOVE GRATING");
4885  er = ChkWinInstance(buf, DAS.Gui.Shells.Sh_mg);
4886  if (er==0)
4887  MDCreateMoveGrat();
4888  break;
4889  //Configuration Shell
4890  case 13:
4891  DB_PasWd();
4892  break;
4893  //Calibration
4894  case 14:
4895  D_Calibra();
4896  break;
4897  //AutoRange
4898  case 15:
4899  AutoRange(0);
4900  break;
4901  //Get CCD
4902  case 16:
4903  sprintf(buf, "%.3lf", TExp);
4904  er = DB_Ask("DOWNLOAD IMAGE", "", "Time Exposure: ", buf, 6, "Get Light");
4905 
4906  if(er == 0)
4907  {
4908  // sscanf(buf, "%lf", &TExp);
4909  DB_GetCCD(1);
4910  // save_imgASCII(filedati, 1);
4911  }
4912  break;
4913  //Averaging
4914  case 17:
4915  D_Average(1);
4916  break;
4917  //Dark
4918  case 18:
4919  //strcpy(buf, "0.000");
4920  sprintf(buf, "%.3lf", TExp);
4921  er = DB_Ask("DOWNLOAD DARK", "", "Time Exposure: ", buf, 6, "Get Dark");
4922  if(er == 0)
4923  {
4924  // sscanf(buf, "%lf", &TExp);
4925  DB_GetCCD(0);
4926  }
4927  break;
4928  //Save CCD Data
4929  case 19:
4930 
4931  if(DAS.DOption.filename) // Automatic file Names
4932  {
4933  D_Saving();
4934  }
4935  else // free choice
4936  {
4937  if(DAS.DOption.savingmode)
4938  er = MFileBrowseExt ("Save File as...", "*.bif", NFileNameF, BIL.DFILEM.DATADIRECTORY, &fbp);
4939  else
4940  er = MFileBrowseExt ("Save File as...", "*.dat", NFileNameF, BIL.DFILEM.DATADIRECTORY, &fbp);
4941  if(er)
4942  {
4943  //check the presence of the extension
4944  DI_FindExtName(NFileNameF, fext);
4945  if( strcmp(fext,"") == 0 )
4946  {
4947  if(DAS.DOption.savingmode)
4948  strcat(NFileNameF, ".bif");
4949  else
4950  strcat(NFileNameF, ".dat");
4951  }
4952  //check the the extension
4953  DI_FindExtName(NFileNameF, fext);
4954  if( (strcmp(fext,".dat") == 0) | (strcmp(fext,".Dat") == 0) )
4955  {
4958  }
4959  else if( (strcmp(fext,".bif") == 0) | (strcmp(fext,".Bif") == 0) )
4960  {
4963  }
4964  else
4965  {
4966  sprintf(buf, "The extension is not recognaized! Please re-type",fext);
4967  MMessageDialog("DAS information", buf, " Ok ", NULL);
4968  break;
4969  }
4970  }
4971 
4972 
4973  sprintf(buf, "%s", NFileNameF );
4975  sprintf(buf, "%05d", SaveCnt);
4977  SaveCnt++;
4978 
4979  }
4980  break;
4981 
4982 
4983  case 20:
4984  //On line Plot
4985  ViewPlot(1);
4986  break;
4987 
4988 
4989  case 21:
4990  DI_Lens();
4991  break;
4992  //Profiling X Axis
4993  case 22:
4994  D_XProfile();
4995  break;
4996  //Profiling Y Axis
4997  case 23:
4998  D_YProfile();;
4999  break;
5000  //Configuration Shell
5001  //About Shell
5002  case 24:
5003  AboutCB(NULL, NULL, 0);
5004  break;
5005  //Pause shell
5006  case 25:
5007  DB_Pause();
5008  break;
5009  //Tools shell
5010  case 26:
5011  sprintf(buf, "%s", "DAS TOOLS");
5012  er = ChkWinInstance(buf, TOOLS.Sh_Tools);
5013  if (er==0)
5014  DB_Tools();
5015  break;
5016  //Quit shell
5017  case 27:
5018  ShutDOWN();
5019  break;
5020  //HG Lamp
5021  case 100:
5022  if(HGFlg)
5023  HgLamp(0);
5024  else
5025  HgLamp(1);
5026  break;
5027  //Qj Lamp
5028  case 111:
5029  if(QJFlg)
5030  QjLamp(0);
5031  else
5032  QjLamp(1);
5033  break;
5034 
5035 
5036 
5037  }
5038 }
MOBJECT Sh_Tools
Shell for tools.
stepm StepM
Stepper motors parameters structure.
gui Gui
Graphic User Interface Structure.
int SD_Grating(int ang)
Positioning Grating. The Grating move to the position specified by ang (Wavelength) ...
Definition: Spat_Device.c:2108
int SD_Mirror(int where)
Positioning Input Mirror. The Input Mirror reaches the position specified by where.
Definition: Spat_Device.c:1898
shells Shells
Shells structure.
void MDCreateMoveZenAzimDeg(void)
Definition: CreateForms.c:3573
void HgLamp(int mod)
HG Lamp ON/OFF .
Definition: Spat_Device.c:2673
optionini DOption
Options for DAS execution.
int savingmode
Flag to set saving mode: 0=ASCII, 1=Binary.
void SD_FNTorqueM(int mod)
Positioning NDFilter. .
Definition: Spat_Device.c:3066
CARD8 change_cwd
Definition: Mguidefs.h:1485
void D_XProfile(void)
Definition: CreateForms.c:2656
CARD8 allow_dir_create
Definition: Mguidefs.h:1487
int DB_Ask(char *tit, char *bmp, char *label, char *pre, int len, char *pbtype)
Input Shell Create an input box.
Definition: CreateForms.c:5373
int SaveCnt
Definition: Procedures.c:49
bil BIL
Definition: CreateForms.c:83
MTFont button_font
Definition: Mguidefs.h:1501
int QJFlg
Definition: DAS_Spatram.h:2969
CARD8 allow_dir_delete
Definition: Mguidefs.h:1493
int MDCreateSh_Mir(void)
Create the shell for the available Mirror Positions. Procedure that build the shell for the positioni...
Definition: CreateForms.c:5614
int MDCreateSh_Fil(void)
Create the shell for the available Filters. Procedure that build the shell for the positioning of the...
Definition: CreateForms.c:5994
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
MOBJECT Sh_Home
Home Shell.
MTFont font
Definition: Mguidefs.h:1499
MOBJECT MDCreateHorMeas(void)
Definition: CreateForms.c:681
#define False
Definition: Mguidefs.h:236
void D_Average(int mod)
Performs averaged measurements .
Definition: Procedures.c:2655
int SD_FilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2244
MOBJECT Sh_mg
Password Shell.
char DATADIRECTORY[_MAX_PATH]
Definition: bildef.h:201
int WlSet
Wavelength position definition - for SD_Grating.
Definition: DAS_Spat.c:135
MOBJECT Albl_CS[4]
Active Control Panel Labels for Camera Status 4.
void DB_Save(char *tit, int mod)
Save the acquired spectrum. Procedure that Save the acquired spectrum.
Definition: Save.c:552
void MObjectSetText(MOBJECT obj, const char *text)
int TMFlg
Definition: DAS_Spatram.h:2972
void QjLamp(int mod)
QJ Lamp ON/OFF .
Definition: Spat_Device.c:2724
int MDCreateSh_Home(void)
Definition: CreateForms.c:6662
void DB_PasWd(void)
Definition: CreateForms.c:2600
int ChkDigIO(unsigned char word, int bitn)
check for digital I/O Status
File Browser Preferences. Used by the Utility functions MFileBowserExt() and MDirBowserExt().
Definition: Mguidefs.h:1482
void D_Saving(void)
Saving image. Procedure for saving the CCD Image Used since version 2.1.0. The coiche between binary ...
Definition: Procedures.c:1369
void DB_Tools()
Definition: CreateForms.c:4158
#define FDOUBLE
double filter wheel
#define FPLUS
Filter Wheel Torque Motor.
CARD8 transparent_tree
Definition: Mguidefs.h:1495
d_fileman DFILEM
Definition: bildef.h:257
int MDCreateSh_Wl(void)
Create the shell for the available Wavelength. Procedure that build the shell for the availables wave...
Definition: CreateForms.c:5815
int D_Calibra(void)
Spectral Calibration Procedure for the spectral calibration with HG lamp. Shift of HG spectral line a...
Definition: Procedures.c:2313
unsigned char OOP[AMSMAX]
2 byte Word for AMS Opto insulated Output Port Status
#define HELV_SMALL
Definition: Mguidefs.h:881
void AboutCB(MOBJECT o, void *s, void *v)
Create the About information shell. .
Definition: About.c:39
char NFileNameF[_MAX_PATH]
Definition: CreateForms.c:71
int ViewPlot(int mod)
Create the plot shell. Procedure that build the plot shell for the data visualization.
Definition: Spat_Plot.c:3775
int ChkWinInstance(char *buff, MOBJECT obj)
Definition: DAS_Spat.c:2153
char DBFILENAME[_MAX_PATH]
Definition: bildef.h:204
int MFileBrowseExt(const char *t, const char *ext, char *fname, char *dname, FB_PREFS *prefs)
double AutoRange(int mod)
Calculate the exposure time The optimum exposure time (TExp) is calculated with an initial TExpAR=0...
Definition: Procedures.c:899
void DB_Pause(void)
Definition: CreateForms.c:3766
void MDCreateMoveGrat(void)
Free Grating positioning. Procedure that build the shell for Free Grating positioning.
Definition: CreateForms.c:2859
void ShutDOWN(void)
Creates shell for Shutting down the instrument .
Definition: CreateForms.c:6903
const char * bg_image_file
Definition: Mguidefs.h:1519
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
int MDCreateSh_NDFil(void)
Definition: CreateForms.c:6233
double TExp
CCD Exposure time.
Definition: DAS_Spat.c:130
int NDFilSet
ND filter wheel position definition - for SD_NDFilterW.
Definition: CreateForms.c:6231
controlpanel ContrPanel
Control Panel Structure.
void FANECU(int mod)
FAN ON/OFF .
Definition: Spat_Device.c:2619
das DAS
Definition: CreateForms.c:98
int MDCreateSh_SimPos(void)
Definition: CreateForms.c:4411
#define True
Definition: Mguidefs.h:235
C_DEF void DI_FindExtName(char *fullname, char *fext)
int FilSet
filter wheel position definition - for SD_FilterW
Definition: CreateForms.c:5992
int filename
Flag to set file name mode 0=Free choice, 1 = Automatic.
CARD8 allow_dir_rename
Definition: Mguidefs.h:1490
int HGFlg
Definition: DAS_Spatram.h:2968
int SD_NDFilterW(int filter)
Positioning Filter wheel. The filter wheel move on the filter number specified by filter...
Definition: Spat_Device.c:2354
void D_YProfile(void)
Definition: CreateForms.c:2638
tools TOOLS
Definition: CreateForms.c:81
#define AMS3
AMS3 address.
int DB_GetCCD(int mod)
Get CCD Image. .
Definition: Procedures.c:1749
C_DEF void DI_Lens(void)
int MirSet
mirror position definition - for SD_Mirror
Definition: CreateForms.c:5612
+ Here is the caller graph for this function:

§ DB_KeyComSelButtKB_CB()

void DB_KeyComSelButtKB_CB ( MOBJECT  obj,
MKeyEvent pe,
void *  a_data 
)

callback for selsct a specified push button with the keyboard

Definition at line 5152 of file CreateForms.c.

References gui::ContrPanel, D_A, palette::DB_Sel, palette::DB_UnSel, palette::DB_UnSelFG, ESC, F1, F10, F11, F12, F2, F3, F5, F6, F7, F8, F9, das::Gui, pushbutt::KeyB, MKeyEvent::keycode, L_A, MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MSelectObject(), controlpanel::pblamps, gui::PushButt, R_A, and U_A.

Referenced by MDCreate_CP().

5153 {
5154 
5155  int c = (int) a_data, i;
5156 
5157 
5158  switch (pe->keycode)
5159  {
5160  case R_A:
5163  if (c == (sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]) - 1)
5164  {
5167  break;
5168  }
5169  else
5170  {
5173  break;
5174  }
5175  case D_A:
5176 // MObjectSetBackgroundRGB(obj, DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
5177 // MObjectSetForegroundRGB(obj, 255 ,0,0);
5178 
5179  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5180  {
5183  if (i == c + 1)
5184  {
5187  MSelectObject(obj);
5188  }
5189 
5190 
5191  }
5194  break;
5195 /* MObjectSetBackgroundRGB(DAS.Gui.PushButt.KeyB[c], DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
5196  MObjectSetForegroundRGB(DAS.Gui.PushButt.KeyB[c], DPAL.DB_UnSelFG[0], DPAL.DB_UnSelFG[1], DPAL.DB_UnSelFG[2]);
5197  if (c == (sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]) - 1)
5198  {
5199  MObjectSetBackgroundRGB(DAS.Gui.PushButt.KeyB[0], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
5200  MObjectSetForegroundRGB(DAS.Gui.PushButt.KeyB[0], ~DPAL.DB_Sel[0], ~DPAL.DB_Sel[1], ~DPAL.DB_Sel[2]);
5201  break;
5202  }
5203  else
5204  {
5205  MObjectSetBackgroundRGB(DAS.Gui.PushButt.KeyB[c + 1], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
5206  MObjectSetForegroundRGB(DAS.Gui.PushButt.KeyB[c + 1], ~DPAL.DB_Sel[0], ~DPAL.DB_Sel[1], ~DPAL.DB_Sel[2]);
5207  break;
5208  }
5209 */
5210  case L_A:
5213  if (c == 0)
5214  {
5217  break;
5218  }
5219  else
5220  {
5223  break;
5224  }
5225  case U_A:
5228  if (c == 0)
5229  {
5232  break;
5233  }
5234  else
5235  {
5238  break;
5239  }
5240  case F1:
5241  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]) ; i++)
5242  {
5244  }
5247  break;
5248  case F2:
5249  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5250  {
5252  }
5255  break;
5256  case F3:
5257  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5258  {
5260  }
5263  break;
5264  case F5:
5265  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5266  {
5268  }
5271  break;
5272  case F6:
5273  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5274  {
5276  }
5279  break;
5280  case F7:
5281  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5282  {
5284  }
5287  break;
5288  case F8:
5289  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5290  {
5292  }
5295  break;
5296  case F9:
5297  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5298  {
5300  }
5303  break;
5304  case F10:
5305  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5306  {
5308  }
5311  break;
5312  case F11:
5313  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5314  {
5316  }
5319  break;
5320  case F12:
5321  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5322  {
5324  }
5327  break;
5328 /* case A_F1:
5329  for (i=0; i<21; i++)
5330  {
5331  MObjectSetBackgroundRGB(DAS.Gui.PushButt.KeyB[i], DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
5332  }
5333  MObjectSetBackgroundRGB(DAS.Gui.PushButt.KeyB[c], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
5334  break;
5335  case A_F2:
5336  for (i=0; i<21; i++)
5337  {
5338  MObjectSetBackgroundRGB(DAS.Gui.PushButt.KeyB[i], DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
5339  }
5340  MObjectSetBackgroundRGB(DAS.Gui.PushButt.KeyB[c], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
5341  break;
5342  case A_F3:
5343  for (i=0; i<21; i++)
5344  {
5345  MObjectSetBackgroundRGB(DAS.Gui.PushButt.KeyB[i], DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
5346  }
5347  MObjectSetBackgroundRGB(DAS.Gui.PushButt.KeyB[c], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
5348  break;
5349 */
5350  case ESC:
5351  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5352  {
5354  }
5357  break;
5358  }
5359 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
unsigned int keycode
Code for the pressed key.
Definition: Mguidefs.h:541
void MSelectObject(MOBJECT f)
MOBJECT KeyB[28]
Keyboard Buttons.
#define ESC
Definition: KEYCODES.H:265
#define F3
Definition: KEYCODES.H:339
#define F10
Definition: KEYCODES.H:346
#define F2
Definition: KEYCODES.H:338
MOBJECT pblamps[2]
Control Panel Push buttons for HG and QJ Lamps.
#define R_A
Definition: KEYCODES.H:280
short DB_Sel[3]
Selected Buttons Colors.
#define F9
Definition: KEYCODES.H:345
#define F7
Definition: KEYCODES.H:343
#define U_A
Definition: KEYCODES.H:278
#define L_A
Definition: KEYCODES.H:281
#define F12
Definition: KEYCODES.H:348
#define F11
Definition: KEYCODES.H:347
#define F5
Definition: KEYCODES.H:341
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
#define F8
Definition: KEYCODES.H:344
controlpanel ContrPanel
Control Panel Structure.
das DAS
Definition: CreateForms.c:98
#define D_A
Definition: KEYCODES.H:279
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
#define F6
Definition: KEYCODES.H:342
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
#define F1
Definition: KEYCODES.H:337
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_KeyComSelButtMouse_CB()

void DB_KeyComSelButtMouse_CB ( MOBJECT  obj,
MMouseEvent pe,
void *  a_data 
)

callback for selsct a specified push button with the keyboard

Definition at line 5072 of file CreateForms.c.

References optionini::aaopmode, MMouseEvent::button, gui::ContrPanel, palette::DB_Sel, palette::DB_UnSel, palette::DB_UnSelFG, das::DOption, E_MOTION, das::Gui, pushbutt::KeyB, MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetUnsensitive(), MSelectObject(), controlpanel::pblamps, gui::PushButt, and MMouseEvent::type.

Referenced by MDCreate_CP().

5073 {
5074 
5075  int c = (int) a_data, i;
5076 
5077 /* for (i=0; i<(sizeof PBUTT.KeyB / sizeof PBUTT.KeyB[0]); i++)
5078  {
5079  MObjectSetBackgroundRGB(PBUTT.KeyB[i], DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
5080 
5081  /**************************************
5082  SHAREWARE
5083  if (i==2 | i==9 |i==3 | i==4 |i==6 | i==11 |i==12 | i==13 |i==19 | i== 20| i==17 |i==10 | i== 21)
5084  {
5085  MObjectSetBackgroundRGB(PBUTT.KeyB[i], 150, 150, 150);
5086  }
5087  /***************************************/
5088 
5089 // }
5090 
5091 
5092 
5093  switch (pe->button)
5094  {
5095 
5096  case (Button1):
5097  {
5098  //MObjectSetBackgroundRGB(PBUTT.KeyB[c], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
5100  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5101  if(i != c)
5102  {
5105  }
5106  /***************************************/
5107  /* SHAREWARE */
5108 // if (c==2 | c==9 |c==3 | c==4 |c==6 | c==11 |c==12 | c==13 |c==19 | c== 20| c==17 |c==10 | c== 21)
5109 // {
5110 // MObjectSetBackgroundRGB(DAS.Gui.PushButt.KeyB[c], 150, 150, 150);
5111 // }
5112  /***************************************/
5113 
5114 
5115  break;
5116  }
5117  }
5118  switch (pe->type)
5119  {
5120 
5121  case (E_MOTION):
5122  {
5124  MSelectObject(obj);
5125  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5126  {
5127  if(i != c)
5128  {
5131  }
5132  }
5135 
5138  if(DAS.DOption.aaopmode == 0)
5139  {
5142  //MObjectSetBackgroundRGB(optedit, 192, 192, 192);
5143  }
5144 
5145  break;
5146  }
5147  }
5148 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
optionini DOption
Options for DAS execution.
void MSelectObject(MOBJECT f)
MOBJECT KeyB[28]
Keyboard Buttons.
void MObjectSetUnsensitive(MOBJECT obj)
MOBJECT pblamps[2]
Control Panel Push buttons for HG and QJ Lamps.
short DB_Sel[3]
Selected Buttons Colors.
unsigned int button
button pressed/released (Button1, Button2 or Button3), 0 if no button involved
Definition: Mguidefs.h:622
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
controlpanel ContrPanel
Control Panel Structure.
das DAS
Definition: CreateForms.c:98
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
int aaopmode
operation mode for the Alt Az Platform, 0 = solar Traxker; 1 = Anti-Solar Tracker; 2 = Free Positioni...
int type
Event type (E_BUTTON_PRESS, E_BUTTON_RELEASE, E_MOTION, E_MOUSE_WHEEL)
Definition: Mguidefs.h:612
#define E_MOTION
Definition: Mguidefs.h:277
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_LampSelButtMouse_CB()

void DB_LampSelButtMouse_CB ( MOBJECT  obj,
MMouseEvent pe,
void *  a_data 
)

callback for selsct a specified push button with the keyboard

Definition at line 5041 of file CreateForms.c.

References gui::ContrPanel, palette::DB_Sel, palette::DB_UnSel, E_MOTION, das::Gui, pushbutt::KeyB, MObjectSetBackgroundRGB(), MSelectObject(), controlpanel::pblamps, gui::PushButt, and MMouseEvent::type.

Referenced by MDCreate_CP().

5042 {
5043  int c = (int) a_data, i;
5044 
5045 
5046  switch (pe->type)
5047  {
5048  case (E_MOTION):
5049  {
5050 
5052  MSelectObject(obj);
5053  switch (c)
5054  {
5055  case 0:
5057  break;
5058  case 1:
5060  break;
5061  }
5062  for (i=0; i<(sizeof DAS.Gui.PushButt.KeyB / sizeof DAS.Gui.PushButt.KeyB[0]); i++)
5064  }
5065  break;
5066  }
5067 
5068 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
void MSelectObject(MOBJECT f)
MOBJECT KeyB[28]
Keyboard Buttons.
MOBJECT pblamps[2]
Control Panel Push buttons for HG and QJ Lamps.
short DB_Sel[3]
Selected Buttons Colors.
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
controlpanel ContrPanel
Control Panel Structure.
das DAS
Definition: CreateForms.c:98
short DB_UnSel[3]
Unselected Buttons Colors.
int type
Event type (E_BUTTON_PRESS, E_BUTTON_RELEASE, E_MOTION, E_MOUSE_WHEEL)
Definition: Mguidefs.h:612
#define E_MOTION
Definition: Mguidefs.h:277
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_Mir_CB()

void DB_Mir_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

callback for input mirror positioning in Mirror shell

Parameters
pcalling push button MObject
*adcalling push button number

Definition at line 5692 of file CreateForms.c.

References paramini::EqType, GASCODNG4, Mir_Code, Mir_CodeTropo, MirBuff, MirFlg, MirSet, das::Paramini, SPATRAM3, and TROPOGAS.

Referenced by MDCreateSh_Mir().

5693 {
5694  int c = (int) ad;
5695 
5696 
5698  MirBuff = Mir_CodeTropo[c];
5699  else
5700  MirBuff = Mir_Code[c];
5701 
5702 
5703  MirSet = c;
5704  MirFlg = 1;
5705 }
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
Definition: DAS_Spat.c:231
static int MirFlg
Definition: CreateForms.c:47
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define GASCODNG4
GASCODNG 4.
#define SPATRAM3
SPATRAM3.
const char * MirBuff
Definition: CreateForms.c:48
das DAS
Definition: CreateForms.c:98
int EqType
Spectrometer Type.
int MirSet
mirror position definition - for SD_Mirror
Definition: CreateForms.c:5612
const char * Mir_CodeTropo[]
const char array for the realisation of the Mirrors buttons in the Mirror shell for TROPOGAS ...
Definition: DAS_Spat.c:234
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the caller graph for this function:

§ DB_MirSelButtKB_CB()

void DB_MirSelButtKB_CB ( MOBJECT  obj,
MKeyEvent pe,
void *  a_data 
)

callback for selsct a specified mirror push button with the keyboard

Definition at line 5748 of file CreateForms.c.

References D_A, palette::DB_Sel, palette::DB_UnSel, das::Gui, MKeyEvent::keycode, L_A, pushbutt::Mir, MObjectSetBackgroundRGB(), gui::PushButt, R_A, and U_A.

Referenced by MDCreateSh_Mir().

5749 {
5750 
5751  int c = (int) a_data;
5752 
5753  switch (pe->keycode)
5754  {
5755  case R_A:
5757  if (c == (sizeof DAS.Gui.PushButt.Mir / sizeof DAS.Gui.PushButt.Mir[0])-1)
5758  {
5760  break;
5761  }
5762  else
5763  {
5765  break;
5766  }
5767  case D_A:
5769  if (c == (sizeof DAS.Gui.PushButt.Mir / sizeof DAS.Gui.PushButt.Mir[0])-1)
5770  {
5772  break;
5773  }
5774  else
5775  {
5777  break;
5778  }
5779 
5780  case L_A:
5782  if (c == 0)
5783  {
5785  break;
5786  }
5787  else
5788  {
5790  break;
5791  }
5792  case U_A:
5794  if (c == 0)
5795  {
5797  break;
5798  }
5799  else
5800  {
5802  break;
5803  }
5804  }
5805 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
unsigned int keycode
Code for the pressed key.
Definition: Mguidefs.h:541
#define R_A
Definition: KEYCODES.H:280
short DB_Sel[3]
Selected Buttons Colors.
#define U_A
Definition: KEYCODES.H:278
#define L_A
Definition: KEYCODES.H:281
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
#define D_A
Definition: KEYCODES.H:279
short DB_UnSel[3]
Unselected Buttons Colors.
MOBJECT Mir[4]
Mirror Buttons.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_MirSelButtMouse_CB()

void DB_MirSelButtMouse_CB ( MOBJECT  obj,
MMouseEvent pe,
void *  a_data 
)

callback changing the bakground color of the push button passing the mouse over it

Definition at line 5708 of file CreateForms.c.

References MMouseEvent::button, palette::DB_Sel, palette::DB_UnSel, palette::DB_UnSelFG, E_MOTION, das::Gui, pushbutt::Mir, MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MSelectObject(), gui::PushButt, and MMouseEvent::type.

5709 {
5710 
5711  int c = (int) a_data, i;
5712 
5713  for (i=0; i<(sizeof DAS.Gui.PushButt.Mir / sizeof DAS.Gui.PushButt.Mir[0]); i++)
5714  {
5717  }
5718 
5719  switch (pe->button)
5720  {
5721  case (Button1):
5722  {
5724 // MObjectSetForegroundRGB(DAS.Gui.PushButt.Mir[c], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
5725  break;
5726  }
5727  }
5728  switch (pe->type)
5729  {
5730 
5731  case (E_MOTION):
5732  {
5734  MSelectObject(obj);
5735  for (i=0; i<(sizeof DAS.Gui.PushButt.Mir / sizeof DAS.Gui.PushButt.Mir[0]); i++)
5736  {
5737  if(i != c)
5739 
5740  }
5741 
5742  break;
5743  }
5744  }
5745 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
void MSelectObject(MOBJECT f)
short DB_Sel[3]
Selected Buttons Colors.
unsigned int button
button pressed/released (Button1, Button2 or Button3), 0 if no button involved
Definition: Mguidefs.h:622
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
int type
Event type (E_BUTTON_PRESS, E_BUTTON_RELEASE, E_MOTION, E_MOUSE_WHEEL)
Definition: Mguidefs.h:612
#define E_MOTION
Definition: Mguidefs.h:277
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT Mir[4]
Mirror Buttons.
+ Here is the call graph for this function:

§ DB_NDFil_CB()

void DB_NDFil_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

callback for filter wheel positioning in Filter shell

Parameters
pcalling push button MObject
*adcalling push button number

Definition at line 6360 of file CreateForms.c.

References paramini::EqType, Fil_Code8H, Fil_CodeNG, Fil_CodeTropo, FilBuff, GASCODNG1, GASCODNG2, GASCODNG3, GASCODNG4, LIS_, NDFil_Code, NDFilBuff, NDFilFlg, NDFilSet, das::Paramini, and TROPOGAS.

Referenced by MDCreateSh_NDFil().

6361 {
6362  int c = (int) ad;
6363 
6364  if(DAS.Paramini.EqType == LIS_)
6365  FilBuff = Fil_Code8H[c];
6366  else
6367  {
6368  if(DAS.Paramini.EqType == TROPOGAS)
6369  FilBuff = Fil_CodeTropo[c];
6371  FilBuff = Fil_CodeNG[c];
6372  else
6373  NDFilBuff = NDFil_Code[c];
6374  }
6375 
6376  NDFilSet = c;
6377  NDFilFlg = 1;
6378 }
char * Fil_Code8H[]
const char array for the realisation of the Filters buttons in the Filter shell
Definition: DAS_Spat.c:204
static int NDFilFlg
Definition: CreateForms.c:53
#define LIS_
Lampedusa Island Spectrometer - ENEA.
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
char * Fil_CodeNG[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG2 and NG3...
Definition: DAS_Spat.c:216
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
#define GASCODNG4
GASCODNG 4.
int NDFilSet
ND filter wheel position definition - for SD_NDFilterW.
Definition: CreateForms.c:6231
const char * NDFilBuff
Definition: CreateForms.c:54
das DAS
Definition: CreateForms.c:98
char * Fil_CodeTropo[]
const char array for the realisation of the Filters buttons in the Filter shell for TROPOGAS instrume...
Definition: DAS_Spat.c:210
char * NDFil_Code[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
Definition: DAS_Spat.c:219
int EqType
Spectrometer Type.
const char * FilBuff
Definition: CreateForms.c:51
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the caller graph for this function:

§ DB_NDFilSelButtKB_CB()

void DB_NDFilSelButtKB_CB ( MOBJECT  obj,
MKeyEvent pe,
void *  a_data 
)

callback for select a specified filter push button with the keyboard

Definition at line 6404 of file CreateForms.c.

References D_A, palette::DB_Sel, palette::DB_UnSel, das::Gui, MKeyEvent::keycode, L_A, MObjectSetBackgroundRGB(), pushbutt::NDFil, gui::PushButt, R_A, and U_A.

Referenced by MDCreateSh_NDFil().

6405 {
6406 
6407  int c = (int) a_data;
6408 
6409  switch (pe->keycode)
6410  {
6411  case R_A:
6413  if (c == (sizeof DAS.Gui.PushButt.NDFil / sizeof DAS.Gui.PushButt.NDFil[0]) - 1)
6414  {
6416  break;
6417  }
6418  else
6419  {
6421  break;
6422  }
6423  case D_A:
6425  if (c == (sizeof DAS.Gui.PushButt.NDFil / sizeof DAS.Gui.PushButt.NDFil[0]) - 1)
6426  {
6428  break;
6429  }
6430  else
6431  {
6433  break;
6434  }
6435 
6436  case L_A:
6438  if (c == 0)
6439  {
6441  break;
6442  }
6443  else
6444  {
6446  break;
6447  }
6448  case U_A:
6450  if (c == 0)
6451  {
6453  break;
6454  }
6455  else
6456  {
6458  break;
6459  }
6460  }
6461 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
unsigned int keycode
Code for the pressed key.
Definition: Mguidefs.h:541
#define R_A
Definition: KEYCODES.H:280
short DB_Sel[3]
Selected Buttons Colors.
#define U_A
Definition: KEYCODES.H:278
#define L_A
Definition: KEYCODES.H:281
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
#define D_A
Definition: KEYCODES.H:279
short DB_UnSel[3]
Unselected Buttons Colors.
MOBJECT NDFil[6]
ND Filter Buttons.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_NDFilSelButtMouse_CB()

void DB_NDFilSelButtMouse_CB ( MOBJECT  obj,
MMouseEvent pe,
void *  a_data 
)

callback changing the bakground color of the push button passing the mouse over it

Definition at line 6382 of file CreateForms.c.

References MMouseEvent::button, palette::DB_Sel, palette::DB_UnSel, das::Gui, MObjectSetBackgroundRGB(), pushbutt::NDFil, and gui::PushButt.

6383 {
6384 
6385  int c = (int) a_data, i;
6386 
6387  for (i=0; i<(sizeof DAS.Gui.PushButt.NDFil / sizeof DAS.Gui.PushButt.NDFil[0]); i++)
6388  {
6390  }
6391 
6392  switch (pe->button)
6393  {
6394 
6395  case (Button1):
6396  {
6398  break;
6399  }
6400  }
6401 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
short DB_Sel[3]
Selected Buttons Colors.
unsigned int button
button pressed/released (Button1, Button2 or Button3), 0 if no button involved
Definition: Mguidefs.h:622
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
short DB_UnSel[3]
Unselected Buttons Colors.
MOBJECT NDFil[6]
ND Filter Buttons.
+ Here is the call graph for this function:

§ DB_PasWd()

void DB_PasWd ( void  )

Definition at line 2600 of file CreateForms.c.

References ChkWinInstance(), gui::ConfigPanel, dpwd::FlgSh_PWD, das::Gui, MDCreateDASConfig(), and configpanel::ShellConfig.

Referenced by DB_KeyB_CB().

2601 {
2602  char DefPwdSys[10]="nefertari";
2603  char ttest[32];
2604  int er;
2605 
2606  sprintf(ttest,"%s","DAS Config");
2607 
2608 /* MSetMessageDialogRGB(DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
2609  MSetMessageDialogFgRGB(DPAL.DB_FG_Albl[0],DPAL.DB_FG_Albl[1], DPAL.DB_FG_Albl[2]);
2610  MSetMessageDialogFonts(FIXED_SMALL, FIXED_SMALL);
2611  MSetInputPromptRGB(DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
2612  MSetInputPromptFgRGB(DPAL.DB_FG_Albl[0],DPAL.DB_FG_Albl[1], DPAL.DB_FG_Albl[2]);
2613  MSetInputPromptFonts(FIXED_SMALL, FIXED_SMALL, FIXED_SMALL);
2614 
2615  er = MDCreateSh_PWD();
2616  if(er == 0)
2617  {
2618 */
2619  //er = ChkConfigInstance();
2621  if (er==0)
2622  {
2624  DPWD.FlgSh_PWD = 1;
2625  }
2626 /*
2627  }
2628  else
2629  {
2630  MMessageDialog("INF PWD", "You insert a wrong PWD! Retry or Contact DanBo", "Ok", NULL);
2631  DPWD.FlgSh_PWD = 1;
2632 
2633  }
2634 */
2635 }
dpwd DPWD
Definition: CreateForms.c:79
gui Gui
Graphic User Interface Structure.
MOBJECT MDCreateDASConfig(void)
DAS Config shell. Procedure that build the shell for the DAS Config panels. The DAS Config allow for ...
int FlgSh_PWD
int ChkWinInstance(char *buff, MOBJECT obj)
Definition: DAS_Spat.c:2153
configpanel ConfigPanel
Configuration panel structure.
MOBJECT ShellConfig
Shell configuration panel.
das DAS
Definition: CreateForms.c:98
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_Pause()

void DB_Pause ( void  )

Definition at line 3766 of file CreateForms.c.

References D_FixSZA(), DB_KB_ButtonActive(), flag::DeltaSZA, flag::exec, flag::ExeDSZA, das::Flag, das::Gui, pushbutt::KeyB, dsza::LastMSZA, MObjectSetSensitive(), MObjectSetText(), gui::PushButt, S_zenetr, Status(), and SZADelta.

Referenced by DB_KeyB_CB(), InitTempAD(), and SetWindowsReset().

3767 {
3768 
3769  if(FLAG.exec)
3770  {
3771  FLAG.exec = 0;
3772  Status("Waiting for the end of current instruction");
3773  MObjectSetText(DAS.Gui.PushButt.KeyB[25],"Resume");
3774  DB_KB_ButtonActive(1);
3775 
3776  if(DAS.Flag.DeltaSZA == 1)
3777  {
3778  DAS.Flag.ExeDSZA = 0; //Stop PRG Execution
3779 
3780 // SZADelta.LastMSZA = S_zenetr;
3781 // D_FixSZA();
3782  }
3783 
3784 
3785  }
3786  else if(FLAG.exec == 0)
3787  {
3788  FLAG.exec = 1;
3789  Status("Execution Resumed");
3790  MObjectSetText(DAS.Gui.PushButt.KeyB[25],"Pause");
3791  DB_KB_ButtonActive(0);
3794  // If a SZAPRG or a *.PRG file is in execution with the DeltaSZA Mode activated
3795  // the next SZA has to be recalculated
3796 
3797 
3798  if(DAS.Flag.DeltaSZA == 1)
3799  {
3800  DAS.Flag.ExeDSZA = 1; //PRG Execution
3801 
3803  D_FixSZA();
3804 
3805  }
3806  }
3807 
3808 }
flag FLAG
Definition: CreateForms.c:84
gui Gui
Graphic User Interface Structure.
void DB_KB_ButtonActive(int mod)
Enable/Disable Push buttons on the Control Panel.
Definition: CreateForms.c:3810
double S_zenetr
Definition: SOLPOS.C:92
dsza SZADelta
Definition: DAS_Spat.c:76
MOBJECT KeyB[28]
Keyboard Buttons.
double LastMSZA
SZA of the previous measurement.
flag Flag
Structure for different flags.
void MObjectSetText(MOBJECT obj, const char *text)
int exec
= 0 -> PRG Execution Paused; = 1 -> PRG Execution Resumed
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
int DeltaSZA
= 1 Delta SZA measurements activated, = 0 Continous measurements
pushbutt PushButt
Push buttons.
void D_FixSZA(void)
Definition: RTC_Time.c:467
das DAS
Definition: CreateForms.c:98
int ExeDSZA
= 1 the measurements are performed, = 0 waiting for the next deltasza.
void MObjectSetSensitive(MOBJECT obj)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_PushButtonMouse()

void DB_PushButtonMouse ( int  mod,
int  event,
MOBJECT  obj,
struct pbutt *  ppbutt 
)

Definition at line 882 of file CreateForms.c.

References palette::DB_Sel, palette::DB_UnSel, palette::DB_UnSelFG, das::Gui, pushbutt::Mir, MIS, MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MSelectObject(), MirrorSt::Pos, gui::PushButt, pushbutt::Wl, and GratingSt::Wl.

883 {
884 
885  int i, count;
886  switch (mod)
887  {
888  case (1): //Input Mirror Buttons
889  {
890  count = (sizeof DAS.Gui.PushButt.Mir / sizeof DAS.Gui.PushButt.Mir[0]);
891  for (i=0; i<count; i++)
892  {
895  if (i==MIS.Pos)
896  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Mir[i], 0, 0, 255);
897  }
898  switch (event)
899  {
900  case (0):
901  {
903  break;
904  }
905  case (1):
906  {
907  for (i=0; i<count; i++)
910  MSelectObject(obj);
911  break;
912  }
913  }
914  break;
915  }
916  case (2): //Grating Buttons
917  {
918  count = (sizeof DAS.Gui.PushButt.Wl / sizeof DAS.Gui.PushButt.Wl[0]);
919  for (i=0; i<count; i++)
920  {
923  if (i==GRS.Wl)
924  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Wl[i], 0, 0, 255);
925  }
926  switch (event)
927  {
928  case (0):
929  {
931  break;
932  }
933  case (1):
934  {
935  for (i=0; i<count; i++)
938  MSelectObject(obj);
939  break;
940  }
941  }
942  break;
943  }
944 
945  }
946 
947 
948 
949 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
void MSelectObject(MOBJECT f)
int Pos
Mirror Current Position.
short DB_Sel[3]
Selected Buttons Colors.
int Wl
Grating Wavelength.
MOBJECT Wl[18]
Wavelength Buttons.
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
MirrorSt MIS
Mirror.
Definition: DAS_Spat.c:61
das DAS
Definition: CreateForms.c:98
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
GratingSt GRS
Definition: CreateForms.c:82
MOBJECT Mir[4]
Mirror Buttons.
+ Here is the call graph for this function:

§ DB_PushButtonMouse_CB()

void DB_PushButtonMouse_CB ( MOBJECT  obj,
MMouseEvent pe,
void *  a_data 
)

Definition at line 950 of file CreateForms.c.

References MMouseEvent::button, palette::DB_Sel, palette::DB_UnSel, palette::DB_UnSelFG, E_MOTION, pushbutt::Fil, FWS, das::Gui, pushbutt::Mir, MIS, MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MSelectObject(), pushbutt::NDFil, NDFWS, FilterWheelSt::Pos, NDFilterWheelSt::Pos, MirrorSt::Pos, gui::PushButt, MMouseEvent::type, pushbutt::Wl, and GratingSt::Wl.

Referenced by MDCreateSh_Fil(), MDCreateSh_Mir(), MDCreateSh_NDFil(), and MDCreateSh_Wl().

951 {
952 
953 
954  int c = (int) a_data, i, count;
955  switch (c)
956  {
957  case (1): // Input Mirror
958  {
959  count = (sizeof DAS.Gui.PushButt.Mir / sizeof DAS.Gui.PushButt.Mir[0]);
960  for (i=0; i<count; i++)
961  {
964  if (i==MIS.Pos)
965  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Mir[i], 0, 0, 255);
966  }
967  switch (pe->button)
968  {
969  case (Button1):
970  {
972  break;
973  }
974  }
975 
976  switch (pe->type)
977  {
978  case (E_MOTION):
979  {
980 
981  for (i=0; i<count; i++)
983  if (i==MIS.Pos)
984  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Mir[i], 0, 0, 255);
985  }
987  MSelectObject(obj);
988  break;
989  }
990  }
991  break;
992  }
993  case (2): // Grating
994  {
995  count = (sizeof DAS.Gui.PushButt.Wl / sizeof DAS.Gui.PushButt.Wl[0]);
996  for (i=0; i<count; i++)
997  {
998 // MObjectSetBackgroundRGB(PBUTT.Wl[i], DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
999 // MObjectSetForegroundRGB(PBUTT.Wl[i], DPAL.DB_UnSelFG[0], DPAL.DB_UnSelFG[1], DPAL.DB_UnSelFG[2]);
1000  if (i==GRS.Wl)
1001  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Wl[i], 0, 0, 255);
1002  }
1003  switch (pe->button)
1004  {
1005  case (Button1):
1006  {
1008  break;
1009  }
1010  }
1011 
1012  switch (pe->type)
1013  {
1014  case (E_MOTION):
1015  {
1016 
1017  for (i=0; i<count; i++)
1018  {
1020  if (i==GRS.Wl)
1021  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Wl[i], 0, 0, 255);
1022  }
1024  MSelectObject(obj);
1025  break;
1026  }
1027  }
1028  break;
1029  }
1030  case (3): // Filter
1031  {
1032  count = (sizeof DAS.Gui.PushButt.Fil / sizeof DAS.Gui.PushButt.Fil[0]);
1033  for (i=0; i<count; i++)
1034  {
1035 // MObjectSetBackgroundRGB(PBUTT.Wl[i], DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
1036 // MObjectSetForegroundRGB(PBUTT.Wl[i], DPAL.DB_UnSelFG[0], DPAL.DB_UnSelFG[1], DPAL.DB_UnSelFG[2]);
1037  if (i==FWS.Pos)
1038  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Fil[i], 0, 0, 255);
1039  }
1040  switch (pe->button)
1041  {
1042  case (Button1):
1043  {
1045  break;
1046  }
1047  }
1048 
1049  switch (pe->type)
1050  {
1051  case (E_MOTION):
1052  {
1053 
1054  for (i=0; i<count; i++)
1055  {
1057  if (i==FWS.Pos)
1058  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Fil[i], 0, 0, 255);
1059  }
1061  MSelectObject(obj);
1062  break;
1063  }
1064  }
1065  break;
1066  }
1067  case (4): // NDFilter
1068  {
1069  count = (sizeof DAS.Gui.PushButt.NDFil / sizeof DAS.Gui.PushButt.NDFil[0]);
1070  for (i=0; i<count; i++)
1071  {
1072 // MObjectSetBackgroundRGB(PBUTT.Wl[i], DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
1073 // MObjectSetForegroundRGB(PBUTT.Wl[i], DPAL.DB_UnSelFG[0], DPAL.DB_UnSelFG[1], DPAL.DB_UnSelFG[2]);
1074  if (i==NDFWS.Pos)
1075  MObjectSetBackgroundRGB(DAS.Gui.PushButt.NDFil[i], 0, 0, 255);
1076  }
1077  switch (pe->button)
1078  {
1079  case (Button1):
1080  {
1082  break;
1083  }
1084  }
1085 
1086  switch (pe->type)
1087  {
1088  case (E_MOTION):
1089  {
1090 
1091  for (i=0; i<count; i++)
1092  {
1094  if (i==NDFWS.Pos)
1095  MObjectSetBackgroundRGB(DAS.Gui.PushButt.NDFil[i], 0, 0, 255);
1096  }
1098  MSelectObject(obj);
1099  break;
1100  }
1101  }
1102  break;
1103 
1104  }
1105  }
1106 
1107 
1108 }
NDFilterWheelSt NDFWS
ND Filter Wheel.
Definition: DAS_Spat.c:58
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
int Pos
Filter Wheel current Position.
void MSelectObject(MOBJECT f)
int Pos
Mirror Current Position.
short DB_Sel[3]
Selected Buttons Colors.
int Pos
Filter Wheel current Position.
MOBJECT Fil[6]
Filter Buttons.
unsigned int button
button pressed/released (Button1, Button2 or Button3), 0 if no button involved
Definition: Mguidefs.h:622
int Wl
Grating Wavelength.
MOBJECT Wl[18]
Wavelength Buttons.
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
MirrorSt MIS
Mirror.
Definition: DAS_Spat.c:61
das DAS
Definition: CreateForms.c:98
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
int type
Event type (E_BUTTON_PRESS, E_BUTTON_RELEASE, E_MOTION, E_MOUSE_WHEEL)
Definition: Mguidefs.h:612
MOBJECT NDFil[6]
ND Filter Buttons.
#define E_MOTION
Definition: Mguidefs.h:277
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
FilterWheelSt FWS
Filter Wheel.
Definition: DAS_Spat.c:57
GratingSt GRS
Definition: CreateForms.c:82
MOBJECT Mir[4]
Mirror Buttons.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_RecGio_CB()

void DB_RecGio_CB ( MOBJECT  o,
void *  a,
void *  v 
)

Definition at line 2835 of file CreateForms.c.

References flag::backlashrec, das::Flag, and MRButtonGetActivationStatus().

Referenced by MDCreateMoveGrat().

2836 {
2837 
2838  int er = 0;
2839  int c = (int) v;
2841 
2842  if(er)
2843  {
2844  switch (c)
2845  {
2846  case 0:
2847  DAS.Flag.backlashrec = 0;
2848  break;
2849  case 1:
2850  DAS.Flag.backlashrec = 1;
2851  break;
2852  }
2853  }
2854 
2855 
2856 }
flag Flag
Structure for different flags.
int MRButtonGetActivationStatus(MOBJECT o)
int backlashrec
flag for backlash recovery: =0 perform backlash rec.; = 1 DO NOT perform backlash rec...
das DAS
Definition: CreateForms.c:98
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_Redraw_CB()

void DB_Redraw_CB ( MOBJECT  obj,
MMouseEvent pe,
void *  a_data 
)

Definition at line 102 of file CreateForms.c.

References palette::DB_BG, palette::DB_BG_Albl, palette::DB_BG_lblUP, palette::DB_BG_Plbl, palette::DB_FG_Albl, palette::DB_FG_lblUP, palette::DB_FG_Plbl, E_MOTION, MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), and MMouseEvent::type.

Referenced by MDCreate_CP().

103 {
104 
105  int c = (int) a_data;
106 
107  switch (pe->type)
108  {
109  case (E_MOTION)://E_WINDOW_ENTER
110  //case (E_WINDOW_ENTER)://E_WINDOW_ENTER
111  {
112  switch (c)
113  {
114  case 0:
117  break;
118  case 1:
121  break;
122  case 2:
125  break;
126  case 3:
129  break;
130  case 4:
133  break;
134  case 5:
137  break;
138  case 6:
141  break;
142  }
143  break;
144  }
145  }
146 
147 }
short DB_BG_lblUP[3]
Background Capital Letters Labels Color UP.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
palette DPAL
Definition: CreateForms.c:88
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
short DB_BG[3]
Default Background Color.
int type
Event type (E_BUTTON_PRESS, E_BUTTON_RELEASE, E_MOTION, E_MOUSE_WHEEL)
Definition: Mguidefs.h:612
#define E_MOTION
Definition: Mguidefs.h:277
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
short DB_FG_lblUP[3]
Foreground Capital Letters Labels Color UP.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_SheelESC()

void DB_SheelESC ( MOBJECT  obj,
MKeyEvent pe,
void *  a_data 
)

Definition at line 5569 of file CreateForms.c.

References ESC, FilBuff, FilFlg, MKeyEvent::keycode, MirBuff, MirFlg, NDFilBuff, NDFilFlg, GratingSt::Pos, WlBuff, WlFlg, and WlSet.

Referenced by MDCreateSh_Fil(), MDCreateSh_Mir(), MDCreateSh_NDFil(), and MDCreateSh_Wl().

5570 {
5571  int c = (int) a_data;
5572  switch(c)
5573  {
5574  case 0:
5575  switch (pe->keycode)
5576  {
5577  case ESC:
5578  MirBuff = "0";
5579  MirFlg = 1;
5580  break;
5581  }
5582  case 1:
5583  switch (pe->keycode)
5584  {
5585  case ESC:
5586  WlSet = GRS.Pos;
5587  WlBuff = "0";
5588  WlFlg = 1;
5589  break;
5590  }
5591  case 2:
5592  switch (pe->keycode)
5593  {
5594  case ESC:
5595  FilBuff = "0";
5596  FilFlg = 1;
5597  break;
5598  }
5599  case 3:
5600  switch (pe->keycode)
5601  {
5602  case ESC:
5603  NDFilBuff = "0";
5604  NDFilFlg = 1;
5605  break;
5606  }
5607  }
5608 }
unsigned int keycode
Code for the pressed key.
Definition: Mguidefs.h:541
static int FilFlg
Definition: CreateForms.c:50
#define ESC
Definition: KEYCODES.H:265
static int MirFlg
Definition: CreateForms.c:47
int WlSet
Wavelength position definition - for SD_Grating.
Definition: DAS_Spat.c:135
static int NDFilFlg
Definition: CreateForms.c:53
char * WlBuff
Definition: CreateForms.c:45
static int WlFlg
Definition: CreateForms.c:44
const char * MirBuff
Definition: CreateForms.c:48
const char * NDFilBuff
Definition: CreateForms.c:54
long Pos
Grating Position.
GratingSt GRS
Definition: CreateForms.c:82
const char * FilBuff
Definition: CreateForms.c:51
+ Here is the caller graph for this function:

§ DB_StepGratEnc_CB()

void DB_StepGratEnc_CB ( MOBJECT  o,
void *  a,
void *  v 
)

Definition at line 2811 of file CreateForms.c.

References das::Flag, MRButtonGetActivationStatus(), and flag::stepgratenc.

Referenced by MDCreateMoveGrat().

2812 {
2813 
2814  int er = 0;
2815  int c = (int) v;
2817 
2818  if(er)
2819  {
2820  switch (c)
2821  {
2822  case 0:
2823  DAS.Flag.stepgratenc = 0;
2824  break;
2825  case 1:
2826  DAS.Flag.stepgratenc = 1;
2827  break;
2828  }
2829  }
2830 
2831 
2832 }
flag Flag
Structure for different flags.
int MRButtonGetActivationStatus(MOBJECT o)
das DAS
Definition: CreateForms.c:98
int stepgratenc
step to the grating mode: = 0 typed steps sent to the stepper; = 1 typed step are parametrized ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_Tools()

void DB_Tools ( )

Definition at line 4158 of file CreateForms.c.

References CENTER_ALIGN, palette::DB_BG_Albl, palette::DB_BG_lblUP, palette::DB_FG_Albl, DB_ToolsKeyB_CB(), palette::DB_UnSel, palette::DB_UnSelFG, DT_ShutterCB(), False, HELV_MEDIUM, HELV_SMALL, tools::KeyB, lbl, LEFT_ALIGN, MButtonSetOnMouseOverForegroundRGB(), MCreateColForm(), MCreateLabel(), MCreatePButton(), MCreatePixmapFromFile(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MFormSetSpacing(), MLabelSetAlignment(), MLabelSetMargin(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetTransparency(), MObjectSetUnsensitive(), MPButtonSetCallback(), MShellRealize(), MTableFormSetColAlign(), SF_NO_MAXIMIZE, tools::Sh_Tools, TOP_ALIGN, True, UNDEF_ALIGN, WS_ETCHED_IN, and WS_NONE.

Referenced by DB_KeyB_CB().

4159 {
4160 
4161 
4162  MOBJECT tb, rowf, lbl,rowf1;
4163  int i;
4164 // char buf[80];
4165 
4166  MOBJECT colform;//, rowform1;
4167  MOBJECT pixmap,pixbut;
4168 
4169 
4170 const char *KeyCom_Code[] = {{"Shutter Closed"},//0
4171  {"Column Format"}, //1
4172  {"Link Spectra "}, //2
4173  {"DOAS Analisys"}, //3
4174  {"Calc Flx Indx"}, //4
4175  {"Reload timer task "},//{"Correct H "}, //5
4176  {"Clear timer task "}, //{"CorrFileEvora"}, //6
4177  {"READ Grat. Steps"}, //7
4178  {"ZERO Grat. Steps"}, //8
4179  {"Compile PRG"}, //9
4180  {"Load PRG"}, //10
4181  {"Temp. History"}, //11
4182  {"Close"}}; //12
4183 
4184 
4185 
4186  TOOLS.Sh_Tools = MCreateShell("DAS TOOLS", SF_NO_MAXIMIZE);
4187  MObjectSetBackgroundRGB(TOOLS.Sh_Tools, 91, 74, 74);
4188 
4189 
4190  rowf = MCreateRowForm(TOOLS.Sh_Tools);
4191  MObjectSetResize(rowf, True, True);
4192  MObjectSetBackgroundRGB(rowf, 91, 74, 74);
4193 
4194  lbl = MCreateLabel(rowf, "TOOLS", HELV_MEDIUM);
4197  MObjectSetResize(lbl, False, True);
4198 
4199 
4200  rowf1 = MCreateRowForm(rowf);
4201  MObjectSetResize(rowf1, True, True);
4202  MObjectSetBackgroundRGB(rowf1, 74, 60, 0);
4203 
4204  lbl = MCreateLabel(rowf1, "Shutter Control", HELV_SMALL);
4205  MObjectSetForegroundRGB(lbl, 255, 255, 255);
4206  MObjectSetBackgroundRGB(lbl, 96, 132, 152);
4207  MObjectSetTransparency(lbl, 0);
4208  MObjectSetShadow(lbl, WS_ETCHED_IN, 1, 1);
4209  MObjectSetCompositeWidth(lbl, 150);
4210 
4211 
4212  colform = MCreateColForm(rowf1);
4213  MObjectSetForegroundRGB(colform, 255, 255, 255);
4214  MObjectSetBackgroundRGB(colform, 74, 60, 0);
4215  MObjectSetShadow(colform, WS_NONE, 0, 0);
4216  MObjectSetResize(colform, False, False);
4217 
4218 
4219  pixbut = MCreatePixmapFromFile(colform, "SYS\\ledoff.bmp");
4221 
4222  TOOLS.KeyB[0] = MCreatePButton(colform, KeyCom_Code[0], HELV_SMALL);
4225  MPButtonSetCallback(TOOLS.KeyB[0], DT_ShutterCB, (void *) pixbut);
4226  MButtonSetOnMouseOverForegroundRGB(TOOLS.KeyB[0], 255, 255, 255);
4228 
4229  tb = MCreateTableForm(colform, 2);
4230  MFormSetSpacing(tb, 1);
4233  MObjectSetBackgroundRGB(tb, 112, 128, 112);
4235 
4236  pixmap = MCreatePixmapFromFile(tb, "sys\\LEDOFFsmall.BMP");
4237 
4238  lbl = MCreateLabel(tb, "Close", HELV_SMALL);
4239  MLabelSetMargin(lbl, 3, 1);
4240  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
4241  MObjectSetTransparency(lbl, 0);
4242  MObjectSetResize(lbl, False, False);
4243 
4244  pixmap = MCreatePixmapFromFile(tb, "sys\\LEDONsmall.BMP");
4245 
4246  lbl = MCreateLabel(tb, "Open", HELV_SMALL);
4248  MLabelSetMargin(lbl, 3, 1);
4250  MObjectSetBackgroundRGB(lbl, 74, 60, 0);
4251  MObjectSetTransparency(lbl, 0);
4252 
4253 
4254 
4255  tb = MCreateTableForm(rowf, 2);
4257  MObjectSetShadow(tb, WS_NONE, 0, 0);
4258  MObjectSetResize(tb, True, True);
4259 
4260 
4261 
4262 
4263  for (i=1; i < (sizeof TOOLS.KeyB / sizeof TOOLS.KeyB[0]); i++)
4264  {
4265  TOOLS.KeyB[i] = MCreatePButton(tb, KeyCom_Code[i], HELV_SMALL);
4268  MPButtonSetCallback(TOOLS.KeyB[i], DB_ToolsKeyB_CB, (void *) i);
4270  /***************************************/
4271  /* DeActivated Buttons */
4272 // if ((i==0) || (i==1) || (i==2) || (i==3) || (i==4) || (i==5) || (i==6))
4273  if ((i==0) || (i==2) || (i==3) || (i==4) || (i==5) || (i==6))
4274  {
4276  }
4277  /***************************************/
4278 
4279  }
4280 
4281 
4283 
4284 
4285 
4286 
4287 }
short DB_BG_lblUP[3]
Background Capital Letters Labels Color UP.
MOBJECT Sh_Tools
Shell for tools.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
#define WS_NONE
Definition: Mguidefs.h:956
MOBJECT MCreatePixmapFromFile(MOBJECT parent, const char *fname)
MOBJECT lbl
Definition: DFileMan.c:42
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MShellRealize(MOBJECT obj)
#define SF_NO_MAXIMIZE
Definition: Mguidefs.h:1034
void MObjectSetUnsensitive(MOBJECT obj)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
MOBJECT KeyB[13]
buttons tools
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void MTableFormSetColAlign(MOBJECT form, int col, int al)
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void DT_ShutterCB(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:3946
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define HELV_SMALL
Definition: Mguidefs.h:881
void MLabelSetMargin(MOBJECT p, int wm, int hm)
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
MOBJECT MCreateColForm(MOBJECT parent)
palette DPAL
Definition: CreateForms.c:88
void DB_ToolsKeyB_CB(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:3973
MOBJECT MCreateShell(const char *title, int flags)
void MLabelSetAlignment(MOBJECT p, int align)
void MFormSetSpacing(MOBJECT p, int offset)
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
#define HELV_MEDIUM
Definition: Mguidefs.h:882
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
tools TOOLS
Definition: CreateForms.c:81
#define TOP_ALIGN
Definition: Mguidefs.h:918
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_ToolsKeyB_CB()

void DB_ToolsKeyB_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

Definition at line 3973 of file CreateForms.c.

References _MAX_PATH, controlpanel::Albl_Script, FB_PREFS::allow_dir_create, FB_PREFS::allow_dir_delete, FB_PREFS::allow_dir_rename, AMS1, AMS_AzzeraCoord(), AMS_ReadStep(), FB_PREFS::bg_image_file, BrowseLog(), BuildLogRatio(), FB_PREFS::button_font, FB_PREFS::change_cwd, gui::ContrPanel, DBDEMO, bil::DFILEM, DI_SplitName(), DT_FluxIndex(), DT_LinkSpectra(), flag::exemode, False, das::Flag, FB_PREFS::font, das::Gui, HELV_SMALL, d_fileman::HOMEDIRECTORY, IDS, LoadExec(), MANUAL, Message(), MFileBrowseExt(), MGetCurrentDirectory(), MMessageDialog(), MObjectSetText(), MRefreshTimeout(), MRemoveTimeout(), MShellDestroy(), MShellUnrealize(), on, PRG_Check(), PrgFile, PRGFILE, SetWorkDirMGUIenv(), tools::Sh_Tools, Status(), Task_Timer(), ids::TIMER, TIMER_TASK_TIME, FB_PREFS::transparent_tree, True, and UPS_Status().

Referenced by DB_Tools().

3974 {
3975 
3976  int c = (int) ad;
3977  int er = 0;
3978  char buf[_MAX_PATH];
3979  char fname[128], dirname[128];
3980  unsigned long ns;
3981 
3982 
3983  FB_PREFS fbp;
3984  strcpy (dirname, MGetCurrentDirectory ());
3985  fname[0] = '\0';
3986  memset (&fbp, 0, sizeof (fbp));
3987 
3988  fbp.change_cwd = True;
3989  fbp.allow_dir_create = True;
3990  fbp.allow_dir_rename = True;
3991  fbp.allow_dir_delete = True;
3992  fbp.transparent_tree = False;
3993  fbp.font = HELV_SMALL;
3994  fbp.button_font = HELV_SMALL;
3995  //Set Img file
3996  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "sys\\Tile2.bmp" );
3997  fbp.bg_image_file =buf;
3998 
3999  switch(c)
4000  {
4001 
4002  case 0 :
4003 
4004  break;
4005  //Column Format
4006  case 1:
4007  UPS_Status();
4008  //DT_ColFormat();
4009  break;
4010  //Link Spectra
4011  case 2:
4012  DT_LinkSpectra();
4013  break;
4014  //Doas Analisys
4015  case 3:
4016  BuildLogRatio();
4017  break;
4018  //Flux Index
4019  case 4:
4020  DT_FluxIndex();
4021  break;
4022  //spare
4023  case 5:
4025  //DT_CorrHeader();
4026  break;
4027  //Spare
4028  case 6:
4029  //DT_CorrFileEvora();
4030  //MClearTimeout(&IDS.TIMER);
4032  break;
4033  //Read Grating Steps
4034  case 7:
4035  ns = AMS_ReadStep(AMS1, 1);
4036  sprintf(buf, "Steps Grating: %ld", ns);
4037  Status(buf);
4038  break;
4039  //ZERO Grating Steps
4040  case 8:
4041  er = AMS_AzzeraCoord(AMS1, 1);
4042  if(er)
4043  {
4044  Message("No Zero Coord Grating", er);
4045  }
4046  else
4047  {
4048 
4049  }
4050  break;
4051  //Compile PRG File
4052  case 9:
4053  er = MFileBrowseExt ("Select PRG File", "*.PRG", fname, dirname, &fbp);
4054  sprintf(buf, "%s%s", dirname, fname);
4055  er = PRG_Check(1, buf);
4056  if (er == 0)
4057  {
4058  sprintf(buf, "The PRG File: %s was correctly compiled.", fname);
4059  MMessageDialog("DAS Inf.", buf, "OK", NULL);
4060  }
4061 
4062 
4063  break;
4064  //Load PRG File
4065  case 10:
4066  if (DAS.Flag.exemode == MANUAL )
4067  {
4068  er = MFileBrowseExt ("Select PRG File", "*.PRG", fname, dirname, &fbp);
4069  DAS.Flag.exemode = PRGFILE;
4070  sprintf(PrgFile, "%s%s", dirname, fname);
4071  //Compile PRG File
4072  er = PRG_Check(1, PrgFile);
4073  if (er == 0)
4074  {
4075  sprintf(buf, "The PRG File: %s was correctly compiled.", fname);
4076  MMessageDialog("DAS Inf.", buf, "OK", NULL);
4077  }
4078 
4079  on = LoadExec(PrgFile);
4080  DI_SplitName(PrgFile, dirname, buf);
4082  // DAS Working directory and MGUI Environment
4083  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "DAS.exe");
4084  er = SetWorkDirMGUIenv(buf);
4085  if (er == -1)
4086  {
4087  //Unable to set the enviromental variable
4088  }
4089 
4092  }
4093  else if (DAS.Flag.exemode == DBDEMO )
4094  {
4095 
4096  er = MFileBrowseExt ("Select PRG File", "*.PRG", fname, dirname, &fbp);
4097  DAS.Flag.exemode = PRGFILE;
4098  sprintf(PrgFile, "%s%s", dirname, fname);
4099  //Compile PRG File
4100  er = PRG_Check(1, PrgFile);
4101  if (er == 0)
4102  {
4103  sprintf(buf, "The PRG File: %s was correctly compiled.", fname);
4104  MMessageDialog("DAS Inf.", buf, "OK", NULL);
4105  on = LoadExec(PrgFile);
4106  DI_SplitName(PrgFile, dirname, buf);
4108  // DAS Working directory and MGUI Environment
4109  sprintf(buf, "%s\\%s", BIL.DFILEM.HOMEDIRECTORY, "DAS.exe");
4110  er = SetWorkDirMGUIenv(buf);
4111  if (er == -1)
4112  {
4113  //Unable to set the enviromental variable
4114  }
4115 
4118  }
4119 
4120  }
4121 
4122 
4123  else if (DAS.Flag.exemode == PRGFILE)
4124  {
4125 
4126  er = MFileBrowseExt ("Replace PRG File in Execution with:", "*.PRG", fname, dirname, &fbp);
4127  //Put something to verify that this is a good PRG file
4128  sprintf(PrgFile, "%s%s", dirname, fname);
4129  on = LoadExec(PrgFile);
4130  DI_SplitName(PrgFile, dirname, buf);
4134  }
4135  else
4136  {
4137  MMessageDialog("DAS Inf.","In this Execution Mode the requested oparation can not be executed." , "OK", NULL);
4138 
4139  }
4140 
4141 
4142  break;
4143  //temp history
4144  case 11:
4145  er = BrowseLog();
4146  break;
4147  //Close
4148  case 12:
4151  break;
4152  }
4153 
4154 
4155 }
char PrgFile[16]
Name of the PRG file.
Definition: DAS_Spat.c:91
MOBJECT Sh_Tools
Shell for tools.
gui Gui
Graphic User Interface Structure.
void MRefreshTimeout(TIMEOUT_ID *pid, CARD32 msec, TIMEOUT_CB cb, void *ud)
CARD8 change_cwd
Definition: Mguidefs.h:1485
CARD8 allow_dir_create
Definition: Mguidefs.h:1487
bil BIL
Definition: CreateForms.c:83
MTFont button_font
Definition: Mguidefs.h:1501
CARD8 allow_dir_delete
Definition: Mguidefs.h:1493
flag Flag
Structure for different flags.
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
#define DBDEMO
execution in demo mode
MTFont font
Definition: Mguidefs.h:1499
#define False
Definition: Mguidefs.h:236
int PRG_Check(int mod, char *prgname)
Definition: DAS_Spat.c:531
void MShellUnrealize(MOBJECT obj)
void MObjectSetText(MOBJECT obj, const char *text)
void MRemoveTimeout(TIMEOUT_ID id)
void Task_Timer(TIMEOUT_ID id, void *data)
Timer Task. Very useful procedure that: 1) Provide to refresh the clock display 2) Check if daylight ...
Definition: RTC_Time.c:1184
void MShellDestroy(MOBJECT obj)
File Browser Preferences. Used by the Utility functions MFileBowserExt() and MDirBowserExt().
Definition: Mguidefs.h:1482
void UPS_Status(void)
Definition: Save.c:32
int TIMER
Timer ID.
CARD8 transparent_tree
Definition: Mguidefs.h:1495
d_fileman DFILEM
Definition: bildef.h:257
C_DEF void DI_SplitName(char *fullname, char *fpath, char *fname)
int BrowseLog(void)
MOBJECT Albl_Script
Active Control Panel Labels for Script in execution.
#define HELV_SMALL
Definition: Mguidefs.h:881
const char * MGetCurrentDirectory(void)
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
#define PRGFILE
execution driven by *.prg file
int MFileBrowseExt(const char *t, const char *ext, char *fname, char *dname, FB_PREFS *prefs)
unsigned long AMS_ReadStep(int id, int motor)
read performed steps Procedure for the determination of the number of steps executed.
Definition: Dxl.c:60
const char * bg_image_file
Definition: Mguidefs.h:1519
#define _MAX_PATH
Definition: Dildef.h:202
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
ids IDS
ID tasks.
Definition: DAS_Spat.c:54
int BuildLogRatio(void)
first attempt to apply the DOAS algorithm (..on going!!!)
Definition: DOAS.c:178
void Message(char *str, int er)
Create a message shell for the AMS errors (Debug Use). .
Definition: Dxl.c:1085
int SetWorkDirMGUIenv(char *buff)
set DAS and MGUI enviroment when the program is launched undirectly (for offlineplot or log or auto o...
Definition: DAS_Spat.c:3353
#define TIMER_TASK_TIME
timer
int DT_LinkSpectra(void)
For the linked spectra (..on going!!!)
Definition: Utils.c:915
controlpanel ContrPanel
Control Panel Structure.
int AMS_AzzeraCoord(int id, int mtr)
Set to zero the number of steps on the selected motor Set to zero the number of steps on the selecte...
Definition: Dxl.c:439
das DAS
Definition: CreateForms.c:98
#define AMS1
AMS1 address.
int LoadExec(char *fname)
Load file for automatic execution. Procedure that load the file for automatic execution.
Definition: Load.c:1534
#define True
Definition: Mguidefs.h:235
int DT_FluxIndex(void)
Callback for Flux Index Calculation.
Definition: Utils.c:499
CARD8 allow_dir_rename
Definition: Mguidefs.h:1490
int on
PRG execution control variabile.
Definition: DAS_Spat.c:109
tools TOOLS
Definition: CreateForms.c:81
int exemode
Set the Execution MODE (Execution modes)
#define MANUAL
execution in manual mode (for lab use)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_Wl_CB()

void DB_Wl_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

callback for grating positioning in Wavelength shell

Parameters
pcalling push button MObject
*adcalling push button number

Definition at line 5891 of file CreateForms.c.

References WlFlg, and WlSet.

Referenced by MDCreateSh_Wl().

5892 {
5893  int c = (int) ad ;
5894 
5895  //WlBuff = Wl_Code[c];
5896  //itoa(wl[c], WlBuff, 10);
5897  WlSet = c;
5898  WlFlg = 1;
5899 
5900 }
int WlSet
Wavelength position definition - for SD_Grating.
Definition: DAS_Spat.c:135
static int WlFlg
Definition: CreateForms.c:44
+ Here is the caller graph for this function:

§ DB_WlSelButtKB_CB()

void DB_WlSelButtKB_CB ( MOBJECT  obj,
MKeyEvent pe,
void *  a_data 
)

callback for selsct a specified wavelength push button with the keyboard

Definition at line 5927 of file CreateForms.c.

References D_A, palette::DB_Sel, palette::DB_UnSel, das::Gui, MKeyEvent::keycode, L_A, MObjectSetBackgroundRGB(), gui::PushButt, R_A, U_A, and pushbutt::Wl.

Referenced by MDCreateSh_Wl().

5928 {
5929 
5930  int c = (int) a_data;
5931 
5932  switch (pe->keycode)
5933  {
5934  case R_A:
5936  if (c == (sizeof DAS.Gui.PushButt.Wl / sizeof DAS.Gui.PushButt.Wl[0])-1)
5937  {
5939  break;
5940  }
5941  else
5942  {
5944  break;
5945  }
5946  case D_A:
5948  if (c == (sizeof DAS.Gui.PushButt.Wl / sizeof DAS.Gui.PushButt.Wl[0])-1)
5949  {
5951  break;
5952  }
5953  else
5954  {
5956  break;
5957  }
5958 
5959  case L_A:
5961  if (c == 0)
5962  {
5964  break;
5965  }
5966  else
5967  {
5969  break;
5970  }
5971  case U_A:
5973  if (c == 0)
5974  {
5976  break;
5977  }
5978  else
5979  {
5981  break;
5982  }
5983  }
5984 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
unsigned int keycode
Code for the pressed key.
Definition: Mguidefs.h:541
#define R_A
Definition: KEYCODES.H:280
short DB_Sel[3]
Selected Buttons Colors.
#define U_A
Definition: KEYCODES.H:278
#define L_A
Definition: KEYCODES.H:281
MOBJECT Wl[18]
Wavelength Buttons.
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
#define D_A
Definition: KEYCODES.H:279
short DB_UnSel[3]
Unselected Buttons Colors.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ DB_WlSelButtMouse_CB()

void DB_WlSelButtMouse_CB ( MOBJECT  obj,
MMouseEvent pe,
void *  a_data 
)

callback changing the bakground color of the push button passing the mouse over it

Definition at line 5905 of file CreateForms.c.

References MMouseEvent::button, palette::DB_Sel, palette::DB_UnSel, das::Gui, MObjectSetBackgroundRGB(), gui::PushButt, and pushbutt::Wl.

5906 {
5907 
5908  int c = (int) a_data, i;
5909 
5910  for (i=0; i<(sizeof DAS.Gui.PushButt.Wl / sizeof DAS.Gui.PushButt.Wl[0]); i++)
5911  {
5913  }
5914 
5915  switch (pe->button)
5916  {
5917 
5918  case (Button1):
5919  {
5921  break;
5922  }
5923  }
5924 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
short DB_Sel[3]
Selected Buttons Colors.
unsigned int button
button pressed/released (Button1, Button2 or Button3), 0 if no button involved
Definition: Mguidefs.h:622
MOBJECT Wl[18]
Wavelength Buttons.
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
das DAS
Definition: CreateForms.c:98
short DB_UnSel[3]
Unselected Buttons Colors.
+ Here is the call graph for this function:

§ DB_WriteMode()

void DB_WriteMode ( int  mod)

Definition at line 6722 of file CreateForms.c.

Referenced by ShutCB(), and WinRes().

6723 {
6724  FILE *fs;
6725 
6726  fs = fopen("LOG\\Paramini.LOG", "w");
6727 
6728  fprintf(fs, "%d %s", mod, "0 = reinizializza CCD, 1 = mantiene lo stato " );
6729 
6730  fclose(fs);
6731 
6732 }
+ Here is the caller graph for this function:

§ DT_ShutterCB()

void DT_ShutterCB ( MOBJECT  p,
void *  od,
void *  ad 
)

Definition at line 3946 of file CreateForms.c.

References CLEARCCD, DC_SetMode(), DC_ShutterControl(), tools::FlagShutter, MObjectSetText(), MPixmapSetImageFile(), NOSHUTTER, and das::Tools.

Referenced by DB_Tools().

3947 {
3948 
3949  MOBJECT c = ad;
3950 
3951  if (DAS.Tools.FlagShutter == 0)
3952  {
3953  DAS.Tools.FlagShutter = 1;
3954  MObjectSetText(p, "Shutter Open");
3955  MPixmapSetImageFile(c, "SYS\\ledon.bmp");
3956  DC_SetMode(CLEARCCD, 0, 0);
3957  DC_SetMode(NOSHUTTER, 1, 0);
3958  DC_ShutterControl(1, 0);
3959  }
3960  else if (DAS.Tools.FlagShutter == 1)
3961  {
3962  DAS.Tools.FlagShutter = 0;
3963  MObjectSetText(p, "Shutter Closed");
3964 
3965  MPixmapSetImageFile(c, "SYS\\ledoff.bmp");
3966  DC_SetMode(CLEARCCD, 1, 0);
3967  DC_SetMode(NOSHUTTER, 0, 0);
3968  DC_ShutterControl(0, 0);
3969  }
3970 }
CTYPE void DLL DC_SetMode(int TaskSettings, int SetRes, int camera)
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
void MObjectSetText(MOBJECT obj, const char *text)
tools Tools
Push buttons for various tools.
static double p
Definition: SOLPOS.C:131
#define CLEARCCD
Clear CCD before acquire.
Definition: dcldef.h:405
CTYPE void DLL DC_ShutterControl(int mode, int camera)
das DAS
Definition: CreateForms.c:98
void * MOBJECT
Definition: Mguidefs.h:192
#define NOSHUTTER
Do not control shutter.
Definition: dcldef.h:407
int FlagShutter
flag for shutter status. =1–> Shutter Open; =0->shutter Closed
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ExecSimPosCB()

void ExecSimPosCB ( MOBJECT  p,
void *  od,
void *  ad 
)

Definition at line 4362 of file CreateForms.c.

References FWS, MIS, SD_Position(), FilterWheelSt::target, GratingSt::target, MirrorSt::target, ZenithSt::target, and AzimuthSt::target.

Referenced by MDCreateSh_SimPos().

4363 {
4364 
4365 
4367 
4368 }
double target
Azimuth Targrt position.
AzimuthSt AST
Definition: CreateForms.c:100
double target
Zenith target position.
int target
Mirror Target position.
ZenithSt ZST
Definition: CreateForms.c:99
MirrorSt MIS
Mirror.
Definition: DAS_Spat.c:61
int target
Filter target Position.
int SD_Position(int m, int w, int f, double z, double a)
perform the simoultaneous positioning of the Spectrometer Devices m = mirror w = wavelength (Grating)...
Definition: Spat_Device.c:1243
FilterWheelSt FWS
Filter Wheel.
Definition: DAS_Spat.c:57
long target
Grating target Wl.
GratingSt GRS
Definition: CreateForms.c:82
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ FrmBuildTemperature()

void FrmBuildTemperature ( MOBJECT  pf)

Definition at line 151 of file CreateForms.c.

References controlpanel::Albl_LT, CENTER_ALIGN, gui::ContrPanel, palette::DB_BG, palette::DB_BG_Albl, palette::DB_BG_Plbl, palette::DB_FG_Albl, palette::DB_FG_Plbl, False, FIXED_SMALL, das::Gui, HELV_SMALL, lbl, LEFT_ALIGN, MCreateLabel(), MCreateTableForm(), MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetBGColorFromParent(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MPagedFormSetActivePage(), RIGHT_ALIGN, TOP_ALIGN, True, and WS_SHADOW_IN.

Referenced by MDCreate_CP().

152 {
153 
154  int i;
155  char buf[32];
156  MOBJECT tb, lbl;
157 
158  const char *channel[] ={{"Optic "}, //0
159  {"Out DX"}, //1
160  {"Out SX"}, //2
161  {"In DX "}, //3
162  {"In SX "}, //4
163  {"Grat. "}, //5
164  {"Elect."}, //6
165  {"MIGE "},//7
166  {"SPARE "},//8
167  {"SPARE "},//9
168  {"SPARE "},//10
169  {"SPARE "},//11
170  {"SPARE "},//12
171  {"SPARE "},//13
172  {"SPARE "},//14
173  {"SPARE "}};//15
174 
176  sprintf(buf,"Page 1");
177  MObjectSetText(pf, buf);
179 
180 
181  tb = MCreateTableForm(pf, 2);
184  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
188 
189 
190  for(i=0;i<8;i++)
191  {
192 
193 /*
194  DAS.Gui.ContrPanel.Plbl_LT[i] = MCreateLabel(tb, channel[i], FIXED_SMALL);
195  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_LT[i], LEFT_ALIGN);
196  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_LT[i], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
197  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_LT[i], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
198  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_LT[i], 0);
199 */
200 
201  lbl = MCreateLabel(tb, channel[i], FIXED_SMALL);
204  MObjectSetTransparency(lbl, 0);
206 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
207 
208  DAS.Gui.ContrPanel.Albl_LT[i] = MCreateLabel(tb, "+10.0C", HELV_SMALL);
213 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_LT[i], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
214  }
215 
217  sprintf(buf,"Page 2");
218  MObjectSetText(pf, buf);
220 
221  tb = MCreateTableForm(pf, 2);
224  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
228 
229  for(i=8;i<16;i++)
230  {
231 
232 /*
233  DAS.Gui.ContrPanel.Plbl_LT[i] = MCreateLabel(tb, channel[i], FIXED_SMALL);
234  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_LT[i], LEFT_ALIGN);
235  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_LT[i], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
236  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_LT[i], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
237  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_LT[i], 0);
238 */
239  lbl = MCreateLabel(tb, channel[i], FIXED_SMALL);
242  MObjectSetTransparency(lbl, 0);
244 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
245 
246  DAS.Gui.ContrPanel.Albl_LT[i] = MCreateLabel(tb, "+10.0C", HELV_SMALL);
251 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_LT[i], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
252  }
253 
255 
256 
257 }
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lbl
Definition: DFileMan.c:42
#define WS_SHADOW_IN
Definition: Mguidefs.h:958
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define HELV_SMALL
Definition: Mguidefs.h:881
#define FIXED_SMALL
Definition: Mguidefs.h:878
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
palette DPAL
Definition: CreateForms.c:88
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
short DB_BG[3]
Default Background Color.
MOBJECT Albl_LT[16]
Active Control Panel Labels for LIS Temperature 16.
void MLabelSetAlignment(MOBJECT p, int align)
controlpanel ContrPanel
Control Panel Structure.
void MPagedFormSetActivePage(MOBJECT form, int page)
das DAS
Definition: CreateForms.c:98
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
#define TOP_ALIGN
Definition: Mguidefs.h:918
void MObjectSetBGColorFromParent(MOBJECT obj, int true_false, int percentage)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ListTargetCB()

void ListTargetCB ( MOBJECT  p,
LIST_ACT la,
void *  ad 
)

Definition at line 4371 of file CreateForms.c.

References FWS, LIST_ACT::item, MIS, LIST_ACT::pos, FilterWheelSt::target, GratingSt::target, MirrorSt::target, ZenithSt::target, and AzimuthSt::target.

Referenced by MDCreateSh_SimPos().

4372 {
4373 
4374  int c = (int) ad;
4375  int er = 0;
4376  char buf[16];
4377 
4378  switch (c)
4379  {
4380  case 0:
4381  MIS.target = la->pos;
4382  break;
4383  case 1:
4384  GRS.target = la->pos;
4385 
4386  break;
4387  case 2:
4388  FWS.target = la->pos;
4389 
4390  break;
4391  case 4:
4392  sprintf(buf,"%s", la->item);
4393  ZST.target = atof(buf);
4394 
4395  break;
4396  case 5:
4397  sprintf(buf,"%s", la->item);
4398  AST.target = atof(buf);
4399 
4400  break;
4401 
4402  }
4403 
4404 
4405 
4406 }
double target
Azimuth Targrt position.
AzimuthSt AST
Definition: CreateForms.c:100
double target
Zenith target position.
char * item
Definition: Mguidefs.h:1181
int target
Mirror Target position.
ZenithSt ZST
Definition: CreateForms.c:99
long pos
Definition: Mguidefs.h:1185
MirrorSt MIS
Mirror.
Definition: DAS_Spat.c:61
int target
Filter target Position.
FilterWheelSt FWS
Filter Wheel.
Definition: DAS_Spat.c:57
long target
Grating target Wl.
GratingSt GRS
Definition: CreateForms.c:82
+ Here is the caller graph for this function:

§ MDCreate_CP()

MOBJECT MDCreate_CP ( void  )

Create Spectrometer Control Panel. Procedure that build the Control Panel for checking the spectrometer operations such as temperature monitoring, stepper motor positioning, data acquisition ...

Returns
void

Definition at line 1143 of file CreateForms.c.

References controlpanel::Albl_Azim, controlpanel::Albl_CS, controlpanel::Albl_Elev, controlpanel::Albl_IE, controlpanel::Albl_LS, controlpanel::Albl_Script, controlpanel::Albl_Status, controlpanel::Albl_sunr, controlpanel::Albl_suns, CENTER_ALIGN, gui::ContrPanel, CP_Sh, palette::DB_BG, palette::DB_BG_Albl, palette::DB_BG_lblUP, palette::DB_BG_Plbl, palette::DB_FG_Albl, palette::DB_FG_lblUP, palette::DB_FG_Plbl, DB_HelpCB(), DB_InfCB(), DB_KB_ButtonActive(), DB_KeyB_CB(), DB_KeyComSelButtKB_CB(), DB_KeyComSelButtMouse_CB(), DB_LampSelButtMouse_CB(), DB_Redraw_CB(), palette::DB_Sel, palette::DB_UnSel, palette::DB_UnSelFG, das::DOption, EM_BUTTON_PRESS, EM_KEY_PRESS, EM_MOTION, EM_WINDOW_ENTER, F_ATT_NONE, False, FDOUBLE, optionini::filtertype, FIXED_SMALL, FPLUS, FrmBuildTemperature(), FSIMPLE, das::Gui, HELV_MEDIUM, HELV_SMALL, item_advc, pushbutt::KeyB, lbl, controlpanel::lbl_Par, controlpanel::lbl_Time, controlpanel::lblK, controlpanel::LedHG, controlpanel::ledpelt, controlpanel::LedQJ, controlpanel::LedSM, LEFT_ALIGN, MBottomAttach(), MButtonSetOnMouseOverForegroundRGB(), MCreateColForm(), MCreateLabel(), MCreatePButton(), MCreatePixmapFromFile(), MCreatePopupMenu(), MCreateRowForm(), MCreateShell(), MCreateTabbedRowForm(), MCreateTableForm(), MLabelSetAlignment(), MMenuAddItemObsolete(), MObjectAddEventNotifyCallback(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetBGColorFromParent(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetTransparency(), MPagedFormSetActivePage(), MPButtonSetCallback(), MSetInputPromptFgRGB(), MSetInputPromptFonts(), MSetInputPromptRGB(), MSetMessageDialogFgRGB(), MSetMessageDialogFonts(), MSetMessageDialogRGB(), stepm::NAMS, controlpanel::Pagedfrm_SM, controlpanel::pblamps, popup_advcalib, PopUpAdvCal_CB(), PupAdvCal_CB(), gui::PushButt, RIGHT_ALIGN, SF_NO_CLOSE, SF_NO_MAXIMIZE, SF_NO_RESIZE, das::StepM, StepperPagForm(), TOP_ALIGN, True, UNDEF_ALIGN, WS_ETCHED_IN, WS_NONE, WS_SHADOW_IN, and WS_SHADOW_OUT.

Referenced by BuildMainShell().

1144 {
1145 
1146  MOBJECT colfrm; //main Container
1147 
1148  MOBJECT rowfrm; //left buttons container (first column)
1149 
1150  MOBJECT tb, pb;
1151  MOBJECT lbl; //
1152 
1153  MOBJECT Pagedfrm_Temp;
1154 
1155  int i, k, c = 0;
1156  int d_events = 0;
1157  char buff[128];
1158 const char *KeyCom_Code[] = {{"&Mirror"}, //0 0
1159  {"&Grating"}, //1 1
1160  {"&Filter "}, //2 2
1161 
1162  {"&NDFilter"}, //5 4
1163  {"&MIGE Pos"}, //4 3
1164 
1165  {"&Ref. Pos."}, //6 5
1166  {"F ECU Off "}, //7 6
1167  {"SPARE "}, //8 7
1168 
1169  {"SPARE "}, //10 8
1170  {"SPARE "}, //11 9
1171  {"Sim.Pos."}, //9 10
1172  {"&Horiz M"}, //3 11
1173 
1174  {"M&vGrat."}, //12 12
1175  {"&Config"},//13 13
1176 
1177  {" Ca&lib "}, //14
1178  {"ARan&ge "}, //15
1179  {"Ge&tCCD "}, //16
1180  {"Average"}, //17
1181  {"Dark "}, //18
1182  {"Save "}, //19
1183  {" PLOT "}, //20
1184  {" ZOOM "},//21
1185  {"P &X Off"},//22
1186  {"P &Y Off"},//23
1187  {"A&bout "},//24
1188  {"&Pause "},//25
1189  {"&Tools "},//26
1190  {"&Quit "}};//27
1191 
1192 const char *KeyCom_CodePopUpHelp[]= {{"Set Input Mirror position"}, //0
1193  {"Set Grating Position"}, //1
1194  {"Set Filter wheel Position"}, //2
1195  {"Set Zenith and Azimuth Position"}, //4
1196  {"Set zimuth Position"}, //5
1197  {"Look for Input Mirror Ref. Pos."}, //6
1198  {"Look for Grating Ref. Pos."}, //7
1199  {"Look for Filter Wheel Ref. Pos."}, //8
1200  {"Look for Zenith Ref. Pos. "}, //10
1201  {"Look for Azimuth Ref. Pos."}, //11
1202  {"Create shell for Simultaneous Positioning"}, //9
1203  {"Create Shell for Horizontal Measurements"}, //3
1204  {"Create Shell for free Grating movements"}, //12
1205  {"Open DAS Configuration tool"},//13
1206 
1207  {"Automatic Calibration "}, //14
1208  {"Computation Optimum Exposure time "}, //15
1209  {"Carry out Light Measurement"}, //16
1210  {"Perform Averaged Measurement"}, //17
1211  {"Carry out Dark Measurement "}, //18
1212  {"Save current measurements "}, //19
1213  {"2D Plot of image"}, //20
1214  {"Image Zoom "},//21
1215  {"X Profile On/Off"},//22
1216  {"Y Profile On/Off"},//23
1217  {"Info & Help "},//24
1218  {"Pause/Resume Script Execution "},//25
1219  {"Open tools Shell "},//26
1220  {"Exit Program "}};//27
1221 
1222 
1223  /**********************************************************************************/
1224  // Set the message dialog color and font format
1231  /**********************************************************************************/
1232 
1235  //MObjectAddEventNotifyCallback(CP_Sh, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1237 
1238  // Come si mette un'icona nella shell?
1239  //pix = MCreatePixmapFromFile(CP_Sh, "SYS\\ledoff.bmp");
1240 
1241  colfrm = MCreateColForm(CP_Sh);
1242  MObjectSetShadow(colfrm, WS_NONE, 0, 0);
1243  //MObjectAddEventNotifyCallback(colfrm, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1244  MObjectSetBGColorFromParent(colfrm, True, 100);
1245  // Row form for the command buttons
1246  rowfrm = MCreateRowForm(colfrm);
1247  MObjectSetShadow(rowfrm, WS_SHADOW_IN, 2, 0);
1249  //MObjectAddEventNotifyCallback(rowfrm, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1250  MObjectSetBGColorFromParent(rowfrm, True, 100);
1251  c = EM_MOTION | EM_BUTTON_PRESS;
1252  for (i=0; i < 14; i++)
1253  {
1254  //PBUTT.KeyB[i] = MCreatePButton(tb, KeyCom_Code[i], HELV_SMALL);
1255  DAS.Gui.PushButt.KeyB[i] = MCreatePButton(rowfrm, KeyCom_Code[i], HELV_SMALL);
1258  //MObjectSetPopupHelp(DAS.Gui.PushButt.KeyB[i] ,KeyCom_CodePopUpHelp[i] , 200, 5000);
1259  if (i==0)
1263 
1267 /*
1268 
1269  This code is for activation\deacivation of some pushbuttons depending on
1270  instrument type\esecution mode\option flags
1271 
1272  these functions are collected in the
1273  "DB_KB_ButtonActive" procedure placed after the creation of the second column of buttons
1274 
1275  if (DAS.Paramini.EqType == TROPOGAS ||
1276  DAS.Paramini.EqType == SPATRAMPLUS ||
1277  DAS.Paramini.EqType == GASCODNG1 ||
1278  DAS.Paramini.EqType == GASCODNG2 ||
1279  DAS.Paramini.EqType == GASCODNG3 ||
1280  DAS.Paramini.EqType == SPATRAM2)
1281  {
1282  if(i==11)
1283  MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[i]);
1284 
1285 
1286  if(i==3 || i==4 || i==8 || i==9)
1287  {
1288  if(DAS.MIGE.linked == 0)
1289  {
1290  MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[i]);
1291  //MObjectSetBackgroundRGB(optedit, 192, 192, 192);
1292 
1293  }
1294  }
1295  }
1296  if (DAS.Paramini.EqType == SPATRAM || DAS.Paramini.EqType == LIS_)
1297  if(i==3 || i==4 || i==8 || i==9 || i==10 || i== 11)
1298  MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[i]);
1299 // if (DAS.Paramini.EqType == GASCODNG)
1300 // if(i==4 || i==5 || i==9 || i==10 || i== 11)
1301 // MObjectSetUnsensitive(DAS.Gui.PushButt.KeyB[i]);
1302 */
1303  }
1304 
1305 
1306 
1307 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1308 
1309  //Second column of labels and controls
1310  /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1311  rowfrm = MCreateRowForm(colfrm);
1312  MBottomAttach(rowfrm, F_ATT_NONE, 3, NULL);
1314 // MObjectSetBackgroundRGB(rowfrm, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
1315  MObjectSetShadow(rowfrm, WS_NONE, 0, 0);
1316  MObjectSetResize(rowfrm, True, True);
1317 // MObjectAddEventNotifyCallback(rowfrm, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1318  MObjectSetBGColorFromParent(rowfrm, True, 100);
1319 
1320  DAS.Gui.ContrPanel.lblK[0] = MCreateLabel(rowfrm, "CONTROL PARAMETERS", HELV_SMALL);
1325 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lblK[0], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 3);
1326 
1327  tb = MCreateTableForm(rowfrm, 2);
1329  MObjectSetResize(tb, True, False);
1330  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
1331 // MObjectAddEventNotifyCallback(tb, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1333 /*
1334  DAS.Gui.ContrPanel.lbl_NP[0] = MCreateLabel(tb, "CCD Target Temp.:", FIXED_SMALL);
1335  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[0], LEFT_ALIGN);
1336  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[0], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1337  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[0], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1338  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[0], 0);
1339 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[0], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1340 */
1341  d_events = EM_WINDOW_ENTER | EM_MOTION;
1342 
1343  lbl = MCreateLabel(tb, "CCD Target Temp.:", FIXED_SMALL);
1347  MObjectSetTransparency(lbl, 0);
1348 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, d_events , (void *) 1);
1349 
1350 
1351  DAS.Gui.ContrPanel.lbl_Par[0] = MCreateLabel(tb, "+10.0C", HELV_SMALL);
1356 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[0], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1357 
1358 /* DAS.Gui.ContrPanel.lbl_NP[1] = MCreateLabel(tb, "CCD Pelt. Init Pwr:", FIXED_SMALL);
1359  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[1], LEFT_ALIGN);
1360  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[1], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1361  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[1], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1362  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[1], 0);
1363  MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[1], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1364 */
1365  lbl = MCreateLabel(tb, "CCD Pelt. Init Pwr:", FIXED_SMALL);
1369  MObjectSetTransparency(lbl, 0);
1370 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1371 
1372  DAS.Gui.ContrPanel.lbl_Par[1] = MCreateLabel(tb, "100%", HELV_SMALL);
1377 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[1], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1378 /*
1379  DAS.Gui.ContrPanel.lbl_NP[2] = MCreateLabel(tb, "OMU Target Temp.:", FIXED_SMALL);
1380  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[2], LEFT_ALIGN);
1381  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[2], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1382  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[2], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1383  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[2], 0);
1384  MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[2], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1385 */
1386 
1387  lbl = MCreateLabel(tb, "OMU Target Temp.:", FIXED_SMALL);
1391  MObjectSetTransparency(lbl, 0);
1392 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1393 
1394  DAS.Gui.ContrPanel.lbl_Par[2] = MCreateLabel(tb, "+10.0C", HELV_SMALL);
1399 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[2], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1400 /*
1401  DAS.Gui.ContrPanel.lbl_NP[10] = MCreateLabel(tb, "OMU Pelt. Init Pwr:", FIXED_SMALL);
1402  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[10], LEFT_ALIGN);
1403  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[10], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1404  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[10], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1405  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[10], 0);
1406  MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[10], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1407 */
1408  lbl = MCreateLabel(tb, "OMU Pelt. Init Pwr:", FIXED_SMALL);
1412  MObjectSetTransparency(lbl, 0);
1413 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1414 
1415  DAS.Gui.ContrPanel.lbl_Par[10] = MCreateLabel(tb, "100%", HELV_SMALL);
1420 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[10], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1421 
1422 /*******************************************************************************************************/
1423  DAS.Gui.ContrPanel.lblK[1] = MCreateLabel(rowfrm, "CCD PARAMETERS", HELV_SMALL);
1428 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lblK[1], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 3);
1429 
1430  tb = MCreateTableForm(rowfrm, 4);
1432  MObjectSetResize(tb, True, False);
1433  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
1434 // MObjectAddEventNotifyCallback(tb, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1436 /*
1437  DAS.Gui.ContrPanel.lbl_NP[3] = MCreateLabel(tb, "H. Pix.:", FIXED_SMALL);
1438  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[3], LEFT_ALIGN);
1439  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[3], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1440  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[3], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1441  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[3], 0);
1442 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[3], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1443 */
1444  lbl = MCreateLabel(tb, "H. Pix:", FIXED_SMALL);
1448  MObjectSetTransparency(lbl, 0);
1449 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1450 
1451  DAS.Gui.ContrPanel.lbl_Par[3] = MCreateLabel(tb, "0000", HELV_SMALL);
1456 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[3], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1457 /*
1458  DAS.Gui.ContrPanel.lbl_NP[4] = MCreateLabel(tb, "V. Pix:", FIXED_SMALL);
1459  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[4], LEFT_ALIGN);
1460  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[4], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1461  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[4], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1462  // MObjectSetShadow(DAS.Gui.ContrPanel.lbl_NP[4], WS_SHADOW_IN, 2, 1);
1463  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[4], 0);
1464 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[4], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1465  */
1466  lbl = MCreateLabel(tb, "V. Pix:", FIXED_SMALL);
1470  MObjectSetTransparency(lbl, 0);
1471 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1472 
1473  DAS.Gui.ContrPanel.lbl_Par[4] = MCreateLabel(tb, " 0000", HELV_SMALL);
1478 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[4], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1479 
1480 /*******************************************************************************************************/
1481 
1482  DAS.Gui.ContrPanel.lblK[2] = MCreateLabel(rowfrm, "CCD WINDOW", HELV_SMALL);
1487 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lblK[2], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 3);
1488 
1489  tb = MCreateTableForm(rowfrm, 4);
1491  MObjectSetResize(tb, True, False);
1492  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
1493 // MObjectAddEventNotifyCallback(tb, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1495 /*
1496 
1497  DAS.Gui.ContrPanel.lbl_NP[5] = MCreateLabel(tb , "X Start:", FIXED_SMALL);
1498  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[5], LEFT_ALIGN);
1499  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[5], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1500  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[5], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1501  // MObjectSetShadow(DAS.Gui.ContrPanel.lbl_NP[5], WS_SHADOW_IN, 2, 1);
1502  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[5], 0);
1503  MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[5], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1504 */
1505  lbl = MCreateLabel(tb, "X Start:", FIXED_SMALL);
1509  MObjectSetTransparency(lbl, 0);
1510 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1511 
1517 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[5], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1518 /*
1519  DAS.Gui.ContrPanel.lbl_NP[6] = MCreateLabel(tb, "Y Start:", FIXED_SMALL);
1520  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[6], LEFT_ALIGN);
1521  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[6], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1522  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[6], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1523  // MObjectSetShadow(DAS.Gui.ContrPanel.lbl_NP[6], WS_SHADOW_IN, 2, 1);
1524  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[6], 0);
1525  MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[6], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1526 */
1527  lbl = MCreateLabel(tb, "Y Start:", FIXED_SMALL);
1531  MObjectSetTransparency(lbl, 0);
1532 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1533 
1539 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[6], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1540 /*
1541  DAS.Gui.ContrPanel.lbl_NP[7] = MCreateLabel(tb, "X End:", FIXED_SMALL);
1542  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[7], LEFT_ALIGN);
1543  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[7], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1544  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[7], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1545  // MObjectSetShadow(DAS.Gui.ContrPanel.lbl_NP[7], WS_SHADOW_IN, 2, 1);
1546  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[7], 0);
1547  MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[7], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1548 */
1549  lbl = MCreateLabel(tb, "X End:", FIXED_SMALL);
1553  MObjectSetTransparency(lbl, 0);
1554 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1555 
1561 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[7], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1562 /*
1563  DAS.Gui.ContrPanel.lbl_NP[8] = MCreateLabel(tb, "Y End:", FIXED_SMALL);
1564  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[8], LEFT_ALIGN);
1565  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[8], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1566  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[8], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1567  // MObjectSetShadow(DAS.Gui.ContrPanel.lbl_NP[8], WS_SHADOW_IN, 2, 1);
1568  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[8], 0);
1569  MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[8], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1570 */
1571  lbl = MCreateLabel(tb, "Y End:", FIXED_SMALL);
1575  MObjectSetTransparency(lbl, 0);
1576 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1577 
1583 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[8], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1584 
1585 /*******************************************************************************************************/
1586 
1587  tb = MCreateTableForm(rowfrm, 2);
1589  MObjectSetResize(tb, True, False);
1590  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
1591 // MObjectAddEventNotifyCallback(tb, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1593 
1594 /*
1595  DAS.Gui.ContrPanel.lbl_NP[9] = MCreateLabel(tb, "Vert.Bin.", FIXED_SMALL);
1596  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_NP[9], LEFT_ALIGN);
1597  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_NP[9], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1598  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_NP[9], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1599  // MObjectSetShadow(DAS.Gui.ContrPanel.lbl_NP[9], WS_SHADOW_IN, 2, 1);
1600  MObjectSetTransparency(DAS.Gui.ContrPanel.lbl_NP[9], 0);
1601  MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_NP[9], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1602 */
1603  lbl = MCreateLabel(tb, "Vert.Bin:", FIXED_SMALL);
1607  MObjectSetTransparency(lbl, 0);
1608 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1609 
1610  DAS.Gui.ContrPanel.lbl_Par[9] = MCreateLabel(tb, "00", HELV_SMALL);
1615 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Par[9], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1616 
1617  /*********************** STEPPERS *************************/
1618 
1619  DAS.Gui.ContrPanel.lblK[3] = MCreateLabel(rowfrm, "STEPPER MOTORS", HELV_SMALL);
1624 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lblK[3], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 3);
1625 
1626 
1630 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Pagedfrm_SM, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1632 
1633  for (i=0;i<DAS.StepM.NAMS;i++)
1634  {
1635  for(k=0;k<2;k++)
1636  {
1637  StepperPagForm(i, k);
1638  }
1639  }
1641 
1642  /*********************** STEPPERS END *************************/
1643 
1644 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1645 
1646 
1647  //Seconda colonna di labels e controlli
1648  rowfrm = MCreateRowForm(colfrm);
1649  MBottomAttach(rowfrm, F_ATT_NONE, 3, NULL);
1651  MObjectSetBackgroundRGB(rowfrm, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
1652  MObjectSetShadow(rowfrm, WS_NONE, 0, 0);
1653  MObjectSetResize(rowfrm, True, True);
1654 // MObjectAddEventNotifyCallback(rowfrm, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1655  MObjectSetBGColorFromParent(rowfrm, True, 100);
1656 
1657  DAS.Gui.ContrPanel.lblK[4] = MCreateLabel(rowfrm, "CCD-OMU STATUS", HELV_SMALL);
1662 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lblK[4], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 3);
1663 
1664  tb = MCreateTableForm(rowfrm, 2);
1667  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
1668  MObjectSetResize(tb, True, False);
1669 // MObjectAddEventNotifyCallback(tb, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1671 
1672 /* DAS.Gui.ContrPanel.Plbl_CS[0] = MCreateLabel(tb, "CCD Actual Temp.:", FIXED_SMALL);
1673  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_CS[0], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1674  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_CS[0], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1675  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_CS[0], 0);
1676  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_CS[0], LEFT_ALIGN);
1677 */
1678  lbl = MCreateLabel(tb, "CCD Actual Temp.:", FIXED_SMALL);
1681  MObjectSetTransparency(lbl, 0);
1683 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1684 
1685 
1686  DAS.Gui.ContrPanel.Albl_CS[0] = MCreateLabel(tb, "+10.0C", HELV_SMALL);
1691 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_CS[0], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1692 /*
1693  DAS.Gui.ContrPanel.Plbl_CS[1] = MCreateLabel(tb, "CCD Pelt. Act. Pwr.:", FIXED_SMALL);
1694  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_CS[1], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1695  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_CS[1], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1696  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_CS[1], 0);
1697  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_CS[1], LEFT_ALIGN);
1698 */
1699  lbl = MCreateLabel(tb, "CCD Pelt Act Pwr:", FIXED_SMALL);
1702  MObjectSetTransparency(lbl, 0);
1704 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1705 
1706  DAS.Gui.ContrPanel.Albl_CS[1] = MCreateLabel(tb, "100%", HELV_SMALL);
1711 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_CS[1], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1712  /*
1713  DAS.Gui.ContrPanel.Plbl_LS[6] = MCreateLabel(tb, "Delta Temp.", FIXED_SMALL);
1714  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_LS[6], LEFT_ALIGN);
1715  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_LS[6], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1716  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_LS[6], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1717  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_LS[6], 0);
1718 */
1719  lbl = MCreateLabel(tb, "Delta Temp.:", FIXED_SMALL);
1722  MObjectSetTransparency(lbl, 0);
1724 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1725 
1726  DAS.Gui.ContrPanel.Albl_LS[6] = MCreateLabel(tb, "+10.0C", HELV_SMALL);
1731 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_LS[6], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1732 /*
1733  DAS.Gui.ContrPanel.Plbl_LS[7] = MCreateLabel(tb, "OMU Pelt.Act.Pwr:", FIXED_SMALL);
1734  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_LS[7], LEFT_ALIGN);
1735  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_LS[7], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1736  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_LS[7], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1737  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_LS[7], 0);
1738 */
1739  lbl = MCreateLabel(tb, "OMU Pelt.Act.Pwr:", FIXED_SMALL);
1742  MObjectSetTransparency(lbl, 0);
1744 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1745 
1746  DAS.Gui.ContrPanel.Albl_LS[7] = MCreateLabel(tb, "100%", HELV_SMALL);
1751 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_LS[7], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1752 
1753  DAS.Gui.ContrPanel.ledpelt[0] = MCreatePixmapFromFile(tb, "SYS\\pltoff.bmp");
1756 
1757  DAS.Gui.ContrPanel.ledpelt[1] = MCreatePixmapFromFile(tb, "SYS\\pltoff.bmp");
1760 
1761 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1762 
1763 
1764  DAS.Gui.ContrPanel.lblK[5] = MCreateLabel(rowfrm, "STEPPERS STATUS", HELV_SMALL);
1769 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lblK[5], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 3);
1770 
1771  tb = MCreateTableForm(rowfrm, DAS.StepM.NAMS*2);
1774  MObjectSetResize(tb, True, False);
1775  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
1776 // MObjectAddEventNotifyCallback(tb, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1778 
1779  for (i=0;i<DAS.StepM.NAMS;i++)
1780  {
1781  for(k=0;k<2;k++)
1782  {
1783  sprintf(buff,"SM%d", (2*i+k+1));
1784 /*
1785  DAS.Gui.ContrPanel.Plbl_SM[i][k] = MCreateLabel(tb, buff, FIXED_SMALL);
1786  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_SM[i][k], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1787  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_SM[i][k], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1788  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_SM[i][k], 0);
1789  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_SM[i][k], CENTER_ALIGN);
1790 */
1791  lbl = MCreateLabel(tb, buff, FIXED_SMALL);
1794  MObjectSetTransparency(lbl, 0);
1796 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1797 
1798 
1799  DAS.Gui.ContrPanel.LedSM[i][k] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
1801  }
1802  }
1803 
1804 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1805 
1806  DAS.Gui.ContrPanel.lblK[6] = MCreateLabel(rowfrm, "ACTIVITY ", HELV_SMALL);
1811 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lblK[6], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 3);
1812 
1813  tb = MCreateTableForm(rowfrm, 2);
1816  MObjectSetResize(tb, True, True);
1817  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
1819 /*
1820  DAS.Gui.ContrPanel.Plbl_Script = MCreateLabel(tb, "Script-Use:", FIXED_SMALL);
1821  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_Script, LEFT_ALIGN);
1822  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_Script, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1823  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_Script, DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1824  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_Script, 0);
1825 */
1826  lbl = MCreateLabel(tb, "Script-Use:", FIXED_SMALL);
1829  MObjectSetTransparency(lbl, 0);
1831 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1832 
1833  DAS.Gui.ContrPanel.Albl_Script = MCreateLabel(tb, "XXXXXXXX.PRG", HELV_SMALL);
1838 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_Script, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1839 
1840 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1841 /*
1842  DAS.Gui.ContrPanel.lblK[9] = MCreateLabel(_rowform002, "ACTIVITY ", HELV_SMALL);
1843  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lblK[9], DPAL.DB_BG_lblUP[0], DPAL.DB_BG_lblUP[1], DPAL.DB_BG_lblUP[2]);
1844  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lblK[9], DPAL.DB_FG_lblUP[0], DPAL.DB_FG_lblUP[1], DPAL.DB_FG_lblUP[2]);
1845  MObjectSetShadow(DAS.Gui.ContrPanel.lblK[9], WS_SHADOW_OUT, 1, 0);
1846  MObjectSetTransparency(DAS.Gui.ContrPanel.lblK[9], 0);
1847 */
1848  tb = MCreateTableForm(rowfrm, 2);
1851  MObjectSetResize(tb, True, True);
1852  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
1853 // MObjectAddEventNotifyCallback(tb, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1855 /*
1856  DAS.Gui.ContrPanel.Plbl_CS[2] = MCreateLabel(tb, "Acq.#:", FIXED_SMALL);
1857  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_CS[2], LEFT_ALIGN);
1858  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_CS[2], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1859  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_CS[2], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1860  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_CS[2], 0);
1861 */
1862 
1863  lbl = MCreateLabel(tb, "Acq.#:", FIXED_SMALL);
1866  MObjectSetTransparency(lbl, 0);
1868 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1869 
1870  DAS.Gui.ContrPanel.Albl_CS[2] = MCreateLabel(tb, " 0", HELV_SMALL);
1875 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_CS[2], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1876 /*
1877  DAS.Gui.ContrPanel.Plbl_CS[3] = MCreateLabel(tb, "File:", FIXED_SMALL);
1878  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_CS[3], LEFT_ALIGN);
1879  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_CS[3], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1880  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_CS[3], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1881  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_CS[3], 0);
1882 */
1883 
1884  lbl = MCreateLabel(tb, "File:", FIXED_SMALL);
1887  MObjectSetTransparency(lbl, 0);
1889 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1890 
1891 
1897 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_CS[3], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1898 
1899 /*
1900  DAS.Gui.ContrPanel.Plbl_IE[0] = MCreateLabel(tb, "AutoR:", FIXED_SMALL);
1901  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_IE[0], LEFT_ALIGN);
1902  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_IE[0], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1903  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_IE[0], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1904  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_IE[0], 0);
1905 */
1906  lbl = MCreateLabel(tb, "AutoR:", FIXED_SMALL);
1909  MObjectSetTransparency(lbl, 0);
1911 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
1912 
1913 
1914  DAS.Gui.ContrPanel.Albl_IE[0] = MCreateLabel(tb, "0.002", HELV_SMALL);
1919 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_IE[0], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
1920  /*
1921  DAS.Gui.ContrPanel.Plbl_IE[1] = MCreateLabel(tb, "Dwnld:", FIXED_SMALL);
1922  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_IE[1], LEFT_ALIGN);
1923  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_IE[1], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
1924  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_IE[1], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
1925  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_IE[1], 0);
1926 
1927  DAS.Gui.ContrPanel.Albl_IE[1] = MCreateLabel(tb, "xxxxx", HELV_SMALL);
1928  MLabelSetAlignment(DAS.Gui.ContrPanel.Albl_IE[1], RIGHT_ALIGN);
1929  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Albl_IE[1], DPAL.DB_FG_Albl[0], DPAL.DB_FG_Albl[1], DPAL.DB_FG_Albl[2]);
1930  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Albl_IE[1], DPAL.DB_BG_Albl[0], DPAL.DB_BG_Albl[1], DPAL.DB_BG_Albl[2]);
1931  MObjectSetTransparency(DAS.Gui.ContrPanel.Albl_IE[1], 0);
1932  */
1933 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1934  DAS.Gui.ContrPanel.lblK[7] = MCreateLabel(rowfrm, "LAMPS STATUS", HELV_SMALL);
1939 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lblK[7], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 3);
1940 
1941 
1942  tb = MCreateTableForm(rowfrm, 4);
1945  MObjectSetResize(tb, True, True);
1946  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
1947 // MObjectAddEventNotifyCallback(tb, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1949 
1950  DAS.Gui.ContrPanel.LedHG = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
1952 
1953  DAS.Gui.ContrPanel.pblamps[0] = MCreatePButton(tb, "Hg Off", HELV_SMALL);
1961 
1962 
1963  DAS.Gui.ContrPanel.LedQJ = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
1965 
1966  DAS.Gui.ContrPanel.pblamps[1] = MCreatePButton(tb, "Qj Off", HELV_SMALL);
1974 
1975 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1976 
1977  /*******************************************************************/
1978 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
1979  rowfrm = MCreateRowForm(colfrm);
1980  MObjectSetBackgroundRGB(rowfrm, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
1981  MObjectSetShadow(rowfrm, WS_NONE, 0, 0);
1982  MObjectSetResize(rowfrm, True, False);
1984 // MObjectAddEventNotifyCallback(rowfrm, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
1985  MObjectSetBGColorFromParent(rowfrm, True, 100);
1986 
1987  DAS.Gui.ContrPanel.lblK[8] = MCreateLabel(rowfrm, "DEVICES STATUS", HELV_SMALL);
1993 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lblK[8], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 3);
1994 
1995  tb = MCreateTableForm(rowfrm, 2);
1997  MObjectSetResize(tb, True, False);
1998  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
2000 // MObjectAddEventNotifyCallback(tb, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
2002 /*
2003  DAS.Gui.ContrPanel.Plbl_LS[0] = MCreateLabel(tb, "Source Mirror:", FIXED_SMALL);
2004  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_LS[0], LEFT_ALIGN);
2005  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_LS[0], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
2006  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_LS[0], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
2007  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_LS[0], 0);
2008  MObjectAlign(DAS.Gui.ContrPanel.Plbl_LS[0], CENTER_ALIGN, TOP_ALIGN);
2009 */
2010  lbl = MCreateLabel(tb, "Source Mirror", FIXED_SMALL);
2013  MObjectSetTransparency(lbl, 0);
2016 
2017  DAS.Gui.ContrPanel.Albl_LS[0] = MCreateLabel(tb, " ", HELV_SMALL);
2023 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_LS[0], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2024 
2025 /* DAS.Gui.ContrPanel.Plbl_LS[1] = MCreateLabel(tb, "Grating:", FIXED_SMALL);
2026  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_LS[1], LEFT_ALIGN);
2027  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_LS[1], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
2028  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_LS[1], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
2029  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_LS[1], 0);
2030 */
2031  lbl = MCreateLabel(tb, "Grating:", FIXED_SMALL);
2034  MObjectSetTransparency(lbl, 0);
2036 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
2037 
2043 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_LS[1], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2044 
2045 /* DAS.Gui.ContrPanel.Plbl_LS[2] = MCreateLabel(tb, "Filter Wheel:", FIXED_SMALL);
2046  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_LS[2], LEFT_ALIGN);
2047  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_LS[2], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
2048  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_LS[2], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
2049  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_LS[2], 0);
2050 */
2051  lbl = MCreateLabel(tb, "Filter Wheel:", FIXED_SMALL);
2054  MObjectSetTransparency(lbl, 0);
2056 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
2057 
2058 
2059  DAS.Gui.ContrPanel.Albl_LS[2] = MCreateLabel(tb, " ", HELV_SMALL);
2064 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_LS[2], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2065 /*
2066  DAS.Gui.ContrPanel.Plbl_LS[3] = MCreateLabel(tb, "Unused", FIXED_SMALL);
2067  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_LS[3], LEFT_ALIGN);
2068  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_LS[3], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
2069  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_LS[3], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
2070  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_LS[3], 0);
2071  MObjectAlign(DAS.Gui.ContrPanel.Plbl_LS[3], CENTER_ALIGN, TOP_ALIGN);
2072 */
2073 
2074 
2076  lbl = MCreateLabel(tb, "NDFiter", FIXED_SMALL);
2077  if(DAS.DOption.filtertype == FSIMPLE)
2078  lbl = MCreateLabel(tb, "Not Used", FIXED_SMALL);
2079 
2082  MObjectSetTransparency(lbl, 0);
2084 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
2085 
2087  DAS.Gui.ContrPanel.Albl_LS[3] = MCreateLabel(tb, " OFF", HELV_SMALL);
2088  if(DAS.DOption.filtertype == FSIMPLE)
2089  DAS.Gui.ContrPanel.Albl_LS[3] = MCreateLabel(tb, " ", HELV_SMALL);
2090 
2096 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_LS[3], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2097 
2098 /* DAS.Gui.ContrPanel.Plbl_LS[4] = MCreateLabel(tb, "Zenith:", FIXED_SMALL);
2099  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_LS[4], LEFT_ALIGN);
2100  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_LS[4], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
2101  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_LS[4], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
2102  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_LS[4], 0);
2103 */
2104  lbl = MCreateLabel(tb, "Zenith:", FIXED_SMALL);
2107  MObjectSetTransparency(lbl, 0);
2109 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
2110 
2111 
2117 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_LS[4], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2118 
2119 /* DAS.Gui.ContrPanel.Plbl_LS[5] = MCreateLabel(tb, "Azimuth:", FIXED_SMALL);
2120  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_LS[5], LEFT_ALIGN);
2121  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_LS[5], DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
2122  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_LS[5], DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
2123  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_LS[5], 0);
2124 */
2125  lbl = MCreateLabel(tb, "Azimuth:", FIXED_SMALL);
2128  MObjectSetTransparency(lbl, 0);
2130 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
2131 
2132 
2133  DAS.Gui.ContrPanel.Albl_LS[5] = MCreateLabel(tb, " ", HELV_SMALL);
2138 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_LS[5], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2139 
2140 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
2141 
2142  DAS.Gui.ContrPanel.lblK[9] = MCreateLabel(rowfrm, "TEMPERATURES", HELV_SMALL);
2148 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lblK[9], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 3);
2149 
2150 
2151  Pagedfrm_Temp = MCreateTabbedRowForm(rowfrm, 2, FIXED_SMALL);
2153  MObjectSetBackgroundRGB(Pagedfrm_Temp, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
2154  MObjectSetBGColorFromParent(Pagedfrm_Temp, True, 100);
2155 
2156  FrmBuildTemperature(Pagedfrm_Temp);
2157 
2158 /*************************** COMMANDS *********************************************/
2159 
2161  item_advc = MMenuAddItemObsolete(popup_advcalib, "Adv. Calib", PopUpAdvCal_CB, (void *) 0);
2164 
2165 
2166 
2167  rowfrm = MCreateRowForm(colfrm);
2168  MObjectSetBackgroundRGB(rowfrm, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
2169  MObjectSetShadow(rowfrm, WS_SHADOW_IN, 2, 0);
2171  MObjectSetResize(rowfrm, True, False);
2172 // MObjectAddEventNotifyCallback(rowfrm, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
2173  MObjectSetBGColorFromParent(rowfrm, True, 100);
2174 
2175  for (i=14; i < 28; i++)
2176  {
2177  DAS.Gui.PushButt.KeyB[i] = MCreatePButton(rowfrm, KeyCom_Code[i], HELV_SMALL);
2180  //MObjectSetPopupHelp(DAS.Gui.PushButt.KeyB[i] ,KeyCom_CodePopUpHelp[i] , 200, 5000);
2181  if (i==0)
2189  if (i==14)
2191 
2192  }
2193 
2194 
2195  DB_KB_ButtonActive(1);
2196 
2197 
2198 /**************************************************************************************/
2199  rowfrm = MCreateRowForm(CP_Sh);
2200  MObjectSetBackgroundRGB(rowfrm, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
2201  MObjectSetShadow(rowfrm, WS_SHADOW_OUT, 2, 2);
2202 // MObjectAddEventNotifyCallback(rowfrm, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
2203  MObjectSetBGColorFromParent(rowfrm, True, 100);
2204 
2205  tb = MCreateTableForm(rowfrm, 3);
2208  //MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
2210  //MObjectAddEventNotifyCallback(tb, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
2212 
2213  pb = MCreatePButton(tb, "Help ", HELV_MEDIUM);
2214  MPButtonSetCallback(pb, DB_HelpCB, (void *) 0);
2216  MObjectSetShadow(pb, WS_SHADOW_OUT, 3, 0);
2217 
2218  DAS.Gui.ContrPanel.lbl_Time = MCreateLabel(tb, "Station: XXX, Date: YYYY/MM/DD, Time: HH:MM:SS, SolarZenithAngle: xxx.xx", HELV_MEDIUM);
2224 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.lbl_Time, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2225 
2226  pb = MCreatePButton(tb, " Inf. ", HELV_MEDIUM);
2227  MPButtonSetCallback(pb, DB_InfCB, (void *) 0);
2229  MObjectSetShadow(pb, WS_SHADOW_OUT, 3, 0);
2230 
2231 
2232  colfrm = MCreateColForm(CP_Sh);
2233  MObjectSetBackgroundRGB(colfrm, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
2234  MObjectSetShadow(colfrm, WS_SHADOW_IN, 2, 2);
2235  MObjectSetBGColorFromParent(colfrm, True, 100);
2236 // MObjectAddEventNotifyCallback(colfrm, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
2237 
2238 /* DAS.Gui.ContrPanel.Plbl_Elev = MCreateLabel(colfrm, "Sun Elev:", HELV_MEDIUM);
2239  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_Elev, LEFT_ALIGN);
2240  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_Elev, DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
2241  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_Elev, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
2242  MObjectSetResize(DAS.Gui.ContrPanel.Plbl_Elev, False, True);
2243  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_Elev, 0);
2244 */
2245  lbl = MCreateLabel(colfrm, "Sun Elev:", HELV_MEDIUM);
2248  MObjectSetTransparency(lbl, 0);
2250  MObjectSetResize(lbl, False, True);
2251 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
2252 
2253  DAS.Gui.ContrPanel.Albl_Elev = MCreateLabel(colfrm, "XX.X", HELV_MEDIUM);
2259 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_Elev, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2260 
2261 /* DAS.Gui.ContrPanel.Plbl_Azim = MCreateLabel(colfrm, "Sun Az.:", HELV_MEDIUM);
2262  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_Azim, LEFT_ALIGN);
2263  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_Azim, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
2264  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.Plbl_Azim, DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
2265  MObjectSetResize(DAS.Gui.ContrPanel.Plbl_Azim, False, True);
2266  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_Azim, 0);
2267 */
2268  lbl = MCreateLabel(colfrm, "Sun Az.:", HELV_MEDIUM);
2271  MObjectSetTransparency(lbl, 0);
2273  MObjectSetResize(lbl, False, True);
2274 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
2275 
2276  DAS.Gui.ContrPanel.Albl_Azim = MCreateLabel(colfrm, "XXX.XX", HELV_MEDIUM);
2282 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_Azim, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2283 
2284  lbl = MCreateLabel(colfrm, "SunR:", HELV_MEDIUM);
2287  MObjectSetTransparency(lbl, 0);
2289  MObjectSetResize(lbl, False, True);
2290 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
2291 
2292  DAS.Gui.ContrPanel.Albl_sunr = MCreateLabel(colfrm, "XXXX.XX", HELV_MEDIUM);
2298 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_sunr, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2299 
2300  lbl = MCreateLabel(colfrm, "SunS:", HELV_MEDIUM);
2303  MObjectSetTransparency(lbl, 0);
2305  MObjectSetResize(lbl, False, True);
2306 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
2307 
2308  DAS.Gui.ContrPanel.Albl_suns = MCreateLabel(colfrm, "XXXX.XX", HELV_MEDIUM);
2314 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_suns, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2315 
2316 /*
2317  DAS.Gui.ContrPanel.Plbl_Status = MCreateLabel(colfrm, "Status:", HELV_MEDIUM);
2318  MLabelSetAlignment(DAS.Gui.ContrPanel.Plbl_Status, LEFT_ALIGN);
2319  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.Plbl_Status, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
2320  MObjectSetResize(DAS.Gui.ContrPanel.Plbl_Status, False, True);
2321  MObjectSetTransparency(DAS.Gui.ContrPanel.Plbl_Status, 0);
2322 */
2323  lbl = MCreateLabel(colfrm, "Status:", HELV_MEDIUM);
2326  MObjectSetTransparency(lbl, 0);
2328  MObjectSetResize(lbl, False, True);
2329 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
2330 
2336 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.Albl_Status, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
2337 
2338 /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
2339 
2340  return CP_Sh;
2341 }
short DB_BG_lblUP[3]
Background Capital Letters Labels Color UP.
stepm StepM
Stepper motors parameters structure.
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
void DB_KB_ButtonActive(int mod)
Enable/Disable Push buttons on the Control Panel.
Definition: CreateForms.c:3810
#define WS_NONE
Definition: Mguidefs.h:956
#define SF_NO_RESIZE
Definition: Mguidefs.h:1038
MOBJECT LedSM[AMSMAX][2]
Leds for stepper motors status.
MOBJECT CP_Sh
Definition: CreateForms.c:85
MOBJECT Albl_LS[8]
Active Control Panel Labels for LIS status.
MOBJECT MCreatePixmapFromFile(MOBJECT parent, const char *fname)
MOBJECT lbl
Definition: DFileMan.c:42
#define WS_SHADOW_IN
Definition: Mguidefs.h:958
void MSetInputPromptRGB(int r, int g, int b)
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
optionini DOption
Options for DAS execution.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void PopUpAdvCal_CB(MOBJECT obj, void *item, void *data)
Definition: CreateForms.c:1110
MOBJECT KeyB[28]
Keyboard Buttons.
int NAMS
Number of AMSs Devices.
MOBJECT Albl_sunr
Active Control Panel Labels for Sunrise.
#define SF_NO_MAXIMIZE
Definition: Mguidefs.h:1034
MOBJECT LedQJ
Control Panel Led for QJ Lamp.
void MBottomAttach(MOBJECT child, int att_type, int off, MOBJECT obj)
void DB_KeyComSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
callback for selsct a specified push button with the keyboard
Definition: CreateForms.c:5072
#define EM_WINDOW_ENTER
Definition: Mguidefs.h:320
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MSetMessageDialogFonts(MTFont text_font, MTFont buttons_font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
int filtertype
type of installed filter module: 0=Simple-SM3, 1=Double-SM3+SM4, 2=simpleplus-SM3+TM) ...
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
#define False
Definition: Mguidefs.h:236
MOBJECT pblamps[2]
Control Panel Push buttons for HG and QJ Lamps.
void MSetInputPromptFonts(MTFont text, MTFont edit, MTFont btn)
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
void MSetInputPromptFgRGB(int r, int g, int b)
MENU_ITEM item_advc
Definition: CreateForms.c:1139
MOBJECT lbl_Par[11]
Parametric Labels of the Control Panel.
short DB_Sel[3]
Selected Buttons Colors.
void MSetMessageDialogFgRGB(int r, int g, int b)
#define SF_NO_CLOSE
Definition: Mguidefs.h:1032
void MSetMessageDialogRGB(int r, int g, int b)
MOBJECT Albl_CS[4]
Active Control Panel Labels for Camera Status 4.
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void DB_KeyComSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for selsct a specified push button with the keyboard
Definition: CreateForms.c:5152
MOBJECT Albl_suns
Active Control Panel Labels for Sunset.
MENU_ITEM MMenuAddItemObsolete(MOBJECT pd, const char *item, MGUI_CB cb, void *ad)
#define EM_MOTION
Definition: Mguidefs.h:319
MOBJECT Albl_Azim
Active Control Panel Labels for Sun Azimuth.
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define EM_KEY_PRESS
Definition: Mguidefs.h:316
MOBJECT lbl_Time
Control Panel Labels for Time.
void StepperPagForm(int p, int q)
Definition: CreateForms.c:259
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define FDOUBLE
double filter wheel
#define FPLUS
Filter Wheel Torque Motor.
MOBJECT popup_advcalib
Definition: CreateForms.c:1138
#define CENTER_ALIGN
Definition: Mguidefs.h:917
MOBJECT ledpelt[2]
Control Panel Leds for Peltier Activity.
#define EM_BUTTON_PRESS
Definition: Mguidefs.h:317
void DB_KeyB_CB(MOBJECT p, void *od, void *ad)
Push buttons callback .
Definition: CreateForms.c:4693
MOBJECT Albl_Script
Active Control Panel Labels for Script in execution.
#define HELV_SMALL
Definition: Mguidefs.h:881
#define FIXED_SMALL
Definition: Mguidefs.h:878
void DB_Redraw_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
Definition: CreateForms.c:102
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
void(* OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad)
Definition: Mguidefs.h:1456
MOBJECT MCreateColForm(MOBJECT parent)
palette DPAL
Definition: CreateForms.c:88
void MObjectAddEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, CARD32 event_mask, void *a_data)
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
pushbutt PushButt
Push buttons.
void DB_LampSelButtMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
callback for selsct a specified push button with the keyboard
Definition: CreateForms.c:5041
#define FSIMPLE
simple filter wheel
MOBJECT MCreateShell(const char *title, int flags)
short DB_BG[3]
Default Background Color.
int DB_HelpCB(MOBJECT o, void *od, void *ad)
Help Callback Create the help in the predefined WEB Browser.
Definition: DAS_Spat.c:881
MOBJECT Albl_Status
Active Control Panel Labels for Status.
void MLabelSetAlignment(MOBJECT p, int align)
controlpanel ContrPanel
Control Panel Structure.
void MPagedFormSetActivePage(MOBJECT form, int page)
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
MOBJECT Albl_IE[1]
Active Control Panel Labels for In Execution status.
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void FrmBuildTemperature(MOBJECT pf)
Definition: CreateForms.c:151
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
int DB_InfCB(MOBJECT o, void *od, void *ad)
Inf Callback Create the Inf shell.
Definition: DAS_Spat.c:915
MOBJECT Albl_Elev
Active Control Panel Labels for Sun Elevation.
#define HELV_MEDIUM
Definition: Mguidefs.h:882
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT LedHG
Control Panel Led for HG Lamp.
MOBJECT MCreateRowForm(MOBJECT parent)
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
void PupAdvCal_CB(MOBJECT obj, MEvent *pe, void *pdown)
Definition: CreateForms.c:1126
MOBJECT Pagedfrm_SM
Pged form for Stepper Motors.
MOBJECT MCreatePopupMenu(MTFont font)
#define TOP_ALIGN
Definition: Mguidefs.h:918
MOBJECT MCreateTabbedRowForm(MOBJECT parent, int npage, MTFont f)
MOBJECT lblK[10]
Capital Labels Up.
#define F_ATT_NONE
Definition: Mguidefs.h:1106
void MObjectSetBGColorFromParent(MOBJECT obj, int true_false, int percentage)
short DB_FG_lblUP[3]
Foreground Capital Letters Labels Color UP.
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
+ Here is the caller graph for this function:

§ MDCreateHorMeas()

MOBJECT MDCreateHorMeas ( void  )

Definition at line 681 of file CreateForms.c.

References controlpanel::Albl_LS, gui::ContrPanel, palette::DB_BG, palette::DB_BG_Albl, palette::DB_FG_Albl, DB_HorComm_CB(), DB_KB_ButtonActive(), DB_KeyB_CB(), palette::DB_UnSel, palette::DB_UnSelFG, flag::extlamp, flag::extshutter, F_ATT_NONE, False, das::Gui, HELV_SMALL, gui::HorizMeas, horizmeas::lbl, horizmeas::led, flag::manhormeas, MBottomAttach(), MButtonSetOnMouseOverForegroundRGB(), MCreateColForm(), MCreateLabel(), MCreatePButton(), MCreatePixmapFromFile(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MLabelSetAlignment(), MObjectAlign(), MObjectGetText(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetTransparency(), MObjectSetUnsensitive(), MPButtonSetCallback(), MShellRealize(), horizmeas::pbutt, RIGHT_ALIGN, SF_NO_CLOSE, SF_NO_MAXIMIZE, SF_NO_RESIZE, horizmeas::shell, TOP_ALIGN, True, UNDEF_ALIGN, WS_NONE, and WS_SHADOW_IN.

Referenced by DB_KeyB_CB().

682 {
683 
684  char buff[128];
685 
686  MOBJECT rowfrm,rowfrm1,rowfrm2, tb;
687 
688  MOBJECT _colform000;
689 // MOBJECT _colform001;
690 // MOBJECT _colform005;
691 // MOBJECT _rowform001;
692 // MOBJECT _rowform002;
693 // MOBJECT _tablefrm002;
694 // MOBJECT _tablefrm004;
695 // MOBJECT _tablefrm005;
696 // MOBJECT _tablefrm006;
697 
698  int i;
699 const char *KeyCom_Code[] = {{"Mirror "}, //0
700  {"Grating "}, //1
701  {"Filter "}, //2
702  {"Ext Lamp"}, //3
703  {"Ext Shut"}, //4
704  {"Calib "}, //5
705  {"ARange "}, //6
706  {"GetCCD "}, //7
707  {"Average "}, //8
708  {"Dark "}, //9
709  {"Save "}, //10
710  {"PLOT "}, //11
711  {"ZOOM "},//12
712  {"Close "}};//13
713 
714 
716  FLAG.manhormeas = 1;
717 
718 
722 
723  _colform000 = MCreateColForm(DAS.Gui.HorizMeas.shell);
724  MObjectSetBackgroundRGB(_colform000, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
725  MObjectSetShadow(_colform000, WS_NONE, 0, 0);
726 
727  rowfrm = MCreateRowForm(_colform000);
728  MObjectSetBackgroundRGB(rowfrm, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
729  MObjectSetShadow(rowfrm, WS_NONE, 0, 0);
731 
732  tb = MCreateTableForm(rowfrm, 2);
733  MBottomAttach(tb, F_ATT_NONE, 3, NULL);
737  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
738 // MObjectAlign(tb, UNDEF_ALIGN, TOP_ALIGN);
739 
740  for (i=0; i < 3; i++)
741  {
742  DAS.Gui.HorizMeas.pbutt[i] = MCreatePButton(tb, KeyCom_Code[i], HELV_SMALL);
748 
749  // if (i==0)
751  /* if (i==1)
752  MObjectGetText(CPL.Albl_LS[1], buff);
753  if (i==2)
754  MObjectGetText(CPL.Albl_LS[2], buff);
755  */
756  DAS.Gui.HorizMeas.lbl[i] = MCreateLabel(tb, buff, HELV_SMALL);
761  }
762 
763 
764  rowfrm1 = MCreateRowForm(_colform000);
765  MObjectSetBackgroundRGB(rowfrm1, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
766  MObjectSetShadow(rowfrm1, WS_NONE, 0, 0);
768 
769  tb = MCreateTableForm(rowfrm1, 3);
770  MBottomAttach(tb, F_ATT_NONE, 3, NULL);
774  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
775 // MObjectAlign(tb, UNDEF_ALIGN, TOP_ALIGN);
776 
777  for (i=3; i < 5; i++)
778  {
779  DAS.Gui.HorizMeas.pbutt[i] = MCreatePButton(tb, KeyCom_Code[i], HELV_SMALL);
782  //if (i==0)
783  // MObjectSetBackgroundRGB(DAS.Gui.HorizMeas.pbutt[i], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
786  //MObjectAddEventNotifyCallback(DAS.Gui.HorizMeas.pbutt[i], (OBJ_EVENT_CB) DB_KeyComSelButtKB_CB, EM_KEY_PRESS, (void *) i);
787  //MObjectAddEventNotifyCallback(DAS.Gui.HorizMeas.pbutt[i], (OBJ_EVENT_CB) DB_KeyComSelButtMouse_CB, EM_BUTTON_PRESS, (void *) i);
789 
790  if (i == 4)
791  {
792  if(FLAG.extshutter == 0)
793  {
794  sprintf (buff,"Open ");
795  DAS.Gui.HorizMeas.led[i - 3] = MCreatePixmapFromFile(tb, "SYS\\ledonQJ.bmp");
796  MObjectSetShadow(DAS.Gui.HorizMeas.led[i - 3], WS_NONE, 0, 0);
797  }
798  else
799  {
800 
801  sprintf (buff,"Close ");
802  DAS.Gui.HorizMeas.led[i - 3] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
803  MObjectSetShadow(DAS.Gui.HorizMeas.led[i - 3], WS_NONE, 0, 0);
804  }
805  DAS.Gui.HorizMeas.lbl[i] = MCreateLabel(tb, buff, HELV_SMALL);
810  }
811  if (i == 3)
812  {
813  if(FLAG.extlamp == 0)
814  {
815  sprintf (buff,"On ");
816  DAS.Gui.HorizMeas.led[i - 3] = MCreatePixmapFromFile(tb, "SYS\\ledonQJ.bmp");
817  MObjectSetShadow(DAS.Gui.HorizMeas.led[i - 3], WS_NONE, 0, 0);
818  }
819  else
820  {
821  sprintf (buff,"OFF ");
822  DAS.Gui.HorizMeas.led[i - 3] = MCreatePixmapFromFile(tb, "SYS\\ledoff.bmp");
823  MObjectSetShadow(DAS.Gui.HorizMeas.led[i - 3], WS_NONE, 0, 0);
824  }
825 
827  DAS.Gui.HorizMeas.lbl[i] = MCreateLabel(tb, buff, HELV_SMALL);
832 
833  }
834 /* DAS.Gui.HorizMeas.lbl[i] = MCreateLabel(tb, buff, HELV_SMALL);
835  MLabelSetAlignment(DAS.Gui.HorizMeas.lbl[i], RIGHT_ALIGN);
836  MObjectSetForegroundRGB(DAS.Gui.HorizMeas.lbl[i], DPAL.DB_FG_Albl[0], DPAL.DB_FG_Albl[1], DPAL.DB_FG_Albl[2]);
837  MObjectSetBackgroundRGB(DAS.Gui.HorizMeas.lbl[i], DPAL.DB_BG_Albl[0], DPAL.DB_BG_Albl[1], DPAL.DB_BG_Albl[2]);
838  MObjectSetTransparency(DAS.Gui.HorizMeas.lbl[i], 0);
839 
840 */
841 // DAS.Gui.HorizMeas.led[i - 3] = MCreatePixmapFromFile(tb, "SYS\\ledonQJ.bmp");
842 // MObjectSetShadow(DAS.Gui.HorizMeas.led[i - 3], WS_NONE, 0, 0);
843 
844  }
845 
846  rowfrm2 = MCreateRowForm(_colform000);
847  MObjectSetBackgroundRGB(rowfrm2, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
848  MObjectSetShadow(rowfrm2, WS_NONE, 0, 0);
850 
851  tb = MCreateTableForm(rowfrm2, 3);
852  MBottomAttach(tb, F_ATT_NONE, 3, NULL);
856  MObjectSetShadow(tb, WS_SHADOW_IN, 2, 0);
857 // MObjectAlign(tb, UNDEF_ALIGN, TOP_ALIGN);
858 
859  for (i=5; i < 14; i++)
860  {
861  DAS.Gui.HorizMeas.pbutt[i] = MCreatePButton(tb, KeyCom_Code[i], HELV_SMALL);
864  //if (i==0)
865  // MObjectSetBackgroundRGB(DAS.Gui.HorizMeas.pbutt[i], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
868  //MObjectAddEventNotifyCallback(DAS.Gui.HorizMeas.pbutt[i], (OBJ_EVENT_CB) DB_KeyComSelButtKB_CB, EM_KEY_PRESS, (void *) i);
869  //MObjectAddEventNotifyCallback(DAS.Gui.HorizMeas.pbutt[i], (OBJ_EVENT_CB) DB_KeyComSelButtMouse_CB, EM_BUTTON_PRESS, (void *) i);
871  }
872 
874 
875  return 0;
876 
877 }
flag FLAG
Definition: CreateForms.c:84
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
void DB_KB_ButtonActive(int mod)
Enable/Disable Push buttons on the Control Panel.
Definition: CreateForms.c:3810
#define WS_NONE
Definition: Mguidefs.h:956
#define SF_NO_RESIZE
Definition: Mguidefs.h:1038
MOBJECT Albl_LS[8]
Active Control Panel Labels for LIS status.
MOBJECT MCreatePixmapFromFile(MOBJECT parent, const char *fname)
#define WS_SHADOW_IN
Definition: Mguidefs.h:958
int extlamp
0 = external lamp OFF; 1 = external lamp ON
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MShellRealize(MOBJECT obj)
#define SF_NO_MAXIMIZE
Definition: Mguidefs.h:1034
void MObjectSetUnsensitive(MOBJECT obj)
void MBottomAttach(MOBJECT child, int att_type, int off, MOBJECT obj)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
#define SF_NO_CLOSE
Definition: Mguidefs.h:1032
char * MObjectGetText(MOBJECT obj, char *text)
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
horizmeas HorizMeas
Structure for Horizontal Measurements.
MOBJECT shell
Horizontal measurements shell.
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
void DB_KeyB_CB(MOBJECT p, void *od, void *ad)
Push buttons callback .
Definition: CreateForms.c:4693
#define HELV_SMALL
Definition: Mguidefs.h:881
MOBJECT pbutt[15]
Horizontal Measurements Buttons.
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
MOBJECT MCreateColForm(MOBJECT parent)
palette DPAL
Definition: CreateForms.c:88
MOBJECT led[2]
led[0] = Lamp, led[1] = Shutter
MOBJECT MCreateShell(const char *title, int flags)
short DB_BG[3]
Default Background Color.
void MLabelSetAlignment(MOBJECT p, int align)
controlpanel ContrPanel
Control Panel Structure.
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
int manhormeas
1 = horizontal measurements in manual mode
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
void DB_HorComm_CB(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:506
#define True
Definition: Mguidefs.h:235
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
MOBJECT lbl[15]
generic labels for hor meas shell
int extshutter
0 = external shutter open; 1 = external shutter closed
#define TOP_ALIGN
Definition: Mguidefs.h:918
#define F_ATT_NONE
Definition: Mguidefs.h:1106
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MDCreateMoveAzim()

void MDCreateMoveAzim ( void  )

Definition at line 3340 of file CreateForms.c.

References ActMvAzimCB(), DB_dirCB(), FIXED_MEDIUM, FIXED_SMALL, GratFlg, GrDIR, das::Gui, lbl, MCreateEdit(), MCreateLabel(), MCreateRButton(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MEditSetActCallback(), MLoopWhileFlag(), MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MPButtonSetCallback(), MRButtonActivate(), MShellDestroy(), MShellRealizeXY(), MShellUnrealize(), shells::Sh_mg, gui::Shells, TIMES_SMALL, True, WS_ETCHED_OUT, and WS_SHADOW_IN.

3341 {
3342 
3343 
3344  MOBJECT lbl;
3345  MOBJECT rbut;
3346  MOBJECT rbutt;
3347  MOBJECT lbl1;
3348  MOBJECT edt;
3349 // MOBJECT pbut;
3350  MOBJECT _rowform000;
3351  MOBJECT _tablefrm000;
3352  char buff[255];
3353  DAS.Gui.Shells.Sh_mg = MCreateShell("MOVE Azimuth Axes", 0);
3354  MObjectSetBackgroundRGB(DAS.Gui.Shells.Sh_mg, 96, 133, 149);
3355 
3356  _rowform000 = MCreateRowForm(DAS.Gui.Shells.Sh_mg);
3357  MObjectSetBackgroundRGB(_rowform000, 96, 133, 149);
3358  MObjectSetResize(_rowform000, True, True);
3359 
3360  sprintf(buff,"This tool allows for the positioning of the Azimuth\n \
3361 Axis of a free number of steps\n ");
3362 
3363  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3364  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3365  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3366  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3367 
3368  sprintf(buff," NOTE:\n");
3369 
3370  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3371  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3372  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3373  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3374 
3375 
3376  lbl = MCreateLabel(_rowform000, "Select dir.", TIMES_SMALL);
3377  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3378  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3379  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3380 
3381  _tablefrm000 = MCreateTableForm(DAS.Gui.Shells.Sh_mg, 2);
3382  MObjectSetBackgroundRGB(_tablefrm000, 96, 133, 149);
3383  MObjectSetResize(_tablefrm000, True, True);
3384 
3385  rbut = MCreateRButton(_tablefrm000, "CCW", FIXED_SMALL);
3386  MObjectSetForegroundRGB(rbut, 255, 255, 255);
3387  MPButtonSetCallback(rbut, DB_dirCB, (void *) 0);
3388  MRButtonActivate(rbut);
3389  GrDIR = 0;
3390 
3391  rbutt = MCreateRButton(_tablefrm000, "CW", FIXED_SMALL);
3392  MObjectSetForegroundRGB(rbutt, 255, 255, 255);
3393  MPButtonSetCallback(rbut, DB_dirCB, (void *) 1);
3394 
3395  lbl1 = MCreateLabel(_tablefrm000, "Step:", FIXED_SMALL);
3396  MObjectSetForegroundRGB(lbl1, 255, 255, 255);
3397 
3398  edt = MCreateEdit(_tablefrm000, "0", 12, FIXED_MEDIUM);
3399  //MEditSetFilter(edt, 4, "");
3400  MObjectSetForegroundRGB(edt, 255, 255, 255);
3401  MObjectSetBackgroundRGB(edt, 0, 0, 0);
3402  MObjectSetShadow(edt, WS_ETCHED_OUT, 2, 1);
3403  MEditSetActCallback(edt, ActMvAzimCB, edt);
3404 
3405 
3406 
3408 
3409  GratFlg = 0;
3410  MLoopWhileFlag(&GratFlg, 0);
3411 
3414 
3415 
3416 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
MOBJECT lbl
Definition: DFileMan.c:42
#define WS_SHADOW_IN
Definition: Mguidefs.h:958
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
#define WS_ETCHED_OUT
Definition: Mguidefs.h:960
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
MOBJECT Sh_mg
Password Shell.
void MShellUnrealize(MOBJECT obj)
#define TIMES_SMALL
Definition: Mguidefs.h:883
void ActMvAzimCB(MOBJECT edit, char *text, void *ed)
Definition: CreateForms.c:3067
void MShellDestroy(MOBJECT obj)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define FIXED_MEDIUM
Definition: Mguidefs.h:879
void DB_dirCB(MOBJECT o, void *id, void *a_data)
Definition: CreateForms.c:2673
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void MRButtonActivate(MOBJECT o)
void MShellRealizeXY(MOBJECT obj, int x, int y)
MOBJECT MCreateShell(const char *title, int flags)
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
int GrDIR
Definition: CreateForms.c:64
static int GratFlg
Definition: CreateForms.c:60
void MLoopWhileFlag(int *pflag, int value)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
+ Here is the call graph for this function:

§ MDCreateMoveAzimDeg()

void MDCreateMoveAzimDeg ( void  )

Definition at line 3673 of file CreateForms.c.

References ActMvAzimDegCB(), FIXED_MEDIUM, FIXED_SMALL, GratFlg, das::Gui, lbl, MCreateEdit(), MCreateLabel(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MEditSetActCallback(), MLoopWhileFlag(), MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MShellDestroy(), MShellRealizeXY(), MShellUnrealize(), AzimuthSt::realazpos, shells::Sh_mg, gui::Shells, TIMES_SMALL, True, WS_ETCHED_OUT, and WS_SHADOW_IN.

3674 {
3675 
3676 
3677  MOBJECT lbl;
3678 // MOBJECT rbut;
3679 // MOBJECT rbutt;
3680  MOBJECT lbl1;
3681  MOBJECT edt;
3682 // MOBJECT pbut;
3683  MOBJECT _rowform000;
3684  MOBJECT _tablefrm000;
3685  char buff[255];
3686  DAS.Gui.Shells.Sh_mg = MCreateShell("MOVE Azimuth Axes", 0);
3687  MObjectSetBackgroundRGB(DAS.Gui.Shells.Sh_mg, 96, 133, 149);
3688 
3689  _rowform000 = MCreateRowForm(DAS.Gui.Shells.Sh_mg);
3690  MObjectSetBackgroundRGB(_rowform000, 96, 133, 149);
3691  MObjectSetResize(_rowform000, True, True);
3692 
3693  sprintf(buff,"This tool allows for the positioning of the Azimuth\n \
3694 Axis at the typed angle. \n ");
3695 
3696  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3697  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3698  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3699  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3700 // if(DAS.MIGE.type)
3701 // {
3702 // sprintf(buff," NOTE: Allowed values: -130 < angle < 80\n since the Home position has been set to 0°N");
3703 // }
3704 // else
3705 // {
3706 // sprintf(buff," NOTE: Allowed values: 20 < angle < 305\n since the Home position has been set to 55°N");
3707 // }
3708 //sprintf(buff," NOTE: Allowed values: -150 < angle < 30");
3709  sprintf(buff," Allowed Azimuth angles: [0, 360]");
3710  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3711  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3712  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3713  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3714 
3715 
3716  sprintf(buff," NOTE: If Azimuth is [0, 120] or [300, 360] --> Zenith [-90, 0]");
3717  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3718  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3719  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3720  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3721 
3722  sprintf(buff," NOTE 1: If Azimuth is [120, 300] --> Zenith [0, 90]");
3723  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3724  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3725  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3726  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3727 
3728 
3729 
3730 
3731 
3732 
3733 
3734  _tablefrm000 = MCreateTableForm(DAS.Gui.Shells.Sh_mg, 2);
3735  MObjectSetBackgroundRGB(_tablefrm000, 96, 133, 149);
3736  MObjectSetResize(_tablefrm000, True, True);
3737 
3738 
3739  lbl1 = MCreateLabel(_tablefrm000, "angle:", FIXED_SMALL);
3740  MObjectSetForegroundRGB(lbl1, 255, 255, 255);
3741 
3742 
3743  //sprintf(buff, "%.1lf", AST.Pos);
3744  sprintf(buff, "%.1lf", AST.realazpos);
3745  edt = MCreateEdit(_tablefrm000, buff, 12, FIXED_MEDIUM);
3746  //MEditSetFilter(edt, 4, "");
3747  MObjectSetForegroundRGB(edt, 255, 255, 255);
3748  MObjectSetBackgroundRGB(edt, 0, 0, 0);
3749  MObjectSetShadow(edt, WS_ETCHED_OUT, 2, 1);
3751 
3752 
3753 
3755 
3756  GratFlg = 0;
3757  MLoopWhileFlag(&GratFlg, 0);
3758 
3761 
3762 
3763 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
MOBJECT lbl
Definition: DFileMan.c:42
#define WS_SHADOW_IN
Definition: Mguidefs.h:958
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
double realazpos
#define WS_ETCHED_OUT
Definition: Mguidefs.h:960
AzimuthSt AST
Definition: CreateForms.c:100
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
MOBJECT Sh_mg
Password Shell.
void ActMvAzimDegCB(MOBJECT edit, char *text, void *ed)
Definition: CreateForms.c:3530
void MShellUnrealize(MOBJECT obj)
#define TIMES_SMALL
Definition: Mguidefs.h:883
void MShellDestroy(MOBJECT obj)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define FIXED_MEDIUM
Definition: Mguidefs.h:879
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void MShellRealizeXY(MOBJECT obj, int x, int y)
MOBJECT MCreateShell(const char *title, int flags)
das DAS
Definition: CreateForms.c:98
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
static int GratFlg
Definition: CreateForms.c:60
void MLoopWhileFlag(int *pflag, int value)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
+ Here is the call graph for this function:

§ MDCreateMoveGrat()

int MDCreateMoveGrat ( void  )

Free Grating positioning. Procedure that build the shell for Free Grating positioning.

Returns
void

Definition at line 2859 of file CreateForms.c.

References ActMvGratCB(), gui::ContrPanel, palette::DB_BG, palette::DB_BG_lblUP, palette::DB_BG_Plbl, DB_dirCB(), palette::DB_FG_lblUP, palette::DB_FG_Plbl, DB_GratPosMode_CB(), DB_RecGio_CB(), DB_StepGratEnc_CB(), False, FIXED_MEDIUM, FIXED_SMALL, das::Flag, GratFlg, flag::gratposmode, GrDIR, das::Gui, HELV_MEDIUM, HELV_SMALL, lbl, controlpanel::lbl_mvgratmode, LEFT_ALIGN, MCreateColForm(), MCreateEdit(), MCreateLabel(), MCreateRButton(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MEditSetActCallback(), MLoopWhileFlag(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetTransparency(), MPButtonSetCallback(), MRButtonActivate(), MShellDestroy(), MShellRealizeXY(), MShellUnrealize(), controlpanel::rbStepGratEnc, shells::Sh_mg, gui::Shells, TIMES_SMALL, TOP_ALIGN, True, WS_ETCHED_OUT, and WS_SHADOW_IN.

Referenced by DB_KeyB_CB().

2860 {
2861 
2862 
2863  MOBJECT lbl;
2864  MOBJECT rb;
2865 
2866 // MOBJECT lbl1;
2867  MOBJECT edt;
2868 // MOBJECT pbut;
2869  MOBJECT rowfrm, rowfrm1, colfrm;
2870  MOBJECT tb;
2871  char buff[255];
2872  DAS.Gui.Shells.Sh_mg = MCreateShell("MOVE GRATING", 0);
2874 // MObjectAddEventNotifyCallback(DAS.Gui.Shells.Sh_mg, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 0);
2876 
2877  rowfrm = MCreateRowForm(DAS.Gui.Shells.Sh_mg);
2878  MObjectSetBackgroundRGB(rowfrm, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
2879 
2880 // MObjectSetBackgroundRGB(rowfrm, 96, 133, 149);
2881  MObjectSetResize(rowfrm, False, False);
2882 
2883 /*
2884  MObjectSetForegroundRGB(lbl, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
2885  MObjectSetBackgroundRGB(lbl, DPAL.DB_BG_Plbl[0], DPAL.DB_BG_Plbl[1], DPAL.DB_BG_Plbl[2]);
2886  MObjectSetTransparency(lbl, 0);
2887  MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, d_events , (void *) 1);
2888 
2889 
2890  DAS.Gui.ContrPanel.lbl_Par[0] = MCreateLabel(tb, "+10.0C", HELV_SMALL);
2891  MLabelSetAlignment(DAS.Gui.ContrPanel.lbl_Par[0], RIGHT_ALIGN);
2892  MObjectSetForegroundRGB(DAS.Gui.ContrPanel.lbl_Par[0], DPAL.DB_FG_Albl[0], DPAL.DB_FG_Albl[1], DPAL.DB_FG_Albl[2]);
2893  MObjectSetBackgroundRGB(DAS.Gui.ContrPanel.lbl_Par[0], DPAL.DB_BG_Albl[0], DPAL.DB_BG_Albl[1], DPAL.DB_BG_Albl[2]);
2894 
2895 
2896 */
2897  sprintf(buff,"FREE GRATING POSITIONING");
2898  lbl = MCreateLabel(rowfrm, buff, HELV_MEDIUM);
2901  MObjectSetTransparency(lbl, 0);
2902 
2903  // MObjectSetForegroundRGB(lbl, 255, 255, 255);
2904 // MObjectSetBackgroundRGB(lbl, 53, 112, 112);
2905  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
2906 
2907  sprintf(buff," NOTE:\nThe Grating is moving, so if you want to shift\n \
2908 a spectral line towards the visible,\nyou have to move the grating in the UV direction.");
2909 
2910  lbl = MCreateLabel(rowfrm, buff, HELV_MEDIUM);
2913  MObjectSetResize(lbl, False, False);
2914 
2915 // MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
2916  MObjectSetTransparency(lbl, 0);
2917 
2918 
2919  rowfrm1 = MCreateRowForm(rowfrm);
2920  MObjectSetBackgroundRGB(rowfrm1, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
2921  MObjectSetResize(rowfrm1, True, True);
2922  MObjectSetTransparency(rowfrm1, 0);
2923 
2924 /********************/
2925  tb = MCreateTableForm(rowfrm1, 2);
2926  MObjectSetBackgroundRGB(tb, 95, 3, 3);
2928 
2929  if(DAS.Flag.gratposmode == 0)
2930  sprintf(buff, "_ Steps:");
2931  if(DAS.Flag.gratposmode == 1)
2932  sprintf(buff, "Amstrongs:");
2937 
2938  edt = MCreateEdit(tb, "0", 12, FIXED_MEDIUM);
2939  //MEditSetFilter(edt, 4, "");
2940  MObjectSetForegroundRGB(edt, 255, 255, 255);
2941  MObjectSetBackgroundRGB(edt, 0, 0, 90);
2942  MObjectSetShadow(edt, WS_ETCHED_OUT, 2, 1);
2943  MEditSetActCallback(edt, ActMvGratCB, edt);
2944 
2945 /**************************************/
2946 
2947 
2948  lbl = MCreateLabel(rowfrm1, "The typed steps have to be directly sent to the Grating stepper? ", HELV_SMALL);
2949  MObjectSetTransparency(lbl, 0);
2952  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
2953 
2954  tb = MCreateTableForm(rowfrm1, 2);
2955  // MObjectSetBackgroundRGB(tb, 96, 133, 149);
2956  MObjectSetBackgroundRGB(tb, 129, 77, 77);
2957  MObjectSetResize(tb, True, False);
2958 
2959  DAS.Gui.ContrPanel.rbStepGratEnc[0] = MCreateRButton(tb, "Yes - Send direct", FIXED_SMALL);
2963 
2964  DAS.Gui.ContrPanel.rbStepGratEnc[1] = MCreateRButton(tb, "No - Use the DAS encoding", FIXED_SMALL);
2967 
2968 
2969 
2970  lbl = MCreateLabel(rowfrm1, "Do you want to perform the backlash recovery? ", HELV_SMALL);
2971  MObjectSetTransparency(lbl, 0);
2974  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
2975 
2976  tb = MCreateTableForm(rowfrm1, 2);
2977  // MObjectSetBackgroundRGB(tb, 96, 133, 149);
2978  MObjectSetBackgroundRGB(tb, 129, 77, 77);
2979  MObjectSetResize(tb, True, False);
2980 
2981  rb = MCreateRButton(tb, "Yes ", FIXED_SMALL);
2982  MObjectSetForegroundRGB(rb, 255, 255, 255);
2983  MPButtonSetCallback(rb, DB_RecGio_CB, (void *) 0);
2984  MRButtonActivate(rb);
2985 
2986  rb = MCreateRButton(tb, "No", FIXED_SMALL);
2987  MObjectSetForegroundRGB(rb, 255, 255, 255);
2988  MPButtonSetCallback(rb, DB_RecGio_CB, (void *) 1);
2989 
2990 
2991 
2992  colfrm = MCreateColForm(rowfrm1);
2993  MObjectSetBackgroundRGB(colfrm, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
2994  MObjectSetResize(colfrm, False, True);
2995  MObjectSetTransparency(colfrm, 0);
2996 
2997 
2998  lbl = MCreateLabel(colfrm, "Select dir.", TIMES_SMALL);
2999  MObjectSetTransparency(lbl, 0);
3002  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3003 
3004  tb = MCreateTableForm(colfrm, 1);
3005  // MObjectSetBackgroundRGB(tb, 96, 133, 149);
3006  //MObjectSetBackgroundRGB(tb, 112, 128, 112);
3007  MObjectSetBackgroundRGB(tb, 129, 77, 77);
3008  MObjectSetResize(tb, False, True);
3009 
3010  rb = MCreateRButton(tb, "CW - UV", FIXED_SMALL);
3011  MObjectSetForegroundRGB(rb, 255, 255, 255);
3012  MPButtonSetCallback(rb, DB_dirCB, (void *) 0);
3013  MRButtonActivate(rb);
3014  GrDIR = 0;
3015 
3016  rb = MCreateRButton(tb, "CCW - Vis", FIXED_SMALL);
3017  MObjectSetForegroundRGB(rb, 255, 255, 255);
3018  MPButtonSetCallback(rb, DB_dirCB, (void *) 1);
3019 
3020 /* colfrm = MCreateColForm(rowfrm1);
3021  MObjectSetBackgroundRGB(colfrm, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
3022  MObjectSetResize(colfrm, True, True);
3023  MObjectSetTransparency(colfrm, 0);
3024 */
3025  lbl = MCreateLabel(colfrm, "Positioning with:", TIMES_SMALL);
3026  MObjectSetTransparency(lbl, 0);
3029  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3030 
3031  tb = MCreateTableForm(colfrm, 1);
3032  //MObjectSetBackgroundRGB(tb, 112, 128, 112);
3033  MObjectSetBackgroundRGB(tb, 129, 77, 77);
3034  MObjectSetResize(tb, False, True);
3035 
3036  rb = MCreateRButton(tb, "Step", FIXED_SMALL);
3037  MPButtonSetCallback(rb, DB_GratPosMode_CB, (void *) 0);
3039  MObjectSetForegroundRGB(rb, 255, 255, 255);
3040  MObjectSetCompositeWidth(rb, 100);
3041  if(DAS.Flag.gratposmode == 0)
3042  MRButtonActivate(rb);
3043 
3044  rb = MCreateRButton(tb, "Wavelength", FIXED_SMALL);
3045  MPButtonSetCallback(rb, DB_GratPosMode_CB, (void *) 1);
3047  MObjectSetForegroundRGB(rb, 255, 255, 255);
3048  MObjectSetCompositeWidth(rb, 100);
3049  if(DAS.Flag.gratposmode == 1)
3050  MRButtonActivate(rb);
3051 
3052 
3053 
3054 
3056 
3057  GratFlg = 0;
3058  MLoopWhileFlag(&GratFlg, 0);
3059 
3062 
3063 
3064 }
short DB_BG_lblUP[3]
Background Capital Letters Labels Color UP.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
void DB_GratPosMode_CB(MOBJECT o, void *a, void *v)
Definition: CreateForms.c:2778
MOBJECT lbl
Definition: DFileMan.c:42
MOBJECT rbStepGratEnc[2]
radio buttons for steps encoding (move Grating free positioning)
#define WS_SHADOW_IN
Definition: Mguidefs.h:958
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
int gratposmode
Grating position mode flag: = 0 step mode; = 1 Wl mode.
#define WS_ETCHED_OUT
Definition: Mguidefs.h:960
MOBJECT lbl_mvgratmode
Active Control Panel Labels for Sunset.
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
flag Flag
Structure for different flags.
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
MOBJECT Sh_mg
Password Shell.
void DB_RecGio_CB(MOBJECT o, void *a, void *v)
Definition: CreateForms.c:2835
void MShellUnrealize(MOBJECT obj)
#define TIMES_SMALL
Definition: Mguidefs.h:883
void MShellDestroy(MOBJECT obj)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define FIXED_MEDIUM
Definition: Mguidefs.h:879
#define HELV_SMALL
Definition: Mguidefs.h:881
void DB_dirCB(MOBJECT o, void *id, void *a_data)
Definition: CreateForms.c:2673
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void MRButtonActivate(MOBJECT o)
void ActMvGratCB(MOBJECT edit, char *text, void *ed)
Move Grating of a free steps number callback. .
Definition: CreateForms.c:2691
MOBJECT MCreateColForm(MOBJECT parent)
palette DPAL
Definition: CreateForms.c:88
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
void MShellRealizeXY(MOBJECT obj, int x, int y)
MOBJECT MCreateShell(const char *title, int flags)
short DB_BG[3]
Default Background Color.
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
controlpanel ContrPanel
Control Panel Structure.
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
int GrDIR
Definition: CreateForms.c:64
static int GratFlg
Definition: CreateForms.c:60
void MLoopWhileFlag(int *pflag, int value)
void DB_StepGratEnc_CB(MOBJECT o, void *a, void *v)
Definition: CreateForms.c:2811
#define HELV_MEDIUM
Definition: Mguidefs.h:882
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
#define TOP_ALIGN
Definition: Mguidefs.h:918
short DB_FG_lblUP[3]
Foreground Capital Letters Labels Color UP.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MDCreateMoveZen()

void MDCreateMoveZen ( void  )

Definition at line 3261 of file CreateForms.c.

References ActMvZenCB(), DB_dirCB(), FIXED_MEDIUM, FIXED_SMALL, GratFlg, GrDIR, das::Gui, lbl, MCreateEdit(), MCreateLabel(), MCreateRButton(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MEditSetActCallback(), MLoopWhileFlag(), MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MPButtonSetCallback(), MRButtonActivate(), MShellDestroy(), MShellRealizeXY(), MShellUnrealize(), shells::Sh_mg, gui::Shells, TIMES_SMALL, True, WS_ETCHED_OUT, and WS_SHADOW_IN.

3262 {
3263 
3264 
3265  MOBJECT lbl;
3266  MOBJECT rbut;
3267  MOBJECT rbutt;
3268  MOBJECT lbl1;
3269  MOBJECT edt;
3270 // MOBJECT pbut;
3271  MOBJECT _rowform000;
3272  MOBJECT _tablefrm000;
3273  char buff[255];
3274  DAS.Gui.Shells.Sh_mg = MCreateShell("MOVE Zenith Axes", 0);
3275  MObjectSetBackgroundRGB(DAS.Gui.Shells.Sh_mg, 96, 133, 149);
3276 
3277  _rowform000 = MCreateRowForm(DAS.Gui.Shells.Sh_mg);
3278  MObjectSetBackgroundRGB(_rowform000, 96, 133, 149);
3279  MObjectSetResize(_rowform000, True, True);
3280 
3281  sprintf(buff,"This tool allows for the positioning of the Zenith\n \
3282 Axis of a free number of steps\n ");
3283 
3284  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3285  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3286  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3287  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3288 
3289  sprintf(buff," NOTE:\n");
3290 
3291  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3292  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3293  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3294  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3295 
3296 
3297  lbl = MCreateLabel(_rowform000, "Select dir.", TIMES_SMALL);
3298  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3299  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3300  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3301 
3302  _tablefrm000 = MCreateTableForm(DAS.Gui.Shells.Sh_mg, 2);
3303  MObjectSetBackgroundRGB(_tablefrm000, 96, 133, 149);
3304  MObjectSetResize(_tablefrm000, True, True);
3305 
3306  rbut = MCreateRButton(_tablefrm000, "CCW", FIXED_SMALL);
3307  MObjectSetForegroundRGB(rbut, 255, 255, 255);
3308  MPButtonSetCallback(rbut, DB_dirCB, (void *) 0);
3309  MRButtonActivate(rbut);
3310  GrDIR = 0;
3311 
3312  rbutt = MCreateRButton(_tablefrm000, "CW", FIXED_SMALL);
3313  MObjectSetForegroundRGB(rbutt, 255, 255, 255);
3314  MPButtonSetCallback(rbut, DB_dirCB, (void *) 1);
3315 
3316  lbl1 = MCreateLabel(_tablefrm000, "Step:", FIXED_SMALL);
3317  MObjectSetForegroundRGB(lbl1, 255, 255, 255);
3318 
3319  edt = MCreateEdit(_tablefrm000, "0", 12, FIXED_MEDIUM);
3320  //MEditSetFilter(edt, 4, "");
3321  MObjectSetForegroundRGB(edt, 255, 255, 255);
3322  MObjectSetBackgroundRGB(edt, 0, 0, 0);
3323  MObjectSetShadow(edt, WS_ETCHED_OUT, 2, 1);
3324  MEditSetActCallback(edt, ActMvZenCB, edt);
3325 
3326 
3327 
3329 
3330  GratFlg = 0;
3331  MLoopWhileFlag(&GratFlg, 0);
3332 
3335 
3336 
3337 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
MOBJECT lbl
Definition: DFileMan.c:42
#define WS_SHADOW_IN
Definition: Mguidefs.h:958
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
#define WS_ETCHED_OUT
Definition: Mguidefs.h:960
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
MOBJECT Sh_mg
Password Shell.
void MShellUnrealize(MOBJECT obj)
#define TIMES_SMALL
Definition: Mguidefs.h:883
void MShellDestroy(MOBJECT obj)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define FIXED_MEDIUM
Definition: Mguidefs.h:879
void DB_dirCB(MOBJECT o, void *id, void *a_data)
Definition: CreateForms.c:2673
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void MRButtonActivate(MOBJECT o)
void MShellRealizeXY(MOBJECT obj, int x, int y)
void ActMvZenCB(MOBJECT edit, char *text, void *ed)
Definition: CreateForms.c:3116
MOBJECT MCreateShell(const char *title, int flags)
MOBJECT MCreateRButton(MOBJECT parent, const char *text, MTFont font)
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
int GrDIR
Definition: CreateForms.c:64
static int GratFlg
Definition: CreateForms.c:60
void MLoopWhileFlag(int *pflag, int value)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
+ Here is the call graph for this function:

§ MDCreateMoveZenAzimDeg()

void MDCreateMoveZenAzimDeg ( void  )

Definition at line 3573 of file CreateForms.c.

References palette::DB_UnSel, palette::DB_UnSelFG, mige::edtaz, mige::edtzen, FIXED_MEDIUM, FIXED_SMALL, GratFlg, das::Gui, lbl, MCreateEdit(), MCreateLabel(), MCreatePButton(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), das::MIGE, MIGEZenAzPos_CB(), MLoopWhileFlag(), MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MPButtonSetCallback(), MShellDestroy(), MShellRealizeXY(), MShellUnrealize(), AzimuthSt::realazpos, ZenithSt::realzenpos, shells::Sh_mg, gui::Shells, TIMES_SMALL, True, WS_ETCHED_OUT, and WS_SHADOW_IN.

Referenced by DB_KeyB_CB().

3574 {
3575 
3576  MOBJECT lbl;
3577  MOBJECT pbut;
3578 // MOBJECT rbutt;
3579  MOBJECT lbl1;
3580 // MOBJECT edt;
3581 // MOBJECT pbut;
3582  MOBJECT _rowform000;
3583  MOBJECT _tablefrm000;
3584  char buff[255];
3585  DAS.Gui.Shells.Sh_mg = MCreateShell("MOVE Zenith and Azimuth Axis", 0);
3586  MObjectSetBackgroundRGB(DAS.Gui.Shells.Sh_mg, 96, 133, 149);
3587 
3588  _rowform000 = MCreateRowForm(DAS.Gui.Shells.Sh_mg);
3589  MObjectSetBackgroundRGB(_rowform000, 96, 133, 149);
3590  MObjectSetResize(_rowform000, True, True);
3591 
3592  sprintf(buff,"This tool allows for the positioning of the Zenith and Azimuth\n \
3593 Axes at the typed angles.");
3594 
3595  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3596  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3597  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3598  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3599 
3600 
3601 
3602  _tablefrm000 = MCreateTableForm(DAS.Gui.Shells.Sh_mg, 3);
3603  MObjectSetBackgroundRGB(_tablefrm000, 96, 133, 149);
3604  MObjectSetResize(_tablefrm000, True, True);
3605 
3606  lbl1 = MCreateLabel(_tablefrm000, "Zenith (xxx.x):", FIXED_SMALL);
3607  MObjectSetForegroundRGB(lbl1, 255, 255, 255);
3608  MObjectSetShadow(lbl1, WS_SHADOW_IN, 1, 0);
3609 
3610  sprintf(buff, "%.1lf", ZST.realzenpos);
3611  DAS.MIGE.edtzen = MCreateEdit(_tablefrm000, buff, 6, FIXED_MEDIUM);
3612  //MEditSetFilter(edt, 4, "");
3613  MObjectSetForegroundRGB(DAS.MIGE.edtzen, 255, 255, 255);
3616  //MEditSetActCallback(edt, ActMvZenDegCB, edt);
3617 
3618  sprintf(buff," Allowed values: 0 <= x <= 180.");
3619  lbl = MCreateLabel(_tablefrm000, buff, TIMES_SMALL);
3620  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3621  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3622  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3623 
3624 
3625 
3626  lbl1 = MCreateLabel(_tablefrm000, "Azimuth (xxx.x):", FIXED_SMALL);
3627  MObjectSetForegroundRGB(lbl1, 255, 255, 255);
3628  MObjectSetShadow(lbl1, WS_SHADOW_IN, 1, 0);
3629 
3630  //sprintf(buff, "%.1lf", AST.Pos);
3631  sprintf(buff, "%.1lf", AST.realazpos);
3632  DAS.MIGE.edtaz = MCreateEdit(_tablefrm000, buff, 6, FIXED_MEDIUM);
3633  //MEditSetFilter(edt, 4, "");
3634  MObjectSetForegroundRGB(DAS.MIGE.edtaz, 255, 255, 255);
3637  //MEditSetActCallback(edt, ActMvAzimDegCB, edt);
3638 
3639 
3640  sprintf(buff," Allowed values: 0 <= x <= 360.");
3641  lbl = MCreateLabel(_tablefrm000, buff, TIMES_SMALL);
3642  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3643  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3644  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3645 
3646 
3647 
3648  _rowform000 = MCreateRowForm(DAS.Gui.Shells.Sh_mg);
3649  MObjectSetBackgroundRGB(_rowform000, 96, 133, 149);
3650  MObjectSetResize(_rowform000, True, True);
3651 
3652 
3653  pbut = MCreatePButton(_rowform000, "DO POSIT.", FIXED_SMALL);
3656  //MObjectSetForegroundRGB(pbut, 255, 255, 255);
3657  MPButtonSetCallback(pbut, MIGEZenAzPos_CB, (void *) 0);
3658 
3659 
3661 
3662  GratFlg = 0;
3663  MLoopWhileFlag(&GratFlg, 0);
3664 
3667 
3668 
3669 
3670 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
MOBJECT lbl
Definition: DFileMan.c:42
#define WS_SHADOW_IN
Definition: Mguidefs.h:958
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
double realazpos
#define WS_ETCHED_OUT
Definition: Mguidefs.h:960
AzimuthSt AST
Definition: CreateForms.c:100
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
MOBJECT Sh_mg
Password Shell.
ZenithSt ZST
Definition: CreateForms.c:99
void MShellUnrealize(MOBJECT obj)
#define TIMES_SMALL
Definition: Mguidefs.h:883
void MShellDestroy(MOBJECT obj)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define FIXED_MEDIUM
Definition: Mguidefs.h:879
MOBJECT edtaz
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define FIXED_SMALL
Definition: Mguidefs.h:878
mige MIGE
palette DPAL
Definition: CreateForms.c:88
void MShellRealizeXY(MOBJECT obj, int x, int y)
void MIGEZenAzPos_CB(MOBJECT o, void *a, void *v)
Definition: CreateForms.c:3554
MOBJECT MCreateShell(const char *title, int flags)
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
static int GratFlg
Definition: CreateForms.c:60
void MLoopWhileFlag(int *pflag, int value)
double realzenpos
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
MOBJECT edtzen
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MDCreateMoveZenDeg()

void MDCreateMoveZenDeg ( void  )

Definition at line 3192 of file CreateForms.c.

References ActMvZenDegCB(), FIXED_MEDIUM, FIXED_SMALL, GratFlg, das::Gui, lbl, MCreateEdit(), MCreateLabel(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MEditSetActCallback(), MLoopWhileFlag(), MObjectSetBackgroundRGB(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MShellDestroy(), MShellRealizeXY(), MShellUnrealize(), shells::Sh_mg, gui::Shells, TIMES_SMALL, True, WS_ETCHED_OUT, and WS_SHADOW_IN.

3193 {
3194 
3195 
3196  MOBJECT lbl;
3197 // MOBJECT rbut;
3198 // MOBJECT rbutt;
3199  MOBJECT lbl1;
3200  MOBJECT edt;
3201 // MOBJECT pbut;
3202  MOBJECT _rowform000;
3203  MOBJECT _tablefrm000;
3204  char buff[255];
3205  DAS.Gui.Shells.Sh_mg = MCreateShell("MOVE Zenith Axes", 0);
3206  MObjectSetBackgroundRGB(DAS.Gui.Shells.Sh_mg, 96, 133, 149);
3207 
3208  _rowform000 = MCreateRowForm(DAS.Gui.Shells.Sh_mg);
3209  MObjectSetBackgroundRGB(_rowform000, 96, 133, 149);
3210  MObjectSetResize(_rowform000, True, True);
3211 
3212  sprintf(buff,"This tool allows for the positioning of the Zenith\n \
3213 Axis at the typed angle. \n ");
3214 
3215  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3216  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3217  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3218  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3219 // if(DAS.MIGE.type)
3220 // {
3221  sprintf(buff," NOTE: Allowed values: -90 < angle < 90.\n");
3222 // }
3223 // else
3224 // {
3225 // sprintf(buff," NOTE: Allowed values: -91 < angle < 45.\n");
3226 // }
3227  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
3228  MObjectSetForegroundRGB(lbl, 255, 255, 255);
3229  MObjectSetBackgroundRGB(lbl, 53, 112, 112);
3230  MObjectSetShadow(lbl, WS_SHADOW_IN, 1, 0);
3231 
3232 
3233  _tablefrm000 = MCreateTableForm(DAS.Gui.Shells.Sh_mg, 2);
3234  MObjectSetBackgroundRGB(_tablefrm000, 96, 133, 149);
3235  MObjectSetResize(_tablefrm000, True, True);
3236 
3237  lbl1 = MCreateLabel(_tablefrm000, "Degrees (xx.x):", FIXED_SMALL);
3238  MObjectSetForegroundRGB(lbl1, 255, 255, 255);
3239 
3240  edt = MCreateEdit(_tablefrm000, "0", 12, FIXED_MEDIUM);
3241  //MEditSetFilter(edt, 4, "");
3242  MObjectSetForegroundRGB(edt, 255, 255, 255);
3243  MObjectSetBackgroundRGB(edt, 0, 0, 0);
3244  MObjectSetShadow(edt, WS_ETCHED_OUT, 2, 1);
3246 
3247 
3248 
3250 
3251  GratFlg = 0;
3252  MLoopWhileFlag(&GratFlg, 0);
3253 
3256 
3257 
3258 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
MOBJECT lbl
Definition: DFileMan.c:42
#define WS_SHADOW_IN
Definition: Mguidefs.h:958
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT MCreateEdit(MOBJECT parent, const char *text, int len, MTFont font)
void ActMvZenDegCB(MOBJECT edit, char *text, void *ed)
Definition: CreateForms.c:3172
#define WS_ETCHED_OUT
Definition: Mguidefs.h:960
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
MOBJECT Sh_mg
Password Shell.
void MShellUnrealize(MOBJECT obj)
#define TIMES_SMALL
Definition: Mguidefs.h:883
void MShellDestroy(MOBJECT obj)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define FIXED_MEDIUM
Definition: Mguidefs.h:879
void MEditSetActCallback(MOBJECT edit, OBJ_STRING_CB cb, void *data)
#define FIXED_SMALL
Definition: Mguidefs.h:878
void MShellRealizeXY(MOBJECT obj, int x, int y)
MOBJECT MCreateShell(const char *title, int flags)
das DAS
Definition: CreateForms.c:98
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
static int GratFlg
Definition: CreateForms.c:60
void MLoopWhileFlag(int *pflag, int value)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT MCreateRowForm(MOBJECT parent)
+ Here is the call graph for this function:

§ MDCreateSh_Fil()

int MDCreateSh_Fil ( void  )

Create the shell for the available Filters. Procedure that build the shell for the positioning of the filter wheel. They are installed during the instrument setup.

Returns
0

Definition at line 5994 of file CreateForms.c.

References DB_Close_Sh(), DB_Fil_CB(), DB_FilSelButtKB_CB(), DB_PushButtonMouse_CB(), DB_SheelESC(), palette::DB_UnSel, palette::DB_UnSelFG, EM_BUTTON_PRESS, EM_KEY_PRESS, EM_MOTION, paramini::EqType, pushbutt::Fil, Fil_Code, Fil_Code8H, Fil_CodeNG, Fil_CodeNG1, Fil_CodeTropo, FilBuff, FilFlg, FWS, GASCODNG1, GASCODNG2, GASCODNG3, GASCODNG4, das::Gui, HELV_SMALL, LIS_, MButtonSetOnMouseOverForegroundRGB(), MCreatePButton(), MCreateShell(), MCreateTableForm(), MLoopWhileFlag(), MObjectAddEventNotifyCallback(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MPButtonSetCallback(), MShellDestroy(), MShellRealizeXY(), MShellSetWMCloseCallback(), MShellUnrealize(), das::Paramini, FilterWheelSt::Pos, gui::PushButt, SF_MODAL, shells::Sh_Fil, gui::Shells, TROPOGAS, True, and WS_SHADOW_OUT.

Referenced by DB_KeyB_CB().

5995 {
5996  int i, er = 0;
5997  int bas = 0; //button array size
5998  MOBJECT _tablefrm000;
5999 // MOBJECT _tablefrm001;
6000 // MOBJECT Esc_But;
6001 
6002  DAS.Gui.Shells.Sh_Fil = MCreateShell("SET FILTER", SF_MODAL);
6003  MObjectSetForegroundRGB(DAS.Gui.Shells.Sh_Fil, 255, 255, 255);
6004 
6005 /*
6006  _tablefrm001 = MCreateTableForm(DAS.Gui.Shells.Sh_Fil, 1);
6007  MObjectSetBackgroundRGB(_tablefrm001, 91, 74, 74);
6008  MObjectSetResize(_tablefrm001, True, True);
6009 
6010  Esc_But = MCreatePButton(_tablefrm001, "ESC-Return", HELV_SMALL);
6011  MObjectSetBackgroundRGB(Esc_But, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
6012  MObjectSetShadow(Esc_But, WS_SHADOW_OUT, 3, 0);
6013  MObjectSetCompositeWidth(Esc_But, 180);
6014  MButtonSetAccelerator(Esc_But, ESC);
6015  MButtonSetOnMouseOverForegroundRGB(Esc_But, 255, 255, 255);
6016  MPButtonSetCallback(Esc_But, DB_Esc_CB, (void *) 2);
6017 */
6018  _tablefrm000 = MCreateTableForm(DAS.Gui.Shells.Sh_Fil, 1);
6019  MObjectSetBackgroundRGB(_tablefrm000, 91, 74, 74);
6020  MObjectSetResize(_tablefrm000, True, True);
6021 
6022 
6023 
6024  if(DAS.Paramini.EqType == LIS_)
6025  {
6026  bas = 8;
6027  for (i=0; i<bas; i++)
6028  {
6029  DAS.Gui.PushButt.Fil[i] = MCreatePButton(_tablefrm000, Fil_Code8H[i], HELV_SMALL);
6032  if (i==FWS.Pos)
6033  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Fil[i], 0, 0, 255);
6034 
6036  // MObjectAddEventNotifyCallback(DAS.Gui.PushButt.Fil[i], (OBJ_EVENT_CB) DB_FilSelButtMouse_CB, EM_BUTTON_PRESS, (void *) i);
6040  MPButtonSetCallback(DAS.Gui.PushButt.Fil[i], DB_Fil_CB, (void *) i);
6041  // MButtonSetOnMouseOverForegroundRGB(DAS.Gui.PushButt.Fil[i], ~DPAL.DB_UnSelFG[0], ~DPAL.DB_UnSelFG[1], ~DPAL.DB_UnSelFG[2]);
6043  }
6044 
6045  }
6046  else
6047  {
6048  bas = 6;
6049  for (i=0; i<bas; i++)
6050  {
6051  if(DAS.Paramini.EqType == TROPOGAS)
6052  DAS.Gui.PushButt.Fil[i] = MCreatePButton(_tablefrm000, Fil_CodeTropo[i], HELV_SMALL);
6054  DAS.Gui.PushButt.Fil[i] = MCreatePButton(_tablefrm000, Fil_CodeNG[i], HELV_SMALL);
6055  else if (DAS.Paramini.EqType == GASCODNG1)
6056  DAS.Gui.PushButt.Fil[i] = MCreatePButton(_tablefrm000, Fil_CodeNG1[i], HELV_SMALL);
6057  else
6058  DAS.Gui.PushButt.Fil[i] = MCreatePButton(_tablefrm000, Fil_Code[i], HELV_SMALL);
6059 
6062  if (i==FWS.Pos)
6063  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Fil[i], 0, 0, 255);
6064 
6066  // MObjectAddEventNotifyCallback(DAS.Gui.PushButt.Fil[i], (OBJ_EVENT_CB) DB_FilSelButtMouse_CB, EM_BUTTON_PRESS, (void *) i);
6070  MPButtonSetCallback(DAS.Gui.PushButt.Fil[i], DB_Fil_CB, (void *) i);
6071  // MButtonSetOnMouseOverForegroundRGB(DAS.Gui.PushButt.Fil[i], ~DPAL.DB_UnSelFG[0], ~DPAL.DB_UnSelFG[1], ~DPAL.DB_UnSelFG[2]);
6073  }
6074 
6075  }
6076 /*
6077  for (i=0; i<(sizeof DAS.Gui.PushButt.Fil / sizeof DAS.Gui.PushButt.Fil[0]); i++)
6078  {
6079  DAS.Gui.PushButt.Fil[i] = MCreatePButton(_tablefrm000, Fil_Code[i], HELV_SMALL);
6080  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Fil[i], DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
6081  MObjectSetForegroundRGB(DAS.Gui.PushButt.Fil[i], DPAL.DB_UnSelFG[0], DPAL.DB_UnSelFG[1], DPAL.DB_UnSelFG[2]);
6082  if (i==0)
6083  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Fil[i], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
6084 
6085  MObjectAddEventNotifyCallback(DAS.Gui.PushButt.Fil[i], (OBJ_EVENT_CB) DB_FilSelButtKB_CB, EM_KEY_PRESS, (void *) i);
6086  MObjectAddEventNotifyCallback(DAS.Gui.PushButt.Fil[i], (OBJ_EVENT_CB) DB_FilSelButtMouse_CB, EM_BUTTON_PRESS, (void *) i);
6087  MObjectSetShadow(DAS.Gui.PushButt.Fil[i], WS_SHADOW_OUT, 4, 0);
6088  MObjectSetCompositeWidth(DAS.Gui.PushButt.Fil[i], 150);
6089  MPButtonSetCallback(DAS.Gui.PushButt.Fil[i], DB_Fil_CB, (void *) i);
6090  MButtonSetOnMouseOverForegroundRGB(DAS.Gui.PushButt.Fil[i], ~DPAL.DB_UnSelFG[0], ~DPAL.DB_UnSelFG[1], ~DPAL.DB_UnSelFG[2]);
6091  }
6092 
6093 */
6094 
6097 
6099 
6100  FilFlg = 0;
6101  MLoopWhileFlag(&FilFlg, 0);
6102  if(FilBuff == "0")
6103  {
6104  FilFlg = 1;
6107 // MShellRaise(DAS.Gui.Shells.Sh_KeyB);
6108  return er;
6109  }
6110  else
6111  {
6114 // MShellRaise(DAS.Gui.Shells.Sh_KeyB);
6115  return er;
6116  }
6117 
6118 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
static int FilFlg
Definition: CreateForms.c:50
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
char * Fil_Code8H[]
const char array for the realisation of the Filters buttons in the Filter shell
Definition: DAS_Spat.c:204
void MShellUnrealize(MOBJECT obj)
int Pos
Filter Wheel current Position.
void DB_Fil_CB(MOBJECT p, void *od, void *ad)
callback for filter wheel positioning in Filter shell
Definition: CreateForms.c:6120
MOBJECT Fil[6]
Filter Buttons.
#define EM_MOTION
Definition: Mguidefs.h:319
void MShellDestroy(MOBJECT obj)
#define LIS_
Lampedusa Island Spectrometer - ENEA.
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define EM_KEY_PRESS
Definition: Mguidefs.h:316
char * Fil_CodeNG[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG2 and NG3...
Definition: DAS_Spat.c:216
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
#define EM_BUTTON_PRESS
Definition: Mguidefs.h:317
void DB_FilSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for select a specified filter push button with the keyboard
Definition: CreateForms.c:6166
MOBJECT Sh_Fil
Filter Shell.
#define HELV_SMALL
Definition: Mguidefs.h:881
#define SF_MODAL
Definition: Mguidefs.h:1019
void(* OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad)
Definition: Mguidefs.h:1456
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
palette DPAL
Definition: CreateForms.c:88
void MObjectAddEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, CARD32 event_mask, void *a_data)
pushbutt PushButt
Push buttons.
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
void MShellRealizeXY(MOBJECT obj, int x, int y)
#define GASCODNG4
GASCODNG 4.
char * Fil_CodeNG1[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG1 instrum...
Definition: DAS_Spat.c:213
MOBJECT MCreateShell(const char *title, int flags)
char * Fil_Code[]
const char array for the realisation of the Filters buttons in the Filter shell
Definition: DAS_Spat.c:207
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
void DB_Close_Sh(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:5511
#define True
Definition: Mguidefs.h:235
void DB_PushButtonMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
Definition: CreateForms.c:950
char * Fil_CodeTropo[]
const char array for the realisation of the Filters buttons in the Filter shell for TROPOGAS instrume...
Definition: DAS_Spat.c:210
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
void MLoopWhileFlag(int *pflag, int value)
int EqType
Spectrometer Type.
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
FilterWheelSt FWS
Filter Wheel.
Definition: DAS_Spat.c:57
void DB_SheelESC(MOBJECT obj, MKeyEvent *pe, void *a_data)
Definition: CreateForms.c:5569
const char * FilBuff
Definition: CreateForms.c:51
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MDCreateSh_Home()

int MDCreateSh_Home ( void  )

Definition at line 6662 of file CreateForms.c.

References DB_Home_CB(), palette::DB_UnSel, palette::DB_UnSelFG, das::Gui, HELV_SMALL, pushbutt::HomePos, HomePosition, MCreatePButton(), MCreateShell(), MCreateTableForm(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MPButtonSetCallback(), MShellRealizeXY(), gui::PushButt, SF_NO_MAXIMIZE, shells::Sh_Home, gui::Shells, True, wl, and WS_SHADOW_OUT.

Referenced by DB_KeyB_CB().

6663 {
6664  int i, er = 0;
6665  MOBJECT _tablefrm000;
6666  char buff[16];
6667 
6668  DAS.Gui.Shells.Sh_Home = MCreateShell("SET HOME POSITION",SF_NO_MAXIMIZE);
6669  MObjectSetForegroundRGB(DAS.Gui.Shells.Sh_Home, 255, 255, 255);
6670 
6671  _tablefrm000 = MCreateTableForm(DAS.Gui.Shells.Sh_Home, 3);
6672  MObjectSetBackgroundRGB(_tablefrm000, 91, 74, 74);
6673  MObjectSetResize(_tablefrm000, True, True);
6674 
6675  for (i=0; i<(sizeof DAS.Gui.PushButt.HomePos / sizeof DAS.Gui.PushButt.HomePos[0]); i++)
6676  {
6677  itoa(wl[i],buff,10);
6678  DAS.Gui.PushButt.HomePos[i] = MCreatePButton(_tablefrm000, HomePosition[i], HELV_SMALL);
6681  //MObjectAddEventNotifyCallback(DAS.Gui.PushButt.HomePos[i], (OBJ_EVENT_CB) DB_HomeSelButtKB_CB, EM_KEY_PRESS, (void *) i);
6682  //MObjectAddEventNotifyCallback(DAS.Gui.PushButt.HomePos[i], (OBJ_EVENT_CB) DB_PushButtonMouse_CB, EM_BUTTON_PRESS | EM_MOTION, (void *) 2);
6683 
6687  //MButtonSetOnMouseOverForegroundRGB(DAS.Gui.PushButt.HomePos[i], 255, 0, 0);
6688  }
6689 
6690  //MShellSetWMCloseCallback(DAS.Gui.Shells.Sh_Home, DB_Close_Sh, (void *) 1);
6691  //MObjectAddEventNotifyCallback(DAS.Gui.Shells.Sh_Home, (OBJ_EVENT_CB) DB_SheelESC, EM_KEY_PRESS, (void *) 1);
6692 
6694 /*
6695  HomeFlg = 0;
6696  MLoopWhileFlag(&HomeFlg, 0);
6697  if(WlBuff == "0")
6698  {
6699  WlFlg = 1;
6700  MShellUnrealize(DAS.Gui.Shells.Sh_Wl);
6701  MShellDestroy(DAS.Gui.Shells.Sh_Wl);
6702  return er;
6703  }
6704  else
6705  {
6706  MShellUnrealize(DAS.Gui.Shells.Sh_Wl);
6707  MShellDestroy(DAS.Gui.Shells.Sh_Wl);
6708  return er;
6709  }
6710 */
6711 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
#define SF_NO_MAXIMIZE
Definition: Mguidefs.h:1034
char * HomePosition[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
Definition: DAS_Spat.c:227
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
void DB_Home_CB(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:6552
MOBJECT Sh_Home
Home Shell.
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define HELV_SMALL
Definition: Mguidefs.h:881
MOBJECT HomePos[7]
Reference Position Buttons.
palette DPAL
Definition: CreateForms.c:88
pushbutt PushButt
Push buttons.
void MShellRealizeXY(MOBJECT obj, int x, int y)
MOBJECT MCreateShell(const char *title, int flags)
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MDCreateSh_Mir()

MDCreateSh_Mir ( void  )

Create the shell for the available Mirror Positions. Procedure that build the shell for the positioning of the Input Mirror.
They are: 1) Zenith 2) Horizontal Right 3) Calibra (Down for the calibration sphere) 4) Horizontal Left.

Returns
0

Definition at line 5614 of file CreateForms.c.

References DB_Close_Sh(), DB_Mir_CB(), DB_MirSelButtKB_CB(), DB_PushButtonMouse_CB(), DB_SheelESC(), palette::DB_UnSel, palette::DB_UnSelFG, EM_BUTTON_PRESS, EM_KEY_PRESS, EM_MOTION, paramini::EqType, GASCODNG4, das::Gui, HELV_SMALL, MButtonSetOnMouseOverForegroundRGB(), MCreatePButton(), MCreateShell(), MCreateTableForm(), pushbutt::Mir, Mir_Code, Mir_CodeTropo, MirBuff, MirFlg, MIS, MLoopWhileFlag(), MObjectAddEventNotifyCallback(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MPButtonSetCallback(), MShellDestroy(), MShellRealizeXY(), MShellSetWMCloseCallback(), MShellUnrealize(), das::Paramini, MirrorSt::Pos, gui::PushButt, SF_MODAL, shells::Sh_Mir, gui::Shells, SPATRAM3, TROPOGAS, True, and WS_SHADOW_OUT.

Referenced by DB_KeyB_CB().

5615 {
5616  int i, er = 0;
5617  MOBJECT _tablefrm000;
5618 // MOBJECT _tablefrm001;
5619 // MOBJECT Esc_But;
5620  char buf[16];
5621 
5622  DAS.Gui.Shells.Sh_Mir = MCreateShell("SET INPUT MIRROR POSITION", SF_MODAL);
5623  MObjectSetForegroundRGB(DAS.Gui.Shells.Sh_Mir, 255, 255, 255);
5624 
5625 /*
5626  _tablefrm001 = MCreateTableForm(DAS.Gui.Shells.Sh_Mir, 1);
5627  MObjectSetBackgroundRGB(_tablefrm001, 91, 74, 74);
5628  MObjectSetResize(_tablefrm001, True, True);
5629 
5630  Esc_But = MCreatePButton(_tablefrm001, "ESC-Return", HELV_SMALL);
5631  MObjectSetBackgroundRGB(Esc_But, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
5632  MObjectSetShadow(Esc_But, WS_SHADOW_OUT, 3, 0);
5633  MObjectSetCompositeWidth(Esc_But, 180);
5634  MButtonSetAccelerator(Esc_But, ESC);
5635  MButtonSetOnMouseOverForegroundRGB(Esc_But, 255, 255, 255);
5636  MPButtonSetCallback(Esc_But, DB_Esc_CB, (void *) 0);
5637 */
5638  _tablefrm000 = MCreateTableForm(DAS.Gui.Shells.Sh_Mir, 1);
5639  MObjectSetBackgroundRGB(_tablefrm000, 91, 74, 74);
5640  MObjectSetResize(_tablefrm000, True, True);
5641 
5642  for (i=0; i < (sizeof DAS.Gui.PushButt.Mir / sizeof DAS.Gui.PushButt.Mir[0]); i++)
5643  {
5645  sprintf(buf, "%s",Mir_CodeTropo[i]);
5646  else
5647  sprintf(buf, "%s",Mir_Code[i]);
5648 
5649 
5650  DAS.Gui.PushButt.Mir[i] = MCreatePButton(_tablefrm000, buf, HELV_SMALL);
5653  if (i==MIS.Pos)
5654  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Mir[i], 0, 0, 255);
5655  //MObjectSetBackgroundRGB(DAS.Gui.PushButt.Mir[i], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
5658  //MObjectAddEventNotifyCallback(DAS.Gui.PushButt.Mir[i], (OBJ_EVENT_CB) DB_MirSelButtMouse_CB, EM_BUTTON_PRESS | EM_MOTION, (void *) 1);
5660 
5662  MPButtonSetCallback(DAS.Gui.PushButt.Mir[i], DB_Mir_CB, (void *) i);
5663 // MButtonSetOnMouseOverForegroundRGB(DAS.Gui.PushButt.Mir[i], ~DPAL.DB_UnSelFG[0], ~DPAL.DB_UnSelFG[1], ~DPAL.DB_UnSelFG[2]);
5665  }
5666 
5669 
5671 
5672  MirFlg = 0;
5673  MLoopWhileFlag(&MirFlg, 0);
5674  if(MirBuff == "0")
5675  {
5676  MirFlg = 1;
5679 // MShellRaise(DAS.Gui.Shells.Sh_KeyB);
5680  return er;
5681  }
5682  else
5683  {
5686 // MShellRaise(DAS.Gui.Shells.Sh_KeyB);
5687  return er;
5688  }
5689 
5690 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
Definition: DAS_Spat.c:231
void DB_Mir_CB(MOBJECT p, void *od, void *ad)
callback for input mirror positioning in Mirror shell
Definition: CreateForms.c:5692
MOBJECT Sh_Mir
Mirror Shell.
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
void DB_MirSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for selsct a specified mirror push button with the keyboard
Definition: CreateForms.c:5748
int Pos
Mirror Current Position.
static int MirFlg
Definition: CreateForms.c:47
void MShellUnrealize(MOBJECT obj)
#define EM_MOTION
Definition: Mguidefs.h:319
void MShellDestroy(MOBJECT obj)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define EM_KEY_PRESS
Definition: Mguidefs.h:316
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define EM_BUTTON_PRESS
Definition: Mguidefs.h:317
#define HELV_SMALL
Definition: Mguidefs.h:881
#define SF_MODAL
Definition: Mguidefs.h:1019
void(* OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad)
Definition: Mguidefs.h:1456
palette DPAL
Definition: CreateForms.c:88
void MObjectAddEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, CARD32 event_mask, void *a_data)
pushbutt PushButt
Push buttons.
void MShellRealizeXY(MOBJECT obj, int x, int y)
#define GASCODNG4
GASCODNG 4.
MOBJECT MCreateShell(const char *title, int flags)
#define SPATRAM3
SPATRAM3.
const char * MirBuff
Definition: CreateForms.c:48
MirrorSt MIS
Mirror.
Definition: DAS_Spat.c:61
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
void DB_Close_Sh(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:5511
#define True
Definition: Mguidefs.h:235
void DB_PushButtonMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
Definition: CreateForms.c:950
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
void MLoopWhileFlag(int *pflag, int value)
int EqType
Spectrometer Type.
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
void DB_SheelESC(MOBJECT obj, MKeyEvent *pe, void *a_data)
Definition: CreateForms.c:5569
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
MOBJECT Mir[4]
Mirror Buttons.
const char * Mir_CodeTropo[]
const char array for the realisation of the Mirrors buttons in the Mirror shell for TROPOGAS ...
Definition: DAS_Spat.c:234
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MDCreateSh_NDFil()

int MDCreateSh_NDFil ( void  )

Definition at line 6233 of file CreateForms.c.

References DB_Close_Sh(), DB_Fil_CB(), DB_FilSelButtKB_CB(), DB_NDFil_CB(), DB_NDFilSelButtKB_CB(), DB_PushButtonMouse_CB(), DB_SheelESC(), palette::DB_UnSel, palette::DB_UnSelFG, EM_BUTTON_PRESS, EM_KEY_PRESS, EM_MOTION, paramini::EqType, pushbutt::Fil, Fil_Code8H, Fil_CodeNG, Fil_CodeTropo, FWS, GASCODNG1, GASCODNG2, GASCODNG3, GASCODNG4, das::Gui, HELV_SMALL, LIS_, MButtonSetOnMouseOverForegroundRGB(), MCreatePButton(), MCreateShell(), MCreateTableForm(), MLoopWhileFlag(), MObjectAddEventNotifyCallback(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MPButtonSetCallback(), MShellDestroy(), MShellRealizeXY(), MShellSetWMCloseCallback(), MShellUnrealize(), pushbutt::NDFil, NDFil_Code, NDFilBuff, NDFilFlg, NDFWS, das::Paramini, FilterWheelSt::Pos, NDFilterWheelSt::Pos, gui::PushButt, SF_MODAL, shells::Sh_NDFil, gui::Shells, TROPOGAS, True, and WS_SHADOW_OUT.

Referenced by DB_KeyB_CB().

6234 {
6235  int i, er = 0;
6236  int bas = 0; //button array size
6237  MOBJECT _tablefrm000;
6238 // MOBJECT _tablefrm001;
6239 // MOBJECT Esc_But;
6240 
6241  DAS.Gui.Shells.Sh_NDFil = MCreateShell("SET ND FILTER", SF_MODAL);
6242  MObjectSetForegroundRGB(DAS.Gui.Shells.Sh_NDFil, 255, 255, 255);
6243 
6244 /*
6245  _tablefrm001 = MCreateTableForm(DAS.Gui.Shells.Sh_Fil, 1);
6246  MObjectSetBackgroundRGB(_tablefrm001, 91, 74, 74);
6247  MObjectSetResize(_tablefrm001, True, True);
6248 
6249  Esc_But = MCreatePButton(_tablefrm001, "ESC-Return", HELV_SMALL);
6250  MObjectSetBackgroundRGB(Esc_But, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
6251  MObjectSetShadow(Esc_But, WS_SHADOW_OUT, 3, 0);
6252  MObjectSetCompositeWidth(Esc_But, 180);
6253  MButtonSetAccelerator(Esc_But, ESC);
6254  MButtonSetOnMouseOverForegroundRGB(Esc_But, 255, 255, 255);
6255  MPButtonSetCallback(Esc_But, DB_Esc_CB, (void *) 2);
6256 */
6257  _tablefrm000 = MCreateTableForm(DAS.Gui.Shells.Sh_NDFil, 1);
6258  MObjectSetBackgroundRGB(_tablefrm000, 91, 74, 74);
6259  MObjectSetResize(_tablefrm000, True, True);
6260 
6261 
6262 
6263  if(DAS.Paramini.EqType == LIS_)
6264  {
6265  bas = 8;
6266  for (i=0; i<bas; i++)
6267  {
6268  DAS.Gui.PushButt.NDFil[i] = MCreatePButton(_tablefrm000, Fil_Code8H[i], HELV_SMALL);
6271  if (i==FWS.Pos)
6272  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Fil[i], 0, 0, 255);
6273 
6275  // MObjectAddEventNotifyCallback(DAS.Gui.PushButt.Fil[i], (OBJ_EVENT_CB) DB_FilSelButtMouse_CB, EM_BUTTON_PRESS, (void *) i);
6279  MPButtonSetCallback(DAS.Gui.PushButt.Fil[i], DB_Fil_CB, (void *) i);
6280  // MButtonSetOnMouseOverForegroundRGB(DAS.Gui.PushButt.Fil[i], ~DPAL.DB_UnSelFG[0], ~DPAL.DB_UnSelFG[1], ~DPAL.DB_UnSelFG[2]);
6282  }
6283 
6284  }
6285  else
6286  {
6287  bas = 6;
6288  for (i=0; i<bas; i++)
6289  {
6290  if(DAS.Paramini.EqType == TROPOGAS)
6291  DAS.Gui.PushButt.Fil[i] = MCreatePButton(_tablefrm000, Fil_CodeTropo[i], HELV_SMALL);
6292  else if (DAS.Paramini.EqType == GASCODNG1 ||
6293  DAS.Paramini.EqType == GASCODNG2 ||
6296  DAS.Gui.PushButt.NDFil[i] = MCreatePButton(_tablefrm000, Fil_CodeNG[i], HELV_SMALL);
6297  else
6298  DAS.Gui.PushButt.NDFil[i] = MCreatePButton(_tablefrm000, NDFil_Code[i], HELV_SMALL);
6299 
6302  if (i==NDFWS.Pos)
6303  MObjectSetBackgroundRGB(DAS.Gui.PushButt.NDFil[i], 0, 0, 255);
6304 
6306  // MObjectAddEventNotifyCallback(DAS.Gui.PushButt.Fil[i], (OBJ_EVENT_CB) DB_FilSelButtMouse_CB, EM_BUTTON_PRESS, (void *) i);
6311  // MButtonSetOnMouseOverForegroundRGB(DAS.Gui.PushButt.Fil[i], ~DPAL.DB_UnSelFG[0], ~DPAL.DB_UnSelFG[1], ~DPAL.DB_UnSelFG[2]);
6313  }
6314 
6315  }
6316 /*
6317  for (i=0; i<(sizeof DAS.Gui.PushButt.Fil / sizeof DAS.Gui.PushButt.Fil[0]); i++)
6318  {
6319  DAS.Gui.PushButt.Fil[i] = MCreatePButton(_tablefrm000, Fil_Code[i], HELV_SMALL);
6320  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Fil[i], DPAL.DB_UnSel[0], DPAL.DB_UnSel[1], DPAL.DB_UnSel[2]);
6321  MObjectSetForegroundRGB(DAS.Gui.PushButt.Fil[i], DPAL.DB_UnSelFG[0], DPAL.DB_UnSelFG[1], DPAL.DB_UnSelFG[2]);
6322  if (i==0)
6323  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Fil[i], DPAL.DB_Sel[0], DPAL.DB_Sel[1], DPAL.DB_Sel[2]);
6324 
6325  MObjectAddEventNotifyCallback(DAS.Gui.PushButt.Fil[i], (OBJ_EVENT_CB) DB_FilSelButtKB_CB, EM_KEY_PRESS, (void *) i);
6326  MObjectAddEventNotifyCallback(DAS.Gui.PushButt.Fil[i], (OBJ_EVENT_CB) DB_FilSelButtMouse_CB, EM_BUTTON_PRESS, (void *) i);
6327  MObjectSetShadow(DAS.Gui.PushButt.Fil[i], WS_SHADOW_OUT, 4, 0);
6328  MObjectSetCompositeWidth(DAS.Gui.PushButt.Fil[i], 150);
6329  MPButtonSetCallback(DAS.Gui.PushButt.Fil[i], DB_Fil_CB, (void *) i);
6330  MButtonSetOnMouseOverForegroundRGB(DAS.Gui.PushButt.Fil[i], ~DPAL.DB_UnSelFG[0], ~DPAL.DB_UnSelFG[1], ~DPAL.DB_UnSelFG[2]);
6331  }
6332 
6333 */
6334 
6337 
6339 
6340  NDFilFlg = 0;
6341  MLoopWhileFlag(&NDFilFlg, 0);
6342  if(NDFilBuff == "0")
6343  {
6344  NDFilFlg = 1;
6347 // MShellRaise(DAS.Gui.Shells.Sh_KeyB);
6348  return er;
6349  }
6350  else
6351  {
6354 // MShellRaise(DAS.Gui.Shells.Sh_KeyB);
6355  return er;
6356  }
6357 
6358 }
NDFilterWheelSt NDFWS
ND Filter Wheel.
Definition: DAS_Spat.c:58
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
int Pos
Filter Wheel current Position.
shells Shells
Shells structure.
void DB_NDFilSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for select a specified filter push button with the keyboard
Definition: CreateForms.c:6404
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
char * Fil_Code8H[]
const char array for the realisation of the Filters buttons in the Filter shell
Definition: DAS_Spat.c:204
void MShellUnrealize(MOBJECT obj)
int Pos
Filter Wheel current Position.
void DB_Fil_CB(MOBJECT p, void *od, void *ad)
callback for filter wheel positioning in Filter shell
Definition: CreateForms.c:6120
MOBJECT Fil[6]
Filter Buttons.
#define EM_MOTION
Definition: Mguidefs.h:319
void MShellDestroy(MOBJECT obj)
static int NDFilFlg
Definition: CreateForms.c:53
#define LIS_
Lampedusa Island Spectrometer - ENEA.
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define EM_KEY_PRESS
Definition: Mguidefs.h:316
char * Fil_CodeNG[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG2 and NG3...
Definition: DAS_Spat.c:216
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
#define EM_BUTTON_PRESS
Definition: Mguidefs.h:317
void DB_FilSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for select a specified filter push button with the keyboard
Definition: CreateForms.c:6166
#define HELV_SMALL
Definition: Mguidefs.h:881
#define SF_MODAL
Definition: Mguidefs.h:1019
void(* OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad)
Definition: Mguidefs.h:1456
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
palette DPAL
Definition: CreateForms.c:88
void MObjectAddEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, CARD32 event_mask, void *a_data)
MOBJECT Sh_NDFil
ND Filter Shell.
pushbutt PushButt
Push buttons.
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
void MShellRealizeXY(MOBJECT obj, int x, int y)
#define GASCODNG4
GASCODNG 4.
MOBJECT MCreateShell(const char *title, int flags)
const char * NDFilBuff
Definition: CreateForms.c:54
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
void DB_Close_Sh(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:5511
#define True
Definition: Mguidefs.h:235
MOBJECT NDFil[6]
ND Filter Buttons.
void DB_PushButtonMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
Definition: CreateForms.c:950
char * Fil_CodeTropo[]
const char array for the realisation of the Filters buttons in the Filter shell for TROPOGAS instrume...
Definition: DAS_Spat.c:210
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
void MLoopWhileFlag(int *pflag, int value)
char * NDFil_Code[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
Definition: DAS_Spat.c:219
int EqType
Spectrometer Type.
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
void DB_NDFil_CB(MOBJECT p, void *od, void *ad)
callback for filter wheel positioning in Filter shell
Definition: CreateForms.c:6360
FilterWheelSt FWS
Filter Wheel.
Definition: DAS_Spat.c:57
void DB_SheelESC(MOBJECT obj, MKeyEvent *pe, void *a_data)
Definition: CreateForms.c:5569
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MDCreateSh_SimPos()

int MDCreateSh_SimPos ( void  )

Definition at line 4411 of file CreateForms.c.

References optionini::aaopmode, CENTER_ALIGN, CloseShCB(), palette::DB_BG, palette::DB_BG_Albl, palette::DB_BG_Plbl, palette::DB_FG_Albl, palette::DB_FG_Plbl, palette::DB_UnSel, palette::DB_UnSelFG, das::DOption, paramini::EqType, ExecSimPosCB(), Fil_Code, Fil_Code8H, Fil_CodeNG, Fil_CodeNG1, Fil_CodeTropo, FIXED_SMALL, FWS, GASCODNG1, GASCODNG2, GASCODNG3, GASCODNG4, das::Gui, LIST_ACT::item, lbl, LEFT_ALIGN, mige::linked, LIS_, ListTargetCB(), MButtonSetOnMouseOverForegroundRGB(), MCreateLabel(), MCreateOptionEdit(), MCreatePButton(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MEditDisableEditing(), das::MIGE, pushbutt::Mir, Mir_Code, Mir_CodeTropo, MIS, MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetText(), MObjectSetTransparency(), MObjectSetUnsensitive(), MObjectSetWidth(), MOptionEditGetList(), MOptionEditSetListCallback(), MPButtonSetCallback(), MShellRealize(), MShellSetWMCloseCallback(), MSListAddItem(), MSListGetSelected(), MSListSelectElement(), das::Paramini, FilterWheelSt::Pos, MirrorSt::Pos, ZenithSt::Pos, AzimuthSt::Pos, gui::PushButt, RIGHT_ALIGN, SF_MODAL, shells::Sh_SimPos, gui::Shells, SimPosShClose_CB(), flag::SimShell, SPATRAM2, SPATRAM3, SPATRAMPLUS, FilterWheelSt::target, GratingSt::target, MirrorSt::target, ZenithSt::target, AzimuthSt::target, tb1, TIMES_SMALL, TOP_ALIGN, TROPOGAS, True, wl, pushbutt::Wl, and GratingSt::Wl.

Referenced by DB_KeyB_CB().

4412 {
4413  int i, er = 0, nfilt;
4414  char buf[80];
4415  MOBJECT tb, tb1;
4416  MOBJECT pb;
4417  MOBJECT rowform;
4418 // MOBJECT colform;
4419  MOBJECT lbl;
4420  MOBJECT optedit;
4421  MOBJECT list;
4422 
4423  LIST_ACT * pla;
4424 
4425 
4426  //DAS.Gui.Shells.Sh_SimPos = MCreateShell("SET DESIRED POSITION",SF_SAVEUNDER);
4427  DAS.Gui.Shells.Sh_SimPos = MCreateShell("SET DEVICE POSITION",SF_MODAL);
4430 
4431  rowform = MCreateRowForm(DAS.Gui.Shells.Sh_SimPos);
4432  MObjectSetBackgroundRGB(rowform, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
4433  MObjectSetWidth(rowform, 250);
4434  //MObjectSetResize(rowform, True, True);
4435 
4436  tb = MCreateTableForm(rowform, 2);
4438  MObjectSetResize(tb, True, True);
4439 
4440  /*********************************************/
4441  lbl = MCreateLabel(tb, "Mirror", FIXED_SMALL);
4446  MObjectSetTransparency(lbl, 0);
4447  MObjectSetResize(lbl, True, True);
4448 
4449  optedit = MCreateOptionEdit(tb, "", 8, 8, 4, FIXED_SMALL);
4450  MEditDisableEditing(optedit);
4451  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
4454  list = MOptionEditGetList(optedit);
4455  for (i=0; i < (sizeof DAS.Gui.PushButt.Mir / sizeof DAS.Gui.PushButt.Mir[0]); i++)
4456  {
4458  sprintf(buf, "%s",Mir_CodeTropo[i]);
4459  else
4460  sprintf(buf, "%s",Mir_Code[i]);
4461  MSListAddItem(list, buf, 0L);
4462  }
4463  MSListSelectElement(list, MIS.Pos);
4464  MIS.target = MIS.Pos;
4465  MOptionEditSetListCallback(optedit, ListTargetCB, (void *) 0);
4466  pla = MSListGetSelected(list);
4467  sprintf(buf, "%s",pla->item);
4468  MObjectSetText(optedit, buf);
4469  /*********************************************/
4470 
4471  /*********************************************/
4472  lbl = MCreateLabel(tb, "Grating", FIXED_SMALL);
4477  MObjectSetTransparency(lbl, 0);
4478  MObjectSetResize(lbl, True, True);
4479 
4480  optedit = MCreateOptionEdit(tb, "", 8, 8, 14, FIXED_SMALL);
4481  MEditDisableEditing(optedit);
4482  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
4485  list = MOptionEditGetList(optedit);
4486  for (i=0; i < (sizeof DAS.Gui.PushButt.Wl / sizeof DAS.Gui.PushButt.Wl[0]); i++)
4487  {
4488  //sprintf(buf, "%s",Wl_Code[i]);
4489  itoa(wl[i], buf,10);
4490  MSListAddItem(list, buf, 0L);
4491  }
4492  MSListSelectElement(list, GRS.Wl);
4493  GRS.target = GRS.Wl;
4494  MOptionEditSetListCallback(optedit, ListTargetCB, (void *) 1);
4495  pla = MSListGetSelected(list);
4496  sprintf(buf, "%s",pla->item);
4497  MObjectSetText(optedit, buf);
4498  /*********************************************/
4499 
4500  /*********************************************/
4501  lbl = MCreateLabel(tb, "Filter", FIXED_SMALL);
4506  MObjectSetTransparency(lbl, 0);
4507  MObjectSetResize(lbl, True, True);
4508 
4509  if(DAS.Paramini.EqType == LIS_)
4510  nfilt = 8;
4511  else
4512  nfilt = 6;
4513 
4514  optedit = MCreateOptionEdit(tb, "", 8, 8, nfilt, FIXED_SMALL);
4515  MEditDisableEditing(optedit);
4516  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
4519  list = MOptionEditGetList(optedit);
4520 
4521 
4522 
4523  for (i=0; i < nfilt; i++)
4524  {
4525  if(nfilt==8)
4526  sprintf(buf, "%s",Fil_Code8H[i]);
4527  else
4528  {
4529  if(DAS.Paramini.EqType == TROPOGAS)
4530  sprintf(buf, "%s",Fil_CodeTropo[i]);
4531  else if (DAS.Paramini.EqType == GASCODNG2 ||
4532  DAS.Paramini.EqType == GASCODNG3 ||
4534  sprintf(buf, "%s",Fil_CodeNG[i]);
4535  else if (DAS.Paramini.EqType == GASCODNG1)
4536  sprintf(buf, "%s",Fil_CodeNG1[i]);
4537  else
4538  sprintf(buf, "%s",Fil_Code[i]);
4539  }
4540 
4541 
4542 
4543  MSListAddItem(list, buf, 0L);
4544  }
4545  MSListSelectElement(list, FWS.Pos);
4546  FWS.target = FWS.Pos;
4547  MOptionEditSetListCallback(optedit, ListTargetCB, (void *) 2);
4548  pla = MSListGetSelected(list);
4549  sprintf(buf, "%s",pla->item);
4550  MObjectSetText(optedit, buf);
4551  /*********************************************/
4552 
4553  if(DAS.Paramini.EqType == TROPOGAS ||
4555  DAS.Paramini.EqType == GASCODNG1 ||
4559  DAS.Paramini.EqType == SPATRAM2 ||
4561  {
4562  if (DAS.MIGE.linked)
4563  {
4564  /*********************************************/
4565  lbl = MCreateLabel(tb, "Zenith", FIXED_SMALL);
4570  MObjectSetTransparency(lbl, 0);
4571  MObjectSetResize(lbl, True, True);
4572 
4573  optedit = MCreateOptionEdit(tb, "", 8, 8, 15, FIXED_SMALL);
4574  MEditDisableEditing(optedit);
4575  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
4578  list = MOptionEditGetList(optedit);
4579 // if(DAS.MIGE.type)
4580 // {
4581  for (i=-90; i < 91; i++)
4582  {
4583  sprintf(buf, "%d",i);
4584  MSListAddItem(list, buf, 0L);
4585  }
4586  MSListSelectElement(list, (long) ZST.Pos+90);
4587 // }
4588 /* else
4589  {
4590  for (i=-91; i < 45; i++)
4591  {
4592  sprintf(buf, "%d",i);
4593  MSListAddItem(list, buf, 0L);
4594  }
4595  MSListSelectElement(list, (long) ZST.Pos+91);
4596  }
4597 */
4598  ZST.target = ZST.Pos;
4599  MOptionEditSetListCallback(optedit, ListTargetCB, (void *) 4);
4600  pla = MSListGetSelected(list);
4601  sprintf(buf, "%s",pla->item);
4602  MObjectSetText(optedit, buf);
4603  if(DAS.DOption.aaopmode == 0)
4604  {
4605  MObjectSetUnsensitive(optedit);
4606  MObjectSetBackgroundRGB(optedit, 192, 192, 192);
4607  }
4608  /*********************************************/
4609 
4610  /*********************************************/
4611  lbl = MCreateLabel(tb, "Azimuth", FIXED_SMALL);
4616  MObjectSetTransparency(lbl, 0);
4617  MObjectSetResize(lbl, True, True);
4618 
4619  optedit = MCreateOptionEdit(tb, "", 8, 8, 20, FIXED_SMALL);
4620  MEditDisableEditing(optedit);
4621  MObjectAlign(optedit, RIGHT_ALIGN, TOP_ALIGN);
4624  list = MOptionEditGetList(optedit);
4625 // if(DAS.MIGE.type)
4626 // {
4627  for (i = 0; i < 361; i++)
4628  {
4629  sprintf(buf, "%d",i);
4630  MSListAddItem(list, buf, 0L);
4631  }
4632 
4633  MSListSelectElement(list,(long) (AST.Pos));
4634 /* }
4635  else
4636  {
4637  for (i = 20; i < 306; i++)
4638  {
4639  sprintf(buf, "%d",i);
4640  MSListAddItem(list, buf, 0L);
4641  }
4642 
4643  MSListSelectElement(list,(long) (AST.Pos - 20));
4644 
4645  }
4646 */ AST.target = AST.Pos ;
4647  MOptionEditSetListCallback(optedit, ListTargetCB, (void *) 5);
4648  pla = MSListGetSelected(list);
4649  sprintf(buf, "%s",pla->item);
4650  MObjectSetText(optedit, buf);
4651  if(DAS.DOption.aaopmode == 0)
4652  {
4653  MObjectSetUnsensitive(optedit);
4654  MObjectSetBackgroundRGB(optedit, 192, 192, 192);
4655  }
4656  /*********************************************/
4657  }
4658  }
4659 
4660  tb1 = MCreateTableForm(rowform, 2);
4661  MObjectSetBackgroundRGB(tb1, 91, 74, 74);
4662  MObjectSetResize(tb1, True, True);
4663 
4664  pb = MCreatePButton(tb1, "GO", TIMES_SMALL);
4668  MButtonSetOnMouseOverForegroundRGB(pb, 255, 0, 0);
4669  MObjectSetCompositeWidth(pb, 70);
4671 
4672  pb = MCreatePButton(tb1, "Close", TIMES_SMALL);
4676  MButtonSetOnMouseOverForegroundRGB(pb, 255, 0, 0);
4677  MObjectSetCompositeWidth(pb, 70);
4679 
4680 //
4681 
4684 
4685  FLAG.SimShell = 1;
4686 
4687  return 0;
4688 
4689 }
void MEditDisableEditing(MOBJECT edit)
void CloseShCB(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:4320
flag FLAG
Definition: CreateForms.c:84
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
MOBJECT lbl
Definition: DFileMan.c:42
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
MOBJECT MOptionEditGetList(MOBJECT ce)
optionini DOption
Options for DAS execution.
void ListTargetCB(MOBJECT p, LIST_ACT *la, void *ad)
Definition: CreateForms.c:4371
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
Definition: DAS_Spat.c:231
double target
Azimuth Targrt position.
void MShellRealize(MOBJECT obj)
void MObjectSetUnsensitive(MOBJECT obj)
List Item Activation.
Definition: Mguidefs.h:1179
void MOptionEditSetListCallback(MOBJECT obj, LIST_ACT_CB cb, void *data)
AzimuthSt AST
Definition: CreateForms.c:100
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
void ExecSimPosCB(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:4362
int Pos
Mirror Current Position.
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
int SimShell
= 1 Simultaneous positioning Shell opened
double target
Zenith target position.
void MSListSelectElement(MOBJECT p, long n)
char * item
Definition: Mguidefs.h:1181
int target
Mirror Target position.
ZenithSt ZST
Definition: CreateForms.c:99
char * Fil_Code8H[]
const char array for the realisation of the Filters buttons in the Filter shell
Definition: DAS_Spat.c:204
MOBJECT MCreateOptionEdit(MOBJECT parent, const char *text, int len, int clip_len, int nrow, MTFont font)
#define TIMES_SMALL
Definition: Mguidefs.h:883
void MObjectSetText(MOBJECT obj, const char *text)
int Pos
Filter Wheel current Position.
#define LIS_
Lampedusa Island Spectrometer - ENEA.
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
int Wl
Grating Wavelength.
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
char * Fil_CodeNG[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG2 and NG3...
Definition: DAS_Spat.c:216
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
void MObjectSetWidth(MOBJECT obj, int w)
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
#define FIXED_SMALL
Definition: Mguidefs.h:878
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
#define SF_MODAL
Definition: Mguidefs.h:1019
MOBJECT Wl[18]
Wavelength Buttons.
mige MIGE
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
palette DPAL
Definition: CreateForms.c:88
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
pushbutt PushButt
Push buttons.
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
#define GASCODNG4
GASCODNG 4.
char * Fil_CodeNG1[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG1 instrum...
Definition: DAS_Spat.c:213
MOBJECT MCreateShell(const char *title, int flags)
int linked
#define SPATRAM3
SPATRAM3.
short DB_BG[3]
Default Background Color.
MirrorSt MIS
Mirror.
Definition: DAS_Spat.c:61
MOBJECT Sh_SimPos
Simultaneous Positioning Shell.
char * Fil_Code[]
const char array for the realisation of the Filters buttons in the Filter shell
Definition: DAS_Spat.c:207
void SimPosShClose_CB(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:4351
void MLabelSetAlignment(MOBJECT p, int align)
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
MOBJECT tb1
Definition: DFileMan.c:41
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
int target
Filter target Position.
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
int aaopmode
operation mode for the Alt Az Platform, 0 = solar Traxker; 1 = Anti-Solar Tracker; 2 = Free Positioni...
int MSListAddItem(MOBJECT p, const char *item, void *data)
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
char * Fil_CodeTropo[]
const char array for the realisation of the Filters buttons in the Filter shell for TROPOGAS instrume...
Definition: DAS_Spat.c:210
int EqType
Spectrometer Type.
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
double Pos
Azimuth Current Position.
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
double Pos
Zenith Current Position.
MOBJECT MCreateRowForm(MOBJECT parent)
#define TOP_ALIGN
Definition: Mguidefs.h:918
FilterWheelSt FWS
Filter Wheel.
Definition: DAS_Spat.c:57
long target
Grating target Wl.
GratingSt GRS
Definition: CreateForms.c:82
MOBJECT Mir[4]
Mirror Buttons.
const char * Mir_CodeTropo[]
const char array for the realisation of the Mirrors buttons in the Mirror shell for TROPOGAS ...
Definition: DAS_Spat.c:234
paramini Paramini
structure for the parameters defined in param.ini configuration file
LIST_ACT * MSListGetSelected(MOBJECT p)
+ Here is the caller graph for this function:

§ MDCreateSh_Wl()

int MDCreateSh_Wl ( void  )

Create the shell for the available Wavelength. Procedure that build the shell for the availables wavelength. They are fixed and setted during the testing phase.

Returns
0

Definition at line 5815 of file CreateForms.c.

References DB_Close_Sh(), DB_PushButtonMouse_CB(), DB_SheelESC(), palette::DB_UnSel, palette::DB_UnSelFG, DB_Wl_CB(), DB_WlSelButtKB_CB(), EM_BUTTON_PRESS, EM_KEY_PRESS, EM_MOTION, das::Gui, HELV_SMALL, MButtonSetOnMouseOverForegroundRGB(), MCreatePButton(), MCreateShell(), MCreateTableForm(), MLoopWhileFlag(), MObjectAddEventNotifyCallback(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MPButtonSetCallback(), MShellDestroy(), MShellRealizeXY(), MShellSetWMCloseCallback(), MShellUnrealize(), gui::PushButt, SF_MODAL, shells::Sh_Wl, gui::Shells, True, wl, pushbutt::Wl, GratingSt::Wl, WlBuff, WlFlg, and WS_SHADOW_OUT.

Referenced by DB_KeyB_CB().

5816 {
5817  int i, er = 0;
5818  MOBJECT _tablefrm000;
5819 // MOBJECT _tablefrm001;
5820 // MOBJECT Esc_But;
5821  char buff[16];
5822 
5823  DAS.Gui.Shells.Sh_Wl = MCreateShell("SET WORK WAVELENGTH", SF_MODAL);
5824  MObjectSetForegroundRGB(DAS.Gui.Shells.Sh_Wl, 255, 255, 255);
5825 
5826 /* _tablefrm001 = MCreateTableForm(DAS.Gui.Shells.Sh_Wl, 1);
5827  MObjectSetBackgroundRGB(_tablefrm001, 91, 74, 74);
5828  MObjectSetResize(_tablefrm001, True, True);
5829 
5830  Esc_But = MCreatePButton(_tablefrm001, "ESC-Return", HELV_SMALL);
5831  MObjectSetBackgroundRGB(Esc_But, DPAL.DB_FG_Plbl[0], DPAL.DB_FG_Plbl[1], DPAL.DB_FG_Plbl[2]);
5832  MObjectSetShadow(Esc_But, WS_SHADOW_OUT, 3, 0);
5833  MObjectSetCompositeWidth(Esc_But, 180);
5834  MButtonSetAccelerator(Esc_But, ESC);
5835  MButtonSetOnMouseOverForegroundRGB(Esc_But, 255, 255, 255);
5836  MPButtonSetCallback(Esc_But, DB_Esc_CB, (void *) 1);
5837 */
5838  _tablefrm000 = MCreateTableForm(DAS.Gui.Shells.Sh_Wl, 3);
5839  MObjectSetBackgroundRGB(_tablefrm000, 91, 74, 74);
5840  MObjectSetResize(_tablefrm000, True, True);
5841 
5842  for (i=0; i<(sizeof DAS.Gui.PushButt.Wl / sizeof DAS.Gui.PushButt.Wl[0]); i++)
5843  {
5844  itoa(wl[i],buff,10);
5845  DAS.Gui.PushButt.Wl[i] = MCreatePButton(_tablefrm000, buff, HELV_SMALL);
5846 // DAS.Gui.PushButt.Wl[i] = MCreatePButton(_tablefrm000, Wl_Code[i], HELV_SMALL);
5849  if (i==GRS.Wl)
5850  MObjectSetBackgroundRGB(DAS.Gui.PushButt.Wl[i], 0, 0, 255);
5851 
5853 // MObjectAddEventNotifyCallback(DAS.Gui.PushButt.Wl[i], (OBJ_EVENT_CB) DB_WlSelButtMouse_CB, EM_BUTTON_PRESS, (void *) i);
5855  //if (i > 14 )
5856  //{
5857  // MObjectSetUnsensitive(DAS.Gui.PushButt.Wl[i]);
5858  //}
5861  MPButtonSetCallback(DAS.Gui.PushButt.Wl[i], DB_Wl_CB, (void *) i);
5862 // MButtonSetOnMouseOverForegroundRGB(DAS.Gui.PushButt.Wl[i], ~DPAL.DB_UnSelFG[0], ~DPAL.DB_UnSelFG[1], ~DPAL.DB_UnSelFG[2]);
5864  }
5865 
5868 
5870 
5871  WlFlg = 0;
5872  MLoopWhileFlag(&WlFlg, 0);
5873  if(WlBuff == "0")
5874  {
5875  WlFlg = 1;
5878 // MShellRaise(DAS.Gui.Shells.Sh_KeyB);
5879  return er;
5880  }
5881  else
5882  {
5885 // MShellRaise(DAS.Gui.Shells.Sh_KeyB);
5886  return er;
5887  }
5888 
5889 }
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
shells Shells
Shells structure.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
MOBJECT Sh_Wl
Wavelength Shell.
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
void MShellUnrealize(MOBJECT obj)
#define EM_MOTION
Definition: Mguidefs.h:319
void MShellDestroy(MOBJECT obj)
void DB_Wl_CB(MOBJECT p, void *od, void *ad)
callback for grating positioning in Wavelength shell
Definition: CreateForms.c:5891
void DB_WlSelButtKB_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
callback for selsct a specified wavelength push button with the keyboard
Definition: CreateForms.c:5927
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
int Wl
Grating Wavelength.
#define EM_KEY_PRESS
Definition: Mguidefs.h:316
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define EM_BUTTON_PRESS
Definition: Mguidefs.h:317
#define HELV_SMALL
Definition: Mguidefs.h:881
#define SF_MODAL
Definition: Mguidefs.h:1019
MOBJECT Wl[18]
Wavelength Buttons.
void(* OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad)
Definition: Mguidefs.h:1456
char * WlBuff
Definition: CreateForms.c:45
palette DPAL
Definition: CreateForms.c:88
void MObjectAddEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, CARD32 event_mask, void *a_data)
pushbutt PushButt
Push buttons.
void MShellRealizeXY(MOBJECT obj, int x, int y)
static int WlFlg
Definition: CreateForms.c:44
MOBJECT MCreateShell(const char *title, int flags)
int wl[]
WaveLength definition - for SD_Grating.
Definition: DAS_Spat.c:182
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
void DB_Close_Sh(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:5511
#define True
Definition: Mguidefs.h:235
void DB_PushButtonMouse_CB(MOBJECT obj, MMouseEvent *pe, void *a_data)
Definition: CreateForms.c:950
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
void MLoopWhileFlag(int *pflag, int value)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
void DB_SheelESC(MOBJECT obj, MKeyEvent *pe, void *a_data)
Definition: CreateForms.c:5569
GratingSt GRS
Definition: CreateForms.c:82
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ MIGEAz()

float MIGEAz ( float  p)

Definition at line 3475 of file CreateForms.c.

References paramini::EqType, GASCODNG2, das::MIGE, p, das::Paramini, S_azim, TROPOGAS, and mige::type.

Referenced by ActMvAzimDegCB(), MIGEActualZenAz(), SD_Azimuth(), SD_PosAADev(), and SD_Position().

3476 {
3477 
3478  float MAZMax; //MIGE Azimut MAX
3479  float MAZMin; //MIGE Azimut Min
3480  float SAA, az;
3481  char str[80];
3482 
3483  if( (DAS.MIGE.type == 1 & DAS.Paramini.EqType == GASCODNG2) )
3484  {
3485  MAZMax = 120.0; //MIGE Azimut MAX - Silver Model
3486  MAZMin = -60.0; //MIGE Azimut Min - Silver Model
3487  }
3488  else if (DAS.MIGE.type == 1 & DAS.Paramini.EqType == TROPOGAS)
3489  {
3490  MAZMax = 160.0; //MIGE Azimut MAX - Silver Model
3491  MAZMin = -20.0; //MIGE Azimut Min - Silver Model
3492  }
3493  else if (DAS.MIGE.type == 1)
3494  {
3495  MAZMax = 60.0; //MIGE Azimut MAX - Black Prototype Model
3496  MAZMin = -120.0; //MIGE Azimut Min - Black Prototype Model
3497  }
3498  if (DAS.MIGE.type == 2)
3499  {
3500  MAZMax = 90.0; //MIGE Azimut MAX - COM Model (slip ring)
3501  MAZMin = -90.0; //MIGE Azimut Min - COM Model (slip Ring)
3502 
3503 
3504  }
3505  //Need condition for the latitude?
3506  // Inside Tropics
3507 
3508  //sun Azimuth angle
3509  sprintf(str, "%.01lf", S_azim);
3510  SAA = p;
3511 
3512 
3513  if (SAA >= 0 && SAA <= MAZMax)
3514  {
3515  az = SAA;
3516  }
3517  if (SAA > MAZMax && SAA <= (MAZMax + 180))
3518  {
3519  az = SAA - 180;
3520  }
3521  if (SAA > (MAZMax+180) && SAA < 360)
3522  {
3523  az = SAA - 360;
3524  }
3525 
3526  return az;
3527 }
double S_azim
O: Solar azimuth angle: N=0, E=90, S=180, W=270.
Definition: SOLPOS.C:45
int type
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
mige MIGE
static double p
Definition: SOLPOS.C:131
das DAS
Definition: CreateForms.c:98
int EqType
Spectrometer Type.
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the caller graph for this function:

§ MIGEZen()

float MIGEZen ( float  p)

Definition at line 3419 of file CreateForms.c.

References paramini::EqType, GASCODNG2, das::MIGE, p, das::Paramini, AzimuthSt::realazpos, TROPOGAS, and mige::type.

Referenced by MIGEActualZenAz(), SD_PosAADev(), SD_Position(), and SD_Zenith().

3420 {
3421  float MAZMax; //MIGE Azimut MAX
3422  float MAZMin; //MIGE Azimut Min
3423  float SAA, az;
3424  char str[80];
3425 
3426 
3427  if (DAS.MIGE.type == 1 & DAS.Paramini.EqType == GASCODNG2)
3428  {
3429  MAZMax = 120.0; //MIGE Azimut MAX - Silver Model
3430  MAZMin = -60.0; //MIGE Azimut Min - Silver Model
3431  }
3432  else if (DAS.MIGE.type == 1 & DAS.Paramini.EqType == TROPOGAS)
3433  {
3434  MAZMax = 160.0; //MIGE Azimut MAX - Silver Model
3435  MAZMin = -20.0; //MIGE Azimut Min - Silver Model
3436  }
3437  else if (DAS.MIGE.type == 1)
3438  {
3439  MAZMax = 60.0; //MIGE Azimut MAX - Black Prototype Model
3440  MAZMin = -120.0; //MIGE Azimut Min - Black Prototype Model
3441  }
3442  if (DAS.MIGE.type == 2)
3443  {
3444  MAZMax = 90.0; //MIGE Azimut MAX - COM Model (slip ring)
3445  MAZMin = -90.0; //MIGE Azimut Min - COM Model (slip Ring)
3446  }
3447  //Need condition for the latitude?
3448  // Inside Tropics
3449 
3450  //sun Azimuth angle
3451  sprintf(str, "%.01lf", AST.realazpos);
3452  SAA = (float)atof(str);
3453 
3454 
3455  if (SAA >= 0 && SAA <= MAZMax)
3456  {
3457  p = p;
3458  }
3459  if (SAA > MAZMax && SAA <= (MAZMax + 180))
3460  {
3461  //p = -p;
3462  p= 180 - p;
3463  }
3464  if (SAA > (MAZMax + 180) && SAA < 360)
3465  {
3466  p = p;
3467  }
3468 
3469  return p;
3470 
3471 }
double realazpos
AzimuthSt AST
Definition: CreateForms.c:100
int type
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
mige MIGE
static double p
Definition: SOLPOS.C:131
das DAS
Definition: CreateForms.c:98
int EqType
Spectrometer Type.
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the caller graph for this function:

§ MIGEZenAzPos_CB()

void MIGEZenAzPos_CB ( MOBJECT  o,
void *  a,
void *  v 
)

Definition at line 3554 of file CreateForms.c.

References mige::edtaz, mige::edtzen, GratFlg, das::MIGE, MObjectGetText(), and SD_Position().

Referenced by MDCreateMoveZenAzimDeg().

3555 {
3556 
3557  int er = 0;
3558  int c = (int) v;
3559  char buf[32];
3560  float z, az;
3561 
3562  MObjectGetText(DAS.MIGE.edtzen, buf);
3563  z = (float) atof(buf);
3564  MObjectGetText(DAS.MIGE.edtaz, buf);
3565  az = (float) atof(buf);
3566 
3567  SD_Position(-1, -1, -1, z, az);
3568 
3569  GratFlg = 1;
3570 
3571 }
char * MObjectGetText(MOBJECT obj, char *text)
MOBJECT edtaz
mige MIGE
das DAS
Definition: CreateForms.c:98
int SD_Position(int m, int w, int f, double z, double a)
perform the simoultaneous positioning of the Spectrometer Devices m = mirror w = wavelength (Grating)...
Definition: Spat_Device.c:1243
static int GratFlg
Definition: CreateForms.c:60
MOBJECT edtzen
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ PopUpAdvCal_CB()

void PopUpAdvCal_CB ( MOBJECT  obj,
void *  item,
void *  data 
)

Definition at line 1110 of file CreateForms.c.

References MMessageDialog().

Referenced by MDCreate_CP().

1111 {
1112  int c = (int) data;
1113 // char buf[16];
1114 
1115  MMessageDialog("DAS Inf", "Procedure not implemented yet!!!", "OK", NULL);
1116 
1117 }
unsigned int data[576]
Conversion data buffer 64 samples * 8 channels * 2 bytes.
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ PupAdvCal_CB()

void PupAdvCal_CB ( MOBJECT  obj,
MEvent pe,
void *  pdown 
)

Definition at line 1126 of file CreateForms.c.

References MMouseEvent::button, MEvent::mouse, MPopupMenu(), MMouseEvent::x_root, and MMouseEvent::y_root.

Referenced by MDCreate_CP().

1127 {
1128 
1129 // char buf[16];
1130 
1131  if (pe->mouse.button == Button3)
1132 
1133  MPopupMenu ((MOBJECT) pdown, pe->mouse.x_root, pe->mouse.y_root);
1134 
1135 }
int y_root
Definition: Mguidefs.h:618
MMouseEvent mouse
Definition: Mguidefs.h:832
unsigned int button
button pressed/released (Button1, Button2 or Button3), 0 if no button involved
Definition: Mguidefs.h:622
void MPopupMenu(MOBJECT pm, int x, int y)
void * MOBJECT
Definition: Mguidefs.h:192
int x_root
coordinates relative to root
Definition: Mguidefs.h:618
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ShutCB()

void ShutCB ( MOBJECT  p,
void *  od,
void *  ad 
)

Definition at line 6740 of file CreateForms.c.

References AMS2, AMS_PWM(), config::CamAdd, CCD_Error(), CELSIUS, CloseShCB(), DXL_par::com, DB_WriteMode(), DC_Close(), DC_Cooler(), DC_ErrorMessage(), DC_SetTemp(), DC_Status(), delay(), bil::DFILEM, dscb, dscFree(), dscFreeBoard(), paramini::EqType, FANFlg, FANPeltier(), GASCODNG1, GASCODNG2, GASCODNG3, GASCODNG4, HGFlg, HgLamp(), HiresPS(), d_fileman::HOMEDIRECTORY, LISTEMP_TASK_TIME, MGUITerm(), das::Nova, NOVA7892, NOVA945GSE, NOVA_Out(), das::Paramini, PeltFlg, Peltier(), PeltierPS(), QJFlg, QjLamp(), sdsh, ShutterOpening(), SioDone(), SPATRAM2, SPATRAM3, SPATRAMPLUS, Status(), TROPOGAS, nova::type, and WDT_func().

Referenced by ShutDOWN().

6741 {
6742  int c = (int) ad;
6743  int er = 0;
6744  char buf[128];
6745  int PowerOn, PowerOff;
6746 
6747  _chdir( BIL.DFILEM.HOMEDIRECTORY);
6748 
6749 
6750 // char buf[80];
6751 
6752 /* FILE *fs;
6753  fs = fopen("Status.log", "w");
6754  fprintf(fs, "%d\n", CoolPw);
6755  fprintf(fs, "%.1lf\n", Temp);
6756  fclose(fs);
6757 */
6758  switch(c)
6759  {
6760  case 0:
6761  //CCD Shutting Down Cooler On
6762  er = DC_Status(Cfg.CamAdd);
6763  if (er)
6764  {
6765  sprintf(buf,DC_ErrorMessage(er));
6766  CCD_Error(buf);
6767  CloseShCB(sdsh, 0, (void *) c);
6768  }
6769  else
6770  {
6771  DC_SetTemp(25.0, CELSIUS, 0);
6772  Status("CCD Shuting Down - Cooler On ");
6773  CloseShCB(sdsh, 0, (void *) c);
6774  }
6775  break;
6776  case 1:
6777  //CCD Shutting Down (cooler Off)
6778  DC_SetTemp(25.0, CELSIUS, 0);
6779  Status("CCD Shuting Down - Cooler Off");
6780  CloseShCB(sdsh, 0, ad);
6781  break;
6782  case 2:
6783  //NO CCD Shutting Down (cooler On)
6784  DB_WriteMode(1);
6785  ShutterOpening(1);
6786  DC_Close(0); //DA RIMETTERE!!!!!!!!!!!!!!!!!1
6787  if (HGFlg)
6788  HgLamp(0);//HG Off
6789  if (QJFlg)
6790  QjLamp(0);//QJ Off
6791  CloseShCB(sdsh, 0, ad);
6792  WDT_func(0); //Stop WDT
6793  MGUITerm();
6794  SioDone(DXL.com);//Close Com connection
6795  exit(0);
6796 
6797  break;
6798 
6799  case 3:
6800  ShutterOpening(1);
6801  // All Off
6802  DB_WriteMode(0);//Write 0 on the Paramini.Log
6803  dscFreeBoard(dscb);//Free resources from PC104 board
6804  dscFree();//Free resources from PC104 board
6805  PowerOn = 1;
6806  PowerOff = LISTEMP_TASK_TIME ;
6807  AMS_PWM(AMS2, PowerOn, PowerOff);//Peltier Power a 0
6808 // DTxStr(AMS2, "7", 1);//PWM off
6809 // er = DRxStr(AMS2, buf, &d, 50);
6810  //Rele'
6811  if(PeltFlg)
6812  Peltier(0); //Peltier Off
6813  if (HGFlg)
6814  HgLamp(0);//HG Off
6815  if (QJFlg)
6816  QjLamp(0);//QJ Off
6817  if (FANFlg)
6818  FANPeltier(0);//FAN Off
6819 
6820 
6821  DC_Cooler(0,0); //Camera cooler OFF
6822  DC_Close(0); // Close Camera Communication DA RIMETTERE!!!!!!!!!!!!!!!!!1
6823 
6824  //Switch OFF the Power supplyes (put to 0 the NOVA Dig Output - For GASCODNG2 and GASCODNG3)
6825  if (DAS.Paramini.EqType == GASCODNG1 ||
6829  DAS.Paramini.EqType == SPATRAM2 ||
6830  DAS.Paramini.EqType == SPATRAM3 ||
6832  {
6833 
6834 
6835  /****************************************************
6836  nb = 1; //24 V
6837  er = ChkDigIO(DAS.Nova.DigOut, nb);
6838  if (er == 1)
6839  DAS.Nova.DigOut &= ~((unsigned char) pow(2,(double)(nb)));
6840  else if (er == 0)
6841  DAS.Nova.DigOut |= (unsigned char) pow(2,(double)(nb));
6842 
6843  er = NOVA_Out(DAS.Nova.type, DAS.Nova.DigOut);
6844  delay(500);
6845  /*****************************************************/
6846 
6847  /****************************************************
6848  nb = 2; //12 V and Hires
6849  er = ChkDigIO(DAS.Nova.DigOut, nb);
6850  if (er == 1)
6851  DAS.Nova.DigOut &= ~((unsigned char) pow(2,(double)(nb)));
6852  else if (er == 0)
6853  DAS.Nova.DigOut |= (unsigned char) pow(2,(double)(nb));
6854 
6855  er = NOVA_Out(DAS.Nova.type, DAS.Nova.DigOut);
6856  delay(500);
6857  /*****************************************************/
6858  if (DAS.Nova.type == NOVA7892)
6859  {
6860  er = NOVA_Out(DAS.Nova.type, 0);
6861  }
6862  if (DAS.Nova.type == NOVA945GSE)
6863  {
6864  //switch off all
6865  er = NOVA_Out(DAS.Nova.type, 15);
6866  }
6867 
6868 
6869 
6870  //ExtShutt(0); //Close the external shutter (Not used)
6871 
6872  }
6873  //Switch OFF the Hires and disconnect the 24V Power supplyes
6874  if (DAS.Paramini.EqType == TROPOGAS )
6875  {
6876  HiresPS(0);
6877 
6878  Status ("Waiting 50ms.");
6879  delay(50);
6880 
6881 
6882  PeltierPS(0);
6883  Status ("Waiting 50ms.");
6884  delay(50);
6885 
6886 
6887  }
6888 
6889  WDT_func(0); //Stop WDT
6890  CloseShCB(sdsh, 0, ad);
6891  MGUITerm();
6892  SioDone(DXL.com);//Close Com connection
6893  exit(0);
6894  break;
6895  case 4:
6896  CloseShCB(sdsh, 0, ad);
6897  break;
6898 
6899  }
6900 }
void CloseShCB(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:4320
void FANPeltier(int mod)
FAN ON/OFF .
Definition: Spat_Device.c:2652
void HgLamp(int mod)
HG Lamp ON/OFF .
Definition: Spat_Device.c:2673
#define AMS2
AMS2 address.
MOBJECT sdsh
Definition: CreateForms.c:6734
DXL_par DXL
Definition: CreateForms.c:78
bil BIL
Definition: CreateForms.c:83
int QJFlg
Definition: DAS_Spatram.h:2969
void WDT_func(int mod)
Definition: DAS_Spat.c:1572
char HOMEDIRECTORY[_MAX_PATH]
Definition: bildef.h:200
#define NOVA945GSE
NOVA945GSE (SPATRAM2, GASCODNG1, GASCODNG4)
U32 CamAdd
(R/W) Intrinsic camera address
Definition: dcldef.h:1069
void AMS_PWM(int id, int on, int off)
set the on/off time on the PWM set the on/off time on the PWM.
Definition: Dxl.c:492
void PeltierPS(int mod)
Peltier Power Supply ON/OFF .
Definition: Spat_Device.c:2551
void Peltier(int mod)
Peltier ON/OFF .
Definition: Spat_Device.c:2597
NoMangle int DLL_IMPORT_EXPORT SioDone(int)
void QjLamp(int mod)
QJ Lamp ON/OFF .
Definition: Spat_Device.c:2724
CTYPE const char *PROC_CALL DC_ErrorMessage(int ErrorCode)
Convert an error code into an error message (string). DC_Status returns an error code of the previous...
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
int PeltFlg
Definition: DAS_Spatram.h:2971
CTYPE void DLL DC_SetTemp(double TargetTemperature, int Scale, int Camera)
Procedure that turns the camera cooler on and allows you to set an operative temperature of the CCD...
CTYPE void DLL DC_Close(int Camera)
Shuts down the control operations of the camera. Procedure that shuts down the control operations of ...
d_fileman DFILEM
Definition: bildef.h:257
void MGUITerm(void)
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
void Status(char *tit)
Writes information&#39;s on the Status label .
Definition: Load.c:1556
int NOVA_Out(int novatype, unsigned int out)
Write the NOVA Output port.
Definition: DAS_Spat.c:1375
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
Definition: Dxl.c:1113
#define LISTEMP_TASK_TIME
spectrometer termoregulation
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
void HiresPS(int mod)
Hires Power Supply ON/OFF .
Definition: Spat_Device.c:2532
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
#define GASCODNG4
GASCODNG 4.
#define SPATRAM3
SPATRAM3.
CTYPE int DLL DC_Status(int Camera)
Return the status of the last operations performed on the camera. This procedure allows you to check ...
nova Nova
NOVA structure.
#define CELSIUS
Return CCD temperature in Celsius.
Definition: dcldef.h:449
BYTE DSCUDAPICALL dscFreeBoard(DSCB board)
das DAS
Definition: CreateForms.c:98
void DB_WriteMode(int mod)
Definition: CreateForms.c:6722
CTYPE void DLL DC_Cooler(int Mode, int Camera)
Procedure that allows you to control the cooler manually. Procedure that allows you to control the co...
void CCD_Error(char *str)
Alerts for CCD errors Creates a message window reporting the number of the error. ...
Definition: Errors.c:279
int EqType
Spectrometer Type.
DSCB dscb
Definition: DAS_Spat.c:67
int HGFlg
Definition: DAS_Spatram.h:2968
#define NOVA7892
NOVA7892 monoboard (old)
int com
Comunication port.
Definition: DXL.H:17
int type
type of NOVA monoboard used (7892 or 945GSE)
BYTE DSCUDAPICALL dscFree(void)
void ShutterOpening(int mod)
Definition: Procedures.c:1685
int FANFlg
Definition: DAS_Spatram.h:2970
config Cfg
Definition: CreateForms.c:77
paramini Paramini
structure for the parameters defined in param.ini configuration file
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ ShutDOWN()

void ShutDOWN ( void  )

Creates shell for Shutting down the instrument
.

Definition at line 6903 of file CreateForms.c.

References CloseShCB(), palette::DB_BG, palette::DB_BG_Plbl, palette::DB_FG_Plbl, palette::DB_UnSel, palette::DB_UnSelFG, DBDEMO, ESC, flag::exemode, F1, F2, F3, F4, das::Flag, HELV_MEDIUM, HELV_SMALL, lbl, MButtonSetAccelerator(), MButtonSetOnMouseOverForegroundRGB(), MCreateLabel(), MCreatePButton(), MCreateRowForm(), MCreateShell(), MCreateTableForm(), MObjectSetBackgroundRGB(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MObjectSetUnsensitive(), MPButtonSetCallback(), MShellRealize(), MShellRealizeXY(), MShellSetWMCloseCallback(), OFFLINEPLOT, sdsh, SF_MODAL, ShutCB(), True, WS_NONE, and WS_SHADOW_OUT.

Referenced by DB_KeyB_CB().

6904 {
6905 
6906  MOBJECT lbl, pb[4], a, b;
6907 
6908 
6909  const char *ShDwn_Code[] = {{"F1 - CCD ShutDown, Cooler On"},
6910  {"F2 - CCD ShutDown, Cooler Off"},
6911  {"F3 - No CCD ShutDown, Cooler On"},
6912  {"F4- No CCD ShutDown, Cooler Off"},
6913  {"ESC-Cancel"}};
6914 
6915  int ShDwn_StK[] = {F1,F2,F3,F4,ESC}, i;
6916 
6917 
6918  if(DAS.Flag.exemode == OFFLINEPLOT)
6919  {
6920  sdsh = MCreateShell("DAS CLOSE ", SF_MODAL);
6922 
6923  a = MCreateRowForm(sdsh);
6924 
6925  lbl = MCreateLabel(a, "Exit Program ?", HELV_MEDIUM);
6928  MObjectSetTransparency(lbl, 0);
6929 
6930  b = MCreateTableForm(sdsh, 1);
6932  MObjectSetShadow(b, WS_NONE, 0, 0);
6933  MObjectSetResize(b, True, True);
6934 
6935  pb[0] = MCreatePButton(b, "Yes - F1", HELV_SMALL);
6937  MObjectSetCompositeWidth(pb[0], 100);
6938  MObjectSetShadow(pb[0], WS_SHADOW_OUT, 3, 0);
6939  MButtonSetOnMouseOverForegroundRGB(pb[0], 255, 255, 255);
6940  MButtonSetAccelerator(pb[0], ShDwn_StK[0]);
6941  MPButtonSetCallback(pb[0], ShutCB, (void *) 2);
6942 
6943  pb[1] = MCreatePButton(b, "No - F2", HELV_SMALL);
6945  MObjectSetCompositeWidth(pb[1], 100);
6946  MObjectSetShadow(pb[1], WS_SHADOW_OUT, 3, 0);
6947  MButtonSetOnMouseOverForegroundRGB(pb[1], 255, 255, 255);
6948  MButtonSetAccelerator(pb[1], ShDwn_StK[1]);
6949  MPButtonSetCallback(pb[1], ShutCB, (void *) 4);
6950 
6952  MShellRealizeXY(sdsh, 0, 0);
6953  //MObjectSetPosition(sdsh, 500, 0);
6954 
6955  }
6956  else
6957  {
6958  sdsh = MCreateShell("EXIT AND/OR SHUTDOWN", SF_MODAL);
6960 
6961  //
6962 
6963  a = MCreateRowForm(sdsh);
6965 
6966  lbl = MCreateLabel(a, "Choose the exit mode", HELV_MEDIUM);
6969  MObjectSetTransparency(lbl, 0);
6970 
6971 
6972  b = MCreateTableForm(sdsh, 1);
6974  MObjectSetShadow(b, WS_NONE, 0, 0);
6975  MObjectSetResize(b, True, True);
6976 
6977  for (i=0; i<5; i++)
6978  {
6979  pb[i] = MCreatePButton(b, ShDwn_Code[i], HELV_SMALL);
6980 
6983  MObjectSetCompositeWidth(pb[i], 300);
6984  MObjectSetShadow(pb[i], WS_SHADOW_OUT, 3, 0);
6986  MButtonSetAccelerator(pb[i], ShDwn_StK[i]);
6987  MPButtonSetCallback(pb[i], ShutCB, (void *) i);
6988  if (DAS.Flag.exemode == DBDEMO )
6989  if(i==0 || i==1 || i==3 )
6990  MObjectSetUnsensitive(pb[i]);
6991  else if(i==2)
6992  MObjectSetText(pb[i],"Exit Program");
6993 
6994  }
6995 
6996 
6997 
6998 
6999 
7001 // MShellRealizeXY(sdsh, 0,0);
7003  }
7004 }
void CloseShCB(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:4320
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
#define WS_NONE
Definition: Mguidefs.h:956
MOBJECT lbl
Definition: DFileMan.c:42
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MShellRealize(MOBJECT obj)
#define ESC
Definition: KEYCODES.H:265
void MObjectSetUnsensitive(MOBJECT obj)
MOBJECT sdsh
Definition: CreateForms.c:6734
#define F3
Definition: KEYCODES.H:339
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
flag Flag
Structure for different flags.
#define F2
Definition: KEYCODES.H:338
#define DBDEMO
execution in demo mode
#define F4
Definition: KEYCODES.H:340
void MObjectSetText(MOBJECT obj, const char *text)
void MButtonSetAccelerator(MOBJECT button, int key)
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define OFFLINEPLOT
execution for archived data visualisation
#define HELV_SMALL
Definition: Mguidefs.h:881
#define SF_MODAL
Definition: Mguidefs.h:1019
palette DPAL
Definition: CreateForms.c:88
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
void MShellRealizeXY(MOBJECT obj, int x, int y)
MOBJECT MCreateShell(const char *title, int flags)
short DB_BG[3]
Default Background Color.
das DAS
Definition: CreateForms.c:98
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
short DB_UnSelFG[3]
Unselected Buttons Colors.
short DB_UnSel[3]
Unselected Buttons Colors.
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
void MButtonSetOnMouseOverForegroundRGB(MOBJECT button, int r, int g, int b)
#define HELV_MEDIUM
Definition: Mguidefs.h:882
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
void ShutCB(MOBJECT p, void *od, void *ad)
Definition: CreateForms.c:6740
MOBJECT MCreateRowForm(MOBJECT parent)
int exemode
Set the Execution MODE (Execution modes)
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
#define F1
Definition: KEYCODES.H:337
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ SimPosShClose_CB()

void SimPosShClose_CB ( MOBJECT  p,
void *  od,
void *  ad 
)

Definition at line 4351 of file CreateForms.c.

References MShellDestroy(), MShellUnrealize(), and flag::SimShell.

Referenced by MDCreateSh_SimPos().

4352 {
4353 
4354  MOBJECT c = (MOBJECT) ad;
4355 
4356  FLAG.SimShell = 0;
4357  MShellUnrealize(c);
4358  MShellDestroy(c);
4359 }
flag FLAG
Definition: CreateForms.c:84
int SimShell
= 1 Simultaneous positioning Shell opened
void MShellUnrealize(MOBJECT obj)
void MShellDestroy(MOBJECT obj)
void * MOBJECT
Definition: Mguidefs.h:192
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ StepperPagForm()

void StepperPagForm ( int  p,
int  q 
)

Definition at line 259 of file CreateForms.c.

References gui::ContrPanel, palette::DB_BG, palette::DB_BG_Albl, palette::DB_BG_Plbl, palette::DB_FG_Albl, palette::DB_FG_Plbl, F_ATT_NONE, False, FIXED_SMALL, controlpanel::frm_tbSM, das::Gui, HELV_SMALL, lbl, LEFT_ALIGN, MBottomAttach(), MCreateLabel(), MCreateTableForm(), MLabelSetAlignment(), MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetBGColorFromParent(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetText(), MObjectSetTransparency(), MPagedFormSetActivePage(), p, controlpanel::Pagedfrm_SM, controlpanel::power, RIGHT_ALIGN, controlpanel::slope, controlpanel::speed, controlpanel::step, TOP_ALIGN, True, UNDEF_ALIGN, WS_SHADOW_IN, and WS_SHADOW_OUT.

Referenced by MDCreate_CP().

260 {
261 
262 
263  char buf[64];
264  int snum;
265  MOBJECT lbl;
266 
267  snum = 2 * p + q; //Stepper Number
268 
270  sprintf(buf,"SM%d",snum+1);
273 
274 
278  MObjectSetTransparency(lbl, 0);
279  MObjectSetShadow(lbl, WS_SHADOW_OUT, 1, 0);
280 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
281 
282  switch (snum)
283  {
284  case 0:
285  sprintf(buf, "Stepper Motor 1 - MIRROR ");
286  break;
287  case 1:
288  sprintf(buf, "Stepper Motor 2 - GRATING");
289  break;
290  case 2:
291  sprintf(buf, "Stepper Motor 3 - FILTER ");
292  break;
293  case 3:
294  sprintf(buf, "Stepper Motor 4 - NOT Con.");
295  break;
296  case 4:
297  sprintf(buf, "Stepper Motor 5 - ZENITH ");
298  break;
299  case 5:
300  sprintf(buf, "Stepper Motor 6 - AZIMUTH");
301  break;
302  }
303 
304  MObjectSetText(lbl,buf);
305 
313 
314  lbl = MCreateLabel(DAS.Gui.ContrPanel.frm_tbSM[p][q], "Power:", FIXED_SMALL);
317  MObjectSetTransparency(lbl, 0);
320  MObjectSetResize(lbl, True, True);
321 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
322 
330 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.power[p][q], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
331 
332  lbl = MCreateLabel(DAS.Gui.ContrPanel.frm_tbSM[p][q], "Step:", FIXED_SMALL);
335  MObjectSetTransparency(lbl, 0);
338  MObjectSetResize(lbl, True, True);
339 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
340 
348 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.step[p][q], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
349 
350  lbl = MCreateLabel(DAS.Gui.ContrPanel.frm_tbSM[p][q], "Slope:", FIXED_SMALL);
353  MObjectSetTransparency(lbl, 0);
356  MObjectSetResize(lbl, True, True);
357 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
358 
366 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.slope[p][q], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
367 
368 
369  lbl = MCreateLabel(DAS.Gui.ContrPanel.frm_tbSM[p][q], "Speed:", FIXED_SMALL);
372  MObjectSetTransparency(lbl, 0);
375  MObjectSetResize(lbl, True, True);
376 // MObjectAddEventNotifyCallback(lbl, (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 1);
377 
385 // MObjectAddEventNotifyCallback(DAS.Gui.ContrPanel.speed[p][q], (OBJ_EVENT_CB) DB_Redraw_CB, EM_MOTION , (void *) 2);
386 
387 
388 
389 }
#define RIGHT_ALIGN
Definition: Mguidefs.h:916
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
MOBJECT lbl
Definition: DFileMan.c:42
#define WS_SHADOW_IN
Definition: Mguidefs.h:958
MOBJECT speed[AMSMAX][2]
Active Control Panel Labels for Stepper Motors "speed".
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
void MBottomAttach(MOBJECT child, int att_type, int off, MOBJECT obj)
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
#define False
Definition: Mguidefs.h:236
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
MOBJECT step[AMSMAX][2]
Active Control Panel Labels for Stepper Motors "step".
#define UNDEF_ALIGN
Definition: Mguidefs.h:920
void MObjectSetText(MOBJECT obj, const char *text)
MOBJECT slope[AMSMAX][2]
Active Control Panel Labels for Stepper Motors "Slope".
MOBJECT MCreateTableForm(MOBJECT parent, int n_cols)
#define HELV_SMALL
Definition: Mguidefs.h:881
#define FIXED_SMALL
Definition: Mguidefs.h:878
short DB_FG_Albl[3]
Foreground ACTIVE Label Colors.
palette DPAL
Definition: CreateForms.c:88
short DB_BG_Plbl[3]
Background PASSIVE Label Colors.
short DB_BG[3]
Default Background Color.
static double p
Definition: SOLPOS.C:131
void MLabelSetAlignment(MOBJECT p, int align)
controlpanel ContrPanel
Control Panel Structure.
void MPagedFormSetActivePage(MOBJECT form, int page)
das DAS
Definition: CreateForms.c:98
MOBJECT frm_tbSM[AMSMAX][2]
tab for Stepper Motors
void * MOBJECT
Definition: Mguidefs.h:192
#define True
Definition: Mguidefs.h:235
#define LEFT_ALIGN
Definition: Mguidefs.h:915
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
MOBJECT Pagedfrm_SM
Pged form for Stepper Motors.
MOBJECT power[AMSMAX][2]
active Control Panel Labels for Stepper Motors "power"
#define TOP_ALIGN
Definition: Mguidefs.h:918
#define F_ATT_NONE
Definition: Mguidefs.h:1106
void MObjectSetBGColorFromParent(MOBJECT obj, int true_false, int percentage)
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

§ alfont

MTFont alfont

Definition at line 95 of file CreateForms.c.

§ AskBuff

char* AskBuff

Definition at line 5369 of file CreateForms.c.

Referenced by DB_Ask(), DB_Ask_SheelESC(), and DB_AskCB().

§ AskFlg

int AskFlg =0
static

Definition at line 5370 of file CreateForms.c.

Referenced by DB_Ask(), DB_Ask_SheelESC(), DB_AskCB(), and DB_CloseAsk().

§ AST

AzimuthSt AST

Definition at line 100 of file CreateForms.c.

§ BIL

bil BIL

Definition at line 83 of file CreateForms.c.

§ Cfg

config Cfg

Definition at line 77 of file CreateForms.c.

§ Com

int Com

§ CP_Sh

MOBJECT CP_Sh

Definition at line 85 of file CreateForms.c.

Referenced by DB_ColorAssign(), and MDCreate_CP().

§ DAS

das DAS

Definition at line 98 of file CreateForms.c.

§ DC_CCD

ccd DC_CCD

Definition at line 75 of file CreateForms.c.

§ DC_HP

ptf DC_HP

Definition at line 76 of file CreateForms.c.

§ DefPWD_OK

int DefPWD_OK = 0

Definition at line 2597 of file CreateForms.c.

§ DGEO

d_geo DGEO

Definition at line 92 of file CreateForms.c.

§ DIL

dil DIL

Definition at line 87 of file CreateForms.c.

§ DPAL

palette DPAL

Definition at line 88 of file CreateForms.c.

§ DPWD

dpwd DPWD

Definition at line 79 of file CreateForms.c.

Referenced by ActPWDSysCB(), CloseConfigCB(), and MDCreateSh_PWD().

§ dscb

DSCB dscb

Definition at line 67 of file DAS_Spat.c.

Referenced by D_readtemp_int(), and ShutCB().

§ DXL

DXL_par DXL

Definition at line 78 of file CreateForms.c.

§ FilBuff

const char* FilBuff

§ FilFlg

int FilFlg =0
static

Definition at line 50 of file CreateForms.c.

Referenced by DB_Close_Sh(), DB_Esc_CB(), DB_Fil_CB(), DB_SheelESC(), and MDCreateSh_Fil().

§ FilSet

int FilSet = 0

filter wheel position definition - for SD_FilterW

Definition at line 5992 of file CreateForms.c.

Referenced by DB_Fil_CB(), and DB_KeyB_CB().

§ FLAG

flag FLAG

§ font

MTFont font

Definition at line 3066 of file DAS_Spatram.h.

Referenced by CloseFontViewCB(), DB_TestF(), and DrawAreaExpFontCB().

§ GratFlg

int GratFlg =0
static

§ GrDIR

int GrDIR

§ GRS

GratingSt GRS

Definition at line 82 of file CreateForms.c.

Referenced by HeaderInPlot(), and HomeGratingFast().

§ HomeBuff

char* HomeBuff

Definition at line 57 of file CreateForms.c.

§ HomeFlg

int HomeFlg =0
static

Definition at line 56 of file CreateForms.c.

§ item_advc

MENU_ITEM item_advc

Definition at line 1139 of file CreateForms.c.

Referenced by MDCreate_CP().

§ MirBuff

const char* MirBuff

Definition at line 48 of file CreateForms.c.

Referenced by DB_Close_Sh(), DB_Esc_CB(), DB_Mir_CB(), DB_SheelESC(), and MDCreateSh_Mir().

§ MirFlg

int MirFlg =0
static

Definition at line 47 of file CreateForms.c.

Referenced by DB_Close_Sh(), DB_Esc_CB(), DB_Mir_CB(), DB_SheelESC(), and MDCreateSh_Mir().

§ MirSet

int MirSet = 0

mirror position definition - for SD_Mirror

Definition at line 5612 of file CreateForms.c.

Referenced by DB_KeyB_CB(), and DB_Mir_CB().

§ NDFilBuff

const char* NDFilBuff

Definition at line 54 of file CreateForms.c.

Referenced by DB_Close_Sh(), DB_Esc_CB(), DB_NDFil_CB(), DB_SheelESC(), and MDCreateSh_NDFil().

§ NDFilFlg

int NDFilFlg =0
static

Definition at line 53 of file CreateForms.c.

Referenced by DB_Close_Sh(), DB_Esc_CB(), DB_NDFil_CB(), DB_SheelESC(), and MDCreateSh_NDFil().

§ NDFilSet

int NDFilSet = 0

ND filter wheel position definition - for SD_NDFilterW.

Definition at line 6231 of file CreateForms.c.

Referenced by DB_KeyB_CB(), and DB_NDFil_CB().

§ newfont

MTFont newfont

Definition at line 95 of file CreateForms.c.

Referenced by D_Lens(), and DB_TestF().

§ NFileNameF

char NFileNameF[_MAX_PATH]

Definition at line 71 of file CreateForms.c.

Referenced by D_PButt_CB(), DB_HorComm_CB(), DB_KeyB_CB(), and PopUp_CB().

§ NumRip

int NumRip

Definition at line 28 of file PWD.C.

Referenced by ActPWDSysCB().

§ PARAM

paramini PARAM

Definition at line 90 of file CreateForms.c.

§ plfont

MTFont plfont

Definition at line 95 of file CreateForms.c.

§ popup_advcalib

MOBJECT popup_advcalib

Definition at line 1138 of file CreateForms.c.

Referenced by MDCreate_CP().

§ PrgFile

char PrgFile[16]

Name of the PRG file.

Definition at line 91 of file DAS_Spat.c.

Referenced by ChkExeMode(), DB_ToolsKeyB_CB(), InitFlags(), ManualModeCB(), SZA_FirstCalc(), Task_LIS_Temp(), and ViewPlot().

§ sdsh

MOBJECT sdsh

Definition at line 6734 of file CreateForms.c.

Referenced by ShutCB(), and ShutDOWN().

§ shell_1

MOBJECT shell_1

Definition at line 4317 of file CreateForms.c.

§ STEPS

long STEPS

Definition at line 63 of file CreateForms.c.

§ TOOLS

tools TOOLS

§ WlBuff

char* WlBuff

Definition at line 45 of file CreateForms.c.

Referenced by DB_Close_Sh(), DB_Esc_CB(), DB_SheelESC(), and MDCreateSh_Wl().

§ WlFlg

int WlFlg =0
static

Definition at line 44 of file CreateForms.c.

Referenced by DB_Close_Sh(), DB_Esc_CB(), DB_SheelESC(), DB_Wl_CB(), and MDCreateSh_Wl().

§ XProfOn

XProfOn = 0
static

Definition at line 2655 of file CreateForms.c.

Referenced by D_XProfile().

§ YProfOn

YProfOn = 0
static

Definition at line 2637 of file CreateForms.c.

Referenced by D_YProfile().

§ ZST

ZenithSt ZST

Definition at line 99 of file CreateForms.c.

______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:27 for DAS - Rel. 3.1.6 - 18/09/2017.