File: SantasGiftBagV2.6.zip Author: Brian Tietz (btietz@biomail.ucsd.edu) Release: 2.6 Compatibility: R4 (can be built for R3 easily) Location: contrib/develop Description: ColumnListView, Document application framework, WindowPositionSet, MouseWatcher, BufferedFile, other goodies Notes: ArrowButton: Works just like BButton, but it provides arrows with the standard Be appearance like what is provided with BScrollBar. BetterScrollView: BScrollView replacement that allows you to specify directly the size of your data rect, and the BetterScrollView takes care of the scrollbar proportions and inactivating the scroll bars when the entire content is showing, and provides nice "pulling behavior" to reveal the content when the user is resizing the scroll view bigger. BufferedFile: BFile-derived class to buffer file output for improved efficiency and allows readable code style to still be efficient. Eliminates endian-ness issue by providing automatic byte swapping. Includes a handy ReadString/WriteString pair. Colors.h: List of const rgb_color definitions for the standard Be UI colors. ColumnListView: BListView-derived class with columns that the user can resize, drag, sort, etc., with BOutlineListView-like support for hierarchical lists. DocumentApp: A document file management framework. Provides a BApplication-derived class and a BWindow-derived class which work together to give nice document behavior, automating the process of quitting when the last window closes, prompting to save unsaved documents, etc. etc. It saves a LOT of work because getting perfect behavior in a multi-document application can take hours of coding, testing, and recoding to get it right. GenericTestApp.cpp: Generic test application framework for testing code fragments that need a GUI. Useful for putting together new classes and also simplest-case code for reporting BeBugs(tm). GetStringsMaxWidth: Wrapper for BFont::GetStringWidths that returns the width of the widest string. MouseWatcher: Thread to track the mouse until user releases the button, even if the mouse goes outside the target BView. There's a variant that will watch the mouse and count time until twice the double-click time expires then send a message signalling that the user wants a popup menu (for single-button mouse support). PlainBufferedFile: Buffers file output for increased efficiency, but without the extra features of BufferedFile, and more to the point, without sticking the extra byte on the beginning of the file to indicate endianness. PrefilledBitmap: BBitmap wrapper that allows you to specify the image data in the constructor. SafeTime: A thread safe version of localtime. Just a stopgap until Be gets around to implementing localtime_r. ScrollViewCorner: A BView for filling the corner of a BScrollView that's not seated in the lower-right corner of a B_DOCUMENT_WINDOW. TabView: Useful if you want to link against PR1 for a wider audience. Also, the BTabView implementation is shit for resizable windows and chokes on hidden child views, TabView handles both cases properly. Funny aside: I wrote TabView as a stopgap measure while I was waiting for R3, planning to switch to BTabView in my Scheduler program project once I got R3. But as soon as I switched to BTabView I found the implementation so bad that I switched back to using my own TabView. WindowPositionSet: A class to make sure that windows are actually visible onscreen when they're created, and to manage the locations of newly created windows to space new windows so that each new window doesn't sit on top of the last one. Gives nice behavior and is easy to use. WrappingTextView: A BTextView derived class that automates the process of rewrapping the text when the view is resized. Also provides a mechanism for storing the text view contents when appropriate, which is useful if the view is of an object that can exist without the view, so that this more persistent object can be kept up-to-date when the text is modified.