| 1 | #include <stdio.h> |
|---|
| 2 | #include <stdlib.h> |
|---|
| 3 | #include <malloc.h> |
|---|
| 4 | #include <arbdb.h> |
|---|
| 5 | #include <arbdbt.h> |
|---|
| 6 | |
|---|
| 7 | #include <aw_root.hxx> |
|---|
| 8 | #include <aw_device.hxx> |
|---|
| 9 | #include <aw_window.hxx> |
|---|
| 10 | #include <aw_preset.hxx> |
|---|
| 11 | #include <aw_awars.hxx> |
|---|
| 12 | #include <awt_canvas.hxx> |
|---|
| 13 | #include <awt.hxx> |
|---|
| 14 | #include <awt_nds.hxx> |
|---|
| 15 | |
|---|
| 16 | #include <awt_tree.hxx> |
|---|
| 17 | #include <awt_dtree.hxx> |
|---|
| 18 | #include <awt_tree_cb.hxx> |
|---|
| 19 | |
|---|
| 20 | #include "AP_buffer.hxx" |
|---|
| 21 | #include "parsimony.hxx" |
|---|
| 22 | #include "ap_tree_nlen.hxx" |
|---|
| 23 | #include "pars_main.hxx" |
|---|
| 24 | #include "pars_dtree.hxx" |
|---|
| 25 | |
|---|
| 26 | extern AW_window *preset_window( AW_root *root ); |
|---|
| 27 | extern AW_window *genetic_window(AW_root *root); |
|---|
| 28 | |
|---|
| 29 | AW_window *create_kernighan_window(AW_root *aw_root) { |
|---|
| 30 | |
|---|
| 31 | AW_window_simple *aws = new AW_window_simple; |
|---|
| 32 | aws->init( aw_root, "OPTIMIZATION_PROPS", "Kernighan Lin Properties", 10, 10 ); |
|---|
| 33 | aws->load_xfig("PARS/kernlin.fig"); |
|---|
| 34 | aws->button_length( 10 ); |
|---|
| 35 | |
|---|
| 36 | aws->at("close"); |
|---|
| 37 | aws->callback((AW_CB0)AW_POPDOWN); |
|---|
| 38 | aws->create_button("CLOSE","CLOSE","C"); |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | aws->at("help"); |
|---|
| 42 | aws->callback((AW_CB1)AW_POPUP_HELP,(AW_CL)"kernlin.hlp"); |
|---|
| 43 | aws->create_button("HELP","HELP","H"); |
|---|
| 44 | |
|---|
| 45 | aws->button_length( 6 ); |
|---|
| 46 | |
|---|
| 47 | aws->at("nodes"); |
|---|
| 48 | aws->create_input_field("genetic/kh/nodes"); |
|---|
| 49 | aws->at("maxdepth"); |
|---|
| 50 | aws->create_input_field("genetic/kh/maxdepth"); |
|---|
| 51 | aws->at("incdepth"); |
|---|
| 52 | aws->create_input_field("genetic/kh/incdepth"); |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | aws->at("static"); |
|---|
| 56 | aws->create_toggle("genetic/kh/static/enable"); |
|---|
| 57 | |
|---|
| 58 | aws->button_length( 4 ); |
|---|
| 59 | aws->at("input_6"); |
|---|
| 60 | aws->create_input_field("genetic/kh/static/depth0"); |
|---|
| 61 | aws->at("input_7"); |
|---|
| 62 | aws->create_input_field("genetic/kh/static/depth1"); |
|---|
| 63 | aws->at("input_8"); |
|---|
| 64 | aws->create_input_field("genetic/kh/static/depth2"); |
|---|
| 65 | aws->at("input_9"); |
|---|
| 66 | aws->create_input_field("genetic/kh/static/depth3"); |
|---|
| 67 | aws->at("input_10"); |
|---|
| 68 | aws->create_input_field("genetic/kh/static/depth4"); |
|---|
| 69 | |
|---|
| 70 | |
|---|
| 71 | aws->at("dynamic"); |
|---|
| 72 | aws->create_toggle("genetic/kh/dynamic/enable"); |
|---|
| 73 | |
|---|
| 74 | aws->button_length( 4 ); |
|---|
| 75 | aws->at("start"); |
|---|
| 76 | aws->create_input_field("genetic/kh/dynamic/start"); |
|---|
| 77 | aws->at("maxx"); |
|---|
| 78 | aws->create_input_field("genetic/kh/dynamic/maxx"); |
|---|
| 79 | aws->at("maxy"); |
|---|
| 80 | aws->create_input_field("genetic/kh/dynamic/maxy"); |
|---|
| 81 | |
|---|
| 82 | #if 0 |
|---|
| 83 | aws->at("button_4"); |
|---|
| 84 | aws->create_option_menu("genetic/kh/function_type",0,""); |
|---|
| 85 | aws->insert_option("start_x^2","d",AP_QUADRAT_START); |
|---|
| 86 | aws->insert_option("max_x^2","d",AP_QUADRAT_MAX); |
|---|
| 87 | aws->insert_default_option("???","?",AP_QUADRAT_START); |
|---|
| 88 | aws->update_option_menu(); |
|---|
| 89 | #endif |
|---|
| 90 | return (AW_window *)aws; |
|---|
| 91 | } |
|---|
| 92 | |
|---|