DAS  3.1.6 - 18/09/2017
About.c
Go to the documentation of this file.
1 
2 #include <windows.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <string.h>
6 #include "mgui.h"
7 #include "DAS_Spatram.h"
8 #include "dcl.h"
9 #include "dil.h"
10 
25 void CloseCB(MOBJECT p, void *od, void *ad)
26 {
27  MOBJECT c = (void *)ad;
28 
29 
30  MShellUnrealize(c);
31  MShellDestroy(c);
32 }
33 
34 
39 void AboutCB(MOBJECT o, void *s, void *v)
40 {
41 
42 
43  MOBJECT _colform000;
44  MOBJECT _rowform000;
45  MOBJECT lbl;
46  MOBJECT sh1;
47  MOBJECT px1;
48  MOBJECT pbutt1;
49  char buff[256], mguirev[4];
50  int DCLREV, DILREV;
51  int c = (int) v;
52 
53  if (c)
54  sh1 = MCreateShell("About DAS", SF_MODAL);
55  else
56  sh1 = MCreateShell("About DAS", 0);
57 
58  _colform000 = MCreateColForm(sh1);
59  MObjectSetBackgroundRGB(_colform000, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
60 
61  px1 = MCreatePixmapFromFile(_colform000, "sys\\info1.bmp");
63  MObjectSetShadow(px1, WS_NONE, 0, 0);
64  MObjectSetCompositeWidth(px1, 32);
66 
67  _rowform000 = MCreateRowForm(_colform000);
68  MObjectSetResize(_rowform000, True, True);
69  MObjectSetBackgroundRGB(_rowform000, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
70 
71  sprintf(buff, "%s","DAS");
72  lbl = MCreateLabel(_rowform000, buff, HELV_LARGE);
75  MObjectSetShadow(lbl, WS_ETCHED_IN, 3, 0);
76  MObjectSetTransparency(lbl, 0);
77 
78  sprintf(buff, "%s","Data Acquisition System\n developed for UV-Vis Spectrometers \n (SPATRAM & GASCOD type equipments)");
79  lbl = MCreateLabel(_rowform000, buff, HELV_MEDIUM);
81  MObjectSetShadow(lbl, WS_ETCHED_IN, 3, 0);
82 
83 
84  //DAS Release and version
85  sprintf(buff, "Release: %d, Rev: %.1lf on %s",DASREL, DASREV, DASREVDATE );
86  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
88  MObjectSetShadow(lbl, WS_ETCHED_IN, 3, 0);
89 
90  sprintf(buff, "%s", " Copyright © 2000-2016 Daniele Bortoli (DanBo) \n CGE University of Evora, Portugal\n 'db@uevora.pt' \nISAC-CNR Bolgna, Italy \n 'd.bortoli@isac.cnr.it'");
91  lbl = MCreateLabel(_rowform000, buff, HELV_MEDIUM);
93  MObjectSetShadow(lbl, WS_ETCHED_IN, 3, 0);
94 
95  //MGUI release
96  itoa(MGUI_RELEASE, mguirev, 16);
97  sprintf(buff, "Morello Graphic User Interface - MGUI: %c.%c.%c", mguirev[0], mguirev[1], mguirev[2]);
98  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
100  MObjectSetShadow(lbl, WS_ETCHED_IN, 3, 0);
101 
102  //DIL Release
103  DILREV = DI_Ver(NULL);
104  sprintf(buff, "DTA Image Library - DIL Rev: %.2lf", (double)DILREV/100);
105  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
107  MObjectSetShadow(lbl, WS_ETCHED_IN, 3, 0);
108 
109  //DCL Release
110  DCLREV = DC_Ver(NULL);
111 // itoa(DCLREV, dclrev, 10);
112 // sprintf(buff, "DTA Camera Library - DCL Rev: %c.%c.%c", dclrev[0], dclrev[1], dclrev[2]);
113  sprintf(buff, "DTA Camera Library - DCL Rev: %.2lf", (double)DCLREV/100);
114  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
116  MObjectSetShadow(lbl, WS_ETCHED_IN, 3, 0);
117 
118 
119 
120  sprintf(buff, "%s", "Platforms: Win9x, WinME, Win2000, WinNT4, WinXP\nCompiler: Microsoft Visual C++ 6.0 ");
121  lbl = MCreateLabel(_rowform000, buff, TIMES_SMALL);
123  MObjectSetShadow(lbl, WS_ETCHED_IN, 3, 0);
124 
125 
126  _rowform000 = MCreateRowForm(_colform000);
127  MObjectSetResize(_rowform000, False, False);
128  MObjectAlign(_rowform000, CENTER_ALIGN, BOTTOM_ALIGN);
129  MObjectSetBackgroundRGB(_rowform000, DPAL.DB_BG[0], DPAL.DB_BG[1], DPAL.DB_BG[2]);
130 
131 
132  pbutt1 = MCreatePButton(_rowform000, "Help ", HELV_MEDIUM);
133  MPButtonSetCallback(pbutt1, DB_HelpCB, (void *) 0);
135  MObjectSetShadow(pbutt1, WS_SHADOW_OUT, 3, 0);
136 
137  pbutt1 = MCreatePButton(_rowform000, "Close", HELV_MEDIUM);
138  MPButtonSetCallback(pbutt1, CloseCB, (void *) sh1);
140  MObjectSetShadow(pbutt1, WS_SHADOW_OUT, 3, 0);
141 
142  MShellRealize(sh1);
143 }
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)
void MShellRealize(MOBJECT obj)
#define DASREV
DAS Revision Number.
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 MShellUnrealize(MOBJECT obj)
#define TIMES_SMALL
Definition: Mguidefs.h:883
palette DPAL
Definition: 2DPlot.c:27
void MShellDestroy(MOBJECT obj)
#define DASREVDATE
DAS Revision Date.
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define CENTER_ALIGN
Definition: Mguidefs.h:917
void MObjectSetCompositeHeight(MOBJECT obj, int h)
void AboutCB(MOBJECT o, void *s, void *v)
Create the About information shell. .
Definition: About.c:39
#define SF_MODAL
Definition: Mguidefs.h:1019
C_DEF int DI_Ver(char *ver)
MOBJECT MCreateColForm(MOBJECT parent)
Function prototypes.
MOBJECT MCreateShell(const char *title, int flags)
void CloseCB(MOBJECT p, void *od, void *ad)
Close the About information shell. .
Definition: About.c:25
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
Function prototypes.
static double p
Definition: SOLPOS.C:131
CTYPE int DLL DC_Ver(char *LibraryVersion)
Return the library version. Procedure returning the number of the revision of the library...
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
void MObjectSetCompositeWidth(MOBJECT obj, int w)
void * MOBJECT
Definition: Mguidefs.h:192
#define BOTTOM_ALIGN
Definition: Mguidefs.h:919
#define True
Definition: Mguidefs.h:235
#define HELV_MEDIUM
Definition: Mguidefs.h:882
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
#define MGUI_RELEASE
Definition: Mguidefs.h:11
#define HELV_LARGE
Definition: Mguidefs.h:885
#define DASREL
DAS Release Number.
MOBJECT MCreateRowForm(MOBJECT parent)
#define WS_ETCHED_IN
Definition: Mguidefs.h:959
#define TOP_ALIGN
Definition: Mguidefs.h:918
#define WS_SHADOW_OUT
Definition: Mguidefs.h:957
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:06 for DAS - Rel. 3.1.6 - 18/09/2017.