    001package org.vishia.gral.area9;
    002
    003import java.io.File;
    004import java.util.ArrayList;
    005import java.util.List;
    006
    007import org.vishia.gral.ifc.GralFactory;
    008
    009/**The standard command-line-arguments for a graphic application are stored in an extra class.
    010 * This class should be the base class for users command line argument storage.
    011 * In Generally the separation of command line argument helps to invoke the functionality with different calls,
    012 * for example calling in a GUI, calling in a command-line-batch-process or calling from ANT.
    013 * This class should be the super class of an derived application's CallingArguments class.
    014 */
    015public class GuiCallingArgs
    016{
    017  /**Version, history and licence
    018   * <ul>
    019   * <li>2015-05-16 Hartmut new "-help:" for help base dir in argument check, "-msgcfg:" in argument check.
    020   *   It is moved from Fcmd to this base class of Fcmd, available generally.
    021   * <li>2013-11-22 Hartmut new {@link #sTitle}
    022   * <li>2012-04-22 Hartmut chg {@link #sizeShow} instead sSize, new {@link #xLeftPixelWindow} etc.
    023   * <li>2011-06-00 Hartmut creation, commonly arguments for each GUI application.
    024   * </ul>
    025   *
    026   * <b>Copyright/Copyleft</b>:
    027   * For this source the LGPL Lesser General Public License,
    028   * published by the Free Software Foundation is valid.
    029   * It means:
    030   * <ol>
    031   * <li> You can use this source without any restriction for any desired purpose.
    032   * <li> You can redistribute copies of this source to everybody.
    033   * <li> Every user of this source, also the user of redistribute copies
    034   *    with or without payment, must accept this license for further using.
    035   * <li> But the LPGL ist not appropriate for a whole software product,
    036   *    if this source is only a part of them. It means, the user
    037   *    must publish this part of source,
    038   *    but don't need to publish the whole source of the own product.
    039   * <li> You can study and modify (improve) this source
    040   *    for own using or for redistribution, but you have to license the
    041   *    modified sources likewise under this LGPL Lesser General Public License.
    042   *    You mustn't delete this Copyright/Copyleft inscription in this source file.
    043   * </ol>
    044   * If you are intent to use this sources without publishing its usage, you can get
    045   * a second license subscribing a special contract with the author.
    046   *
    047   * @author Hartmut Schorrig = hartmut.schorrig@vishia.de
    048   *
    049   *
    050   */
    051  public final static int version = 20131122;
    052
    053
    054
    055  /**String for title bar. */
    056  String sTitle;
    057
    058  /**The graphic base factory can be detected from command line arguments
    059   * or set directly from the calling level. */
    060  GralFactory graphicFactory;
    061
    062  /**Name of the config-file for the Gui-appearance. */
    063  //String sFileGui;
    064
    065  /**The configuration file. It is created while parsing arguments.
    066   * The file is opened and closed while the configuration is used to build the GUI.
    067   * The file is used to write on menu-save action.
    068   */
    069  protected File fileGuiCfg;
    070
    071  public String sPathZbnf = "GUI";
    072
    073  /**The time zone to present all time informations. */
    074  public String sTimeZone = "GMT";
    075
    076  /**Size, either A,B or F for 800x600, 1024x768 or full screen. */
    077  public char sizeShow = 'C';
    078
    079  /**The position in grid units related to the whole display. */
    080  public String positionWindow = "0+60, 0+90";
    081  //public int xLeftPixelWindow = 50, yTopPixelWindow = 50, dxPixelWindow = 930, dyPixelWindow = 520;
    082
    083  /**The own ipc-address for Interprocess-Communication with the target.
    084   * It is a string, which determines the kind of communication.
    085   * For example "UDP:0.0.0.0:60099" to create a socket port for UDP-communication.
    086   */
    087  public String sOwnIpcAddr;
    088
    089  public List<String> cfgConditions = new ArrayList<String>();
    090
    091
    092
    093  /**A class which is used as plugin for user specifies. It is of interface {@link PlugUser_ifc}. */
    094  String sPluginClass;
    095
    096  /**A plugin specific confic string. */
    097  public String sPluginCfg;
    098
    099
    100
    101  /**The own ipc-address for inspector-Communication with this application.
    102   * It is a string, which determines the kind of communication.
    103   * For example "UDP:0.0.0.0:60099" to create a socket port for UDP-communication.
    104   */
    105  String sInspectorOwnPort;
    106
    107  public File dirHtmlHelp;
    108
    109  public File msgConfig;
    110
    111
    112  /**Returns that directory where the configuration file is found. That directory may contain some more files
    113   * for the application. */
    114  public File getDirCfg(){ return fileGuiCfg.getAbsoluteFile().getParentFile(); }
    115
    116}