Exemplo n.º 1
0
static void
style_selected (Widget w, int i, XmToggleButtonCallbackStruct * cbs)
{
  RouteStyleType *style;
  int j, n;
  if (cbs && cbs->set == 0)
    {
      XmToggleButtonSetState (w, 1, 0);
      return;
    }
  style = PCB->RouteStyle + i;
  SetLineSize (style->Thick);
  SetViaSize (style->Diameter, true);
  SetViaDrillingHole (style->Hole, true);
  SetKeepawayWidth (style->Keepaway);
  if (style_dialog)
    {
      for (j = 0; j < NUM_STYLES; j++)
	if (j != i)
	  XmToggleButtonSetState (style_pb[j], 0, 0);
	else
	  XmToggleButtonSetState (style_pb[j], 1, 0);
      update_values ();
    }
  else
    lesstif_update_status_line ();
  for (n = 0; n < num_style_buttons; n++)
    {
      for (j = 0; j < NUM_STYLES; j++)
	if (j != i)
	  XmToggleButtonSetState (style_button_list[n].w[j], 0, 0);
	else
	  XmToggleButtonSetState (style_button_list[n].w[j], 1, 0);
    }
}
Exemplo n.º 2
0
/* ---------------------------------------------------------------------------
 * set the route style to the first one, if the current one doesn't
 * happen to match any.  This way, "revert" won't change the route
 * style.
 */
static void
set_some_route_style ()
{
  if (hid_get_flag ("style"))
    return;
  SetLineSize (PCB->RouteStyle[0].Thick);
  SetViaSize (PCB->RouteStyle[0].Diameter, true);
  SetViaDrillingHole (PCB->RouteStyle[0].Hole, true);
  SetKeepawayWidth (PCB->RouteStyle[0].Keepaway);
}