001package org.vishia.gral.ifc;
002
003import java.io.File;
004
005import org.vishia.gral.base.GralWidget;
006import org.vishia.gral.base.GralWindow_setifc;
007import org.vishia.mainCmd.MainCmd_ifc;
008
009
010/**This interface represents a basic main window with title bar in the gral (graphical adaption layer).
011 *
012 * @author Hartmut Schorrig
013 *
014 */
015public interface GralPrimaryWindow_ifc //extends GralWindow_setifc, GralWindow_getifc //, GralWindowMng_ifc
016{
017  /**Version, history and license.
018   * <ul>
019   * <li>2012-03-10 Hartmut chg Now the both GralWindow_set- and -getifc are base,
020   *   The GralWindow_ifc is independent of this.
021   * <li>2011-06-00 Hartmut created
022   * </ul>
023   * 
024   * <b>Copyright/Copyleft</b>:<br>
025   * For this source the LGPL Lesser General Public License,
026   * published by the Free Software Foundation is valid.
027   * It means:
028   * <ol>
029   * <li> You can use this source without any restriction for any desired purpose.
030   * <li> You can redistribute copies of this source to everybody.
031   * <li> Every user of this source, also the user of redistribute copies
032   *    with or without payment, must accept this license for further using.
033   * <li> But the LPGL is not appropriate for a whole software product,
034   *    if this source is only a part of them. It means, the user
035   *    must publish this part of source,
036   *    but doesn't need to publish the whole source of the own product.
037   * <li> You can study and modify (improve) this source
038   *    for own using or for redistribution, but you have to license the
039   *    modified sources likewise under this LGPL Lesser General Public License.
040   *    You mustn't delete this Copyright/Copyleft inscription in this source file.
041   * </ol>
042   * If you intent to use this source without publishing its usage, you can get
043   * a second license subscribing a special contract with the author. 
044   * 
045   * @author Hartmut Schorrig = hartmut.schorrig@vishia.de
046   */
047  public static final int version = 20120303;
048
049  /**Sets the title and the pixel size for the whole window. */
050  //void buildMainWindow(String sTitle, int left, int top, int xSize, int ySize);
051  
052  
053  /**Activates the menu bar with the standard entries, especially the file open entry.
054   * Note: This method should only be called in the same thread where the graphic runs.
055   * 
056   * @param openStandardDirectory If given, then this is the default directory for file open.
057   * @param actionFile Action on file menu entries.
058   */
059  void setStandardMenusGThread(File openStandardDirectory, GralUserAction actionFile);
060  
061  
062  
063  MainCmd_ifc getMainCmd();
064  
065  
066  /**Returns the Frame class of the underlying graphic.
067   * SWT: Shell, swing: TODO
068   * @return
069   */
070  Object getitsGraphicFrame();
071  
072  
073
074
075
076}