Files
linguist/samples/NetLinx+ERB/sample.axs.erb
2015-03-21 20:22:46 -07:00

79 lines
2.9 KiB
Plaintext

(***********************************************************
Sample File
For testing syntax highlighting
************************************************************)
#if_not_defined Sample
#define Sample 1
(***********************************************************)
(* System Type : NetLinx *)
(***********************************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_DEVICE
(***********************************************************)
(* CONSTANT DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_CONSTANT
<% global_constant_justify = 20 -%>
// Video Source Select Buttons
<%=
video_sources = {
BTN_VID_FOH_PC: { btn: 11, input: :VID_SRC_FOH_PC },
BTN_VID_STAGE_PC: { btn: 12, input: :VID_SRC_STAGE_PC },
BTN_VID_BLURAY: { btn: 13, input: :VID_SRC_BLURAY },
}
print_constant_hash video_sources.remap(:btn),
justify: global_constant_justify
%>
(***********************************************************)
(* INCLUDES GO BELOW *)
(***********************************************************)
(***********************************************************)
(* DATA TYPE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_TYPE
(***********************************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(***********************************************************)
DEFINE_VARIABLE
(***********************************************************)
(* SUBROUTINE/FUNCTION DEFINITIONS GO BELOW *)
(***********************************************************)
(***********************************************************)
(* STARTUP CODE GOES BELOW *)
(***********************************************************)
DEFINE_START
(***********************************************************)
(* THE EVENTS GO BELOW *)
(***********************************************************)
DEFINE_EVENT
// Video Source Select
<%=
justify group(video_sources.remap :input) { |name, input|
"[#{@dvTP}, #{name}] = (outputs[VID_DEST_PROJECTOR].input == #{input});"
}
%>
(***********************************************************)
(* THE MAINLINE GOES BELOW *)
(***********************************************************)
DEFINE_PROGRAM
(***********************************************************)
(* END OF PROGRAM *)
(* DO NOT PUT ANY CODE BELOW THIS COMMENT *)
(***********************************************************)
#end_if