|
Class: WebSlideShow (in Demos)
Object
|
+--HTTPService
|
+--Demos::WebSlideShow
- Package:
- stx:goodies/webServer
- Category:
- Net-Communication-HTTP-Services-Demo-WebApplications
- Version:
- rev:
1.120
date: 2023/08/11 09:50:21
- user: cg
- file: WebSlideShow.st directory: goodies/webServer
- module: stx stc-classLibrary: webServer
Provides a thumbnailed slides presentation;
for the given slideDirectory, referring pages are synthesized,
and thumbnails automatically generated, as required.
To add more slides, simply create a sub-folder of the slidesDirectory,
put the slides there, and open a browser; that's it - all done automatically
and on the fly.
To start:
start the HTTPServer at some port:
aServer := HTTPServer startServerOnPort:8080
register the class (towards the HTTPServer) with:
service := Demos::WebSlideShow new.
service slideDirectory:'someDirectory'.
service registerServiceOn:(HTTPServer runningServers first) as:'slides'.
Open a netscape or internet explorer (somewhere);
enter the URL:
httP://host:port/slides
copyrightCOPYRIGHT (c) 2003 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
defaults
-
defaultReplyPresenterClass
-
-
isThreadSafe
-
-
linkName
-
return the default path (with slash)
-
newSetIndicationFile
-
-
slideDirectory
-
my default slides directory
queries-service
-
settingsApplicationClass
-
my application in the settings dialog
accessing
-
allowSlideShow
-
-
allowSlideShow: aBoolean
-
-
allowUploads
-
-
allowUploads: something
-
-
numberOfColumns
-
the number of columns to generate (default: 5)
-
numberOfColumns: something
-
set the number of columns to generate
-
numberOfSlidesPerPage
-
the number of thumbs per page (default: 25)
-
numberOfSlidesPerPage: something
-
set the number of thumbs per page
-
showExeptFrame
-
old instance var keep selector for loading old settings files
-
showExeptFrame: aBoolean
-
old instance var keep selector for loading old settings files
-
showFileNames
-
-
showFileNames: aBoolean
-
-
showFileSizes
-
-
showFileSizes: aBoolean
-
-
slideDirectory
-
where the slides are
-
slideDirectory: something
-
set the value of the instance variable 'slideDirectory' (automatically generated)
-
slideShowDelay
-
-
smoothThumbs
-
-
thumbBorders
-
-
thumbBorders: aBoolean
-
-
thumbFileFormat
-
^ #gif
-
thumbSize
-
the size of the generated thumbs (default: 128@128)
-
thumbSize: anExtent
-
the size of the generated thumbs (default: 128@128)
-
thumbStyle
-
-
thumbStyle: aSymbol
-
-
uploadRealm
-
-
uploadRealm: something
-
-
withImageWidthOption
-
-
withImageWidthOption: something
-
helpers
-
areAnyImagesIn: aDirectory
-
true if there are any files with an image mimeType in aDirectory
-
criticalDirectoryAccessIn: anAbsolutePath do: aBlock
-
synchronized critical update of the thumb directory
-
filesInDirectory: path
-
-
imageFilesInDirectory: path
-
-
newSetIn: aDirectory
-
true if there are any files with an image mimeType in aDirectory
maintenance html presentation
-
specificChangeFromRequest: aRequest
-
extracts parameter from an html-maintenance post-request
-
specificInputFieldsForRequest: aRequest
-
generates the html-fragment for the maintenance form
misc
-
flushCachedThumbImages
-
self allInstancesDo:#flushCachedThumbImages
-
styleDescriptionsAndSymbols
-
('Cartoon' #cartoon) "/ does not work yet
registration
-
addRequiredForeignServicesTo: anHTTPServer
-
I need a file service for the bitmaps and icons
request handling
-
process: aRequest
-
process an http request
serving-private
-
authenticateUploadFor: aRequest
-
-
createNewImageSet: aRequest forRelativePath: relPath
-
self showExeptFrame ifTrue:[
-
doFormActions: aRequest forRelativePath: relPath
-
process all the form actions
-
file: absolutePathToFile for: aRequest
-
return a files complete contents
-
generateTableForSlidesIn: path relative: relativePath for: aRequest
-
generate an html table containing the thumbs
-
generateTableForSubdirectoriesIn: path relative: relativePath for: aRequest
-
generate an html table containing links to subdirectories
-
generateZipLinksForFilesIn: path relative: relativePath for: aRequest
-
generate a link for zip/tgz files
-
image: absolutePathToImage for: aRequest
-
return a full image
-
imagePageBody: aRequest for: path relative: relativePath
-
the body of an image page
-
isDirectoryVisible: aDirectory
-
-
linkToThumbFor: aRealativeImageFilename
-
generate a hyperlink to a thumb
-
pageFinish: aRequest
-
showExeptFrame ifTrue:[
-
slidePage: aRequest forRelativePath: relativePathOfSlideDirectory
-
after validating the request, generate a page containing the tables
-
slidePageBody: aRequest for: path relative: relativePath
-
the body of a slide page
-
slidePageTables: aRequest for: path relative: relativePath
-
generates the two tables
-
thumb: absolutePathToThumb for: aRequest
-
look for or create and cache a thumb image.
When invoked for the first time, generate a dithered 8-bit version.
-
upLoadImage: aRequest forRelativePath: relPath
-
-
upLoadInputFor: aRequest relative: relativePath
-
serving-thumbs
-
generateButtonImageFor: anImage buttonLevel: bw
-
-
generateCartoonImageFor: anImage
-
must convert - GIF only supports Depth8.
-
generateGrayImageFor: anImage
-
-
generateShadowImageFor: anImage shadowWidth: sw
-
-
generateSlideImageFor: anImage
-
must convert - GIF only supports Depth8.
-
generateThumbFor: anImage
-
must convert - GIF only supports Depth8.
settings persistency
-
settingSelectors
-
answer the selectors that are used to configure a service - i.e. those which are
saved in the webServer-settings file.
Usage example(s):
HTTPService new settingSelectors
self new settingSelectors
|
CachedDirectoryEntry
start the HTTPServer at some port and register
the class (towards the HTTPServer)
Open a netscape or internet explorer (somewhere);
enter the URL:
http://host:port/WebSlideShow
|aServer service|
aServer := HTTPServer serverOnPort:8081.
service := Demos::WebSlideShow new.
service slideDirectory:'/phys/exept/unsaved3/cg/camp smalltalk bilder'.
service numberOfColumns:5.
service numberOfSlidesPerPage:30.
service registerServiceOn:aServer as:'campSmalltalk'.
|
|