Plasma GitLab Archive
Projects Blog Knowledge

<?xml version="1.0" encoding="ISO-8859-1"?>

<!--
  - <COPYRIGHT>
  - Copyright 2003 Gerd Stolpmann
  -
  - <GPL>
  - This file is part of WTimer.
  - 
  - WTimer is free software; you can redistribute it and/or modify
  - it under the terms of the GNU General Public License as published by
  - the Free Software Foundation; either version 2 of the License, or
  - (at your option) any later version.
  -
  - WTimer is distributed in the hope that it will be useful,
  - but WITHOUT ANY WARRANTY; without even the implied warranty of
  - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  - GNU General Public License for more details.
  -
  - You should have received a copy of the GNU General Public License
  - along with WDialog; if not, write to the Free Software
  - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  - </>
  -->

<!--  $Id: session.ui,v 1.5 2003/03/23 11:59:14 gerd Exp $
   -  ======================================================================
   - 
  -->

<!-- This file defines the dialog "session". This dialog contains only
     variables but no pages, and is more a record structure than a 
     dialog.

     The other dialogs usually contain a session variable, and usually it
     stores an instance of the session dialog:

     <ui:variable name="session" type="dialog"/>

     The event handlers ensure that the contents of the session variable
     are passed from one dialog to the next dialog (this is programmed
     manually because WDialog has no support for cross-dialog persistence).

     The session dialog contains a number of variables that must be
     kept during the whole user session.
  -->

<ui:dialog name="session" start-page="empty">

  <!-- *********************** Login ****************************** -->

  <!-- login-user: The verified name of the user. 
     - This variable is protected so it cannot be modified directly by
     - CGI parameters. This is necessary, otherwise we cannot trust
     - this variable.
    -->

  <ui:variable name="login-user" protected="yes"/>

  <!-- passwd-hash: The MD5 hash of the password. This is a security
     - feature because it makes it very hard to guess the checksum
     - of the serialized session
    -->

  <ui:variable name="passwd-hash" protected="yes"/>


  <!-- ******************** Which object is edited **************** -->

  <ui:variable name="current-sheet">
    <!-- <ui:string-value>gerd</ui:string-value> --> <!-- test data -->
  </ui:variable>

  <ui:variable name="current-date">
    <!-- <ui:string-value>1970-01-01</ui:string-value> --> <!-- test data -->
  </ui:variable>

  <!-- ************************ Clipboard ************************* -->

  <ui:variable name="clipboard" protected="yes">
    <!-- Empty string if the clipboard is empty. Otherwise, this variable
       - contains a marshaled O'Caml representation of the clipboard value.
       - (We do not need to display the clipboard!)
       - The type of the clipboard is currently: Editor.row list.
       - This variable is protected because it is a marshaled value, and
       - modification can lead to unpredictable behaviour of the application.
      -->
    <!--&editor-clipboard;-->              <!-- Test data for this variable -->
  </ui:variable>

  <!-- ******************** Browser capabilities ****************** -->

  <!-- js-enabled is "yes" or "no". Initially "no", it is changed to 
     - "yes" by the startpage when Javascript is enabled.
    -->

  <ui:variable name="js-enabled">
    <ui:string-value>no</ui:string-value>
  </ui:variable>

  <!-- The variable "grid" determines which grid the basic-grid template
     - instantiates. The are several grids because not every browser
     - can display every grid, and it looks very funny if the wrong grid
     - is active.
     - The grids are:
     -
     - * "dynamic": This is the most effectful grid, and it requires the
     -   most capabilities. The basic layout of the application uses
     -   CSS2-positioned boxes, including "position:fixed" boxes, and
     -   right-aligned boxes. The effect is that the browser resizes the
     -   boxes appropriately when the browser window is resized. Because
     -   of this, the grid works for any screen resolution.
     -   Currently only Gecko-based browsers can display this grid.
     -
     - * "1200" and "960": These grids base on CSS2-positioned boxes, too,
     -   but "position:fixed" boxes and right-aligned boxes are avoided.
     -   There are two variants: "1200" is a good choice if the screen
     -   has 1280x1024 pixels, and "960" is good if the screen has 
     -   1024x768 pixels. The boxes have a fixed size, and cannot be
     -   resized.
     -   These grids have Internet Explorers 5 and 6 in mind.
     -
     - * "legacy": This is an old-style table-based grid. Furthermore, CSS
     -   is turned off (to avoid that poor CSS engines are used). This
     -   grid is only provided to make the application "accessible" for
     -   old, HTML3.2-based browsers in the spirit of the HTML accessibility
     -   guidelines by W3C. There is a substantial degredation of functionality
     -   because the menu buttons are scrolled together with the main
     -   column, and because of this the legacy grid should be avoided if
     -   possible.
     -   This grid has version 3 and 4 browsers in mind.
     -
     - By the way, text browsers seem to like the positioned grids more than
     - the legacy grid.
     -
     - When the application is started the first time, the grid is guessed
     - by "browser sniffing". There is an option to save the grid style in
     - a cookie, so browser remember automatically which was the right grid
     - the last time the application was started.
     -
     - The sniffing and cookie code is in startpage.ml.
     - 
    -->

  <ui:enumeration name="grids">
    <ui:enum internal="dynamic" 
             external="Dynamic grid (requires advanced CSS2 features)"/>
    <ui:enum internal="fixed" 
             external="Fixed grid (requires advanced CSS2 features)"/>
    <ui:enum internal="1200"
             external="Positioned grid for 1280 x 1024 screen size"/>
    <ui:enum internal="960"
             external="Positioned grid for 1024 x 768 screen size"/>
    <ui:enum internal="legacy"
             external="Table-based grid for older browsers"/>
  </ui:enumeration>

  <ui:variable name="grid" type="grids">
    <ui:enum-value>
      <ui:enum-item internal="960"/>
    </ui:enum-value>
  </ui:variable>

  <ui:enumeration name="bool">
    <ui:enum internal="no"/>
    <ui:enum internal="yes"/>
  </ui:enumeration>

  <ui:variable name="grid-cookie" type="bool">
    <!-- Whether the grid style is stored in a cookie -->
    <ui:enum-value>
      <ui:enum-item internal="yes"/>
    </ui:enum-value>
  </ui:variable>

  <!-- The button implementation (for menu buttons):
     - * "richbutton" is an advanced implementation basing on the BUTTON
     -   element with a number of CSS-controled special effects. This 
     -   implementation is only activated for the "dynamic" grid.
     - * "button" is the classic implementation basing on INPUT elements
     -   with TYPE=SUBMIT. It works for all browsers.
    -->

  <ui:variable name="button-impl">
    <!-- "button" or "richbutton": This value is set in the "handle" method
       - of "startpage.ml" 
      -->
    <ui:string-value>button</ui:string-value>
  </ui:variable>


  <ui:page name="empty"/>
</ui:dialog>

<!-- ******************* For Emacs: ********************* -->
<!--
Local Variables:
mode: xml
sgml-parent-document: ("main.ui" "ui:application" "ui:dialog")
End:
-->

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml