FlipPalette Biztech, Inc. 700 Canal Street · 3rd Floor Stamford, CT 06902 info@biztech.com ftp.biztech.com Overview FlipPalette is a tool for flipping views in and out of the view hierarchy. The tool consists of a palette, standard and debug libraries, and the FlipView header. Also, a source license is available. The palette consists of a view that can be dragged off the palette and placed anywhere on a window or panel. You can then connect windows, panels, or boxes to the FlipView. Flipping from one view to another is simply accomplished by sending the flipView a message. The advantages that FlipPalette has over similar tools are: 1) It allows you to flip to views by name as well as by tag. 2) It utilizes a custom connection inspector to make connecting views much easier. Installing All that's necessary to use FlipPalette is to place the files in appropriate places. Here are some suggestions: Flip.palette /LocalDeveloper/Palettes anywhere (it really doesn't matter...make sure it's always accessible) libFlipPalette.a /usr/local/lib (recommended) libFlipPalette_d.a /usr/lib (anywhere else will require the OTHER_LDFLAGS line in your makefile.preamble to reflect the location ex: OTHER_LDFLAGS=-L. // lib in current directory ) FlipView.h /LocalDeveloper/Headers/bizkit your local project directory Don't forget to ranlib the library files after you have placed them in the appropriate directory. Using the Palette FlipView includes 2 inspectors; one for attributes, and one for connections. The attributes inspector allows you to decide what type of border should surround the FlipView. The default behavior is for the view to have a bezel border when the FlipView is empty, and no border when a view occupies the space. The connection inspector, on the other hand, is a bit more complex. The upper section of the inspector works similarly to the standard connection inspector. It allows you to connect and disconnect outlets and actions. The lower section allows you to connect an unlimited number of containers to the FlipView. When a connection is drawn in InterfaceBuilder from the FlipView to a panel, window, or box, the connect button will highlight, signifying the capability of connecting the FlipView to the target. If you press the connect button, a connection will be made, and a new line will appear in the list. If you choose to change the integer tag that will select that view, you can change it by highlighting the line in the list, and changing the value in the tag field. In addition, by pressing the Reset/Set Default button (or double-clicking the item on the list), you can change which view will be automatically loaded at launch (or emulation) time. Once the view is connected to the FlipView, your application can flip to that view by either sending the flipView the tagFlip: message (where the sender's tag matches the tag in the flipView inspector), or sending it the titleFlip: message, which will select the view whose name matches the title of the sender. The name of a view can be set in two ways: programmatically, or by the name listed in InterfaceBuilder. The checkmark on the line indicates the default view. Licensing FlipPalette is useable free during development. When included in a product, the following restrictions apply: If the product is distributed free (freely available to the public), use of FlipView and it's associated objects is free. If the product is to be used internally in an organization, or is to be sold, a $95 licensing fee will be required for each product FlipView is used in. A source code license is also available for $ 695, which includes unlimited product licenses for the organization. Programmatic Control of the FlipView The important methods of the FlipView class are: - tagFlip:sender Queries sender's tag (or selected cell's tag if sender is a matrix) and flips to the view that was registered with that tag. - flipToTag:(int) tag Flips to view registered with tag. This method is called by tagFlip:. - titleFlip:sender Queries sender's title (or selected cell's title if sender is a matrix) and flips to the view that was registered with that title. - flipToName:(const char *) name Flips to view registered with name. This method is called by titleFlip:. - currentView Returns id of currently displayed view. - (int) currentTag Returns tag of currently displayed view. - (const char *) currentTagName Returns name of currently displayed view. - (int) addContainer:obj Adds new view to the FlipView, and returns the assigned tag. - (BOOL) addContainer:obj withTag:(int) tag Adds new view to the FlipView with tag tag. Returns success or failure. - (BOOL) addContainer:obj withName:(const char *) name Adds new view to the FlipView with name name. Returns success or failure. - (BOOL) addContainer:obj withTag:(int) tag withName:(const char *) name Adds new view to the FlipView with tag tag and name name. Returns success or failure. - setDelegate:obj Sets FlipView's delegate to obj. Delegate Methods - viewChanged:source Sent to the delegate every time the view flips.