00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "xsmmath.h"
00030 #include "app_view.h"
00031
00032
00033
00034 static GnomeUIInfo scan_mode_menu[] = {
00035 GNOMEUIINFO_ITEM_NONE(N_("Off"),N_("kill channel"), (gpointer) ViewControl::SetOff_callback),
00036 GNOMEUIINFO_ITEM_NONE(N_("Active"),N_("activate this channel"), (gpointer) ViewControl::Activate_callback),
00037 GNOMEUIINFO_ITEM_NONE(N_("On"),N_("set channel mode to On"), (gpointer) ViewControl::SetOn_callback),
00038 GNOMEUIINFO_ITEM_NONE(N_("Math"),N_("set channel mode to Math"), (gpointer) ViewControl::SetMath_callback),
00039 GNOMEUIINFO_ITEM_NONE(N_("X"),N_("set channel mode to X"), (gpointer) ViewControl::SetX_callback),
00040 GNOMEUIINFO_END
00041 };
00042
00043 static GnomeUIInfo scan_file_menu[] = {
00044 GNOMEUIINFO_ITEM_STOCK(N_("_Open here"), N_("load scan into this channel"),
00045 (gpointer) ViewControl::view_file_openhere_callback, GNOME_STOCK_MENU_OPEN),
00046 GNOMEUIINFO_ITEM_STOCK(N_("_Save"), N_("Save this scans with automatically generated name"),
00047 (gpointer) ViewControl::view_file_save_callback, GNOME_STOCK_MENU_SAVE),
00048 GNOMEUIINFO_ITEM_STOCK(N_("Save _as..."), N_("Save this scan with a new name"),
00049 (gpointer) ViewControl::view_file_save_as_callback, GNOME_STOCK_MENU_SAVE_AS),
00050 GNOMEUIINFO_ITEM_STOCK(N_("Save Image"), N_("save as image (gif, jpeg, png, tiff, xpm)"),
00051 (gpointer) ViewControl::view_file_saveimage_callback, GNOME_STOCK_MENU_SAVE_AS),
00052 GNOMEUIINFO_ITEM_STOCK(N_("Save Objects"), N_("save objects, .plt (HPGL) or else as obj list"),
00053 (gpointer) ViewControl::view_file_saveobjects_callback, GNOME_STOCK_MENU_SAVE_AS),
00054 GNOMEUIINFO_ITEM_STOCK(N_("Load Objects"), N_("load objects"),
00055 (gpointer) ViewControl::view_file_loadobjects_callback, GNOME_STOCK_MENU_OPEN),
00056 GNOMEUIINFO_ITEM_STOCK(N_("Get Info"), N_("show all info about this scan (NC view)"),
00057 (gpointer) ViewControl::view_file_getinfo_callback, GNOME_STOCK_MENU_PROP),
00058 GNOMEUIINFO_MENU_PRINT_ITEM( (gpointer) ViewControl::view_file_print_callback, NULL ),
00059 GNOMEUIINFO_ITEM_STOCK(N_("Close"), N_("kill this scan"),
00060 (gpointer) ViewControl::view_file_kill_callback, GNOME_STOCK_MENU_CLOSE),
00061 GNOMEUIINFO_END
00062 };
00063
00064 static GnomeUIInfo scan_edit_menu[] = {
00065 GNOMEUIINFO_ITEM_NONE(N_("Copy"),N_("copy scan to new channel"), (gpointer) ViewControl::view_edit_copy_callback),
00066 GNOMEUIINFO_ITEM_NONE(N_("Crop"),N_("crop rectangular area to new channel"), (gpointer) ViewControl::view_edit_crop_callback),
00067 GNOMEUIINFO_ITEM_NONE(N_("Cpy zoom in"),N_("zoom into rectangular area, put data in new channel, calculate new positions"), (gpointer) ViewControl::view_edit_zoomin_callback),
00068 GNOMEUIINFO_ITEM_NONE(N_("Cpy zoom out"),N_("zoom rectangular area out, put data in new channel, calculate new positions"), (gpointer) ViewControl::view_edit_zoomout_callback),
00069 GNOMEUIINFO_END
00070 };
00071
00072 static GnomeUIInfo scan_view_zoom_menu[] = {
00073 GNOMEUIINFO_ITEM_NONE(N_("10:1"),N_("set zoomfactor to 10"), (gpointer) ViewControl::view_view_zoom10_1_callback),
00074 GNOMEUIINFO_ITEM_NONE(N_(" 5:1"),N_("set zoomfactor to 5"), (gpointer) ViewControl::view_view_zoom5_1_callback),
00075 GNOMEUIINFO_ITEM_NONE(N_(" 4:1"),N_("set zoomfactor to 4"), (gpointer) ViewControl::view_view_zoom4_1_callback),
00076 GNOMEUIINFO_ITEM_NONE(N_(" 3:1"),N_("set zoomfactor to 3"), (gpointer) ViewControl::view_view_zoom3_1_callback),
00077 GNOMEUIINFO_ITEM_NONE(N_(" 2:1"),N_("set zoomfactor to 2"), (gpointer) ViewControl::view_view_zoom2_1_callback),
00078 GNOMEUIINFO_ITEM_NONE(N_(" 1:1"),N_("set zoomfactor to 1"), (gpointer) ViewControl::view_view_zoom1_1_callback),
00079 GNOMEUIINFO_ITEM_NONE(N_(" 1:2"),N_("set zoomfactor to 1/2"), (gpointer) ViewControl::view_view_zoom1_2_callback),
00080 GNOMEUIINFO_ITEM_NONE(N_(" 1:3"),N_("set zoomfactor to 1/3"), (gpointer) ViewControl::view_view_zoom1_3_callback),
00081 GNOMEUIINFO_ITEM_NONE(N_(" 1:4"),N_("set zoomfactor to 1/4"), (gpointer) ViewControl::view_view_zoom1_4_callback),
00082 GNOMEUIINFO_ITEM_NONE(N_(" 1:5"),N_("set zoomfactor to 1/5"), (gpointer) ViewControl::view_view_zoom1_5_callback),
00083 GNOMEUIINFO_ITEM_NONE(N_(" 1:10"),N_("set zoomfactor to 1/10"), (gpointer) ViewControl::view_view_zoom1_10_callback),
00084 GNOMEUIINFO_END
00085 };
00086
00087 static GnomeUIInfo scan_view_modes_radiolist[] = {
00088 GNOMEUIINFO_RADIOITEM(N_("Quick"), N_("quick view"), (gpointer) ViewControl::view_view_quick_callback, NULL),
00089 GNOMEUIINFO_RADIOITEM(N_("Direct"), N_("direct view"), (gpointer) ViewControl::view_view_direct_callback, NULL),
00090 GNOMEUIINFO_RADIOITEM(N_("Plane Sub"), N_("auto 3 points plane sub view"), (gpointer) ViewControl::view_view_planesub_callback, NULL),
00091 GNOMEUIINFO_RADIOITEM(N_("Logarithmic"), N_("logarithmic view"), (gpointer) ViewControl::view_view_log_callback, NULL),
00092 GNOMEUIINFO_RADIOITEM(N_("Horizont"), N_("horizontal view - subtract mean/line"), (gpointer) ViewControl::view_view_horizont_callback, NULL),
00093 GNOMEUIINFO_RADIOITEM(N_("Periodic"), N_("periodic view of greys/colors"), (gpointer) ViewControl::view_view_periodic_callback, NULL),
00094 GNOMEUIINFO_RADIOITEM(N_("Differential"), N_("differential view of greys/colors"), (gpointer) ViewControl::view_view_differential_callback, NULL),
00095 GNOMEUIINFO_END
00096 };
00097
00098 static GnomeUIInfo scan_view_coordinates_radiolist[] = {
00099 GNOMEUIINFO_RADIOITEM(N_("Absolute"), N_("set XY display units to absolute coordinates (offset and rotation)"), (gpointer) ViewControl::view_view_coord_absolute_callback, NULL),
00100 GNOMEUIINFO_RADIOITEM(N_("Relative"), N_("set XY display units to relative coordinates (no offset, no rotation)"), (gpointer) ViewControl::view_view_coord_relative_callback, NULL),
00101 GNOMEUIINFO_RADIOITEM(N_("Pixels"), N_("set XY display units to pixels"), (gpointer) ViewControl::view_view_coord_pixels_callback, NULL),
00102 GNOMEUIINFO_END
00103 };
00104
00105 static GnomeUIInfo scan_view_coordinates_menu[] = {
00106 GNOMEUIINFO_RADIOLIST(scan_view_coordinates_radiolist),
00107 GNOMEUIINFO_END
00108 };
00109
00110 static GnomeUIInfo scan_view_menu[] = {
00111 GNOMEUIINFO_RADIOLIST(scan_view_modes_radiolist),
00112 GNOMEUIINFO_TOGGLEITEM(N_("red Profile"), N_("show profile of red line while scanning"), (gpointer) ViewControl::view_view_redline_callback, NULL),
00113 GNOMEUIINFO_SEPARATOR,
00114 GNOMEUIINFO_TOGGLEITEM(N_("Autozoom"), N_("enable/disable autozoom/quench"), (gpointer) ViewControl::view_view_autozoom_callback, NULL),
00115 GNOMEUIINFO_TOGGLEITEM(N_("Palette"), N_("enable/disable color mode"), (gpointer) ViewControl::view_view_color_callback, NULL),
00116 GNOMEUIINFO_SUBTREE (N_("Coordinates"), scan_view_coordinates_menu),
00117 GNOMEUIINFO_ITEM_NONE(N_("zoom in"),N_("zoom in one level"), (gpointer) ViewControl::view_view_zoom_out_callback),
00118 GNOMEUIINFO_ITEM_NONE(N_("zoom out"),N_("zoom out one level"), (gpointer) ViewControl::view_view_zoom_in_callback),
00119 GNOMEUIINFO_SUBTREE (N_("Zoom"), scan_view_zoom_menu),
00120 GNOMEUIINFO_END
00121 };
00122
00123
00124
00125
00126
00127
00128
00129 static GnomeUIInfo scan_objectslist_menu[] = {
00130 GNOMEUIINFO_ITEM_NONE(N_("Rectangle"),N_("add rectangle objects"), (gpointer) ViewControl::view_tool_addrectangle_callback),
00131 GNOMEUIINFO_ITEM_NONE(N_("Point"),N_("add point object"), (gpointer) ViewControl::view_tool_addpoint_callback),
00132 GNOMEUIINFO_ITEM_NONE(N_("Line"),N_("add line object"), (gpointer) ViewControl::view_tool_addline_callback),
00133 GNOMEUIINFO_ITEM_NONE(N_("Circle"),N_("add circle objects"), (gpointer) ViewControl::view_tool_addcircle_callback),
00134 GNOMEUIINFO_ITEM_NONE(N_("PolyLine"),N_("add polyline object"), (gpointer) ViewControl::view_tool_addpolyline_callback),
00135 GNOMEUIINFO_ITEM_NONE(N_("Ksys"),N_("add Koord.sys object"), (gpointer) ViewControl::view_tool_addksys_callback),
00136 GNOMEUIINFO_ITEM_NONE(N_("Parabel"),N_("add parabel object"), (gpointer) ViewControl::view_tool_addparabel_callback),
00137 GNOMEUIINFO_ITEM_NONE(N_("Show Point"),N_("add point object and show profile in layer dimension"), (gpointer) ViewControl::view_tool_addshowpoint_callback),
00138 GNOMEUIINFO_ITEM_NONE(N_("Show Line"),N_("add line object and show path profile"), (gpointer) ViewControl::view_tool_showline_callback),
00139 GNOMEUIINFO_ITEM_NONE(N_("Show Circle"),N_("add circle objects and show path profile"), (gpointer) ViewControl::view_tool_addshowcircle_callback),
00140 GNOMEUIINFO_ITEM_NONE(N_("Disable"),N_("disable object creation"), (gpointer) ViewControl::view_tool_disable_callback),
00141 GNOMEUIINFO_END
00142 };
00143
00144 static GnomeUIInfo scan_objects_localradius_menu[] = {
00145 GNOMEUIINFO_ITEM_NONE(N_("Set R=2"),N_("set local search radius"), (gpointer) ViewControl::view_tool_mvprop_r2_callback),
00146 GNOMEUIINFO_ITEM_NONE(N_("Set R=5"),N_("set local search radius"), (gpointer) ViewControl::view_tool_mvprop_r5_callback),
00147 GNOMEUIINFO_ITEM_NONE(N_("Set R=10"),N_("set local search radius"), (gpointer) ViewControl::view_tool_mvprop_r10_callback),
00148 GNOMEUIINFO_ITEM_NONE(N_("Set R=20"),N_("set local search radius"), (gpointer) ViewControl::view_tool_mvprop_r20_callback),
00149 GNOMEUIINFO_ITEM_NONE(N_("Set R=50"),N_("set local search radius"), (gpointer) ViewControl::view_tool_mvprop_r50_callback),
00150 GNOMEUIINFO_ITEM_NONE(N_("Set R=100"),N_("set local search radius"), (gpointer) ViewControl::view_tool_mvprop_r100_callback),
00151 GNOMEUIINFO_END
00152 };
00153
00154 static GnomeUIInfo scan_objects_menu[] = {
00155 GNOMEUIINFO_RADIOLIST(scan_objectslist_menu),
00156 GNOMEUIINFO_SEPARATOR,
00157 GNOMEUIINFO_TOGGLEITEM(N_("Show Labels"), N_("show/hide object lables"), (gpointer) ViewControl::view_tool_labels_callback, NULL),
00158 GNOMEUIINFO_SUBTREE (N_("Local Radius"), scan_objects_localradius_menu),
00159 GNOMEUIINFO_ITEM_NONE(N_("All loc max "),N_("move all objects to loc. Max"), (gpointer) ViewControl::view_tool_all2locmax_callback),
00160 GNOMEUIINFO_ITEM_NONE(N_("Remove all"),N_("remove all objects"), (gpointer) ViewControl::view_tool_removeall_callback),
00161 GNOMEUIINFO_END
00162 };
00163
00164 static GnomeUIInfo scan_events_menu[] = {
00165 GNOMEUIINFO_TOGGLEITEM(N_("Show Probe"), N_("show/hide probe events"), (gpointer) ViewControl::events_probe_callback, NULL),
00166 GNOMEUIINFO_TOGGLEITEM(N_("Show User"), N_("show/hide user events"), (gpointer) ViewControl::events_user_callback, NULL),
00167 GNOMEUIINFO_SEPARATOR,
00168 GNOMEUIINFO_TOGGLEITEM(N_("Show Labels"), N_("show/hide event lables"), (gpointer) ViewControl::events_labels_callback, NULL),
00169 GNOMEUIINFO_TOGGLEITEM(N_("Verbose"), N_("show/hide event lables"), (gpointer) ViewControl::events_verbose_callback, NULL),
00170 GNOMEUIINFO_ITEM_NONE(N_("Remove All"),N_("remove all events and attached data"), (gpointer) ViewControl::events_remove_callback),
00171 GNOMEUIINFO_END
00172 };
00173
00174 static GnomeUIInfo scan_popup_menu[] = {
00175 GNOMEUIINFO_ITEM_NONE(N_("Activate"),N_("activate this Channel"), (gpointer) ViewControl::Activate_callback),
00176 GNOMEUIINFO_ITEM_NONE(N_("AutoDisp"),N_("autoscale Area"), (gpointer) ViewControl::AutoDisp_callback),
00177 GNOMEUIINFO_SUBTREE (N_("Mode"), scan_mode_menu),
00178 GNOMEUIINFO_SUBTREE (N_("File"), scan_file_menu),
00179 GNOMEUIINFO_SUBTREE (N_("Edit"), scan_edit_menu),
00180 GNOMEUIINFO_SUBTREE (N_("View"), scan_view_menu),
00181
00182 GNOMEUIINFO_SUBTREE (N_("Objects"), scan_objects_menu),
00183 GNOMEUIINFO_SUBTREE (N_("Events"), scan_events_menu),
00184 GNOMEUIINFO_END
00185 };
00186
00187
00188
00189 static GnomeUIInfo vobj_popup_menu_event[] = {
00190 GNOMEUIINFO_ITEM_NONE(N_("Dump Event"),N_("use event data for..."), (gpointer) ViewControl::obj_event_use_callback),
00191 GNOMEUIINFO_ITEM_NONE(N_("Open Event"),N_("open event, show attached data"), (gpointer) ViewControl::obj_event_open_callback),
00192 GNOMEUIINFO_ITEM_NONE(N_("Save Event"),N_("save event, export attached data"), (gpointer) ViewControl::obj_event_save_callback),
00193 GNOMEUIINFO_ITEM_NONE(N_("Properties"),N_("open object properties dialog"), (gpointer) ViewControl::obj_properties_callback),
00194 GNOMEUIINFO_ITEM_NONE(N_("Set current Offset to Point"),N_("get coordinates from this Point and set Offset in main to this position"), (gpointer) ViewControl::obj_setoffset_callback),
00195 GNOMEUIINFO_END
00196 };
00197
00198 static GnomeUIInfo vobj_popup_menu_1[] = {
00199 GNOMEUIINFO_ITEM_NONE(N_("Remove"),N_("remove point object"), (gpointer) ViewControl::obj_remove_callback),
00200 GNOMEUIINFO_ITEM_NONE(N_("Properties"),N_("open object properties dialog"), (gpointer) ViewControl::obj_properties_callback),
00201 GNOMEUIINFO_ITEM_NONE(N_("Set current Offset to Point"),N_("get coordinates from this Point and set Offset in main to this position"), (gpointer) ViewControl::obj_setoffset_callback),
00202 GNOMEUIINFO_TOGGLEITEM(N_("Follow"), N_("enable/disable tip follows point"), (gpointer) ViewControl::obj_follow_callback, NULL),
00203 GNOMEUIINFO_ITEM_NONE(N_("Go Loc.Max."),N_("look for local maximum and goto there"), (gpointer) ViewControl::obj_go_locmax_callback),
00204 GNOMEUIINFO_ITEM_NONE(N_("Dump"),N_("Dump Object's Properties"), (gpointer) ViewControl::obj_dump_callback),
00205 GNOMEUIINFO_END
00206 };
00207
00208 static GnomeUIInfo vobj_popup_menu_2[] = {
00209 GNOMEUIINFO_ITEM_NONE(N_("Remove"),N_("remove line object"), (gpointer) ViewControl::obj_remove_callback),
00210 GNOMEUIINFO_ITEM_NONE(N_("Properties"),N_("open object properties dialog"), (gpointer) ViewControl::obj_properties_callback),
00211 GNOMEUIINFO_ITEM_NONE(N_("Get Coordintes"),N_("get coordinates for new 1D scan"), (gpointer) ViewControl::obj_getcoords_callback),
00212 GNOMEUIINFO_ITEM_NONE(N_("Go Loc.Max."),N_("look for local maximum and goto there"), (gpointer) ViewControl::obj_go_locmax_callback),
00213 GNOMEUIINFO_ITEM_NONE(N_("Dump"),N_("Dump Object's Properties"), (gpointer) ViewControl::obj_dump_callback),
00214 GNOMEUIINFO_END
00215 };
00216
00217 static GnomeUIInfo vobj_popup_menu_n[] = {
00218 GNOMEUIINFO_ITEM_NONE(N_("Remove"),N_("remove line object"), (gpointer) ViewControl::obj_remove_callback),
00219 GNOMEUIINFO_ITEM_NONE(N_("Properties"),N_("open object properties dialog"), (gpointer) ViewControl::obj_properties_callback),
00220 GNOMEUIINFO_ITEM_NONE(N_("Add Node"),N_("add polyline node"), (gpointer) ViewControl::obj_addnode_callback),
00221 GNOMEUIINFO_ITEM_NONE(N_("Delete Node"),N_("delete polyline node"), (gpointer) ViewControl::obj_delnode_callback),
00222 GNOMEUIINFO_ITEM_NONE(N_("Dump"),N_("Dump Object's Properties"), (gpointer) ViewControl::obj_dump_callback),
00223 GNOMEUIINFO_END
00224 };