eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'LicenceBox':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: LicenceBox


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--TopView
                  |
                  +--StandardSystemView
                     |
                     +--ModalBox
                        |
                        +--DialogBox
                           |
                           +--LicenceBox

Package:
stx:libwidg2
Category:
Views-DialogBoxes
Version:
rev: 1.31 date: 2018/10/13 07:42:02
user: cg
file: LicenceBox.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
Stefan Vogel

Description:


LicenceBox shows a licence text when opened, an returns true,
if the licence has been accepted, false otherwise.


Related information:

    AboutBox

Class protocol:

Signal constants
o  licenceRejectSignal
licence has been rejected by user

initialization
o  initialize
self initialize

instance creation
o  open
open myself modal and return true if accepted, false otherwise

usage example(s):

     LicenceBox open

o  openOnFile: aFileName
like open, but show the HTML-text found in aFileName.
Can be used for end-user applications which want to display
there own licence text.

usage example(s):

     LicenceBox openOnFile:'doc/online/english/TOP.html'

     (LicenceBox licenceRejectSignal catch:[
	LicenceBox openOnFile:'doc/online/english/TOP.html'
     ]) ifTrue:[
	self information:'rejected'
      ]


Instance protocol:

accessing
o  accepted
return accepted

o  accepted: something
set accepted

o  licenceText: someHTMLText
set the text which is shown in the box

o  topDirectory: aDirectoryName
set the topDirectory, which is required for hyperlinks
to work (in the html text)

destroying
o  terminate
this is the close from a windowmanager
(only if UseTransientViews == true).
Redefined, since ModalBox keeps the View alive (only hidden)

initialization
o  initialize
(displayHeight < 800) ifTrue:[

o  mapped
kludge

private
o  licenceFile
get filename of licence file

usage example(s):

     LicenceBox new licenceFile

o  licenceText
get licence text

usage example(s):

     LicenceBox new licenceText

o  topDirectory
get name of top directory

usage example(s):

     LicenceBox new topDirectory

queries
o  windowStyle
self new windowStyle


Demonstration:


    LicenceBox open


Examples:


    LicenceRejectSignal handle:[:ex|
        Transcript showCR:'Licence rejected'.
    ] do:[
        LicenceBox open.
        Transcript showCR:'Licence accepted'.
    ]


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sun, 27 Nov 2022 10:05:12 GMT