// generated by Fast Light User Interface Designer (fluid) version 1.00

#include "MailReact.h"
#include "sfl.h"
#include "FL/fl_ask.H"
#include <FL/Fl_Pixmap.H>
extern SYMTAB load_symtab;
extern void ini_dyn_setvalue(SYMTAB *symtab,const char *section,const char *keyword,const char *value);
extern char *ini_dyn_assumevalue (SYMTAB *symtab,const char *section,const char *keyword, const char *default_value);
TextBuffer *b;
TextBuffer *b2;
TextEdit *textedit;
TextEdit *Mail_text;
int abortit;

bufModifyCallbackProc bufModifiedCB(void *arg) {
  if(progress)
progress->range(0,textedit->mNBufferLines);
return NULL;
}

static void fill_text(TextBuffer *texteditobj,char *filename) {
  DESCR *descriptor;
if(descriptor=file_slurpl(filename))
{
texteditobj->Insert(descriptor->size,removechars((char *)descriptor->data,"\r"));
mem_free(descriptor);
}
}

void save_data() {
  ini_dyn_setvalue(&load_symtab,"Misc","Smtp",SMTPval->value());
ini_dyn_setvalue(&load_symtab,"Misc","Sender",sender->value());
ini_dyn_setvalue(&load_symtab,"Misc","Subject",subject->value());
ini_dyn_setvalue(&load_symtab,"Misc","Port",port->value());
ini_dyn_setvalue(&load_symtab,"Misc","Delay",delay->value());
ini_dyn_setvalue(&load_symtab,"Misc","MailsPerConnection",mailsconnect->value());

FILE * file=file_open ("text.txt",'w');
if(file)
{
fputs (b2->GetAll(),file);
file_close (file);
}

file=file_open ("receivers.txt",'w');
if(file)
{
fputs (b->GetAll(),file);
file_close (file);
}
file=file_open ("log.txt",'w');
if(file)
{
fputs (syslog->value(),file);
file_close (file);
}
}

void log_text(Fl_Output *output,char *text) {
  char buffie[1000];
timestamp_string(buffie,"%dddd %dd %mmmm, %yyyy %h:%m:%s - ");
output->insert(buffie,strlen(buffie));
output->insert(text,strlen(text));
output->insert("\n",1);
Fl::flush();
}

static void show_log(Fl_Output *output) {
  DESCR *descriptor;
if(descriptor=file_slurpl("log.txt"))
{
char *cleared =removechars((char *)descriptor->data,"\r"); 
output->insert(cleared,strlen(cleared));
mem_free(descriptor);
log_text(syslog,"Started...");
}else
{
log_text(syslog,"Welcome to MailReactor! Do not abuse this software!");
}
}

Fl_Window *mailwin=(Fl_Window *)0;

static void cb_mailwin(Fl_Window*, void*) {
  save_data();
delete mailwin;
}

Fl_Input *SMTPval=(Fl_Input *)0;

Fl_Input *port=(Fl_Input *)0;

Fl_Input *sender=(Fl_Input *)0;

Fl_Input *subject=(Fl_Input *)0;

Fl_Input *delay=(Fl_Input *)0;

Fl_Input *mailsconnect=(Fl_Input *)0;

Fl_Group *Receivers=(Fl_Group *)0;

Fl_Scrollbar *h=(Fl_Scrollbar *)0;

Fl_Scrollbar *v=(Fl_Scrollbar *)0;

Fl_Group *Text=(Fl_Group *)0;

Fl_Scrollbar *Text_v=(Fl_Scrollbar *)0;

Fl_Scrollbar *Text_h=(Fl_Scrollbar *)0;

Fl_Output *syslog=(Fl_Output *)0;

Fl_Value_Slider *progress=(Fl_Value_Slider *)0;

Fl_Button *Send=(Fl_Button *)0;

static void cb_Send(Fl_Button*, void*) {
  start_sending();
}

#include <FL/Fl_Pixmap.H>
static unsigned char *image_MailReactor[] = {
(unsigned char*)
"42 39 256 2",
(unsigned char*)
"   c Gray0",
(unsigned char*)
".  c #040402",
(unsigned char*)
"X  c #0d0b01",
(unsigned char*)
"o  c #0b0b0b",
(unsigned char*)
"O  c #0a0600",
(unsigned char*)
"+  c #110c01",
(unsigned char*)
"@  c #1c1402",
(unsigned char*)
"#  c #18180c",
(unsigned char*)
"$  c #1b1906",
(unsigned char*)
"%  c #1b1b1b",
(unsigned char*)
"&  c #151515",
(unsigned char*)
"*  c #241c02",
(unsigned char*)
"=  c #3c1f01",
(unsigned char*)
"-  c #28280f",
(unsigned char*)
";  c #25230a",
(unsigned char*)
":  c #2c2c12",
(unsigned char*)
">  c #352b03",
(unsigned char*)
",  c #3e2200",
(unsigned char*)
"<  c #322100",
(unsigned char*)
"1  c #3b360c",
(unsigned char*)
"2  c #3c3c19",
(unsigned char*)
"3  c Gray15",
(unsigned char*)
"4  c #3c3c3c",
(unsigned char*)
"5  c #343434",
(unsigned char*)
"6  c #452d00",
(unsigned char*)
"7  c #4d2b00",
(unsigned char*)
"8  c #4b3d0d",
(unsigned char*)
"9  c #533900",
(unsigned char*)
"0  c #703a02",
(unsigned char*)
"q  c #4e4107",
(unsigned char*)
"w  c #4f4109",
(unsigned char*)
"e  c #4c4b1d",
(unsigned char*)
"r  c #544602",
(unsigned char*)
"t  c #5f5307",
(unsigned char*)
"y  c #54531d",
(unsigned char*)
"u  c #57582a",
(unsigned char*)
"i  c #644403",
(unsigned char*)
"p  c #6a4101",
(unsigned char*)
"a  c #675507",
(unsigned char*)
"s  c #7f4f01",
(unsigned char*)
"d  c #7c4301",
(unsigned char*)
"f  c #7b5700",
(unsigned char*)
"g  c #6e6517",
(unsigned char*)
"h  c #6b6319",
(unsigned char*)
"j  c #7e6b07",
(unsigned char*)
"k  c #7e6000",
(unsigned char*)
"l  c #7f741e",
(unsigned char*)
"z  c #6c6b21",
(unsigned char*)
"x  c #636427",
(unsigned char*)
"c  c #676732",
(unsigned char*)
"v  c #747431",
(unsigned char*)
"b  c Gray28",
(unsigned char*)
"n  c #565656",
(unsigned char*)
"m  c #5d5d5d",
(unsigned char*)
"M  c Gray40",
(unsigned char*)
"N  c Gray49",
(unsigned char*)
"B  c #7f803e",
(unsigned char*)
"V  c #905f08",
(unsigned char*)
"C  c #9f5601",
(unsigned char*)
"Z  c #905201",
(unsigned char*)
"A  c #887919",
(unsigned char*)
"S  c #967603",
(unsigned char*)
"D  c #a25c01",
(unsigned char*)
"F  c #a97305",
(unsigned char*)
"G  c #bf6b01",
(unsigned char*)
"H  c #ba6400",
(unsigned char*)
"J  c #b17703",
(unsigned char*)
"K  c #c46c01",
(unsigned char*)
"L  c #c86f00",
(unsigned char*)
"P  c #c57201",
(unsigned char*)
"I  c #c97601",
(unsigned char*)
"U  c #cc7c01",
(unsigned char*)
"Y  c #c07908",
(unsigned char*)
"T  c #8e8208",
(unsigned char*)
"R  c #938513",
(unsigned char*)
"E  c #9d970e",
(unsigned char*)
"W  c #8e882a",
(unsigned char*)
"Q  c #8f8f3e",
(unsigned char*)
"!  c #83843f",
(unsigned char*)
"~  c #8f903c",
(unsigned char*)
"^  c #9b9b35",
(unsigned char*)
"/  c #ae9e0a",
(unsigned char*)
"(  c #b58805",
(unsigned char*)
")  c #bb9401",
(unsigned char*)
"_  c #bfa908",
(unsigned char*)
"`  c #a3a133",
(unsigned char*)
"\'  c #bbb02d",
(unsigned char*)
"]  c #b7b73f",
(unsigned char*)
"[  c #b7b335",
(unsigned char*)
"{  c #9a9a4d",
(unsigned char*)
"}  c #a9ac4c",
(unsigned char*)
"|  c #b7b746",
(unsigned char*)
" . c #c68402",
(unsigned char*)
".. c #c78108",
(unsigned char*)
"X. c #cf8402",
(unsigned char*)
"o. c #cc8608",
(unsigned char*)
"O. c #ca9d07",
(unsigned char*)
"+. c #d38401",
(unsigned char*)
"@. c #d58b01",
(unsigned char*)
"#. c #d88901",
(unsigned char*)
"$. c #d5970e",
(unsigned char*)
"%. c #dc9301",
(unsigned char*)
"&. c #d89b05",
(unsigned char*)
"*. c #d39812",
(unsigned char*)
"=. c #ca972c",
(unsigned char*)
"-. c #caa904",
(unsigned char*)
";. c #dea40d",
(unsigned char*)
":. c #daa201",
(unsigned char*)
">. c #daa214",
(unsigned char*)
",. c #c7a821",
(unsigned char*)
"<. c #cea02d",
(unsigned char*)
"1. c #d5a625",
(unsigned char*)
"2. c #d9a927",
(unsigned char*)
"3. c #d2a633",
(unsigned char*)
"4. c #e19700",
(unsigned char*)
"5. c #e49d01",
(unsigned char*)
"6. c #e5a201",
(unsigned char*)
"7. c #e7a800",
(unsigned char*)
"8. c #eaa600",
(unsigned char*)
"9. c #edab00",
(unsigned char*)
"0. c #e1a60a",
(unsigned char*)
"q. c #e2af1a",
(unsigned char*)
"w. c #efb80b",
(unsigned char*)
"e. c #e4b316",
(unsigned char*)
"r. c #e4b31c",
(unsigned char*)
"t. c #e7bc1e",
(unsigned char*)
"y. c #ebbd1b",
(unsigned char*)
"u. c #e5bc14",
(unsigned char*)
"i. c #f2ab00",
(unsigned char*)
"p. c #f4b400",
(unsigned char*)
"a. c #f5bc01",
(unsigned char*)
"s. c #fabe01",
(unsigned char*)
"d. c #e6b728",
(unsigned char*)
"f. c #e4bf32",
(unsigned char*)
"g. c #e9bf32",
(unsigned char*)
"h. c #c89e4d",
(unsigned char*)
"j. c #cfa64c",
(unsigned char*)
"k. c #cbab58",
(unsigned char*)
"l. c #d2af56",
(unsigned char*)
"z. c #d7b24e",
(unsigned char*)
"x. c #d7b557",
(unsigned char*)
"c. c #d8b459",
(unsigned char*)
"v. c #d9bf61",
(unsigned char*)
"b. c #d4c10c",
(unsigned char*)
"n. c #d9c611",
(unsigned char*)
"m. c #eec607",
(unsigned char*)
"M. c #eec117",
(unsigned char*)
"N. c #ecc31b",
(unsigned char*)
"B. c #edce1f",
(unsigned char*)
"V. c #f5c306",
(unsigned char*)
"C. c #fcc502",
(unsigned char*)
"Z. c #fdca03",
(unsigned char*)
"A. c #ffcc08",
(unsigned char*)
"S. c #f2c30a",
(unsigned char*)
"D. c #f3cb16",
(unsigned char*)
"F. c #fdd105",
(unsigned char*)
"G. c #fcd40a",
(unsigned char*)
"H. c #fddb0b",
(unsigned char*)
"J. c #f7d518",
(unsigned char*)
"K. c #fadd14",
(unsigned char*)
"L. c #f9de1d",
(unsigned char*)
"P. c #fad315",
(unsigned char*)
"I. c #ecca27",
(unsigned char*)
"U. c #edc326",
(unsigned char*)
"Y. c #e9c733",
(unsigned char*)
"T. c #ecd223",
(unsigned char*)
"R. c #ebd939",
(unsigned char*)
"E. c #ecd636",
(unsigned char*)
"W. c #f3cc28",
(unsigned char*)
"Q. c #f4d326",
(unsigned char*)
"!. c #f3d62a",
(unsigned char*)
"~. c #f3da2a",
(unsigned char*)
"^. c #fbd927",
(unsigned char*)
"/. c #f5dc33",
(unsigned char*)
"(. c #fade33",
(unsigned char*)
"). c #f3d537",
(unsigned char*)
"_. c #fde20e",
(unsigned char*)
"`. c #fde613",
(unsigned char*)
"\'. c #fdec14",
(unsigned char*)
"]. c #fbed1e",
(unsigned char*)
"[. c #fdf20f",
(unsigned char*)
"{. c #fdf114",
(unsigned char*)
"}. c #fae425",
(unsigned char*)
"|. c #fbe42d",
(unsigned char*)
" X c #f9ed24",
(unsigned char*)
".X c #fce92b",
(unsigned char*)
"XX c #f5e423",
(unsigned char*)
"oX c #f6e53d",
(unsigned char*)
"OX c #fbe233",
(unsigned char*)
"+X c #fce63b",
(unsigned char*)
"@X c #fced3e",
(unsigned char*)
"#X c #fceb36",
(unsigned char*)
"$X c #fbf629",
(unsigned char*)
"%X c #fbf235",
(unsigned char*)
"&X c #fcf838",
(unsigned char*)
"*X c #cacb4e",
(unsigned char*)
"=X c #c2c450",
(unsigned char*)
"-X c #dfc758",
(unsigned char*)
";X c #dbc356",
(unsigned char*)
":X c #d5d759",
(unsigned char*)
">X c #ddcb64",
(unsigned char*)
",X c #d7d866",
(unsigned char*)
"<X c #dbd668",
(unsigned char*)
"1X c #dde056",
(unsigned char*)
"2X c #e1c759",
(unsigned char*)
"3X c #eadd42",
(unsigned char*)
"4X c #e3e04c",
(unsigned char*)
"5X c #e7e651",
(unsigned char*)
"6X c #f7e841",
(unsigned char*)
"7X c #feef43",
(unsigned char*)
"8X c #fcec42",
(unsigned char*)
"9X c #faed4a",
(unsigned char*)
"0X c #f7e945",
(unsigned char*)
"qX c #faee57",
(unsigned char*)
"wX c #fdf444",
(unsigned char*)
"eX c #fdf649",
(unsigned char*)
"rX c #fdf54c",
(unsigned char*)
"tX c #fdfa4d",
(unsigned char*)
"yX c #fdf755",
(unsigned char*)
"uX c #fdfc54",
(unsigned char*)
"iX c #fefe5a",
(unsigned char*)
"pX c #fdfe5d",
(unsigned char*)
"aX c #fdfb5b",
(unsigned char*)
"sX c #f7f758",
(unsigned char*)
"dX c #f5f768",
(unsigned char*)
"fX c #fdfe62",
(unsigned char*)
"gX c #fdfe65",
(unsigned char*)
"hX c #fbfd63",
(unsigned char*)
"jX c #fefe6a",
(unsigned char*)
"kX c #fdfe6e",
(unsigned char*)
"lX c #fbfe6c",
(unsigned char*)
"zX c #f6fb63",
(unsigned char*)
"xX c #fdff71",
(unsigned char*)
"cX c #fdff77",
(unsigned char*)
"vX c #fcfd71",
(unsigned char*)
"bX c #feff7a",
(unsigned char*)
"nX c #feff7e",
(unsigned char*)
"mX c #888888",
(unsigned char*)
"MX c #979797",
(unsigned char*)
"NX c #9a9a9a",
(unsigned char*)
"BX c Gray65",
(unsigned char*)
"VX c #a9a9a9",
(unsigned char*)
"CX c #bbbbbb",
(unsigned char*)
"ZX c #c7b58c",
(unsigned char*)
"AX c #c9bd93",
(unsigned char*)
"SX c #c4bdab",
(unsigned char*)
"DX c #c2bfb3",
(unsigned char*)
"FX c #c2bfb9",
(unsigned char*)
"GX c #ccc498",
(unsigned char*)
"HX c #d0c48d",
(unsigned char*)
"JX c #c6c3af",
(unsigned char*)
"KX c #c4c1b2",
(unsigned char*)
"LX c #c2c1bb",
(unsigned char*)
"PX c #feff81",
(unsigned char*)
"IX c #fcfb80",
(unsigned char*)
"UX c #c0c0c0",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXLXGX;Xf.f.S.S.g.Y.;XGXLXUXUXUXUXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXKX-XD.P.OX9XyXaXaXyX9X|.P.D.2XKXUXUXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXLX>XJ.|.yXjXjXgXfXgXgXgXgXfXfXrX}.P.>XLXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXKXE.}.uXjXlXfXfXfXfXgXgXgXgXgXgXgXpXeXK.Y.JXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXGXXX@XkXlXuXwXiXpXgXjXkXxXxXxXxXkXuXuXfXiX.XW.GXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXKXXXrXxXfX&X`.H.eXgXjXxXcXbXbXPXbXxX X].wXiXpX#XD.KXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXLXR.wXkXfX&X\'.`.H.}.hXgXcXbXPXPXbXPXtX{.\'.`.%XiXiX|.Y.LXUXUXU\
XUXUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUX>X.XkXfX$X{.{._.H.F.wXpXkXbXPXPXbXbX$X{.{.`._..XuXiXJ.v.LXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXKXL.gXfX&X[.{.`.H.F.Z.^.uXgXbXbXbXIXuX{.{.\'.`.H.F.|.uXeXw.DXUXUX\
UXUXUXUX",
(unsigned char*)
"UXUXUXUXMXo         E \'.`.-.>           } PX,X2  X\'.\'.`.H.r ) V.\' 2      \
     N UXUX",
(unsigned char*)
"UXUXUXBXm o       X / _.H.r a O       X =XbXu   t > H.H.-.  k 9.q z +       %\
 n UXUX",
(unsigned char*)
"UXUXUXn % HX}.jXtXH.G.A.A.* @ 5.%.%.0.7XpXxX: * j   S Z.S   F 5.* ; tXy.AXUXN\
   UXUX",
(unsigned char*)
"UXUXUX4 4 2X9XgX}.Z.Z.s.7.  6 +.X.+.@.(.uXdX  r V.* X :.i    .+.  8 eX~.l.UXn\
 % UXUX",
(unsigned char*)
"UXUXUX% M U.aXfXJ.a.p.8.J   p I P I e.|.eX*X  A a.(   9 < + I C   a @X@X1.UX5\
 3 UXUX",
(unsigned char*)
"UXUXUX. mXU.fXpXw.9.5.%.s   Z K L $.B.Q.M.A   | M.8.9 6 O , P d   V +XwX1.UXo\
 4 UXUX",
(unsigned char*)
"UXUXUXm %       X  .@.U G 7 +       . ( 9.O.a zX/.4.@.I 7 D K C , Y (.wX;.UX5\
 mXUXUX",
(unsigned char*)
"UXUXUXMXo       @ s X...J i         @ O.a.f q uXrXN.>.F @ D H 0 = ..(.wX;.VX5\
 VXUXUX",
(unsigned char*)
"UXUXUXUXUXd.pXiXW . 7X(.* 1 ~.~./.OX8X#XG.X 1 rXtXuXeXl   ,.d.+ > t.(.wX1.M  \
 MXUXUX",
(unsigned char*)
"UXUXUXUXUXd.uXpXy - uX3X  h 8X7XwXrXuXpX5X  z wXuXpXpXy   oXR.  g OX@X8X1.4  \
 CXUXUX",
(unsigned char*)
"UXUXUXUXUXx.6XhX: e pX|   ^ iXiXiXhXeX%X[   R .XiXfXjX: : pX]   ` tXuX/.l.% 3\
 UXUXUX",
(unsigned char*)
"UXUXUXUXUXAXQ.sX  v kXQ   :XkXxXxXhX`.`.T   -.A.8XgXlX  u kX~ . :XgXgXU.ZX  b\
 UXUXUX",
(unsigned char*)
"UXUXM         ; x :XbXc c #       X b.\'.a   m.Z.S.yX:X  v PXu { #       % b \
MXUXUXUX",
(unsigned char*)
"UXUXn         $ 1XjXbX{ #         ; n._.j a Z.a.i.M.4X; ,XPX{ #         & BXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXSXu.pXgXxXbXbXbXPXgXK.H.H.G.Z.C.a.9.5.%.I.sXxXbXbXbXbXvXu.SXLXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXc.!.fXkXbXPXbXcXL.F.F.Z.C.a.9.6.%.@.+.X.R.fXxXbXPXbX).c.UXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXFXd.8XgXcXPXbXoXC.C.s.p.9.5.%.+.U U I U o.9XfXcXbX9Xd.FXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXDXM.rXkXbXxXS.p.p.9.6.%.+.U I P K K P U !.iXjXqXe.DXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXAXy.9XkXxX9Xy.6.4.#.U P P K K G G o.U.+XtX6Xr.AXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXSXd./.fXkXfXoXt.$.U P K P ..*.t.T.~.OXN.2.SXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXFXx.y.oXaXuXwX+X(.~.!.!.!.~.~.^.U.$.k.LXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXSXz.q.I.oX7X7X8X+X+XOXW.q.*.h.SXUXUXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXDXZXj.<.3.;.;.3.=.h.ZXDXUXUXUXUXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXU\
XUXUXUX",
(unsigned char*)
"UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXU\
XUXUXUX"
};
static Fl_Pixmap pixmap_MailReactor(image_MailReactor);

Fl_Button *Abort=(Fl_Button *)0;

static void cb_Abort(Fl_Button*, void*) {
  abortit=TRUE;
}

Fl_Button *ExitButton=(Fl_Button *)0;

static void cb_ExitButton(Fl_Button*, void*) {
  save_data();
mailwin->hide();
}

Fl_Button *ClearLog=(Fl_Button *)0;

static void cb_ClearLog(Fl_Button*, void*) {
  syslog->value("");
log_text(syslog,"Welcome to MailReactor! Do not abuse this software!");
}

Fl_Button *about=(Fl_Button *)0;

static void cb_about(Fl_Button*, void*) {
  Fl_Window* aboutwindow=about_window();
aboutwindow->show();
}

Fl_Window* make_window() {
  Fl_Window* w;
  { Fl_Window* o = mailwin = new Fl_Window(586, 517, "MailReactor");
    w = o;
    o->box(FL_UP_BOX);
    o->callback((Fl_Callback*)cb_mailwin);
    { Fl_Group* o = new Fl_Group(5, 5, 349, 115);
      o->box(FL_ENGRAVED_BOX);
      { Fl_Input* o = SMTPval = new Fl_Input(82, 10, 186, 20, "SMTP server:");
        o->labelsize(11);
        o->textsize(11);
        char *smtpval=ini_dyn_assumevalue (&load_symtab,"Misc", "SMTP","smtp");
        SMTPval->insert(smtpval,strlen(smtpval));
      }
      { Fl_Input* o = port = new Fl_Input(300, 10, 44, 20, "Port:");
        o->type(2);
        o->labelsize(11);
        o->textsize(11);
        char *portval=ini_dyn_assumevalue (&load_symtab,"Misc", "Port","25");
        port->insert(portval,strlen(portval));
      }
      { Fl_Input* o = sender = new Fl_Input(82, 39, 186, 20, "Sender e-mail:");
        o->labelsize(11);
        o->textsize(11);
        char *senderval=ini_dyn_assumevalue (&load_symtab,"Misc", "Sender","me@here.now");
        sender->insert(senderval,strlen(senderval));
      }
      { Fl_Input* o = subject = new Fl_Input(82, 68, 186, 20, "Subject:");
        o->labelsize(11);
        o->textsize(11);
        char *subjectval=ini_dyn_assumevalue (&load_symtab,"Misc", "Subject","Very interesting");
        subject->insert(subjectval,strlen(subjectval));
      }
      { Fl_Input* o = delay = new Fl_Input(82, 96, 44, 20, "Delay (msec):");
        o->type(2);
        o->labelsize(11);
        o->textsize(11);
        char *delayval=ini_dyn_assumevalue (&load_symtab,"Misc", "Delay","100");
        delay->insert(delayval,strlen(delayval));
      }
      { Fl_Input* o = mailsconnect = new Fl_Input(224, 96, 44, 20, "Mails/connection:");
        o->type(2);
        o->labelsize(11);
        o->textsize(11);
        char *mailscon=ini_dyn_assumevalue (&load_symtab,"Misc", "MailsPerConnection","10");
        mailsconnect->insert(mailscon,strlen(mailscon));
      }
      o->end();
    }
    { Fl_Group* o = new Fl_Group(5, 137, 575, 275);
      { Fl_Group* o = Receivers = new Fl_Group(355, 137, 225, 275, "Receivers:");
        o->box(FL_DOWN_BOX);
        o->color(7);
        o->labelsize(11);
        o->align(FL_ALIGN_TOP_LEFT);
        o->when(FL_WHEN_CHANGED);
        { Fl_Scrollbar* o = h = new Fl_Scrollbar(357, 395, 206, 15);
          o->type(1);
        }
        v = new Fl_Scrollbar(563, 139, 15, 256);
        { Fl_Box* o = new Fl_Box(425, 292, 25, 25);
          Fl_Group::current()->resizable(o);
        }
        { Fl_Box* o = new Fl_Box(563, 395, 15, 15);
          o->box(FL_FLAT_BOX);
        }
        b= new TextBuffer(1);
        textedit= new TextEdit(Receivers->x()+2, Receivers->y()+2, Receivers->w()-(v->w())-4, Receivers->h()-(h->h())-4, h, v, b, 0, 0 );
        textedit->color( FL_WHITE );textedit->MoveDown();b->AddModifyCB((bufModifyCallbackProc) bufModifiedCB,NULL );
        fill_text(b,"receivers.txt");
        o->end();
      }
      { Fl_Group* o = Text = new Fl_Group(5, 137, 345, 275, "Text:");
        o->box(FL_DOWN_BOX);
        o->color(7);
        o->labelsize(11);
        o->align(FL_ALIGN_TOP_LEFT);
        Text_v = new Fl_Scrollbar(333, 139, 15, 256);
        { Fl_Scrollbar* o = Text_h = new Fl_Scrollbar(7, 395, 326, 15);
          o->type(1);
        }
        { Fl_Box* o = new Fl_Box(240, 297, 25, 25);
          Fl_Group::current()->resizable(o);
        }
        b2= new TextBuffer(1);
        Mail_text= new TextEdit(Text->x()+2, Text->y()+2, Text->w()-(Text_v->w())-4, Text->h()-(Text_h->h())-4,Text_h,Text_v, b2, 0, 0 );
        Mail_text->color( FL_WHITE );Mail_text->MoveDown();
        fill_text(b2,"text.txt");
        o->end();
      }
      { Fl_Box* o = new Fl_Box(265, 242, 25, 25);
        Fl_Group::current()->resizable(o);
      }
      { Fl_Box* o = new Fl_Box(333, 395, 15, 15);
        o->box(FL_FLAT_BOX);
      }
      o->end();
    }
    { Fl_Output* o = syslog = new Fl_Output(5, 415, 575, 98);
      o->type(4);
      o->labelsize(11);
      o->textsize(11);
      show_log(syslog);
    }
    { Fl_Value_Slider* o = progress = new Fl_Value_Slider(355, 100, 225, 20, "Start from:");
      o->type(3);
      o->labelsize(11);
      o->maximum(100);
      o->step(1);
      o->textsize(11);
      o->align(FL_ALIGN_TOP_LEFT);
      progress->range(0,textedit->mNBufferLines);
    }
    { Fl_Box* o = new Fl_Box(564, 327, 6, 25);
      Fl_Group::current()->resizable(o);
    }
    { Fl_Button* o = Send = new Fl_Button(357, 5, 65, 55);
      pixmap_MailReactor.label(o);
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_Send);
    }
    { Fl_Button* o = Abort = new Fl_Button(427, 5, 65, 25, "Abort");
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_Abort);
      o->deactivate();
    }
    { Fl_Button* o = ExitButton = new Fl_Button(497, 5, 65, 25, "Exit");
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_ExitButton);
    }
    { Fl_Button* o = ClearLog = new Fl_Button(427, 35, 65, 25, "Clear Log");
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_ClearLog);
    }
    { Fl_Button* o = about = new Fl_Button(497, 35, 65, 25, "About");
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_about);
    }
    o->end();
  }
  return w;
}

Fl_Window *aboutwin=(Fl_Window *)0;

static void cb_Thanks(Fl_Button*, void*) {
  delete aboutwin;
}

Fl_Output *website=(Fl_Output *)0;

Fl_Window* about_window() {
  Fl_Window* w;
  { Fl_Window* o = aboutwin = new Fl_Window(212, 203, "About MailReactor");
    w = o;
    o->labelsize(11);
    o->align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
    w->hotspot(o);
    { Fl_Button* o = new Fl_Button(75, 173, 65, 25, "Thanks!");
      o->labelsize(11);
      o->callback((Fl_Callback*)cb_Thanks);
    }
    { Fl_Box* o = new Fl_Box(25, 15, 165, 115, "MailReactor 0.9                          by Niek Albers (nieka@dsv.nl)       \
              Open Source Software 1999   Build using:                        \
     Fast Light Toolkit (www.fltk.org) Standard Function Library (www.imatix.c\
om) and TextEdit by Maarten de Boer");
      o->box(FL_ENGRAVED_FRAME);
      o->labelsize(11);
      o->align(129|FL_ALIGN_INSIDE);
    }
    { Fl_Output* o = website = new Fl_Output(7, 140, 200, 25);
      o->labelsize(11);
      o->textsize(11);
      website->value("http://www.dsv.nl/~nieka/MailReactor");
    }
    o->set_modal();
    o->end();
  }
  return w;
}
