home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
wif_const.tcl
< prev
next >
Wrap
Text File
|
1996-09-12
|
15KB
|
475 lines
#---------------------------------------------------------------------------
#
# Copyright (c) 1995-1996 by Cayenne Software Inc.
#
# This software is furnished under a license and may be used only in
# accordance with the terms of such license and with the inclusion of
# the above copyright notice. This software or any other copies thereof
# may not be provided or otherwise made available to any other person.
# No title to and ownership of the software is hereby transferred.
#
# The information in this software is subject to change without notice
# and should not be construed as a commitment by Cayenne Software Inc.
#
#---------------------------------------------------------------------------
#
# File : @(#)wif_const.tcl /main/titanic/1
# Original date : 14-02-1995
# Description : All kind of constants used by wif generation
#
#---------------------------------------------------------------------------
#
# Geometry stuff
#
global WN_left
set WN_left 0
global WN_top
set WN_top 0
global WN_width
set WN_width 6000
global WN_height
set WN_height 4000
global ST_left
set ST_left 100
global ST_top
set ST_top 100
global ST_width
set ST_width 5800
global ST_height
set ST_height 3800
#global SF_left
#global SF_top
global SF_width
set SF_width 2500
global SF_height
set SF_height 400
#global SF_title_Left
#global SF_title_Top
global SF_title_Height
set SF_title_Height 400
global SF_title_Width
set SF_title_Width 1500
#global BT_left
#global BT_top
global BT_width
set BT_width 1000
global BT_height
set BT_height 400
global SF_interspace
set SF_interspace 100
global SF_title_interspace
set SF_title_interspace 100
global BT_interspace
set BT_interspace 100
# WIF Version stuff
#
global WifVersion
set WifVersion "\"2.11.WC1\""
# Window stuff
#
global WindowProps
set WindowProps {
backgroundColor foregroundColor windowStyle title containingWindow \
fontName fontSize fontBold fontItalic derivedFrom snapToGrid \
fontUnderline theStartup enabled rulersOn left top width height \
database icon classname shown helpFile helpNum name gridOn characterMode
}
global UpdWindowProps
set UpdWindowProps {
title database classname name
}
global DefWindowProps
set DefWindowProps(backgroundColor) NULL
set DefWindowProps(foregroundColor) NULL
set DefWindowProps(windowStyle) ixWindow::normalTop
set DefWindowProps(containingWindow) NULL
set DefWindowProps(fontName) NULL
set DefWindowProps(fontSize) NULL
set DefWindowProps(fontBold) NULL
set DefWindowProps(fontItalic) NULL
set DefWindowProps(derivedFrom) {"ixWindow"}
set DefWindowProps(snapToGrid) FALSE
set DefWindowProps(fontUnderline) NULL
set DefWindowProps(theStartup) FALSE
set DefWindowProps(enabled) TRUE
set DefWindowProps(rulersOn) TRUE
set DefWindowProps(left) $WN_left
set DefWindowProps(top) $WN_top
set DefWindowProps(width) $WN_width
set DefWindowProps(height) $WN_height
set DefWindowProps(icon) NULL
set DefWindowProps(shown) TRUE
set DefWindowProps(helpFile) NULL
set DefWindowProps(helpNum) 0
set DefWindowProps(gridOn) FALSE
set DefWindowProps(characterMode) FALSE
global UserWindowProps
global WindowHandlers
set WindowHandlers {
pre_body constructor_extension
}
global DefWindowHandlers
set DefWindowHandlers(pre_body) {handler pre_body()
INCLUDE "DBObject.4gh"
INCLUDE "~${hdr_file}"
end handler}
set DefWindowHandlers(constructor_extension) {handler constructor_extension()
CALL ~${class_type_supfld}.setInitialQueryValue(
NEW ixString("~${cl_name}"))
CALL ~${class_type_supfld}.setInitialDataValue(
NEW ixString("~${cl_name}"))
end handler}
# SuperTable stuff
#
global SupTblProps
set SupTblProps {
updateTable backgroundColor foregroundColor fontName fontSize fontBold \
fontItalic fontUnderline enabled selectUnique SVName numDisplayedCols \
gridTop gridLeft gridWidth gridHeight \
left top width data_source SVLevel height selectFromPart \
selectJoinPart selectOrderbyPart borderWidth classname shown helpNum \
name lockMode layout numDisplayedRows dbConnection selectFilterPart \
displayMode maxRows
}
global UpdSupTblProps
set UpdSupTblProps {
updateTable numDisplayedCols selectFromPart selectJoinPart name
}
global DefSupTblProps
set DefSupTblProps(backgroundColor) NULL
set DefSupTblProps(foregroundColor) NULL
set DefSupTblProps(fontName) NULL
set DefSupTblProps(fontSize) NULL
set DefSupTblProps(fontBold) NULL
set DefSupTblProps(fontItalic) NULL
set DefSupTblProps(fontUnderline) NULL
set DefSupTblProps(enabled) TRUE
set DefSupTblProps(selectUnique) FALSE
set DefSupTblProps(SVName) NULL
set DefSupTblProps(gridTop) NULL
set DefSupTblProps(gridLeft) NULL
set DefSupTblProps(gridWidth) NULL
set DefSupTblProps(gridHeight) NULL
set DefSupTblProps(left) $ST_left
set DefSupTblProps(top) $ST_top
set DefSupTblProps(width) $ST_width
set DefSupTblProps(data_source) tables
set DefSupTblProps(SVLevel) NULL
set DefSupTblProps(height) $ST_height
set DefSupTblProps(selectOrderbyPart) NULL
set DefSupTblProps(borderWidth) 20
set DefSupTblProps(classname) {"ixSuperTable"}
set DefSupTblProps(shown) TRUE
set DefSupTblProps(helpNum) 0
set DefSupTblProps(lockMode) ixSuperTable::noLock
set DefSupTblProps(layout) ixSuperTable::freeForm
set DefSupTblProps(numDisplayedRows) 1
set DefSupTblProps(dbConnection) NULL
set DefSupTblProps(selectFilterPart) NULL
set DefSupTblProps(displayMode) ixSuperTable::displayData
set DefSupTblProps(maxRows) NULL
global UserSupTblProps
global SupTblHandlers
set SupTblHandlers {
SQLDelete SQLInsert SQLUpdate
}
global DefSupTblHandlers
set DefSupTblHandlers(SQLDelete) {handler SQLDelete(theRow ixRow)
VARIABLE the~${cl_name} ~${cl_name}
-- Instantiate ~${cl_name} here by calling
-- ~${cl_name}::NEW~${cl_name}<ByKeys>(<keys>)
RETURN the~${cl_name}.deleteFromDB()
end handler}
set DefSupTblHandlers(SQLInsert) {handler SQLInsert(theRow ixRow)
VARIABLE the~${cl_name} ~${cl_name}
-- Instantiate ~${cl_name} here by calling
-- ~${cl_name}::NEW~${cl_name}(...) and set attributes
RETURN the~${cl_name}.insertInDB()
end handler}
set DefSupTblHandlers(SQLUpdate) {handler SQLUpdate(theRow ixRow)
VARIABLE the~${cl_name} ~${cl_name}
-- Instantiate ~${cl_name} here by calling
-- ~${cl_name}::NEW~${cl_name}<ByKeys>(<keys>) and set attributes
RETURN the~${cl_name}.updateInDB()
end handler}
# SuperField stuff
#
global SupFldProps
set SupFldProps {
SQLRole colNum columnName tableName backgroundColor foregroundColor \
title fontName fontSize fontBold fontItalic fontUnderline tabIndex \
tabEnabled left top width height classname shown helpNum blobEditor \
name shiftPolicy autoNextOn title_BackgroundColor pictureString \
encLength initialDataValue format maxDataChars type \
title_ForegroundColor dataState required verify multiLine \
title_FontName title_FontSize title_Left title_Top title_FontBold \
title_FontItalic title_FontUnderline title_Height title_Width \
columnAlias nullable initialQueryValue dataJustify queryState \
useIncludes titleJustify includeTable primaryKey
}
global UpdSupFldProps
set UpdSupFldProps {
SQLRole colNum columnName tableName title name encLength\
initialDataValue maxDataChars type nullable primaryKey
}
global DefSupFldProps
set DefSupFldProps(backgroundColor) NULL
set DefSupFldProps(foregroundColor) NULL
set DefSupFldProps(fontName) NULL
set DefSupFldProps(fontSize) NULL
set DefSupFldProps(fontBold) NULL
set DefSupFldProps(fontItalic) NULL
set DefSupFldProps(fontUnderline) NULL
set DefSupFldProps(tabIndex) NULL
set DefSupFldProps(tabEnabled) TRUE
set DefSupFldProps(left) NULL
set DefSupFldProps(top) NULL
set DefSupFldProps(width) $SF_width
set DefSupFldProps(height) $SF_height
set DefSupFldProps(classname) {"ixSuperField"}
set DefSupFldProps(shown) TRUE
set DefSupFldProps(helpNum) 0
set DefSupFldProps(blobEditor) NULL
set DefSupFldProps(shiftPolicy) ixSuperField::noShift
set DefSupFldProps(autoNextOn) FALSE
set DefSupFldProps(title_BackgroundColor) NULL
set DefSupFldProps(pictureString) NULL
set DefSupFldProps(format) NULL
set DefSupFldProps(title_ForegroundColor) NULL
set DefSupFldProps(dataState) ixSuperField::enabledState
set DefSupFldProps(required) FALSE
set DefSupFldProps(verify) FALSE
set DefSupFldProps(multiLine) FALSE
set DefSupFldProps(title_FontName) NULL
set DefSupFldProps(title_FontSize) NULL
set DefSupFldProps(title_Left) NULL
set DefSupFldProps(title_Top) NULL
set DefSupFldProps(title_FontBold) NULL
set DefSupFldProps(title_FontItalic) NULL
set DefSupFldProps(title_FontUnderline) NULL
set DefSupFldProps(title_Height) $SF_title_Height
set DefSupFldProps(title_Width) $SF_title_Width
set DefSupFldProps(columnAlias) NULL
set DefSupFldProps(initialQueryValue) NULL
set DefSupFldProps(dataJustify) ixSuperField::leftJustify
set DefSupFldProps(queryState) ixSuperField::enabledState
set DefSupFldProps(useIncludes) FALSE
set DefSupFldProps(titleJustify) ixSuperField::rightJustify
set DefSupFldProps(includeTable) NULL
global UserSupFldProps
# SuperTable Button stuff
#
# These are the SuperTable Buttons that have an activate handler defined
# in DefSTBtnActivateHdlrs
# ApplyAll ApplyRow DeleteRow FirstRow Help InsertRow
# LastRow NextPage NextRow PreviousPage PreviousRow
# Query Retrieve RevertRow
#
global SupTblBtnProps
set SupTblBtnProps {
backgroundColor foregroundColor title fontName fontSize fontBold \
fontItalic fontUnderline enabled tabIndex tabEnabled left top width \
height classname shown helpNum theDefault name
}
global UpdSupTblBtnProps
set UpdSupTblBtnProps {
title name
}
global DefSupTblBtnProps
set DefSupTblBtnProps(backgroundColor) NULL
set DefSupTblBtnProps(foregroundColor) NULL
set DefSupTblBtnProps(fontName) NULL
set DefSupTblBtnProps(fontSize) NULL
set DefSupTblBtnProps(fontBold) NULL
set DefSupTblBtnProps(fontItalic) NULL
set DefSupTblBtnProps(fontUnderline) NULL
set DefSupTblBtnProps(enabled) TRUE
set DefSupTblBtnProps(tabIndex) NULL
set DefSupTblBtnProps(tabEnabled) TRUE
set DefSupTblBtnProps(left) NULL
set DefSupTblBtnProps(top) NULL
set DefSupTblBtnProps(width) $BT_width
set DefSupTblBtnProps(height) $BT_height
set DefSupTblBtnProps(classname) {"ixButton"}
set DefSupTblBtnProps(shown) TRUE
set DefSupTblBtnProps(helpNum) 0
set DefSupTblBtnProps(theDefault) FALSE
global UserSupTblBtnProps
global SupTblBtnHandlers
set SupTblBtnHandlers {
activate
}
global DefSTBtnActivateHdlrs
set DefSTBtnActivateHdlrs(ApplyAll) {handler activate()
VARIABLE ok BOOLEAN
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET ok = superTable.apply()
end handler}
set DefSTBtnActivateHdlrs(ApplyRow) {handler activate()
VARIABLE ok BOOLEAN
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
IF superTable.acceptRow() THEN
LET ok = superTable.applyRowSQL(superTable.getRowByNumber(displayMode :
ixSuperTable::displayData))
END IF
end handler}
set DefSTBtnActivateHdlrs(DeleteRow) {handler activate()
VARIABLE deletedRow ixRow
VARIABLE superTable ixSuperTable
VARIABLE ok BOOLEAN
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET deletedRow = superTable.delete()
LET ok = superTable.apply()
end handler}
set DefSTBtnActivateHdlrs(FirstRow) {handler activate()
VARIABLE ok BOOLEAN
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET ok = superTable.setCurrentCell(1, ixSuperTable::currentColumn)
end handler}
set DefSTBtnActivateHdlrs(Help) {handler activate()
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
CALL superTable.displayHelp()
end handler}
set DefSTBtnActivateHdlrs(InsertRow) {handler activate()
VARIABLE rowNum INTEGER
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET rownum = superTable.insert()
end handler}
set DefSTBtnActivateHdlrs(LastRow) {handler activate()
VARIABLE ok BOOLEAN
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET ok = superTable.setCurrentCell(ixSuperTable::lastRow,
ixSuperTable::currentColumn)
end handler}
set DefSTBtnActivateHdlrs(NextPage) {handler activate()
VARIABLE ok BOOLEAN
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET ok = superTable.pageDown()
end handler}
set DefSTBtnActivateHdlrs(NextRow) {handler activate()
VARIABLE ok BOOLEAN
VARIABLE superTable ixSuperTable
VARIABLE rowPosition INTEGER
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET rowPosition = superTable.getCurrRowNum() + 1
IF rowPosition > superTable.getNumStoredRows(NULL) THEN
LET rowPosition = ixSuperTable::lastRow
END IF
LET ok = superTable.setCurrentCell(rowPosition, ixSuperTable::currentColumn)
end handler}
set DefSTBtnActivateHdlrs(PreviousPage) {handler activate()
VARIABLE ok BOOLEAN
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET ok = superTable.pageUp()
end handler}
set DefSTBtnActivateHdlrs(PreviousRow) {handler activate()
VARIABLE ok BOOLEAN
VARIABLE superTable ixSuperTable
VARIABLE rowPosition INTEGER
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET rowPosition = superTable.getCurrRowNum() - 1
IF rowPosition < 1 THEN
LET rowPosition = 1
END IF
LET ok = superTable.setCurrentCell(rowPosition, ixSuperTable::currentColumn)
end handler}
set DefSTBtnActivateHdlrs(Query) {handler activate()
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
CALL superTable.setDisplayMode (ixSuperTable::displayQuery)
end handler}
set DefSTBtnActivateHdlrs(Retrieve) {handler activate()
VARIABLE ok BOOLEAN
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET ok = superTable.retrieve( QBE: TRUE )
end handler}
set DefSTBtnActivateHdlrs(RevertRow) {handler activate()
VARIABLE ok BOOLEAN
VARIABLE superTable ixSuperTable
LET superTable = (getVisualContainer() CAST ixSuperTable)
LET ok = superTable.revert()
end handler}
set DefSTBtnActivateHdlrs(NotYetImplemented) {handler activate()
-- Not yet implemented!!
end handler}