Drop Containers

Update 23rd Feb 2006: Ted Bracht has kindly ported the LinkButton and DropContainer packages to Dolphin 6. The download is here. Thanks Ted!

By: Steve Waring
Home Pages: Journal Dolphinharbor
Created: 20030118
Last Update: 20030118

Overview

This package contains a LayoutManager for Dolphin Smalltalk, that can be used to implement the look and feel of WindowsXP's "Special folders" and "Generic Webview folders".

linkButton

The above screenshot is from the sample application.

Webview folders

I named this package and the layout manager before I knew what Microsoft's official name was. From the WindowsXP_DesignGuidelines, I have since found out that they are called "Special folders" and "Generic Webview folders". I still like my "Drop Container".

Background

My first implementation trying to achieve the look and feel of these containers was hard-wired into one of my application's presenters. It was an experiment to see if I liked how they worked, but I didnt have the feel right. I used Framing layoutManagers for three containers, and the Splitting a FramingLayout technique. This had the right look (see my ListTreeView blog post screenshot) but the feel was wrong, and I didnt like it.

Changing the extent of one container (ie opening/closing it), would change the extent of a second container. The XP feel is to push down, or pull up all the containers below the container being opened or closed.

One nice thing was that I did have the animation effect working ... the command to open/close a folder would start a loop that moved the appropriate splitter a couple of pixels at a time.

I decided to re-implement it; give it the right feel, and make the code re-usable by implementing it as a LayoutManager.

LayoutManager

The package installs a LayoutManager that can be used like any other Dolphin LayoutManager.

aspects

aspects

The above screenshots are the DropContainerSample shell in the ViewComposer.

Details on the various aspects can be found in the class comments.

One additonal function (over the standard XP feel) is that Splitters can be used to allow the user to manually resize the containers.

The LayoutManager also contains helper methods that a presenter can use in its #queryCommand: method to update the status of the open/close commands. See the sample for how this works.

Downloads

The packages are released under the OpenBSD license (ie free). The "SW DropContainerLayout.pac" package includes the LayoutManger and supporting classes. The "SW DropContainerLayout Sample.pac" package contains the Sample shell and the SessionManager that was used to deploy the test ToGo.

The ToGo is released as TestWare ... if you have a problem with the code or technique in your environment, you will be doing me a favor by letting me know about it.

Notes;


Copyright Steve Waring 2003.