rendered paste body//-------------------------------------------//// Leet Converter Using FLTK ////-------------------------------------------//#include <FL/Fl.H>#include <FL/Fl_Window.H>#include <FL/Fl_Button.H>#include <FL/Fl_Input.H>#include <FL/Fl_Output.H>#include <cstdlib> #include <string.h>#include <iostream>#include <stdio.h>#include <map>#define Zach '10s3R';#define Mole 'h4xz0r';using namespace std;//-------------------------------------------// void copy_cb( Fl_Widget* , void* ); void close_cb( Fl_Widget* , void* );void make_window();//-------------------------------------------// map<string,string> setvals() { map<string, string> replace; replace["a"] = "4";replace["A"] = "4"; replace["b"] = "B"; replace["c"] = "C"; replace["d"] = "D"; replace["e"] = "3";replace["E"] = "3"; replace["f"] = "F"; replace["g"] = "G"; replace["h"] = "H"; replace["i"] = "I"; replace["k"] = "K"; replace["l"] = "1";replace["L"] = "1"; replace["m"] = "M"; replace["n"] = "N"; replace["o"] = "0"; replace["p"] = "P"; replace["q"] = "Q"; replace["r"] = "R"; replace["s"] = "S"; replace["t"] = "7";replace["T"] = "7"; replace["u"] = "U"; replace["v"] = "V"; replace["w"] = "W"; replace["x"] = "X"; replace["y"] = "Y"; return replace;}//-------------------------------------------// string convert() { map<string, string> replace; replace = setvals(); string repl, key, get; string result = get; while(!replace.empty()) { key = (*replace.begin()).first; repl = (*replace.begin()).second; string::size_type loc; loc = result.find( key, 0 ); while(loc != string::npos) { result.replace( loc, repl.length(), repl ); loc = result.find( key, 0 ); } replace.erase(replace.begin()); }} //-------------------------------------------// int main() { make_window(); return Fl::run();}//-------------------------------------------//void make_window() { Fl_Window* win= new Fl_Window(300,200, "Leet Converter"); win->begin(); Fl_Button* copy = new Fl_Button( 10, 150, 70, 30, "C&opy"); //child 0: 1st widget Fl_Button* close = new Fl_Button(100, 150, 70, 30, "&Quit"); //child 1: 2nd widget Fl_Input* inp = new Fl_Input(50, 50, 140, 30, "Input");//child 2: 3rd widget Fl_Output* out = new Fl_Output(50, 100, 140, 30, "Out"); //child 3: 4th widget win->end(); copy->callback( copy_cb ); close->callback( close_cb ); win->show(); }//-------------------------------------------//void copy_cb( Fl_Widget* o , void* ) { Fl_Button* b=(Fl_Button*)o; Fl_Input* iw = (Fl_Input*) b -> parent() -> child(2); Fl_Output* ow = (Fl_Output*) b -> parent() -> child(3); ow->value(convert(iw->value()));}//-------------------------------------------//void close_cb( Fl_Widget* o, void*) { exit(0);}//-------------------------------------------//