Hi, Before writing another mail about future development for releases that will follow 0.2, here is a short presentation of Container framework I have been working on recently. I plan to merge it in EtoileUI when it will be backported to GNUstep. I decided to develop it first with Cocoa because Xcode is really better than any development tools around for GNUstep/Étoilé. This was helpful because early design went through many changes.
Container is an implementation of what was very vaguely described on ComponentKit page of Étoilé website. I initially wrote PaneKit/ PreferencesKit in part as a training project before tackling ComponentKit ideas. Container offers a lot more flexible pane support than PaneKit does, however PaneKit future isn't really clear to me as it stands now. It may continue to exist as a standalone framework but relying on EtoileUI (since it offers some features unrelated to presentation/layout) or simply be merged as a subprojet of EtoileUI. SVN repository link: <http://svn.gna.org/viewcvs/etoile/branches/ qmathe/Container/> Main Goals: - Write, rewrite less code and put my memory to rest… AppKit tends to be way too big for my brain ;-) - Simple, unified and consistent API for providing, displaying, interacting and manipulating collection of items in a view - Ability to choose between data source and no data source programming style (as NSComboBox allows it) - Powerful layout engine which makes possible to build Graphics oriented applications (layers, grids, item decoration etc.) - New useful layouts like stack, line and flow (for photo management view to take an example) - Better PaneKit - AppKit compatibility (NSCell, NSControll subclasses dedicated to collection management like NSTableView etc.) - As many features as possible without code at all like item scaling, sorting, drag and drop, scroll view, undo/redo etc. - Possibility to override all these factory settings - Allows applications to never exit UI prototyping stage ;-) Below you can find a summary of many features planned or already working in Container. General features (done): - Generic view to display a collection of items with pluggable layouts - Generic layout engine (both for simple view layouting or more complex ones… Examples: photo view, download manager view, three panes view or DTP-style view) - Each item is wrapped and represented by a layout item object - Each container has an associated layout item (behind the scene layout items always form a tree structure) - Handles both list and tree collection of layout items - Accepts layout items added directly or provided through a data source Features done: - Many layouts provided by default (flow, stack/column, line/row, table, outline, browser, pane / wizard, two panes / pane switcher) - Layout item can wrap KVC-compliant model object, view, cell, or simple value (like text, image, number) - Easily create new layouts - Possibility to wrap NSView subclasses in a layout subclass - Possibility to modify NSView prototype wrapped in a layout (by instantiating the layout in IB and connecting the outlet prototype) - Built-in scroll view support (but you are free to customize it in code or IB) - Decides wich properties of items are shown or used when the item is drawn (think of columns in a table view or size label under a picture file in an icon view) Note: Stack layout (ETStackLayout) is totally unrelated to -stack and -unstack operations. This is a little overlap in current API. Features work-in-progress: - Built-in pick and drop (unified drag and drop + copy/paste but you can still customize drag and drop as you do in NSTableView for example) - Supports layers, grids and guides (as specific kinds of layout items), this means all layouts automatically supports features like 'Snap to grid/guides', 'Modify grid size' etc. - Customize the rendering of items with a layout delegate or by adding style decorator objects to your item(s) - Generic stack/unstack operations similar to Apple Aperture stacks in many layouts and bound to expand/collapse in ETOutlineLayout - Generic group/ungroup operations which creates or destroys a relation between items (note: stack/unstack only apply to already existing item groups; you can restrict stack/unstack operations to a particular group kind with a delegate method. Group semantic is completely up to you as it is in OrganizeKit) - Fully customizable unstacked items look by setting a layout exactly as you do with any containers - Two, three and more panes layout (aka pane switcher layout) with content flow and update based on selection Features planned: - Free layout and Icon layout (Free layout means where you position items in an arbitrary way in term of coordinates with a Z order and compositing rules) - Provides per property formatter through a delegate method - Persistent and custom shape selection - Built-in Undo support - Built-in default inspector for item (will be made customizable through InspectorKit) - Customization of displayed items à la NSToolbar - Tabbed documents which can be rearranged inside an application and across applications - Bindings compatibility - Component integration (more in another mail) - CoreObject integration An uncommon good news is that it's already sufficiently usable to experiment with. Take note many things are very much work-in-progress or even buggy :-) Most of code isn't really complicated, there are redundancies here and there that will be eliminated and I hope to simplify some areas. Making View objects very passive and introducing the two new abstractions Layout and Layout Item is the main idea behind Container. Container allows to unify at UI level item collection and document. It blurs the boundaries between Document and Object Manager. A document becomes just an Object Manager using a free layout (aka where you position items in an arbitrary way in term of coordinates with a Z order and compositing rules) An ObjectManager becomes just a document using collection-management oriented layouts like table, outline, photo management etc. A typical example would be to change the View popup in a document to 'Outline View' and then you would observe in the document window what you see usually in Layers/Objects/Elements palettes of applications like GIMP, Photoshop or Illustator etc. The shared layout engine should allow to reuse a lot of code. For example, there is no need to write Grid support code for the icon view, rewrite it for photo management view and yet another time in some PowerPoint-like application. That's not yet possible, but you should be able to create 3 panes layout easily with Pane switcher layout simply by assigning pane switcher layout recursively. As a last point, it is partially documented :-)… but I wouldn't say it's documented. API is slowly moving towards stability (except ETPaneSwitcher perhaps) but some old methods need to be cleaned and many API holes need to be filled, and also few responsabilities may be shift away from ETContainer in upcoming development. I may ask later for more precise feedback on method/class names. I'm really interested in your feedback. Cheers, Quentin. _______________________________________________ Etoile-dev mailing list [email protected] https://mail.gna.org/listinfo/etoile-dev
