DAS  3.1.6 - 18/09/2017
Functions
About.c File Reference

Informations about DAS. A very simple file with only 2 function defined for the visualization of informations about the DAS program. More...

#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mgui.h"
#include "DAS_Spatram.h"
#include "dcl.h"
#include "dil.h"
+ Include dependency graph for About.c:

Go to the source code of this file.

Functions

void AboutCB (MOBJECT o, void *s, void *v)
 Create the About information shell.
. More...
 
void CloseCB (MOBJECT p, void *od, void *ad)
 Close the About information shell.
. More...
 

Detailed Description

Informations about DAS. A very simple file with only 2 function defined for the visualization of informations about the DAS program.

Author
Daniele Bortoli (20/05/2002)

Definition in file About.c.

Function Documentation

§ AboutCB()

void AboutCB ( MOBJECT  o,
void *  s,
void *  v 
)

Create the About information shell.
.

Returns
void

Definition at line 39 of file About.c.

References BOTTOM_ALIGN, CENTER_ALIGN, CloseCB(), DASREL, DASREV, DASREVDATE, palette::DB_BG, palette::DB_BG_Albl, palette::DB_FG_Plbl, DB_HelpCB(), DC_Ver(), DI_Ver(), DPAL, False, HELV_LARGE, HELV_MEDIUM, lbl, MCreateColForm(), MCreateLabel(), MCreatePButton(), MCreatePixmapFromFile(), MCreateRowForm(), MCreateShell(), MGUI_RELEASE, MObjectAlign(), MObjectSetBackgroundRGB(), MObjectSetCompositeHeight(), MObjectSetCompositeWidth(), MObjectSetForegroundRGB(), MObjectSetResize(), MObjectSetShadow(), MObjectSetTransparency(), MPButtonSetCallback(), MShellRealize(), SF_MODAL, TIMES_SMALL, TOP_ALIGN, True, WS_ETCHED_IN, WS_NONE, and WS_SHADOW_OUT.

Referenced by DB_KeyB_CB(), HlpTopCB(), and SetScriptUseLabel().

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)
#define TIMES_SMALL
Definition: Mguidefs.h:883
palette DPAL
Definition: 2DPlot.c:27
#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)
#define SF_MODAL
Definition: Mguidefs.h:1019
C_DEF int DI_Ver(char *ver)
MOBJECT MCreateColForm(MOBJECT parent)
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
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
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

§ CloseCB()

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

Close the About information shell.
.

Returns
void

Definition at line 25 of file About.c.

References MShellDestroy(), and MShellUnrealize().

Referenced by AboutCB().

26 {
27  MOBJECT c = (void *)ad;
28 
29 
30  MShellUnrealize(c);
31  MShellDestroy(c);
32 }
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:
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:13 for DAS - Rel. 3.1.6 - 18/09/2017.