[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

Corridor

inherits from Box
inherits from CanContainEntrances
inherits from Scroller
inherits from HasBuiltInScrollArrows

Object <- Viewable <- Box <- Corridor



Operations

Get list of all operations

AdjustSize
CalcInsidePart
CanAcceptCoupon
ChangedContents
CreateEntrance
Draw
DrawFloor
InsertIntoCorridor
InsertSpace
InstallEntrance
InstallInto
MakeActive
MakeValid
MaximumGapSize
MaximumScrollOffset
MoveTouch
MovedContents
PageLeft
PageRight
PartColor
RemoveFromCorridor
RevealViewable
ScrollArrowImage
ScrollArrowPositions
ScrolledContentBox
SetPartColor
Touch


Attributes

Get list of all attributes

AuthoringMode
ScrollsHorizontally
UseBuiltInScrollArrows


Fields

Field Type
Viewable: superview: Viewable
relativeOrigin: Dot
contentSize: Dot
viewFlags: Flags
labelStyle: TextStyle
color: Unsigned
altColor: Unsigned
shadow: Shadow
sound: Playable
HasBorder: border: Border
ScrollableByMicron: scrollOffset: Dot
Corridor: floorColor: Unsigned
floorColorHighlighted: Unsigned
floorHeight: Micron
itemSpacing: Micron
directoryList: ObjectList
scrollAmount: Micron
corridorSize: Micron
authoringMode: Boolean
useBuiltInScrollArrows: Boolean
inactiveList: ObjectList
lastInsert: Micron
insertInterval: Micron
insertList: ObjectList
insertIndex: Unsigned
removableItemsList: DenseObjectList
insertAfter: Viewable
knownItemNames: Text


Instance template

instance Corridor tag;
 relativeOrigin: <0.0,0.0>;
    contentSize: <0.0,0.0>;
      viewFlags: 0x00000000;
     labelStyle: nilObject;
          color: 0;
       altColor: 0;
         shadow: nilObject;
          sound: nilObject;
         border: nilObject;
   scrollOffset: <0.0,0.0>;
     floorColor: 0;
floorColorHighlighted: 0;
    floorHeight: <0.0>;
    itemSpacing: <0.0>;
  directoryList: nilObject;
   scrollAmount: <0.0>;
   corridorSize: <0.0>;
  authoringMode: false;
useBuiltInScrollArrows: false;
   inactiveList: nilObject;
     lastInsert: <0.0>;
 insertInterval: <0.0>;
     insertList: nilObject;
    insertIndex: 0;
removableItemsList: nilObject;
    insertAfter: nilObject;
 knownItemNames: nilObject;
end instance;

Class definition

Define Class Corridor;
    inherits from Box;
    inherits from CanContainEntrances;
    inherits from Scroller;
    inherits from HasBuiltInScrollArrows;

    field floorColor:       Unsigned;
    field floorColorHighlighted: Unsigned;
    field floorHeight:      Micron;
        // the distance between the bottom of the corridor's content box and 
        // the point where the wall meets the floor.
    field itemSpacing:      Micron;
        // used by InsertIntoCorridor() to put gaps between things.
        // = 28*onePixel for the corridor in the storeroom,
        // = 20*onePixel for all other system corridors.
    field directoryList:    ObjectList;
        // the list of all interesting things in the corridor.
        // updated by InsertIntoCorridor and RemoveFromCorridor.
    field scrollAmount:     Micron;
    field corridorSize:     Micron;
    field authoringMode:    Boolean;
    field useBuiltInScrollArrows:   Boolean, getter;
    field inactiveList:     ObjectList;
    field lastInsert:       Micron;
        // last position of inserted furniture.
    field insertInterval:   Micron;
        // minimum distance between furniture.
    field insertList:       ObjectList, weak;
        // list of furniture to insert.  Set to nilObject if there is no furniture.
    field insertIndex:      Unsigned;
        // index into insertList which specifies the last type of furniture inserted.
    field removableItemsList: DenseObjectList, weak;
        // list of items which the corridor is free to remove as need be.  all
        // furniture that the corridor inserts is placed on this list.
        // usually set to nilObject initially.
    field insertAfter:      Viewable, weak;
        // objects inserted by InsertIntoCorridor cannot be placed to the left
        // of the object placed in the insertAfter field.  usually set to nilObject,
        // unless such behavior is useful.
    field knownItemNames:   Text;
        // a list of names of objects that the corridor knows about.  if an object
        // matching one of these names is inserted, it will be placed in the corridor
        // in the same order as the list of names.

    operation InsertIntoCorridor(newElement: Viewable; distanceAboveFloor: Micron), noFail, safe;
        // Inserts an item into the corridor by finding a good
        // place to insert the new element, inserting furniture if necessary, 
        // inserting the proper amount of space in the corridor, 
        // scrolling the corridor to the newly inserted item,
        // and adding the new item to the directory list.  
        // The distance above the floor may be specified, with a negative
        // value meaning that the item will be placed below the floor 
        // (e.g., for shelves in the storeroom)
        // Rarely override.
    operation RemoveFromCorridor(theElement: Viewable), noFail;
        // Removes an item from the corridor, removes furniture if
        // necessary, collapses the gap in the corridor, and
        // removes the item from the directory list.
        // Rarely override.
    operation InsertSpace(amountToInsert: Micron; whereToInsert: Micron);
        // Grows the corridor and moves subviews appropriately.
        // Use a negative value for amountToInsert in order to
        // shrink the corridor.
        // Rarely override.
    operation MaximumGapSize(): Unsigned;
        // Used by MakeActive to determine how big a gap must be before
        // being closed up.
        // Sometimes override if a different max gap size is appropriate.
    operation DrawFloor();
        // Draws the corridor floor

    overrides CreateEntrance;
        // If self == iCorridor, creates a door that installs 
        // into the hallway.  Otherwise, return InheritedCreateEntrance.
    overrides InstallEntrance;
        // Sets the stepback of the destination (if it was nilObject)
        // and checks to see if the entrance is a normal entrance or one which
        // should only be visible in authoring mode.
    overrides InstallInto;
        // if the object is an entrance, calls InstallEntrance.  if it is some
        // other kind of Viewable, calls InsertIntoCorridor.
    overrides RevealViewable;
        // Scrolls the corridor to place the viewable onscreen.

    overrides AdjustSize;
        // Adjusts the size of the corridor by examining the position of the
        // rightmost object.
    overrides Draw;
        // Draws the corridor background, its floor, and any scroll arrows.
    overrides Touch;
        // Scrolls the corridor as the user drags the floor.
    overrides CalcInsidePart;
        // Returns partFloor for the floor, if appropriate.
    overrides CanAcceptCoupon;
        // Does not accept borders or shadows.
    overrides PartColor, SetPartColor;
        // If the part is partFloor, sets the floorColor field.
    overrides MakeValid, MakeActive;
        // Collapses gaps in the corridor which may have been left by disappearing doors.
    overrides ScrolledContentBox;
        // Returns the scrolled content box.
    overrides SetAuthoringMode;
        // Makes authoring-mode-only-doors appear and disappear as appropriate.

    overrides PageLeft, PageRight;
        // Scrolls the corridor one screenful to the left or right.
    overrides MaximumScrollOffset;
        // Returns corridorSize - ContentWidth(self) horizontally, and 0 vertically.
    overrides ScrollArrowImage;
        // returns iFloorArrow if <backArrow> is true, iFloorRightArrow otherwise
    overrides ScrollArrowPositions;
        // positions arrows at left and right of corridor
    overrides ScrollsHorizontally;
        // returns true;
    attribute UseBuiltInScrollArrows: Boolean;
        // getter returns value of boolean field
        // setter sets value into boolean field, after dirtying arrow boxes

    overrides ChangedContents;
        // Ensures that the directoryList is up-to-date.
    overrides MovedContents;
        // Readjusts doors/buildings to be on the floor/ground.
    overrides MoveTouch;
        // Allows the user to add or remove space between doors when the move
        // tool is used.
end class;