diff -r 000000000000 -r fb279309251b uidesigner/com.nokia.sdt.series60.componentlibrary/components/view/CAknView_common.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/uidesigner/com.nokia.sdt.series60.componentlibrary/components/view/CAknView_common.inc Fri Apr 03 23:33:03 2009 +0100
@@ -0,0 +1,678 @@
+
+
+
+
+
+
+
+
+
+
+include("../containers/containerLibrary.js")
+include("../cba/cbaLibrary.js")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#include "${getProjectName()}.hrh"
+
+
+#include "${instanceName}.h"
+
+
+
+
+
+/**
+ * First phase of Symbian two-phase construction. Should not contain any
+ * code that could leave.
+ */
+
+
+
+
+
+
+
+/**
+ * The view's destructor removes the container from the control
+ * stack and destroys it.
+ */
+
+
+
+
+ ConstructL();
+ return self;
+ }
+
+]]>
+
+
+
+
+
+/**
+ * Second-phase constructor for view.
+ * Initialize contents from resource.
+ */
+
+
+BaseConstructL( ${resourceName$upper} );
+
+
+// add your own initialization code here
+
+
+
+
+
+
+
+/**
+ * @return The UID for this view
+ */
+
+
+return TUid::Uid( ${getViewUidConstant(instance, contribs)} );
+
+
+
+
+
+
+/**
+ * Handle a command for this view (override)
+ * @param aCommand command id to be handled
+ */
+
+
+
+
+ default:
+ break;
+ }
+
+<% // Handle any leftover handler contribs that occur after the switch here.
+ var postSwitchContribs = Engine.getContributionsForPhase(handlerContribs, "PostSwitchContents");
+ Engine.assignLocationsForPhase(postSwitchContribs, "PostSwitchContents", "HANDLECOMMANDL_BODY")
+ contribs.addAll(postSwitchContribs);
+ handlerContribs.removeAll(postSwitchContribs);
+
+ // Remaining ones go into this file
+ var includeContribs = Engine.getContributionsForPhase(handlerContribs, "MainSystemIncludes");
+ Engine.assignLocationsForPhase(includeContribs, "MainSystemIncludes", "MAIN_OWNED_SYSTEM_INCLUDES");
+ contribs.addAll(includeContribs);
+ %>
+if ( !commandHandled )
+ {
+<% // Handle 'handleCommand' event here. This is a special case for handler
+ // code since the HandleCommandL method is mostly entirely generated.
+ var event = instance.events['handleCommand'];
+ var hasFormChild = findAknFormChild(children) != null;
+ var childWantsExit = childWantsExitBehavior(children);
+ var id = findCbaRightId(children);
+ if (event) {
+%> // dispatch to ${event.eventName} handler
+ commandHandled = ${event.handlerName}( aCommand );
+<% if (!hasFormChild && childWantsExit && id != null && id != "") { %>
+ if ( !commandHandled )
+ {
+ if ( aCommand == ${id} )
+ {
+ AppUi()->HandleCommandL( EEikCmdExit );
+ }
+ }<%
+ }
+ } else if (!hasFormChild && childWantsExit && id != null && id != "") { %>
+ if ( aCommand == ${id} )
+ {
+ AppUi()->HandleCommandL( EEikCmdExit );
+ }
+<% } %>
+ }
+]]>
+
+
+
+/**
+ * Handles user actions during activation of the view,
+ * such as initializing the content.
+ */
+
+
+CEikButtonGroupContainer* cba = AppUi()->Cba();
+if ( cba != NULL )
+ {
+ cba->MakeVisible( EFalse );
+ }
+<% } %>
+]]>
+
+
+
+
+
+/**
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+${event.handlerName}();
+
+
+
+
+
+
+
+
+CEikButtonGroupContainer* cba = AppUi()->Cba();
+if ( cba != NULL )
+ {
+ cba->MakeVisible( ETrue );
+ cba->DrawDeferred();
+ }
+<% } %>
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/**
+ * Handle status pane size change for this view (override)
+ */
+
+
+CAknView::HandleStatusPaneSizeChange();
+
+// this may fail, but we're not able to propagate exceptions here
+TVwsViewId view;
+AppUi()->GetActiveViewId( view );
+if ( view.iViewUid == Id() )
+ {
+ TInt result;
+ TRAP( result, SetupStatusPaneL() );
+ }
+
+
+
+
+@@@ Remove call to SetupStatusPaneL() from HandleStatusPaneSizeChange()
+- TInt result;
+- TRAP( result, SetupStatusPaneL() );
++ TVwsViewId view;
++ AppUi()->GetActiveViewId( view );
++ if ( view.iViewUid == Id() )
++ {
++ TInt result;
++ TRAP( result, SetupStatusPaneL() );
++ }
+
+
+
+
+
+
+
+
+
+
+/**
+ * Handle the ${event.eventName} event.
+ * @return ETrue if event was handled, EFalse if not
+ */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+${event.handlerName}();
+
+
+
+
+
+
+
+ if (!Engine.formMatches(form, ["RootAppUi"])) {
+ this.getHrhFiles(contribs);
+ }
+
+
+
+
+
+ include("../srcgenLibrary.js");
+
+
+
+
+ if (!Engine.formMatches(form, ["RootAppUi"])) {
+ // clear out any image stuff
+ resetImagePropertyState(instance);
+
+ // We expect one container child to supply the contents
+ // for the phases below.
+
+ // gather default and view-specific contributions
+ contribs.addAll(Engine.generateChildContributions("|AknView"))
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+${event.handlerName}();
+
+
+
+
+
+
+
+
+ if (!Engine.formMatches(form, ["RootAppUi"])) {
+ // fix up the phases so they point to real locations
+ Engine.assignLocationsForPhase(contribs, "ClassSource", "MAIN_FILE");
+ Engine.assignLocationsForPhase(contribs, "ClassHeader", "HEADER_FILE");
+
+ Engine.assignLocationsForPhase(contribs, "MainConstants", "MAIN_OWNED_CONSTANTS");
+ Engine.assignLocationsForPhase(contribs, "MainSystemIncludes", "MAIN_OWNED_SYSTEM_INCLUDES");
+ Engine.assignLocationsForPhase(contribs, "MainUserIncludes", "MAIN_OWNED_USER_INCLUDES");
+ Engine.assignLocationsForPhase(contribs, "Construct", "CONSTRUCTOR_BODY");
+ Engine.assignLocationsForPhase(contribs, "Initialize", "CONSTRUCTL_METHOD_BODY");
+ Engine.assignLocationsForPhase(contribs, "Destroy", "DESTRUCTOR_BODY");
+ Engine.assignLocationsForPhase(contribs, "DoActivateL", "DOACTIVATEL_METHOD_BODY");
+ Engine.assignLocationsForPhase(contribs, "DoDeactivate", "DODEACTIVATE_METHOD_BODY");
+
+ Engine.assignLocationsForPhase(contribs, "HeaderIncludes", "HEADER_OWNED_SYSTEM_INCLUDES");
+ Engine.assignLocationsForPhase(contribs, "ForwardDeclarations", "HEADER_OWNED_FORWARD_DECLARATIONS");
+ Engine.assignLocationsForPhase(contribs, "InstanceVariables", "CLASS_PRIVATE_OWNED_INSTANCE_VARIABLES");
+ Engine.assignLocationsForPhase(contribs, "ClassMethods", "CLASS_PUBLIC_OWNED_METHODS");
+
+ Engine.assignLocationsForPhase(contribs, "SetupStatusPane", "SETUPSTATUSPANEL_METHOD");
+ Engine.assignLocationsForPhase(contribs, "CleanupStatusPane", "CLEANUPSTATUSPANE_METHOD");
+
+ Engine.assignLocationsForPhase(contribs, "OverriddenMethods", "CLASS_PROTECTED_OVERRIDDEN_METHODS");
+ Engine.assignLocationsForPhase(contribs, "UserHandlers", "CLASS_PROTECTED_USER_HANDLERS");
+ Engine.assignLocationsForPhase(contribs, "EventIncludes", "HEADER_EVENT_HANDLER_INCLUDES");
+ Engine.assignLocationsForPhase(contribs, "BaseClassList", "CLASS_BASES");
+
+ Engine.assignLocationsForPhase(contribs, "ClassPublic", "CLASS_PUBLIC");
+ Engine.assignLocationsForPhase(contribs, "ClassProtected", "CLASS_PROTECTED");
+ Engine.assignLocationsForPhase(contribs, "ClassPrivate", "CLASS_PRIVATE");
+ }
+
+
+
+
+]]>
+
+
+
+
+#include "${instanceName}.h"
+
+
+
+
+
+
+
+
+
+
+ Id() );
+]]>
+
+
+
+
+
+
+
+
+
+
+
+
+