browserui/browser/BrowserAppInc/BrowserWindowQueue.h
changeset 51 48e827313edd
parent 37 481242ead638
child 53 f427d27b98d8
equal deleted inserted replaced
37:481242ead638 51:48e827313edd
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *      Internal class for storing a window.
       
    16 *  
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef __MULTIPLE_WINDOWS_WINDOWQUEUE_H__
       
    22 #define __MULTIPLE_WINDOWS_WINDOWQUEUE_H__
       
    23 
       
    24 // INCLUDES FILES
       
    25 #include "WmlBrowserBuild.h"
       
    26 #include <e32base.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CBrowserWindow;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 // multiple linked queue for windows
       
    34 // iPrev and iNext for stepping through all the queue
       
    35 // iParent points to the window's parent
       
    36 class CBrowserWindowQue: public CBase
       
    37     {
       
    38     public:  // default constructor to have a valid window
       
    39         CBrowserWindowQue( CBrowserWindow* aWindow ) : 
       
    40              iWindow(aWindow), iParent(NULL),
       
    41              iPrev(NULL), iNext(NULL), iStatus( 0 ) {}
       
    42         ~CBrowserWindowQue();
       
    43 
       
    44     public:
       
    45         // returns the last item in the queue
       
    46         inline CBrowserWindowQue* LastItem() const ;
       
    47         // appends an iten at the end of the queue
       
    48         void AppendL( CBrowserWindowQue* aItem );
       
    49         // points to the 'next' window which is not deleted
       
    50         CBrowserWindowQue* Next() const;
       
    51         // points to the 'prev' window which is not deleted
       
    52         CBrowserWindowQue* Prev() const;
       
    53 
       
    54         
       
    55     public:
       
    56         enum TWindowStatus {  // bit mask
       
    57             EWindowNone = 0,
       
    58             EWindowDeleted = 1
       
    59         };
       
    60 
       
    61     public:  // data members
       
    62         CBrowserWindow* iWindow;
       
    63         CBrowserWindowQue* iParent;
       
    64         CBrowserWindowQue* iPrev;
       
    65         CBrowserWindowQue* iNext;
       
    66         TInt iStatus;  // bitmask
       
    67     };
       
    68 
       
    69 
       
    70 #endif  // __MULTIPLE_WINDOWS_WINDOWQUEUE_H__
       
    71 
       
    72 // End of File