File 'clock/dayBrowse.cls' (part of 'Pool_Clock')

Description (short)
Day choice
Written by
Andreas Kupries
Description
Widget to choose day, depending on given month and year
See also
calendar
Keywords
calendar, choosing a day, day choice

Class 'dayBrowser'

Superclasses
valueManager
Options
onwrap
month
heading
sunday
weekno
dayrelief
Methods
public
GetOffset ()
OnWrap (direction)
RefreshDay (storeChange day)
RefreshDisplay ()
TrackDayrelief (o oldValue)
TrackHeading (o oldValue)
TrackMonth (o oldValue)
TrackSunday (o oldValue)
TrackWeekno (o oldValue)
createSubwidgets ()
dayBrowser ()
downOne ()
downSeven ()
setBindings ()
setBindingsTo (w)
upOne ()
upSeven ()
updateDisplay ()
Membervariables
public
m
y
monlen
offset
chosen

Options

-onwrap
Script to evaluate in the case of a wrap around, either at the start or the end of the month. The evaluation takes place before the execution of valueManager:command. A single argument is appended before the actual evaluation, it specifies the direction of the wrap. Possible values are 'up' (wrap 12 -> 1) and 'down' (wrap 1->12). A possible use is the modification of an associated yearBrowser.
-month
External month/year information (in format mm/yyyy) to control the appearance of the widget.
-heading
Color to mark header row.
default value: black
-sunday
Color to mark sundays.
default value: red
-weekno
Color to mark week numbers
default value: black
-dayrelief
Relief of button associated to currently chosen day
default value: sunken

Methods

GetOffset ()

Internal method. Computes the weekday associated to the first day in a month. This is used to correctly indent the topmost row of day buttons.

OnWrap (direction)

Propagates wraparound events, if possible
Argument: direction direction of wrap, one 'up' or 'down' respectively.

RefreshDay (storeChange day)

Refreshes the day buttons after a change of the current value.
Argument: storeChange 1 if called by day button day. This requires propagation of the new value to all internal data structures. 0 makes internal changes visible to the user, by changing the appearance of the buttons.
Argument: day Relevant for storeChange=1, index of activated button.

RefreshDisplay ()

Refreshes the area containing the day buttons according to changes in day, month or year.

TrackDayrelief (o oldValue)

Executed whenever the relief of the buttons is set.
Argument: o The name of the changed option, always '-dayrelief'.
Argument: oldValue The old value of the option.

TrackHeading (o oldValue)

Executed whenever the color of the heading is changed.
Argument: o The name of the changed option, always '-heading'.
Argument: oldValue The old value of the option.

TrackMonth (o oldValue)

Executed every time the month/year information is changed.
Argument: o The name of the changed option, always '-month'.
Argument: oldValue The old value of the option.

TrackSunday (o oldValue)

Executed whenever the color of the sunday column requires a refresh.
Argument: o The name of the changed option, always '-sunday'.
Argument: oldValue The old value of the option.

TrackWeekno (o oldValue)

Executed whenever the color of the weeknumber column requires a refresh.
Argument: o The name of the changed option, always '-weekno'.
Argument: oldValue The old value of the option.

createSubwidgets ()

Overrides valueManager:createSubwidgets
Called by the framework to generate the subwidgets and their layout.

dayBrowser ()

Initializes the value to the current day if not set already by the user. Initializes the month/year information to the current month/year if not already set by the user.

downOne ()

Decrements chosen day by one. Touching the lower bound triggers a wrap-around to the highest value possible. This event might be propagated.

downSeven ()

Increments chosen day by seven (ahead a week). Touching the upper bound triggers a wrap-around. This event might be propagated.

setBindings ()

Overrides valueManager:setBindings
Adds various keyboard accelerators to the daybrowser.

setBindingsTo (w)

Adds various keyboard accelerators to the given widget.
Argument: w The widget the accelerators are added to.

upOne ()

Increments the chosen day by one. Touching the upper bound triggers a wrap-around to the lowest value possible. This event might be propagated.

upSeven ()

Decrements chosen day by seven (back a week). Touching the lower bound triggers a wrap-around. This event might be propagated.

updateDisplay ()

Overrides valueManager:updateDisplay
Method required by the superclass valueManager to propagate changes to the value into the display. Requests are simply forwarded to dayBrowser:RefreshDay


Membervariables

m
Derived information, he month part of dayBrowser:month.
y
Derived information, he year part of dayBrowser:month.
monlen
Derived information, the length of the specified dayBrowser:month.
offset
Offset of first day in month into the day-area. Alternative description: Difference between day and number of associated button.
chosen
Index of chosen button for chosen day.
initial value: -1

Generated by AutoDoc 2.4 at 09/14/2000, invoked by Andreas Kupries