sdkcreationmw/sdkruntimes/MIDP/DebugAgent/src/JavaDebugAgentLogView.cpp
author rajpuroh
Mon, 08 Mar 2010 12:09:11 +0530
changeset 0 b26acd06ea60
permissions -rw-r--r--
First Contribution of SDK components
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     1
/*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     3
* All rights reserved.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     4
* This component and the accompanying materials are made available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     6
* which accompanies this distribution, and is available
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     8
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
     9
* Initial Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    11
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    12
* Contributors:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    13
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    14
* Description: 
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    15
*
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    16
*/
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    17
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    18
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    19
#include <akntitle.h>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    20
#include <eikbtgpc.h>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    21
#include <barsread.h>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    22
#include <aknviewappui.h>
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    23
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    24
#include "JavaDebugAgent.hrh"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    25
#include "JavaDebugAgentRes.h"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    26
#include "JavaDebugAgentLogView.h"
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    27
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    28
#define SUPER CJavaDebugAgentBasicLogView
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    29
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    30
CJavaDebugAgentLogView* CJavaDebugAgentLogView::NewLC()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    31
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    32
    CJavaDebugAgentLogView* self = new(ELeave)CJavaDebugAgentLogView;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    33
    CleanupStack::PushL(self);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    34
    self->ConstructL();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    35
    return self;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    36
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    37
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    38
CJavaDebugAgentLogView::CJavaDebugAgentLogView() :
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    39
SUPER(TUid::Uid(KJavaDebugAgentLogViewId))
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    40
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    41
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    42
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    43
void CJavaDebugAgentLogView::ConstructL()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    44
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    45
    BaseConstructL(R_JAVA_DEBUG_AGENT_LOG_VIEW,
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    46
        R_JAVA_DEBUG_AGENT_LOG_POPUP_MENUBAR);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    47
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    48
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    49
void CJavaDebugAgentLogView::DoActivateL(const TVwsViewId&,TUid,const TDesC8&)
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    50
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    51
    Cba()->MakeVisible(ETrue);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    52
    StatusPane()->MakeVisible(ETrue);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    53
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    54
    // Get title pane
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    55
    CAknTitlePane* title = (CAknTitlePane*)AppUi()->StatusPane()->
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    56
        ControlL(TUid::Uid(EEikStatusPaneUidTitle));
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    57
    
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    58
    // Configure the title
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    59
    TResourceReader reader;
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    60
    iCoeEnv->CreateResourceReaderLC(reader, R_JAVA_DEBUG_AGENT_LOG_TITLE);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    61
    title->SetFromResourceL(reader);
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    62
    CleanupStack::PopAndDestroy();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    63
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    64
    // Add control to stack
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    65
    ShowLogScreenL();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    66
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    67
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    68
// CJavaDebugAgentBasicLogView
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    69
TRect CJavaDebugAgentLogView::LogScreenRect()
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    70
{
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    71
    return AppUi()->ClientRect();
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    72
}
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    73
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    74
/**
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    75
 * Local Variables:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    76
 * c-basic-offset: 4
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    77
 * indent-tabs-mode: nil
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    78
 * End:
b26acd06ea60 First Contribution of SDK components
rajpuroh
parents:
diff changeset
    79
 */