User:Jminta:Views: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
==Migration to the new views==
So, it looks like the xbl model won out.  Unlike my previous patches to bring in the new views, this one cannot be easily implemented in one step.  Here's how I'm proposing to go about this:
===Step 1:===
*Create xbl elements for each of the 4 views we want to implement
*These views will implement the following API
**readonly attribute observerID (not used until Step 2)
**readonly attribute startDay
**readonly attribute endDay
**attribute selectedDay
**attribute controller
**void switchTo(dayToBaseViewOn)
**void switchFrom()
**void moveView(numberOfTimes)
*These views will still be controlled by a shell of gCalendarWindow, mostly to control enabling/disabling commands
===Step 2:===
Make the views truly pluggable:
*Remove all traces of gCalendarWindow
**make CalendarEventSelection stand on its own
*switching to a view will activate its observer.  Commands related to the view should update themselves accordingly (disable/enable)
===xbl model===
===xbl model===
<deck id="view-deck">
<deck id="view-deck">
Line 15: Line 35:


gCalendarWindow.switchToDayView() becomes switchView('day-view');
gCalendarWindow.switchToDayView() becomes switchView('day-view');
===current trunk===
*not pluggable
*4 vboxes in deck, each with its own view-element
*plug-hack:
**add element to deck
**add overlay to that element
**add functions to gCalendarWindow
**over-ride currentView at correct times
==New view implementation models==
===everything_v1===
*not pluggable
*2 elements in deck
*plug
**add element to deck(optional)
**over-ride viewManager functions
===re-use overlay===
*not pluggable
*4 vboxes in deck, each with its own view-element
*plug-hack:
**add element to deck
**add overlay to that element
**add methods to gCalendarWindow
**over-ride currentView at correct times
===everything_v2===
*pluggable
*2 elements in deck
*plug:
**add element to deck(optional)
**call addView()
289

edits