function_panel.cxx 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266
  1. //
  2. // "$Id: function_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $"
  3. //
  4. // Code dialogs for the Fast Light Tool Kit (FLTK).
  5. //
  6. // Copyright 1998-2010 by Bill Spitzak and others.
  7. //
  8. // This library is free software. Distribution and use rights are outlined in
  9. // the file "COPYING" which should have been included with this file. If this
  10. // file is missing or damaged, see the license at:
  11. //
  12. // http://www.fltk.org/COPYING.php
  13. //
  14. // Please report all bugs and problems on the following page:
  15. //
  16. // http://www.fltk.org/str.php
  17. //
  18. // generated by Fast Light User Interface Designer (fluid) version 1.0302
  19. #include "function_panel.h"
  20. #include <FL/Fl_Pixmap.H>
  21. #include "Fl_Type.h"
  22. #include "undo.h"
  23. extern class Fl_Pixmap *pixmap[];
  24. extern class Fl_Type *Fl_Type_make(const char*);
  25. extern void select_only(Fl_Type*);
  26. extern void exit_cb(Fl_Widget*, void*);
  27. extern void toggle_widgetbin_cb(Fl_Widget*, void*);
  28. extern void update_widget_browser_position_cb(CodeViewer *source, CodeViewer *header, Fl_Input *ii);
  29. Fl_Double_Window *function_panel=(Fl_Double_Window *)0;
  30. Fl_Choice *f_public_member_choice=(Fl_Choice *)0;
  31. Fl_Menu_Item menu_f_public_member_choice[] = {
  32. {"private", 0, 0, (void*)(0), 0, FL_NORMAL_LABEL, 0, 11, 0},
  33. {"public", 0, 0, (void*)(1), 0, FL_NORMAL_LABEL, 0, 11, 0},
  34. {"protected", 0, 0, (void*)(2), 0, FL_NORMAL_LABEL, 0, 11, 0},
  35. {0,0,0,0,0,0,0,0,0}
  36. };
  37. Fl_Choice *f_public_choice=(Fl_Choice *)0;
  38. Fl_Menu_Item menu_f_public_choice[] = {
  39. {"local", 0, 0, (void*)(0), 0, FL_NORMAL_LABEL, 0, 11, 0},
  40. {"global", 0, 0, (void*)(1), 0, FL_NORMAL_LABEL, 0, 11, 0},
  41. {0,0,0,0,0,0,0,0,0}
  42. };
  43. Fl_Light_Button *f_c_button=(Fl_Light_Button *)0;
  44. Fl_Input *f_name_input=(Fl_Input *)0;
  45. Fl_Input *f_return_type_input=(Fl_Input *)0;
  46. Fl_Return_Button *f_panel_ok=(Fl_Return_Button *)0;
  47. Fl_Button *f_panel_cancel=(Fl_Button *)0;
  48. Fl_Text_Editor *f_comment_input=(Fl_Text_Editor *)0;
  49. Fl_Double_Window* make_function_panel() {
  50. { function_panel = new Fl_Double_Window(343, 232, "Function/Method Properties");
  51. { Fl_Group* o = new Fl_Group(10, 10, 270, 20);
  52. { f_public_member_choice = new Fl_Choice(10, 10, 75, 20);
  53. f_public_member_choice->tooltip("Change member access attribute.");
  54. f_public_member_choice->down_box(FL_BORDER_BOX);
  55. f_public_member_choice->labelsize(11);
  56. f_public_member_choice->textsize(11);
  57. f_public_member_choice->when(FL_WHEN_CHANGED);
  58. f_public_member_choice->menu(menu_f_public_member_choice);
  59. } // Fl_Choice* f_public_member_choice
  60. { f_public_choice = new Fl_Choice(10, 10, 75, 20);
  61. f_public_choice->tooltip("Change widget accessibility.");
  62. f_public_choice->down_box(FL_BORDER_BOX);
  63. f_public_choice->labelsize(11);
  64. f_public_choice->textsize(11);
  65. f_public_choice->when(FL_WHEN_CHANGED);
  66. f_public_choice->menu(menu_f_public_choice);
  67. } // Fl_Choice* f_public_choice
  68. { f_c_button = new Fl_Light_Button(95, 10, 80, 20, "C declaration");
  69. f_c_button->tooltip("Declare with a C interface instead of C++.");
  70. f_c_button->labelsize(11);
  71. } // Fl_Light_Button* f_c_button
  72. { Fl_Box* o = new Fl_Box(235, 10, 45, 20);
  73. Fl_Group::current()->resizable(o);
  74. } // Fl_Box* o
  75. o->end();
  76. } // Fl_Group* o
  77. { f_name_input = new Fl_Input(10, 50, 320, 20, "Name(args): (blank for main())");
  78. f_name_input->tooltip("The name of the function or method.");
  79. f_name_input->labelfont(1);
  80. f_name_input->labelsize(11);
  81. f_name_input->textfont(4);
  82. f_name_input->textsize(11);
  83. f_name_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  84. f_name_input->when(FL_WHEN_NEVER);
  85. } // Fl_Input* f_name_input
  86. { f_return_type_input = new Fl_Input(10, 90, 320, 20, "Return Type: (blank to return outermost widget)");
  87. f_return_type_input->tooltip("The return type of the function or method.");
  88. f_return_type_input->labelfont(1);
  89. f_return_type_input->labelsize(11);
  90. f_return_type_input->textfont(4);
  91. f_return_type_input->textsize(11);
  92. f_return_type_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  93. f_return_type_input->when(FL_WHEN_NEVER);
  94. } // Fl_Input* f_return_type_input
  95. { Fl_Group* o = new Fl_Group(10, 200, 320, 20);
  96. { f_panel_ok = new Fl_Return_Button(220, 200, 50, 20, "OK");
  97. f_panel_ok->tooltip("Apply the changes.");
  98. f_panel_ok->labelsize(11);
  99. f_panel_ok->window()->hotspot(f_panel_ok);
  100. } // Fl_Return_Button* f_panel_ok
  101. { f_panel_cancel = new Fl_Button(280, 200, 50, 20, "Cancel");
  102. f_panel_cancel->tooltip("Cancel the changes.");
  103. f_panel_cancel->shortcut(0xff1b);
  104. f_panel_cancel->labelsize(11);
  105. } // Fl_Button* f_panel_cancel
  106. { Fl_Box* o = new Fl_Box(10, 200, 205, 20);
  107. Fl_Group::current()->resizable(o);
  108. } // Fl_Box* o
  109. o->end();
  110. } // Fl_Group* o
  111. { f_comment_input = new Fl_Text_Editor(10, 125, 320, 65, "Comment:");
  112. f_comment_input->tooltip("Function comment in Doxygen format");
  113. f_comment_input->box(FL_DOWN_BOX);
  114. f_comment_input->labelfont(1);
  115. f_comment_input->labelsize(11);
  116. f_comment_input->textfont(4);
  117. f_comment_input->textsize(11);
  118. f_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  119. Fl_Group::current()->resizable(f_comment_input);
  120. f_comment_input->buffer(new Fl_Text_Buffer());
  121. } // Fl_Text_Editor* f_comment_input
  122. function_panel->set_modal();
  123. function_panel->end();
  124. } // Fl_Double_Window* function_panel
  125. return function_panel;
  126. }
  127. Fl_Double_Window *code_panel=(Fl_Double_Window *)0;
  128. CodeEditor *code_input=(CodeEditor *)0;
  129. Fl_Return_Button *code_panel_ok=(Fl_Return_Button *)0;
  130. Fl_Button *code_panel_cancel=(Fl_Button *)0;
  131. Fl_Input *code_parent=(Fl_Input *)0;
  132. Fl_Double_Window* make_code_panel() {
  133. { Fl_Double_Window* o = code_panel = new Fl_Double_Window(540, 216, "Code Properties");
  134. code_panel->labelsize(11);
  135. { CodeEditor* o = code_input = new CodeEditor(10, 45, 520, 130);
  136. code_input->box(FL_DOWN_BOX);
  137. code_input->color(FL_BACKGROUND2_COLOR);
  138. code_input->selection_color(FL_SELECTION_COLOR);
  139. code_input->labeltype(FL_NORMAL_LABEL);
  140. code_input->labelfont(0);
  141. code_input->labelsize(11);
  142. code_input->labelcolor(FL_FOREGROUND_COLOR);
  143. code_input->textfont(4);
  144. code_input->textsize(11);
  145. code_input->align(Fl_Align(FL_ALIGN_TOP));
  146. code_input->when(FL_WHEN_RELEASE);
  147. Fl_Group::current()->resizable(code_input);
  148. o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);
  149. o->change_text_size(14);
  150. } // CodeEditor* code_input
  151. { Fl_Group* o = new Fl_Group(10, 185, 520, 20);
  152. o->labelsize(11);
  153. { code_panel_ok = new Fl_Return_Button(400, 185, 60, 20, "OK");
  154. code_panel_ok->labelsize(11);
  155. code_panel_ok->window()->hotspot(code_panel_ok);
  156. } // Fl_Return_Button* code_panel_ok
  157. { code_panel_cancel = new Fl_Button(470, 185, 60, 20, "Cancel");
  158. code_panel_cancel->shortcut(0xff1b);
  159. code_panel_cancel->labelsize(11);
  160. } // Fl_Button* code_panel_cancel
  161. { Fl_Box* o = new Fl_Box(10, 185, 380, 20);
  162. o->labelsize(11);
  163. Fl_Group::current()->resizable(o);
  164. } // Fl_Box* o
  165. o->end();
  166. } // Fl_Group* o
  167. { code_parent = new Fl_Input(40, 11, 490, 24, "For:");
  168. } // Fl_Input* code_parent
  169. o->size_range(200, 150);
  170. code_panel->set_modal();
  171. code_panel->end();
  172. } // Fl_Double_Window* code_panel
  173. return code_panel;
  174. }
  175. Fl_Double_Window *codeblock_panel=(Fl_Double_Window *)0;
  176. Fl_Input *code_before_input=(Fl_Input *)0;
  177. Fl_Input *code_after_input=(Fl_Input *)0;
  178. Fl_Return_Button *codeblock_panel_ok=(Fl_Return_Button *)0;
  179. Fl_Button *codeblock_panel_cancel=(Fl_Button *)0;
  180. Fl_Double_Window* make_codeblock_panel() {
  181. { Fl_Double_Window* o = codeblock_panel = new Fl_Double_Window(300, 115, "Code Block Properties");
  182. codeblock_panel->labelsize(11);
  183. { code_before_input = new Fl_Input(10, 15, 280, 20, "Conditional code block");
  184. code_before_input->tooltip("#ifdef or similar conditional code block.");
  185. code_before_input->labelsize(11);
  186. code_before_input->textfont(4);
  187. code_before_input->textsize(11);
  188. code_before_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  189. code_before_input->when(FL_WHEN_NEVER);
  190. } // Fl_Input* code_before_input
  191. { code_after_input = new Fl_Input(10, 55, 280, 20, "\"{...child code...}\" is inserted here");
  192. code_after_input->tooltip("#endif or similar conditional code block.");
  193. code_after_input->labelsize(11);
  194. code_after_input->textfont(4);
  195. code_after_input->textsize(11);
  196. code_after_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  197. code_after_input->when(FL_WHEN_NEVER);
  198. Fl_Group::current()->resizable(code_after_input);
  199. } // Fl_Input* code_after_input
  200. { Fl_Group* o = new Fl_Group(10, 85, 280, 20);
  201. { codeblock_panel_ok = new Fl_Return_Button(160, 85, 60, 20, "OK");
  202. codeblock_panel_ok->labelsize(11);
  203. codeblock_panel_ok->window()->hotspot(codeblock_panel_ok);
  204. } // Fl_Return_Button* codeblock_panel_ok
  205. { codeblock_panel_cancel = new Fl_Button(230, 85, 60, 20, "Cancel");
  206. codeblock_panel_cancel->shortcut(0xff1b);
  207. codeblock_panel_cancel->labelsize(11);
  208. } // Fl_Button* codeblock_panel_cancel
  209. { Fl_Box* o = new Fl_Box(10, 85, 140, 20);
  210. Fl_Group::current()->resizable(o);
  211. } // Fl_Box* o
  212. o->end();
  213. } // Fl_Group* o
  214. o->size_range(o->w(), o->h(), Fl::w(), o->h());
  215. codeblock_panel->set_modal();
  216. codeblock_panel->end();
  217. } // Fl_Double_Window* codeblock_panel
  218. return codeblock_panel;
  219. }
  220. Fl_Double_Window *block_panel=(Fl_Double_Window *)0;
  221. Fl_Choice *block_public_choice=(Fl_Choice *)0;
  222. Fl_Menu_Item menu_block_public_choice[] = {
  223. {"in source code only", 0, 0, (void*)(0), 0, FL_NORMAL_LABEL, 0, 11, 0},
  224. {"in header and source", 0, 0, (void*)(1), 0, FL_NORMAL_LABEL, 0, 11, 0},
  225. {0,0,0,0,0,0,0,0,0}
  226. };
  227. Fl_Light_Button *block_public_button_x=(Fl_Light_Button *)0;
  228. Fl_Input *block_name_input=(Fl_Input *)0;
  229. Fl_Input *block_before_input=(Fl_Input *)0;
  230. Fl_Input *block_after_input=(Fl_Input *)0;
  231. Fl_Input *block_file_name_input=(Fl_Input *)0;
  232. Fl_Return_Button *block_panel_ok=(Fl_Return_Button *)0;
  233. Fl_Button *block_panel_cancel=(Fl_Button *)0;
  234. Fl_Double_Window* make_block_panel() {
  235. { Fl_Double_Window* o = block_panel = new Fl_Double_Window(300, 236, "Block Properties");
  236. block_panel->labelsize(11);
  237. { Fl_Group* o = new Fl_Group(10, 10, 280, 20);
  238. { block_public_choice = new Fl_Choice(10, 10, 140, 20);
  239. block_public_choice->tooltip("Change widget accessibility.");
  240. block_public_choice->down_box(FL_BORDER_BOX);
  241. block_public_choice->labelsize(11);
  242. block_public_choice->textsize(11);
  243. block_public_choice->when(FL_WHEN_NEVER);
  244. block_public_choice->menu(menu_block_public_choice);
  245. } // Fl_Choice* block_public_choice
  246. { block_public_button_x = new Fl_Light_Button(10, 10, 60, 20, "public");
  247. block_public_button_x->tooltip("Make the declaration publicly accessible.");
  248. block_public_button_x->labelsize(11);
  249. block_public_button_x->when(FL_WHEN_NEVER);
  250. block_public_button_x->hide();
  251. } // Fl_Light_Button* block_public_button_x
  252. { Fl_Box* o = new Fl_Box(155, 10, 135, 20);
  253. Fl_Group::current()->resizable(o);
  254. } // Fl_Box* o
  255. o->end();
  256. } // Fl_Group* o
  257. { block_name_input = new Fl_Input(10, 50, 280, 20, "name for this block");
  258. block_name_input->tooltip("#endif or similar declaration code block.");
  259. block_name_input->labelsize(11);
  260. block_name_input->textfont(4);
  261. block_name_input->textsize(11);
  262. block_name_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  263. block_name_input->when(FL_WHEN_NEVER);
  264. } // Fl_Input* block_name_input
  265. { block_before_input = new Fl_Input(10, 89, 280, 20, "block begin mark");
  266. block_before_input->tooltip("#ifdef or similar conditional declaration block.");
  267. block_before_input->labelsize(11);
  268. block_before_input->textfont(4);
  269. block_before_input->textsize(11);
  270. block_before_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  271. block_before_input->when(FL_WHEN_NEVER);
  272. Fl_Group::current()->resizable(block_before_input);
  273. } // Fl_Input* block_before_input
  274. { block_after_input = new Fl_Input(10, 128, 280, 20, "block end mark");
  275. block_after_input->tooltip("#endif or similar declaration code block.");
  276. block_after_input->labelsize(11);
  277. block_after_input->textfont(4);
  278. block_after_input->textsize(11);
  279. block_after_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  280. block_after_input->when(FL_WHEN_NEVER);
  281. } // Fl_Input* block_after_input
  282. { block_file_name_input = new Fl_Input(10, 167, 280, 20, "file name for this block");
  283. block_file_name_input->tooltip("#endif or similar declaration code block.");
  284. block_file_name_input->labelsize(11);
  285. block_file_name_input->textfont(4);
  286. block_file_name_input->textsize(11);
  287. block_file_name_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  288. block_file_name_input->when(FL_WHEN_NEVER);
  289. } // Fl_Input* block_file_name_input
  290. { Fl_Group* o = new Fl_Group(10, 205, 280, 20);
  291. { block_panel_ok = new Fl_Return_Button(160, 205, 60, 20, "OK");
  292. block_panel_ok->labelsize(11);
  293. block_panel_ok->window()->hotspot(block_panel_ok);
  294. } // Fl_Return_Button* block_panel_ok
  295. { block_panel_cancel = new Fl_Button(230, 205, 60, 20, "Cancel");
  296. block_panel_cancel->shortcut(0xff1b);
  297. block_panel_cancel->labelsize(11);
  298. } // Fl_Button* block_panel_cancel
  299. { Fl_Box* o = new Fl_Box(10, 205, 140, 20);
  300. Fl_Group::current()->resizable(o);
  301. } // Fl_Box* o
  302. o->end();
  303. } // Fl_Group* o
  304. o->size_range(o->w(), o->h(), Fl::w(), o->h());
  305. block_panel->set_modal();
  306. block_panel->end();
  307. } // Fl_Double_Window* block_panel
  308. return block_panel;
  309. }
  310. Fl_Double_Window *declblock_panel=(Fl_Double_Window *)0;
  311. Fl_Choice *declblock_public_choice=(Fl_Choice *)0;
  312. Fl_Menu_Item menu_declblock_public_choice[] = {
  313. {"in source code only", 0, 0, (void*)(0), 0, FL_NORMAL_LABEL, 0, 11, 0},
  314. {"in header and source", 0, 0, (void*)(1), 0, FL_NORMAL_LABEL, 0, 11, 0},
  315. {0,0,0,0,0,0,0,0,0}
  316. };
  317. Fl_Light_Button *declblock_public_button_x=(Fl_Light_Button *)0;
  318. Fl_Input *decl_before_input=(Fl_Input *)0;
  319. Fl_Input *decl_after_input=(Fl_Input *)0;
  320. Fl_Return_Button *declblock_panel_ok=(Fl_Return_Button *)0;
  321. Fl_Button *declblock_panel_cancel=(Fl_Button *)0;
  322. Fl_Double_Window* make_declblock_panel() {
  323. { Fl_Double_Window* o = declblock_panel = new Fl_Double_Window(300, 135, "Declaration Block Properties");
  324. declblock_panel->labelsize(11);
  325. { Fl_Group* o = new Fl_Group(10, 10, 280, 20);
  326. { declblock_public_choice = new Fl_Choice(10, 10, 140, 20);
  327. declblock_public_choice->tooltip("Change widget accessibility.");
  328. declblock_public_choice->down_box(FL_BORDER_BOX);
  329. declblock_public_choice->labelsize(11);
  330. declblock_public_choice->textsize(11);
  331. declblock_public_choice->when(FL_WHEN_NEVER);
  332. declblock_public_choice->menu(menu_declblock_public_choice);
  333. } // Fl_Choice* declblock_public_choice
  334. { declblock_public_button_x = new Fl_Light_Button(10, 10, 60, 20, "public");
  335. declblock_public_button_x->tooltip("Make the declaration publicly accessible.");
  336. declblock_public_button_x->labelsize(11);
  337. declblock_public_button_x->when(FL_WHEN_NEVER);
  338. declblock_public_button_x->hide();
  339. } // Fl_Light_Button* declblock_public_button_x
  340. { Fl_Box* o = new Fl_Box(155, 10, 135, 20);
  341. Fl_Group::current()->resizable(o);
  342. } // Fl_Box* o
  343. o->end();
  344. } // Fl_Group* o
  345. { decl_before_input = new Fl_Input(10, 40, 280, 20);
  346. decl_before_input->tooltip("#ifdef or similar conditional declaration block.");
  347. decl_before_input->labelsize(11);
  348. decl_before_input->textfont(4);
  349. decl_before_input->textsize(11);
  350. decl_before_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  351. decl_before_input->when(FL_WHEN_NEVER);
  352. Fl_Group::current()->resizable(decl_before_input);
  353. } // Fl_Input* decl_before_input
  354. { decl_after_input = new Fl_Input(10, 75, 280, 20, "\"\\n...child code...\\n\" is inserted here");
  355. decl_after_input->tooltip("#endif or similar declaration code block.");
  356. decl_after_input->labelsize(11);
  357. decl_after_input->textfont(4);
  358. decl_after_input->textsize(11);
  359. decl_after_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  360. decl_after_input->when(FL_WHEN_NEVER);
  361. } // Fl_Input* decl_after_input
  362. { Fl_Group* o = new Fl_Group(10, 105, 280, 20);
  363. { declblock_panel_ok = new Fl_Return_Button(160, 105, 60, 20, "OK");
  364. declblock_panel_ok->labelsize(11);
  365. declblock_panel_ok->window()->hotspot(declblock_panel_ok);
  366. } // Fl_Return_Button* declblock_panel_ok
  367. { declblock_panel_cancel = new Fl_Button(230, 105, 60, 20, "Cancel");
  368. declblock_panel_cancel->shortcut(0xff1b);
  369. declblock_panel_cancel->labelsize(11);
  370. } // Fl_Button* declblock_panel_cancel
  371. { Fl_Box* o = new Fl_Box(10, 105, 140, 20);
  372. Fl_Group::current()->resizable(o);
  373. } // Fl_Box* o
  374. o->end();
  375. } // Fl_Group* o
  376. o->size_range(o->w(), o->h(), Fl::w(), o->h());
  377. declblock_panel->set_modal();
  378. declblock_panel->end();
  379. } // Fl_Double_Window* declblock_panel
  380. return declblock_panel;
  381. }
  382. Fl_Double_Window *decl_panel=(Fl_Double_Window *)0;
  383. Fl_Choice *decl_choice=(Fl_Choice *)0;
  384. Fl_Menu_Item menu_decl_choice[] = {
  385. {"in source file only", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  386. {"in header file only", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  387. {"\"static\" in source file", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  388. {"in source and \"extern\" in header", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  389. {0,0,0,0,0,0,0,0,0}
  390. };
  391. Fl_Choice *decl_class_choice=(Fl_Choice *)0;
  392. Fl_Menu_Item menu_decl_class_choice[] = {
  393. {"private", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  394. {"public", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  395. {"protected", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  396. {0,0,0,0,0,0,0,0,0}
  397. };
  398. Fl_Text_Editor *decl_input=(Fl_Text_Editor *)0;
  399. Fl_Return_Button *decl_panel_ok=(Fl_Return_Button *)0;
  400. Fl_Button *decl_panel_cancel=(Fl_Button *)0;
  401. Fl_Text_Editor *decl_comment_input=(Fl_Text_Editor *)0;
  402. Fl_Check_Button *decl_has_initialization=(Fl_Check_Button *)0;
  403. Fl_Double_Window* make_decl_panel() {
  404. { decl_panel = new Fl_Double_Window(343, 338, "Declaration Properties");
  405. decl_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
  406. { Fl_Group* o = new Fl_Group(10, 10, 270, 20);
  407. { Fl_Box* o = new Fl_Box(200, 10, 80, 20);
  408. Fl_Group::current()->resizable(o);
  409. } // Fl_Box* o
  410. { decl_choice = new Fl_Choice(10, 10, 185, 20);
  411. decl_choice->down_box(FL_BORDER_BOX);
  412. decl_choice->labelsize(11);
  413. decl_choice->textsize(11);
  414. decl_choice->menu(menu_decl_choice);
  415. } // Fl_Choice* decl_choice
  416. { decl_class_choice = new Fl_Choice(10, 10, 75, 20);
  417. decl_class_choice->down_box(FL_BORDER_BOX);
  418. decl_class_choice->labelsize(11);
  419. decl_class_choice->textsize(11);
  420. decl_class_choice->menu(menu_decl_class_choice);
  421. } // Fl_Choice* decl_class_choice
  422. o->end();
  423. } // Fl_Group* o
  424. { decl_input = new Fl_Text_Editor(13, 40, 320, 123, "This can be any declaration, like \"int x;\", an external symbol like \"exter\
  425. n int foo();\", a #directive like \"#include <foo.h>\", a comment like \"//foo\
  426. \" or \"/*foo*/\", or typedef like \"typedef char byte;\" or \"using std::list\
  427. ;\".");
  428. decl_input->tooltip("Declaration comment in Doxygen format");
  429. decl_input->box(FL_DOWN_BOX);
  430. decl_input->labelsize(11);
  431. decl_input->textfont(4);
  432. decl_input->align(Fl_Align(130));
  433. Fl_Group::current()->resizable(decl_input);
  434. decl_input->buffer(new Fl_Text_Buffer());
  435. } // Fl_Text_Editor* decl_input
  436. { Fl_Group* o = new Fl_Group(10, 308, 320, 20);
  437. { decl_panel_ok = new Fl_Return_Button(200, 308, 60, 20, "OK");
  438. decl_panel_ok->labelsize(11);
  439. decl_panel_ok->window()->hotspot(decl_panel_ok);
  440. } // Fl_Return_Button* decl_panel_ok
  441. { decl_panel_cancel = new Fl_Button(270, 308, 60, 20, "Cancel");
  442. decl_panel_cancel->shortcut(0xff1b);
  443. decl_panel_cancel->labelsize(11);
  444. } // Fl_Button* decl_panel_cancel
  445. { Fl_Box* o = new Fl_Box(10, 308, 185, 20);
  446. Fl_Group::current()->resizable(o);
  447. } // Fl_Box* o
  448. o->end();
  449. } // Fl_Group* o
  450. { decl_comment_input = new Fl_Text_Editor(10, 233, 320, 65, "Comment:");
  451. decl_comment_input->tooltip("Declaration comment in Doxygen format");
  452. decl_comment_input->box(FL_DOWN_BOX);
  453. decl_comment_input->labelfont(1);
  454. decl_comment_input->labelsize(11);
  455. decl_comment_input->textfont(4);
  456. decl_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  457. decl_comment_input->buffer(new Fl_Text_Buffer());
  458. } // Fl_Text_Editor* decl_comment_input
  459. { decl_has_initialization = new Fl_Check_Button(260, 214, 70, 15, "has init");
  460. decl_has_initialization->down_box(FL_DOWN_BOX);
  461. } // Fl_Check_Button* decl_has_initialization
  462. decl_panel->size_range(343, 237);
  463. decl_panel->end();
  464. } // Fl_Double_Window* decl_panel
  465. return decl_panel;
  466. }
  467. Fl_Double_Window *data_panel=(Fl_Double_Window *)0;
  468. Fl_Choice *data_choice=(Fl_Choice *)0;
  469. Fl_Menu_Item menu_data_choice[] = {
  470. {"in source file only", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  471. {"in header file only", 0, 0, 0, 16, FL_NORMAL_LABEL, 0, 11, 0},
  472. {"\"static\" in source file", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  473. {"in source and \"extern\" in header", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  474. {0,0,0,0,0,0,0,0,0}
  475. };
  476. Fl_Choice *data_class_choice=(Fl_Choice *)0;
  477. Fl_Menu_Item menu_data_class_choice[] = {
  478. {"private", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  479. {"public", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  480. {"protected", 0, 0, 0, 0, FL_NORMAL_LABEL, 0, 11, 0},
  481. {0,0,0,0,0,0,0,0,0}
  482. };
  483. Fl_Input *data_input=(Fl_Input *)0;
  484. Fl_Input *data_filename=(Fl_Input *)0;
  485. Fl_Button *data_filebrowser=(Fl_Button *)0;
  486. Fl_Return_Button *data_panel_ok=(Fl_Return_Button *)0;
  487. Fl_Button *data_panel_cancel=(Fl_Button *)0;
  488. Fl_Text_Editor *data_comment_input=(Fl_Text_Editor *)0;
  489. Fl_Double_Window* make_data_panel() {
  490. { data_panel = new Fl_Double_Window(343, 237, "Binary Data Properties");
  491. data_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
  492. { Fl_Group* o = new Fl_Group(10, 10, 270, 20);
  493. { Fl_Box* o = new Fl_Box(200, 10, 80, 20);
  494. Fl_Group::current()->resizable(o);
  495. } // Fl_Box* o
  496. { data_choice = new Fl_Choice(10, 10, 185, 20);
  497. data_choice->down_box(FL_BORDER_BOX);
  498. data_choice->labelsize(11);
  499. data_choice->textsize(11);
  500. data_choice->menu(menu_data_choice);
  501. } // Fl_Choice* data_choice
  502. { data_class_choice = new Fl_Choice(10, 10, 75, 20);
  503. data_class_choice->down_box(FL_BORDER_BOX);
  504. data_class_choice->labelsize(11);
  505. data_class_choice->textsize(11);
  506. data_class_choice->menu(menu_data_class_choice);
  507. } // Fl_Choice* data_class_choice
  508. o->end();
  509. } // Fl_Group* o
  510. { data_input = new Fl_Input(10, 52, 320, 20, "Variable Name:");
  511. data_input->tooltip("Binary Data variables are declared \"const unsigned char []\".");
  512. data_input->labelfont(1);
  513. data_input->labelsize(11);
  514. data_input->textfont(4);
  515. data_input->textsize(11);
  516. data_input->align(Fl_Align(133));
  517. data_input->when(FL_WHEN_NEVER);
  518. } // Fl_Input* data_input
  519. { data_filename = new Fl_Input(10, 90, 280, 20, "Filename:");
  520. data_filename->tooltip("Name and path of binary file that will be included.");
  521. data_filename->labelfont(1);
  522. data_filename->labelsize(11);
  523. data_filename->textfont(4);
  524. data_filename->textsize(11);
  525. data_filename->align(Fl_Align(133));
  526. data_filename->when(FL_WHEN_NEVER);
  527. } // Fl_Input* data_filename
  528. { data_filebrowser = new Fl_Button(290, 90, 40, 20, "@fileopen");
  529. data_filebrowser->labelcolor((Fl_Color)134);
  530. } // Fl_Button* data_filebrowser
  531. { Fl_Group* o = new Fl_Group(10, 205, 320, 20);
  532. { data_panel_ok = new Fl_Return_Button(200, 205, 60, 20, "OK");
  533. data_panel_ok->labelsize(11);
  534. data_panel_ok->window()->hotspot(data_panel_ok);
  535. } // Fl_Return_Button* data_panel_ok
  536. { data_panel_cancel = new Fl_Button(270, 205, 60, 20, "Cancel");
  537. data_panel_cancel->shortcut(0xff1b);
  538. data_panel_cancel->labelsize(11);
  539. } // Fl_Button* data_panel_cancel
  540. { Fl_Box* o = new Fl_Box(10, 205, 185, 20);
  541. Fl_Group::current()->resizable(o);
  542. } // Fl_Box* o
  543. o->end();
  544. } // Fl_Group* o
  545. { data_comment_input = new Fl_Text_Editor(10, 130, 320, 65, "Comment:");
  546. data_comment_input->tooltip("Declaration comment in Doxygen format");
  547. data_comment_input->box(FL_DOWN_BOX);
  548. data_comment_input->labelfont(1);
  549. data_comment_input->labelsize(11);
  550. data_comment_input->textfont(4);
  551. data_comment_input->textsize(11);
  552. data_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  553. Fl_Group::current()->resizable(data_comment_input);
  554. data_comment_input->buffer(new Fl_Text_Buffer());
  555. } // Fl_Text_Editor* data_comment_input
  556. data_panel->size_range(343, 237);
  557. data_panel->end();
  558. } // Fl_Double_Window* data_panel
  559. return data_panel;
  560. }
  561. Fl_Double_Window *class_panel=(Fl_Double_Window *)0;
  562. Fl_Light_Button *c_public_button=(Fl_Light_Button *)0;
  563. Fl_Input *c_name_input=(Fl_Input *)0;
  564. Fl_Input *c_subclass_input=(Fl_Input *)0;
  565. Fl_Text_Editor *c_comment_input=(Fl_Text_Editor *)0;
  566. Fl_Return_Button *c_panel_ok=(Fl_Return_Button *)0;
  567. Fl_Button *c_panel_cancel=(Fl_Button *)0;
  568. Fl_Double_Window* make_class_panel() {
  569. { class_panel = new Fl_Double_Window(342, 193, "Class Properties");
  570. class_panel->labelsize(11);
  571. { Fl_Group* o = new Fl_Group(10, 10, 280, 20);
  572. o->hide();
  573. { c_public_button = new Fl_Light_Button(10, 10, 60, 20, "public");
  574. c_public_button->tooltip("Make the class publicly accessible.");
  575. c_public_button->labelsize(11);
  576. c_public_button->when(FL_WHEN_NEVER);
  577. c_public_button->hide();
  578. } // Fl_Light_Button* c_public_button
  579. { Fl_Box* o = new Fl_Box(80, 10, 210, 20);
  580. Fl_Group::current()->resizable(o);
  581. } // Fl_Box* o
  582. o->end();
  583. } // Fl_Group* o
  584. { c_name_input = new Fl_Input(10, 20, 320, 20, "Name:");
  585. c_name_input->tooltip("Name of class.");
  586. c_name_input->labelfont(1);
  587. c_name_input->labelsize(11);
  588. c_name_input->textfont(4);
  589. c_name_input->textsize(11);
  590. c_name_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  591. c_name_input->when(FL_WHEN_NEVER);
  592. } // Fl_Input* c_name_input
  593. { c_subclass_input = new Fl_Input(10, 55, 320, 20, "Subclass of (text between : and {)");
  594. c_subclass_input->tooltip("Name of subclass.");
  595. c_subclass_input->labelfont(1);
  596. c_subclass_input->labelsize(11);
  597. c_subclass_input->textfont(4);
  598. c_subclass_input->textsize(11);
  599. c_subclass_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  600. c_subclass_input->when(FL_WHEN_NEVER);
  601. } // Fl_Input* c_subclass_input
  602. { c_comment_input = new Fl_Text_Editor(10, 94, 320, 65, "Comment:");
  603. c_comment_input->tooltip("Class comment in Doxygen format");
  604. c_comment_input->box(FL_DOWN_BOX);
  605. c_comment_input->labelfont(1);
  606. c_comment_input->labelsize(11);
  607. c_comment_input->textfont(4);
  608. c_comment_input->textsize(11);
  609. c_comment_input->align(Fl_Align(FL_ALIGN_TOP_LEFT));
  610. Fl_Group::current()->resizable(c_comment_input);
  611. c_comment_input->buffer(new Fl_Text_Buffer());
  612. } // Fl_Text_Editor* c_comment_input
  613. { Fl_Group* o = new Fl_Group(10, 169, 320, 20);
  614. { c_panel_ok = new Fl_Return_Button(200, 169, 60, 20, "OK");
  615. c_panel_ok->labelsize(11);
  616. c_panel_ok->window()->hotspot(c_panel_ok);
  617. } // Fl_Return_Button* c_panel_ok
  618. { c_panel_cancel = new Fl_Button(270, 169, 60, 20, "Cancel");
  619. c_panel_cancel->shortcut(0xff1b);
  620. c_panel_cancel->labelsize(11);
  621. } // Fl_Button* c_panel_cancel
  622. { Fl_Box* o = new Fl_Box(10, 169, 185, 20);
  623. Fl_Group::current()->resizable(o);
  624. } // Fl_Box* o
  625. o->end();
  626. } // Fl_Group* o
  627. class_panel->set_modal();
  628. class_panel->size_range(343, 188);
  629. class_panel->end();
  630. } // Fl_Double_Window* class_panel
  631. return class_panel;
  632. }
  633. Fl_Double_Window *comment_panel=(Fl_Double_Window *)0;
  634. CodeEditor *comment_input=(CodeEditor *)0;
  635. Fl_Return_Button *comment_panel_ok=(Fl_Return_Button *)0;
  636. Fl_Button *comment_panel_cancel=(Fl_Button *)0;
  637. Fl_Light_Button *comment_in_source=(Fl_Light_Button *)0;
  638. Fl_Light_Button *comment_in_header=(Fl_Light_Button *)0;
  639. Fl_Menu_Button *comment_predefined=(Fl_Menu_Button *)0;
  640. Fl_Button *comment_load=(Fl_Button *)0;
  641. Fl_Double_Window* make_comment_panel() {
  642. { Fl_Double_Window* o = comment_panel = new Fl_Double_Window(550, 280, "Comment Properties");
  643. comment_panel->labelsize(11);
  644. { CodeEditor* o = comment_input = new CodeEditor(110, 10, 430, 230);
  645. comment_input->box(FL_DOWN_BOX);
  646. comment_input->color(FL_BACKGROUND2_COLOR);
  647. comment_input->selection_color(FL_SELECTION_COLOR);
  648. comment_input->labeltype(FL_NORMAL_LABEL);
  649. comment_input->labelfont(0);
  650. comment_input->labelsize(11);
  651. comment_input->labelcolor(FL_FOREGROUND_COLOR);
  652. comment_input->textfont(4);
  653. comment_input->textsize(11);
  654. comment_input->align(Fl_Align(FL_ALIGN_TOP));
  655. comment_input->when(FL_WHEN_RELEASE);
  656. Fl_Group::current()->resizable(comment_input);
  657. o->when(FL_WHEN_ENTER_KEY_CHANGED|FL_WHEN_RELEASE);
  658. } // CodeEditor* comment_input
  659. { Fl_Group* o = new Fl_Group(110, 250, 430, 20);
  660. o->labelsize(11);
  661. { comment_panel_ok = new Fl_Return_Button(370, 250, 80, 20, "OK");
  662. comment_panel_ok->labelsize(11);
  663. comment_panel_ok->window()->hotspot(comment_panel_ok);
  664. } // Fl_Return_Button* comment_panel_ok
  665. { comment_panel_cancel = new Fl_Button(460, 250, 80, 20, "Cancel");
  666. comment_panel_cancel->shortcut(0xff1b);
  667. comment_panel_cancel->labelsize(11);
  668. } // Fl_Button* comment_panel_cancel
  669. { Fl_Box* o = new Fl_Box(110, 250, 250, 20);
  670. o->labelsize(11);
  671. Fl_Group::current()->resizable(o);
  672. } // Fl_Box* o
  673. o->end();
  674. } // Fl_Group* o
  675. { Fl_Group* o = new Fl_Group(10, 10, 90, 243);
  676. o->labelsize(11);
  677. { comment_in_source = new Fl_Light_Button(10, 10, 90, 20, "In Source");
  678. comment_in_source->tooltip("Put the comment into the source (.cxx) file.");
  679. comment_in_source->labelsize(11);
  680. comment_in_source->when(FL_WHEN_NEVER);
  681. } // Fl_Light_Button* comment_in_source
  682. { comment_in_header = new Fl_Light_Button(10, 40, 90, 20, "In Header");
  683. comment_in_header->tooltip("Put the comment into the header (.h) file.");
  684. comment_in_header->labelsize(11);
  685. comment_in_header->when(FL_WHEN_NEVER);
  686. } // Fl_Light_Button* comment_in_header
  687. { comment_predefined = new Fl_Menu_Button(10, 70, 90, 20, "Predefined");
  688. comment_predefined->labelsize(11);
  689. comment_predefined->textsize(11);
  690. } // Fl_Menu_Button* comment_predefined
  691. { comment_load = new Fl_Button(10, 100, 90, 20, "Import...");
  692. comment_load->labelsize(11);
  693. } // Fl_Button* comment_load
  694. { Fl_Box* o = new Fl_Box(10, 132, 90, 121);
  695. o->labelsize(11);
  696. Fl_Group::current()->resizable(o);
  697. } // Fl_Box* o
  698. o->end();
  699. } // Fl_Group* o
  700. o->size_range(320, 180);
  701. comment_panel->set_modal();
  702. comment_panel->end();
  703. } // Fl_Double_Window* comment_panel
  704. return comment_panel;
  705. }
  706. void type_make_cb(Fl_Widget*,void*d) {
  707. undo_checkpoint();
  708. Fl_Type *t = Fl_Type_make((char*)d);
  709. if (t) {
  710. select_only(t);
  711. set_modflag(1);
  712. t->open();
  713. } else {
  714. undo_current --;
  715. undo_last --;
  716. }
  717. }
  718. Fl_Window *widgetbin_panel=(Fl_Window *)0;
  719. static void cb_widgetbin_panel(Fl_Window* o, void* v) {
  720. if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape)
  721. exit_cb((Fl_Widget*)o, v);
  722. else
  723. toggle_widgetbin_cb((Fl_Widget*)o, v);
  724. }
  725. Fl_Window* make_widgetbin() {
  726. { widgetbin_panel = new Fl_Window(550, 85, "Widget Bin");
  727. widgetbin_panel->callback((Fl_Callback*)cb_widgetbin_panel);
  728. widgetbin_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
  729. { Fl_Group* o = new Fl_Group(3, 3, 79, 79);
  730. { Fl_Button* o = new Fl_Button(5, 5, 24, 24);
  731. o->tooltip("Function");
  732. o->box(FL_THIN_UP_BOX);
  733. o->callback((Fl_Callback*)type_make_cb, (void*)("Function"));
  734. o->image(pixmap[7]);
  735. } // Fl_Button* o
  736. { Fl_Button* o = new Fl_Button(30, 5, 24, 24);
  737. o->tooltip("Class");
  738. o->box(FL_THIN_UP_BOX);
  739. o->callback((Fl_Callback*)type_make_cb, (void*)("Class"));
  740. o->image(pixmap[12]);
  741. } // Fl_Button* o
  742. { Fl_Button* o = new Fl_Button(55, 5, 24, 24);
  743. o->tooltip("Comment");
  744. o->box(FL_THIN_UP_BOX);
  745. o->callback((Fl_Callback*)type_make_cb, (void*)("comment"));
  746. o->image(pixmap[46]);
  747. } // Fl_Button* o
  748. { Fl_Button* o = new Fl_Button(5, 30, 24, 24);
  749. o->tooltip("Code");
  750. o->box(FL_THIN_UP_BOX);
  751. o->callback((Fl_Callback*)type_make_cb, (void*)("Code"));
  752. o->image(pixmap[8]);
  753. } // Fl_Button* o
  754. { Fl_Button* o = new Fl_Button(30, 30, 24, 24);
  755. o->tooltip("Code Block");
  756. o->box(FL_THIN_UP_BOX);
  757. o->callback((Fl_Callback*)type_make_cb, (void*)("CodeBlock"));
  758. o->image(pixmap[9]);
  759. } // Fl_Button* o
  760. { Fl_Button* o = new Fl_Button(55, 30, 24, 24);
  761. o->tooltip("Widget Class");
  762. o->box(FL_THIN_UP_BOX);
  763. o->callback((Fl_Callback*)type_make_cb, (void*)("widget_class"));
  764. o->image(pixmap[48]);
  765. } // Fl_Button* o
  766. { Fl_Button* o = new Fl_Button(5, 55, 24, 24);
  767. o->tooltip("Declaration");
  768. o->box(FL_THIN_UP_BOX);
  769. o->callback((Fl_Callback*)type_make_cb, (void*)("decl"));
  770. o->image(pixmap[10]);
  771. } // Fl_Button* o
  772. { Fl_Button* o = new Fl_Button(30, 55, 24, 24);
  773. o->tooltip("Declaration Block");
  774. o->box(FL_THIN_UP_BOX);
  775. o->callback((Fl_Callback*)type_make_cb, (void*)("declblock"));
  776. o->image(pixmap[11]);
  777. } // Fl_Button* o
  778. { Fl_Button* o = new Fl_Button(55, 55, 24, 24);
  779. o->tooltip("Binary Data");
  780. o->box(FL_THIN_UP_BOX);
  781. o->callback((Fl_Callback*)type_make_cb, (void*)("data"));
  782. o->image(pixmap[49]);
  783. } // Fl_Button* o
  784. o->end();
  785. } // Fl_Group* o
  786. { Fl_Group* o = new Fl_Group(87, 3, 79, 79);
  787. { Fl_Button* o = new Fl_Button(89, 5, 24, 24);
  788. o->tooltip("Window");
  789. o->box(FL_THIN_UP_BOX);
  790. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Window"));
  791. o->image(pixmap[1]);
  792. } // Fl_Button* o
  793. { Fl_Button* o = new Fl_Button(114, 5, 24, 24);
  794. o->tooltip("Group");
  795. o->box(FL_THIN_UP_BOX);
  796. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Group"));
  797. o->image(pixmap[6]);
  798. } // Fl_Button* o
  799. { Fl_Button* o = new Fl_Button(139, 5, 24, 24);
  800. o->tooltip("Pack");
  801. o->box(FL_THIN_UP_BOX);
  802. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Pack"));
  803. o->image(pixmap[22]);
  804. } // Fl_Button* o
  805. { Fl_Button* o = new Fl_Button(89, 30, 24, 24);
  806. o->tooltip("Tabs");
  807. o->box(FL_THIN_UP_BOX);
  808. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tabs"));
  809. o->image(pixmap[13]);
  810. } // Fl_Button* o
  811. { Fl_Button* o = new Fl_Button(114, 30, 24, 24);
  812. o->tooltip("Scroll");
  813. o->box(FL_THIN_UP_BOX);
  814. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Scroll"));
  815. o->image(pixmap[19]);
  816. } // Fl_Button* o
  817. { Fl_Button* o = new Fl_Button(139, 30, 24, 24);
  818. o->tooltip("Table");
  819. o->box(FL_THIN_UP_BOX);
  820. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Table"));
  821. o->image(pixmap[51]);
  822. } // Fl_Button* o
  823. { Fl_Button* o = new Fl_Button(89, 55, 24, 24);
  824. o->tooltip("Tile");
  825. o->box(FL_THIN_UP_BOX);
  826. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tile"));
  827. o->image(pixmap[20]);
  828. } // Fl_Button* o
  829. { Fl_Button* o = new Fl_Button(114, 55, 24, 24);
  830. o->tooltip("Wizard");
  831. o->box(FL_THIN_UP_BOX);
  832. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Wizard"));
  833. o->image(pixmap[21]);
  834. } // Fl_Button* o
  835. o->end();
  836. } // Fl_Group* o
  837. { Fl_Group* o = new Fl_Group(171, 3, 54, 79);
  838. { Fl_Button* o = new Fl_Button(173, 5, 24, 24);
  839. o->tooltip("Button");
  840. o->box(FL_THIN_UP_BOX);
  841. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Button"));
  842. o->image(pixmap[2]);
  843. } // Fl_Button* o
  844. { Fl_Button* o = new Fl_Button(198, 5, 24, 24);
  845. o->tooltip("Return Button");
  846. o->box(FL_THIN_UP_BOX);
  847. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Return_Button"));
  848. o->image(pixmap[23]);
  849. } // Fl_Button* o
  850. { Fl_Button* o = new Fl_Button(173, 30, 24, 24);
  851. o->tooltip("Light Button");
  852. o->box(FL_THIN_UP_BOX);
  853. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Light_Button"));
  854. o->image(pixmap[24]);
  855. } // Fl_Button* o
  856. { Fl_Button* o = new Fl_Button(198, 30, 24, 24);
  857. o->tooltip("Repeat Button");
  858. o->box(FL_THIN_UP_BOX);
  859. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Repeat_Button"));
  860. o->image(pixmap[25]);
  861. } // Fl_Button* o
  862. { Fl_Button* o = new Fl_Button(173, 55, 24, 24);
  863. o->tooltip("Check Button");
  864. o->box(FL_THIN_UP_BOX);
  865. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Check_Button"));
  866. o->image(pixmap[3]);
  867. } // Fl_Button* o
  868. { Fl_Button* o = new Fl_Button(198, 55, 24, 24);
  869. o->tooltip("Round Button");
  870. o->box(FL_THIN_UP_BOX);
  871. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Round_Button"));
  872. o->image(pixmap[4]);
  873. } // Fl_Button* o
  874. o->end();
  875. } // Fl_Group* o
  876. { Fl_Group* o = new Fl_Group(230, 3, 104, 79);
  877. { Fl_Button* o = new Fl_Button(232, 5, 24, 24);
  878. o->tooltip("Slider");
  879. o->box(FL_THIN_UP_BOX);
  880. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Slider"));
  881. o->image(pixmap[37]);
  882. } // Fl_Button* o
  883. { Fl_Button* o = new Fl_Button(257, 5, 24, 24);
  884. o->tooltip("Scroll Bar");
  885. o->box(FL_THIN_UP_BOX);
  886. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Scrollbar"));
  887. o->image(pixmap[38]);
  888. } // Fl_Button* o
  889. { Fl_Button* o = new Fl_Button(282, 5, 24, 24);
  890. o->tooltip("Value Slider");
  891. o->box(FL_THIN_UP_BOX);
  892. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Slider"));
  893. o->image(pixmap[39]);
  894. } // Fl_Button* o
  895. { Fl_Button* o = new Fl_Button(307, 5, 24, 24);
  896. o->tooltip("Value Output");
  897. o->box(FL_THIN_UP_BOX);
  898. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Output"));
  899. o->image(pixmap[45]);
  900. } // Fl_Button* o
  901. { Fl_Button* o = new Fl_Button(232, 30, 24, 24);
  902. o->tooltip("Adjuster");
  903. o->box(FL_THIN_UP_BOX);
  904. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Adjuster"));
  905. o->image(pixmap[40]);
  906. } // Fl_Button* o
  907. { Fl_Button* o = new Fl_Button(257, 30, 24, 24);
  908. o->tooltip("Counter");
  909. o->box(FL_THIN_UP_BOX);
  910. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Counter"));
  911. o->image(pixmap[41]);
  912. } // Fl_Button* o
  913. { Fl_Button* o = new Fl_Button(282, 30, 24, 24);
  914. o->tooltip("Dial");
  915. o->box(FL_THIN_UP_BOX);
  916. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Dial"));
  917. o->image(pixmap[42]);
  918. } // Fl_Button* o
  919. { Fl_Button* o = new Fl_Button(232, 55, 24, 24);
  920. o->tooltip("Roller");
  921. o->box(FL_THIN_UP_BOX);
  922. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Roller"));
  923. o->image(pixmap[43]);
  924. } // Fl_Button* o
  925. { Fl_Button* o = new Fl_Button(257, 55, 24, 24);
  926. o->tooltip("Spinner");
  927. o->box(FL_THIN_UP_BOX);
  928. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Spinner"));
  929. o->image(pixmap[47]);
  930. } // Fl_Button* o
  931. { Fl_Button* o = new Fl_Button(282, 55, 24, 24);
  932. o->tooltip("Value Input");
  933. o->box(FL_THIN_UP_BOX);
  934. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Value_Input"));
  935. o->image(pixmap[44]);
  936. } // Fl_Button* o
  937. o->end();
  938. } // Fl_Group* o
  939. { Fl_Group* o = new Fl_Group(339, 3, 54, 79);
  940. { Fl_Button* o = new Fl_Button(341, 5, 24, 24);
  941. o->tooltip("Input");
  942. o->box(FL_THIN_UP_BOX);
  943. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Input"));
  944. o->image(pixmap[14]);
  945. } // Fl_Button* o
  946. { Fl_Button* o = new Fl_Button(366, 5, 24, 24);
  947. o->tooltip("Output");
  948. o->box(FL_THIN_UP_BOX);
  949. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Output"));
  950. o->image(pixmap[27]);
  951. } // Fl_Button* o
  952. { Fl_Button* o = new Fl_Button(341, 30, 24, 24);
  953. o->tooltip("Text Edit");
  954. o->box(FL_THIN_UP_BOX);
  955. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Text_Editor"));
  956. o->image(pixmap[29]);
  957. } // Fl_Button* o
  958. { Fl_Button* o = new Fl_Button(366, 30, 24, 24);
  959. o->tooltip("Text Display");
  960. o->box(FL_THIN_UP_BOX);
  961. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Text_Display"));
  962. o->image(pixmap[28]);
  963. } // Fl_Button* o
  964. { Fl_Button* o = new Fl_Button(341, 55, 24, 24);
  965. o->tooltip("File Input");
  966. o->box(FL_THIN_UP_BOX);
  967. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_File_Input"));
  968. o->image(pixmap[30]);
  969. } // Fl_Button* o
  970. o->end();
  971. } // Fl_Group* o
  972. { Fl_Group* o = new Fl_Group(398, 3, 54, 79);
  973. { Fl_Button* o = new Fl_Button(400, 5, 24, 24);
  974. o->tooltip("Menu Bar");
  975. o->box(FL_THIN_UP_BOX);
  976. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Menu_Bar"));
  977. o->image(pixmap[17]);
  978. } // Fl_Button* o
  979. { Fl_Button* o = new Fl_Button(425, 5, 24, 24);
  980. o->tooltip("Input Choice");
  981. o->box(FL_THIN_UP_BOX);
  982. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Input_Choice"));
  983. o->image(pixmap[15]);
  984. } // Fl_Button* o
  985. { Fl_Button* o = new Fl_Button(400, 30, 24, 24);
  986. o->tooltip("Menu Button");
  987. o->box(FL_THIN_UP_BOX);
  988. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Menu_Button"));
  989. o->image(pixmap[26]);
  990. } // Fl_Button* o
  991. { Fl_Button* o = new Fl_Button(425, 30, 24, 24);
  992. o->tooltip("Menu Item");
  993. o->box(FL_THIN_UP_BOX);
  994. o->callback((Fl_Callback*)type_make_cb, (void*)("menuitem"));
  995. o->image(pixmap[16]);
  996. } // Fl_Button* o
  997. { Fl_Button* o = new Fl_Button(400, 55, 24, 24);
  998. o->tooltip("Choice");
  999. o->box(FL_THIN_UP_BOX);
  1000. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Choice"));
  1001. o->image(pixmap[15]);
  1002. } // Fl_Button* o
  1003. { Fl_Button* o = new Fl_Button(425, 55, 24, 24);
  1004. o->tooltip("Sub Menu");
  1005. o->box(FL_THIN_UP_BOX);
  1006. o->callback((Fl_Callback*)type_make_cb, (void*)("submenu"));
  1007. o->image(pixmap[18]);
  1008. } // Fl_Button* o
  1009. o->end();
  1010. } // Fl_Group* o
  1011. { Fl_Group* o = new Fl_Group(457, 3, 54, 79);
  1012. { Fl_Button* o = new Fl_Button(459, 5, 24, 24);
  1013. o->tooltip("Browser");
  1014. o->box(FL_THIN_UP_BOX);
  1015. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Browser"));
  1016. o->image(pixmap[31]);
  1017. } // Fl_Button* o
  1018. { Fl_Button* o = new Fl_Button(484, 5, 24, 24);
  1019. o->tooltip("Tree");
  1020. o->box(FL_THIN_UP_BOX);
  1021. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Tree"));
  1022. o->image(pixmap[50]);
  1023. } // Fl_Button* o
  1024. { Fl_Button* o = new Fl_Button(459, 30, 24, 24);
  1025. o->tooltip("Check Browser");
  1026. o->box(FL_THIN_UP_BOX);
  1027. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Check_Browser"));
  1028. o->image(pixmap[32]);
  1029. } // Fl_Button* o
  1030. { Fl_Button* o = new Fl_Button(459, 55, 24, 24);
  1031. o->tooltip("File Browser");
  1032. o->box(FL_THIN_UP_BOX);
  1033. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_File_Browser"));
  1034. o->image(pixmap[33]);
  1035. } // Fl_Button* o
  1036. o->end();
  1037. } // Fl_Group* o
  1038. { Fl_Group* o = new Fl_Group(491, 3, 55, 79);
  1039. { Fl_Button* o = new Fl_Button(493, 5, 24, 24);
  1040. o->tooltip("Box");
  1041. o->box(FL_THIN_UP_BOX);
  1042. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Box"));
  1043. o->image(pixmap[5]);
  1044. } // Fl_Button* o
  1045. { Fl_Button* o = new Fl_Button(518, 5, 24, 24);
  1046. o->tooltip("Clock");
  1047. o->box(FL_THIN_UP_BOX);
  1048. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Clock"));
  1049. o->image(pixmap[34]);
  1050. } // Fl_Button* o
  1051. { Fl_Button* o = new Fl_Button(493, 30, 24, 24);
  1052. o->tooltip("Help Browser");
  1053. o->box(FL_THIN_UP_BOX);
  1054. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Help_View"));
  1055. o->image(pixmap[35]);
  1056. } // Fl_Button* o
  1057. { Fl_Button* o = new Fl_Button(493, 55, 24, 24);
  1058. o->tooltip("Progress");
  1059. o->box(FL_THIN_UP_BOX);
  1060. o->callback((Fl_Callback*)type_make_cb, (void*)("Fl_Progress"));
  1061. o->image(pixmap[36]);
  1062. } // Fl_Button* o
  1063. o->end();
  1064. } // Fl_Group* o
  1065. widgetbin_panel->set_non_modal();
  1066. widgetbin_panel->end();
  1067. } // Fl_Window* widgetbin_panel
  1068. return widgetbin_panel;
  1069. }
  1070. Fl_Double_Window *sourceview_panel=(Fl_Double_Window *)0;
  1071. Fl_Tabs *sv_tab=(Fl_Tabs *)0;
  1072. CodeViewer *sv_source=(CodeViewer *)0;
  1073. static void cb_sv_source(CodeViewer* o, void*) {
  1074. update_widget_browser_position_cb(o, NULL, sv_line_pos);
  1075. }
  1076. CodeViewer *sv_header=(CodeViewer *)0;
  1077. static void cb_sv_header(CodeViewer* o, void*) {
  1078. update_widget_browser_position_cb(NULL, o, sv_line_pos);
  1079. }
  1080. Fl_Light_Button *sv_autorefresh=(Fl_Light_Button *)0;
  1081. Fl_Light_Button *sv_autoposition=(Fl_Light_Button *)0;
  1082. Fl_Int_Input *sv_line_pos=(Fl_Int_Input *)0;
  1083. Fl_Double_Window* make_sourceview() {
  1084. { sourceview_panel = new Fl_Double_Window(520, 490, "Code View");
  1085. sourceview_panel->callback((Fl_Callback*)toggle_sourceview_cb);
  1086. sourceview_panel->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE));
  1087. { sv_tab = new Fl_Tabs(10, 10, 500, 440);
  1088. sv_tab->selection_color((Fl_Color)4);
  1089. sv_tab->labelcolor(FL_BACKGROUND2_COLOR);
  1090. sv_tab->callback((Fl_Callback*)update_sourceview_position_cb);
  1091. { Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Source");
  1092. o->labelsize(13);
  1093. { sv_source = new CodeViewer(20, 50, 480, 390);
  1094. sv_source->box(FL_DOWN_FRAME);
  1095. sv_source->color(FL_BACKGROUND2_COLOR);
  1096. sv_source->selection_color(FL_SELECTION_COLOR);
  1097. sv_source->labeltype(FL_NORMAL_LABEL);
  1098. sv_source->labelfont(0);
  1099. sv_source->labelsize(14);
  1100. sv_source->labelcolor(FL_FOREGROUND_COLOR);
  1101. sv_source->textfont(4);
  1102. sv_source->textsize(11);
  1103. sv_source->callback((Fl_Callback*)cb_sv_source);
  1104. sv_source->align(Fl_Align(FL_ALIGN_TOP));
  1105. sv_source->when(FL_WHEN_RELEASE);
  1106. Fl_Group::current()->resizable(sv_source);
  1107. } // CodeViewer* sv_source
  1108. o->end();
  1109. Fl_Group::current()->resizable(o);
  1110. } // Fl_Group* o
  1111. { Fl_Group* o = new Fl_Group(10, 35, 500, 415, "Header");
  1112. o->labelsize(13);
  1113. o->hide();
  1114. { sv_header = new CodeViewer(20, 50, 480, 390);
  1115. sv_header->box(FL_DOWN_FRAME);
  1116. sv_header->color(FL_BACKGROUND2_COLOR);
  1117. sv_header->selection_color(FL_SELECTION_COLOR);
  1118. sv_header->labeltype(FL_NORMAL_LABEL);
  1119. sv_header->labelfont(0);
  1120. sv_header->labelsize(14);
  1121. sv_header->labelcolor(FL_FOREGROUND_COLOR);
  1122. sv_header->textfont(4);
  1123. sv_header->textsize(11);
  1124. sv_header->callback((Fl_Callback*)cb_sv_header);
  1125. sv_header->align(Fl_Align(FL_ALIGN_TOP));
  1126. sv_header->when(FL_WHEN_RELEASE);
  1127. Fl_Group::current()->resizable(sv_header);
  1128. } // CodeViewer* sv_header
  1129. o->end();
  1130. } // Fl_Group* o
  1131. sv_tab->end();
  1132. Fl_Group::current()->resizable(sv_tab);
  1133. } // Fl_Tabs* sv_tab
  1134. { Fl_Group* o = new Fl_Group(10, 460, 500, 20);
  1135. { Fl_Button* o = new Fl_Button(10, 460, 61, 20, "Refresh");
  1136. o->labelsize(11);
  1137. o->callback((Fl_Callback*)update_sourceview_cb);
  1138. } // Fl_Button* o
  1139. { Fl_Light_Button* o = sv_autorefresh = new Fl_Light_Button(76, 460, 91, 20, "Auto-Refresh");
  1140. sv_autorefresh->labelsize(11);
  1141. o->callback((Fl_Callback*)update_sourceview_cb);
  1142. } // Fl_Light_Button* sv_autorefresh
  1143. { sv_autoposition = new Fl_Light_Button(172, 460, 89, 20, "Auto-Position");
  1144. sv_autoposition->labelsize(11);
  1145. } // Fl_Light_Button* sv_autoposition
  1146. { Fl_Button* o = new Fl_Button(460, 460, 50, 20, "Close");
  1147. o->labelsize(11);
  1148. o->callback((Fl_Callback*)toggle_sourceview_b_cb);
  1149. } // Fl_Button* o
  1150. { Fl_Box* o = new Fl_Box(265, 460, 190, 20);
  1151. Fl_Group::current()->resizable(o);
  1152. } // Fl_Box* o
  1153. o->end();
  1154. } // Fl_Group* o
  1155. { sv_line_pos = new Fl_Int_Input(450, 10, 60, 24, "Line:");
  1156. sv_line_pos->type(2);
  1157. } // Fl_Int_Input* sv_line_pos
  1158. sourceview_panel->size_range(384, 120);
  1159. sourceview_panel->end();
  1160. } // Fl_Double_Window* sourceview_panel
  1161. return sourceview_panel;
  1162. }
  1163. //
  1164. // End of "$Id: function_panel.fl 8864 2011-07-19 04:49:30Z greg.ercolano $".
  1165. //