Routines for slacal.kb


AdjustForMonthWithMoreDays

File Name

slacal.kb

Syntax

AdjustForMonthWithMoreDays(VAL currentDate: DATE, VAL isNext: BOOLEAN)

Parameters

currentDate - current date

isNext - TRUE if you are going to the next month, FALSE if you are going to the previous month

Returns

Adjusted Date

Side Effects

None

Description

When going to a previous or next month adjusts the date, if needed, so as not to cause a month to be skipped. If you are going to a month with fewer days than the current month, and the current date selected is greater than the total number of days in the next month, then adjust the date.

Dialog Forms Called

None


CalendarColorEvent

File Name

slacal.kb

Syntax

CalendarColorEvent(REF thisColor: SLAColorRecord)

Parameters

thisColor - record structure containing the color information

Returns

1 = user-accepted dialog < 1 = user-canceled dialog

Side Effects

None

Description

Controls selection of fonts/background color for display of dates in window.

Dialog Forms Called

None


CalendarEvent

File Name

slacal.kb

Syntax

CalendarEvent(REF thisCal: SLACalendarRecord)

Parameters

selectedDate - date for initialization of calendar and date selected by user

Returns

1 = user-selected date and accepted window < 1 = user-canceled window

Side Effects

None

Description

Event that displays the calendar and handles mouse events.

Dialog Forms Called

.dfc[gotodate]

.dfc[calendarfont]

.dfc[formstatus]

.dfc[calendarselectform]

.dfc[calendarcolor]

.dfc[dateinfo]


CalendarFontEvent

File Name

slacal.kb

Syntax

CalendarFontEvent(REF font: SLAFontRecord)

Parameters

font - record structure containing the font information

Returns

1 = user-accepted dialog < 1 = user-canceled dialog

Side Effects

None

Description

Controls selection of fonts for display of dates in window.

Dialog Forms Called

None


CalendarFormSelectEvent

File Name

slacal.kb

Syntax

CalendarFormSelectEvent ( REF formInfo: SLAFormRecord )

Parameters

formInfo - form record structure with current and dialog form list

Returns

None

Side Effects

None

Description

Event for selection of calendar form.

Dialog Forms Called

.dfc[' & form & ']


CalendarInfoEvent

File Name

slacal.kb

Syntax

CalendarInfoEvent(REF parentW: WINDOW)

Parameters

parentW - parent window from which to receive information

Returns

None

Side Effects

None

Description

Event to display extra date information.

Dialog Forms Called

None


GetCurrentOS

File Name

slacal.kb

Syntax

GetCurrentOS

Parameters

None

Returns

Type of operating system.

Side Effects

None

Description

Returns the current operating system string.

Dialog Forms Called

None


GotoDateEvent

File Name

slacal.kb

Syntax

GotoDateEvent(REF gotoDate: DATE)

Parameters

gotoDate - date from user input

Returns

1 = user-accepted dialog < 1 = user-canceled dialog

Side Effects

None

Description

Gets date to jump to.

Dialog Forms Called

None


ImbedSizedCalendar

File Name

slacal.kb

Syntax

ImbedSizedCalendar ( VAL parentWindow: WINDOW, VAL x: INTEGER, VAL y: INTEGER, VAL width: INTEGER, VAL height: INTEGER, VAL colSpace: INTEGER, VAL rowSpace: INTEGER, VAL fontSize: INTEGER, VAL borders: BOOLEAN, VAL times: ARRAY OF STRING, VAL startDate: DATE, VAL endDate: DATE, REF sDate: DATE, VAL displayTitle: BOOLEAN )

Parameters

parentWindow - caller's window handle

x - x coordinate location to place the calendar

y - y coordinate location to place the calendar

width, height - width and height to be used for the must be specific to the operating system

colSpace, rowSpace - the space between columns and rows must also be specific to the operating system

fontSize - size for the font must also be specific to the operating system

borders - TRUE creates borders for the calendar

times - array of 15-minute time intervals as strings for month

startDate - first day in the SLA Calendar's range

endDate - last day in the SLA Calendar's range

sDate - starting date

displayTitle - TRUE displays a title bar on the calendar; FALSE does not display the title bar

Returns

calW, Window

Side Effects

Setting the displayTitle to TRUE allows the user to move the calendar in relation to the parent window.

Description

Invokes the calender from the caller's window. This does not display any supporting dialog box. The caller is responsible for communicating with the calendar.

Dialog Forms Called

None


IsAtLeastASE5

File Name

slacal.kb

Syntax

IsAtLeastASE5

Parameters

None

Returns

TRUE - if running with ASE 5.0.0 or greater. FALSE - if running with ASE < 5.0.0

Side Effects

None

Description

Determines if running with at least version 5.0.0 of ASE.

Dialog Forms Called

None


ReadCalendarOptions

File Name

slacal.kb

Syntax

ReadCalendarOptions ( REF calOptions: CalendarOptionsRecord, VAL INIFileName: STRING)

Parameters

INIFileName - INI file from which to read

Returns

None

Side Effects

None

Description

Reads the saved options from the INI file.

Dialog Forms Called

None


SetGlobalCalendarWindowAttributes

File Name

slacal.kb

Syntax

SetGlobalCalendarWindowAttributes

Parameters

None

Returns

None

Side Effects

None

Description

Sets global operating-system dependent window attributes if not already set.

Dialog Forms Called

None


WriteCalendarOptions

File Name

slacal.kb

Syntax

WriteCalendarOptions ( VAL calOptions: CalendarOptionsRecord, VAL INIFileName: STRING)

Parameters

None

Returns

None

Side Effects

None

Description

Writes the current options to the INI file.

Dialog Forms Called

None