001package jmri.jmrit.logixng;
002
003import jmri.jmrit.logixng.MaleSocket.ErrorHandlingType;
004import jmri.jmrit.logixng.actions.IfThenElse;
005
006/**
007 * Preferences for LogixNG
008 *
009 * @author Daniel Bergqvist Copyright 2018
010 */
011public interface LogixNGPreferences {
012
013    /**
014     * Compare if the values are different from the other preferences.
015     * @param prefs the other preferences to check
016     * @return true if preferences differ, false otherwise
017     */
018    boolean compareValuesDifferent(LogixNGPreferences prefs);
019
020    /**
021     * Apply other preferences to this class
022     * @param prefs the other preferences
023     */
024    void apply(LogixNGPreferences prefs);
025
026    /**
027     * Save the preferences
028     */
029    void save();
030
031    /**
032     * Set whenether LogixNG should be started when the program starts or a
033     * panel is loaded.
034     * @param value true if LogixNG should start on program start or when a
035     * panel is loaded, false otherwise
036     */
037    void setStartLogixNGOnStartup(boolean value);
038
039    /**
040     * Get whenether LogixNG should be started when the program starts or a
041     * panel is loaded.
042     * @return true if LogixNG should start on program start or when a panel
043     * is loaded, false otherwise
044     */
045    boolean getStartLogixNGOnStartup();
046
047    /**
048     * Set whenether system names and user names should be visible for actions
049     * and expressions.
050     * @param value true if names should be visible, false otherwise
051     */
052    void setShowSystemUserNames(boolean value);
053
054    /**
055     * Get whenether system names and user names should be visible for actions
056     * and expressions.
057     * @return true if names should be visible, false otherwise
058     */
059    boolean getShowSystemUserNames();
060
061    /**
062     * Set whenether the debugger should be installed or nog.
063     * @param value true if the debugger should be installed, false otherwise
064     */
065    void setInstallDebugger(boolean value);
066
067    /**
068     * Get whenether the debugger should be installed or nog.
069     * @return true if the debugger should be installed, false otherwise
070     */
071    boolean getInstallDebugger();
072
073    /**
074     * Set the default error handling type.
075     * @param type the error handling type
076     */
077    void setErrorHandlingType(ErrorHandlingType type);
078
079    /**
080     * Get the default error handling type.
081     * @return the error handling type
082     */
083    ErrorHandlingType getErrorHandlingType();
084
085    /**
086     * Set whether row in tree editor should be highlighted or not.
087     * @param value true if the row should be highlighted, false otherwise
088     */
089    void setTreeEditorHighlightRow(boolean value);
090
091    /**
092     * Get whether row in tree editor should be highlighted or not.
093     * @return true if the row should be highlighted, false otherwise
094     */
095    boolean getTreeEditorHighlightRow();
096
097    /**
098     * Set whether system names should be shown or not in exceptions.
099     * @param value true if system names should be shown, false otherwise
100     */
101    void setShowSystemNameInException(boolean value);
102
103    /**
104     * Get whether system names should be shown or not in exceptions.
105     * @return true if the system names should be shown, false otherwise
106     */
107    boolean getShowSystemNameInException();
108
109    /**
110     * Set whenether strict typing should be used for global variables.
111     * @param value true if strict typing should be used for global variables,
112     *              false otherwise
113     */
114    void setStrictTypingGlobalVariables(boolean value);
115
116    /**
117     * Get whenether strict typing should be used for global variables.
118     * @return true if strict typing should be used for global variables,
119     *         false otherwise
120     */
121    boolean getStrictTypingGlobalVariables();
122
123    /**
124     * Set whenether strict typing should be used for local variables.
125     * @param value true if strict typing should be used for local variables,
126     *              false otherwise
127     */
128    void setStrictTypingLocalVariables(boolean value);
129
130    /**
131     * Get whenether strict typing should be used for local variables.
132     * @return true if strict typing should be used for local variables,
133     *         false otherwise
134     */
135    boolean getStrictTypingLocalVariables();
136
137    /**
138     * Set the default execute type for IfThenElse.
139     * @param value the default
140     */
141    void setIfThenElseExecuteTypeDefault(IfThenElse.ExecuteType value);
142
143    /**
144     * Get the default execute type for IfThenElse.
145     * @return the default
146     */
147    IfThenElse.ExecuteType getIfThenElseExecuteTypeDefault();
148
149    /**
150     * Set log all before.
151     * @param value true if log all before, false otherwise
152     */
153    void setLogAllBefore(boolean value);
154
155    /**
156     * Get log all before.
157     * @return true if log all before, false otherwise
158     */
159    boolean getLogAllBefore();
160
161    /**
162     * Set log all after.
163     * @param value true if log all after, false otherwise
164     */
165    void setLogAllAfter(boolean value);
166
167    /**
168     * Get log all after.
169     * @return true if log all after, false otherwise
170     */
171    boolean getLogAllAfter();
172
173}