// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Equipment component additional customization
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Equipment {
  view: true;
  toolbar: true;
  interactor: true;
  backgrounds: true;
}

// Configure the view
View {
  keepingAspectRatio: true;
  maxZoomXFactor: 10;
  maxZoomYFactor: 10;
}

// Configure the toolbar to disallow moving of objects.
ToolBar {
  enabled: true;
  button[0]: @+SelectionButton;
  button[1]: @+PanButton;
  button[2]: @+ZoomInButton;
  button[3]: @+ZoomOutButton;
  button[4]: @+ZoomBackButton;
  button[5]: @+ZoomResetButton;
  button[6]: @+FitToContentsButton;
  button[7]: @+ZoomViewButton;
}

#SelectionButton {
  actionType: "Select";
  usingObjectInteractor: true;
  popupMenuFactory: @=viewPopupMenuFactory;
  moveAllowed: false;
  action[0]: @+action0;
  action[1]: @+action1;
}

#viewPopupMenuFactory {
  class: 'basic.AlarmPopupMenuFactory';
}

#action0 {
  key: "control A";
  class: "ilog.cpl.graph.action.IlpSelectAllObjectsAction";
}

#action1 {
  gesture: BUTTON1_DOUBLE_CLICKED;
  class: "basic.ShowDetailsAction";
}

#PanButton {
  actionType: "Pan";
  usingObjectInteractor: false;
}

#ZoomInButton {
  actionType: "ZoomIn";
}

#ZoomOutButton {
  actionType: "ZoomOut";
}

#ZoomBackButton {
  actionType: "ZoomBack";
}

#ZoomResetButton {
  actionType: "ZoomReset";
}

#FitToContentsButton {
  actionType: "FitToContents";
}

#ZoomViewButton {
  actionType: "ZoomView";
  usingObjectInteractor: false;
}

// Define the interactor
Interactor {
  name: "Select";
}

// Load a background file
Backgrounds {
  background[0]: "resources/cabinet.png";
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Customize AlarmCountVisible for ports
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
object."ilog.tgo.model.IltPort" {
  alarmCountVisible: false;
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Change selection color for IltObject
// Set tooltip for all objects
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
object."ilog.tgo.model.IltObject" {
  toolTipText: @name;
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Configure foreground color for LED instances
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#RJLed0 {
  foreground: #FFFF00; //yellow
}
#RJLed1 {
  foreground: #00FF00; //green
}
#RJLed2 {
  foreground: #FF0000; //red
}
#RJLed3 {
  foreground: #FFC800; //orange
}
#RJLed4 {
  foreground: #FFFF00; //yellow
}
#RJLed5 {
  foreground: #00FF00; //green
}
#RJLed6 {
  foreground: #FF0000; //red
}
#RJLed7 {
  foreground: #FFC800; //orange
}
#CentLed1 {
  foreground: #00FF00; //green
}
#CentLed2 {
  foreground: #333333; //gray
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Configure label visibility for card instances
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Shelf1 {
  XSlotLabels: "CTRL, A, B, C, D, E";
}
#Shelf1 > object."ilog.tgo.model.IltCard"[type="Standard"] {
  labelVisible: false;
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Configure alarm decorations
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
#CompositeCard4 {
  alarmBalloonPosition: BOTTOM;
  alarmCountVisible: false;
}