set digitisermenu_items {
GuidoMenuItem digitiser {
-label "Properties"
-command server "DIGITISER"
-icon "icons/16/digitiser_new_string.png"
}
GuidoSeparator sep1 {
}
GuidoMenuItem newpoint {
-label "New point"
-icon "icons/16/digitiser_digitise.png"
-command server "DIGITISER DIGITISE"
}
GuidoMenuItem midpoint {
-label "New midpoint"
-icon "icons/16/digitiser_midpoint.png"
-command server "DIGITISER MIDPOINT"
}
GuidoMenuItem follow_segment {
-label "By following a segment"
-icon "icons/16/digitiser_follow_segment.png"
-command server "DIGITISER FOLLOW SEGMENT"
}
GuidoSeparator sep2 {
}
GuidoMenuItem startstring {
-label "Start next string"
-icon "icons/16/digitiser_next_string.png"
-command server "DIGITISER NEXT STRING"
}
GuidoMenuItem newstring {
-label "Start new string"
-icon "icons/16/digitiser_new_string.png"
-command server "DIGITISER NEW STRING"
}
GuidoSeparator sep3 {
}
GuidoMenuItem selectsegment {
-label "Reactivate segment"
-icon "icons/16/digitiser_select_segment.png"
-command server "DIGITISER SELECT SEGMENT"
}
GuidoMenuItem newsegment {
-label "Start new segment"
-icon "icons/16/digitiser_end_segment.png"
-command server "DIGITISER END SEGMENT"
}
GuidoMenuItem close_segment {
-label "Close current segment"
-icon "icons/16/digitiser_close_segment.png"
-command server "DIGITISER CLOSE SEGMENT"
}
GuidoMenuItem delete_last_point {
-label "Delete last point"
-icon "icons/16/digitiser_delete_last_point.png"
-command server "DIGITISER DELETE LAST POINT"
}
GuidoSeparator sep4 {
}
GuidoMenuItem snap_plane {
-label "Toggle plane mode"
-command server "TOGGLE PLANE MODE"
}
GuidoField digitiser_menu_current_function_name {
-default ""
-status_item "current function name"
-visible false
}
GuidoLabel digitiser_menu_function_changer {
-dependency {"[string tolower [$digitiser_menu_current_function_name getCurrentValue]]" == "digitiser digitise" || "[string tolower [$digitiser_menu_current_function_name getCurrentValue]]" == "digitiser midpoint"}
-action stateChanged {[
if {"[string tolower [$digitiser_menu_current_function_name getCurrentValue]]" == "digitiser digitise"} {
$close_segment setCommand server "digitiser close segment,digitiser digitise"
$newsegment setCommand server "digitiser end segment,digitiser digitise"
$startstring setCommand server "digitiser next string,digitiser digitise"
} elseif {"[string tolower [$digitiser_menu_current_function_name getCurrentValue]]" == "digitiser midpoint"} {
$close_segment setCommand server "digitiser close segment,digitiser midpoint"
$newsegment setCommand server "digitiser end segment,digitiser midpoint"
$startstring setCommand server "digitiser next string,digitiser midpoint"
} else {
$close_segment setCommand server "digitiser close segment"
$newsegment setCommand server "digitiser end segment"
$startstring setCommand server "digitiser next string"
}
]}
}
}
GuidoMenu digitisermenu {
-label "Digitise"
-delayed_script $digitisermenu_items
}
