phoneuis/BubbleManager/laf/BMLayout3.cpp
changeset 0 5f000ab63145
child 19 544e34b3255a
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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 "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:  Call3 LAF
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "BMLayout3.h"
       
    21 #include "BMPanic.h"
       
    22 #include <aknenv.h>
       
    23 #include <applayout.cdl.h>
       
    24 #include <AknUtils.h>
       
    25 #include <AknLayout2ScalableDef.h>
       
    26 #include <aknlayoutscalable_apps.cdl.h>
       
    27 #include <layoutmetadata.cdl.h>
       
    28 
       
    29 
       
    30 // ============================ MEMBER FUNCTIONS ===============================
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // BubbleLayout3::popup_call3_audio_in_window_rect
       
    34 // (other items were commented in a header).
       
    35 // -----------------------------------------------------------------------------
       
    36 //
       
    37 TRect BubbleLayout3::popup_call3_audio_in_window_rect( TInt aVariety )
       
    38     {
       
    39     TRect screenRect( CEikonEnv::Static()->ScreenDevice()->SizeInPixels() );
       
    40 
       
    41     TAknLayoutRect appRect;
       
    42     appRect.LayoutRect( 
       
    43         screenRect, 
       
    44         AknLayout::application_window( screenRect ) );
       
    45         
       
    46     TAknLayoutRect mainRect;
       
    47     
       
    48     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
    49         {
       
    50         mainRect.LayoutRect( 
       
    51             appRect.Rect(), 
       
    52             AknLayout::main_pane( appRect.Rect(), 0, 1, 1 ) ); // stacon included            
       
    53         }
       
    54     else
       
    55         {
       
    56         mainRect.LayoutRect( 
       
    57             appRect.Rect(), 
       
    58             AknLayout::main_pane( appRect.Rect(), 0, 1, 1 ) ); // statuspane excluded        
       
    59         }
       
    60         
       
    61     TAknLayoutRect mainCall3Pane;
       
    62     mainCall3Pane.LayoutRect( 
       
    63         mainRect.Rect(), 
       
    64         AknLayoutScalable_Apps::main_call3_pane().LayoutLine() );
       
    65         
       
    66     TAknLayoutRect call3WindowRect;
       
    67     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
    68         {
       
    69         aVariety += 2;            
       
    70         }    
       
    71     call3WindowRect.LayoutRect( 
       
    72         mainCall3Pane.Rect(), 
       
    73         AknLayoutScalable_Apps::popup_call3_audio_in_window( aVariety ).LayoutLine() );
       
    74         
       
    75     return call3WindowRect.Rect();                    
       
    76     }
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // BubbleLayout3::main_call3_pane
       
    80 // (other items were commented in a header).
       
    81 // -----------------------------------------------------------------------------
       
    82 //
       
    83 const TAknWindowLineLayout BubbleLayout3::main_call3_pane()
       
    84     {
       
    85     return AknLayoutScalable_Apps::main_call3_pane().LayoutLine();    
       
    86     }
       
    87 
       
    88 // -----------------------------------------------------------------------------
       
    89 // BubbleLayout3::popup_call3_audio_in_window
       
    90 // (other items were commented in a header).
       
    91 // -----------------------------------------------------------------------------
       
    92 //
       
    93 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_window(
       
    94     TInt aVariety )
       
    95     {
       
    96     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
    97         {
       
    98         aVariety += 2;            
       
    99         }
       
   100         
       
   101     TAknWindowComponentLayout layout1 = 
       
   102         AknLayoutScalable_Apps::main_call3_pane();
       
   103     TAknWindowComponentLayout layout2 = 
       
   104         AknLayoutScalable_Apps::popup_call3_audio_in_window( aVariety );
       
   105     
       
   106     return TAknWindowComponentLayout::
       
   107         Compose( layout1, layout2 ).LayoutLine();
       
   108     }
       
   109 
       
   110 // -----------------------------------------------------------------------------
       
   111 // BubbleLayout3::popup_call3_audio_in_pane
       
   112 // (other items were commented in a header).
       
   113 // -----------------------------------------------------------------------------
       
   114 //
       
   115 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_pane(
       
   116     TInt aVariety )
       
   117     {    
       
   118     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   119         {
       
   120         aVariety += 2;            
       
   121         }
       
   122     return AknLayoutScalable_Apps::bg_popup_call3_in_pane( aVariety).LayoutLine();
       
   123     }
       
   124 
       
   125 // -----------------------------------------------------------------------------
       
   126 // BubbleLayout3::popup_call3_audio_in_window_fr_center
       
   127 // (other items were commented in a header).
       
   128 // -----------------------------------------------------------------------------
       
   129 //
       
   130 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_window_fr_center()
       
   131     {
       
   132     return AknLayoutScalable_Apps::bg_popup_call3_rect_pane_g1().LayoutLine();
       
   133     }
       
   134     
       
   135 // -----------------------------------------------------------------------------
       
   136 // BubbleLayout3::popup_call3_audio_in_window_fr_corner_topleft
       
   137 // (other items were commented in a header).
       
   138 // -----------------------------------------------------------------------------
       
   139 //
       
   140 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_window_fr_corner_topleft()
       
   141     {
       
   142     return AknLayoutScalable_Apps::bg_popup_call3_rect_pane_g2().LayoutLine();
       
   143     }
       
   144     
       
   145 // -----------------------------------------------------------------------------
       
   146 // BubbleLayout3::popup_call3_audio_in_window_fr_corner_topright
       
   147 // (other items were commented in a header).
       
   148 // -----------------------------------------------------------------------------
       
   149 //
       
   150 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_window_fr_corner_topright()
       
   151     {
       
   152     return AknLayoutScalable_Apps::bg_popup_call3_rect_pane_g3().LayoutLine();
       
   153     }
       
   154     
       
   155 // -----------------------------------------------------------------------------
       
   156 // BubbleLayout3::popup_call3_audio_in_window_fr_corner_bottomleft
       
   157 // (other items were commented in a header).
       
   158 // -----------------------------------------------------------------------------
       
   159 //
       
   160 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_window_fr_corner_bottomleft()
       
   161     {
       
   162     return AknLayoutScalable_Apps::bg_popup_call3_rect_pane_g4().LayoutLine();
       
   163     }        
       
   164     
       
   165 // -----------------------------------------------------------------------------
       
   166 // BubbleLayout3::popup_call3_audio_in_window_fr_corner_bottomright
       
   167 // (other items were commented in a header).
       
   168 // -----------------------------------------------------------------------------
       
   169 //
       
   170 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_window_fr_corner_bottomright()
       
   171     {
       
   172     return AknLayoutScalable_Apps::bg_popup_call3_rect_pane_g5().LayoutLine();
       
   173     }
       
   174     
       
   175 // -----------------------------------------------------------------------------
       
   176 // BubbleLayout3::popup_call3_audio_in_window_call_indication
       
   177 // (other items were commented in a header).
       
   178 // -----------------------------------------------------------------------------
       
   179 //
       
   180 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_window_call_indication(
       
   181     TInt aVariety )
       
   182     {
       
   183     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   184         {
       
   185         aVariety += 2;            
       
   186         }
       
   187     return AknLayoutScalable_Apps::popup_call3_audio_in_window_g1( aVariety ).LayoutLine();
       
   188     }
       
   189     
       
   190 // -----------------------------------------------------------------------------
       
   191 // BubbleLayout3::popup_call3_audio_in_window_numbertype_indication
       
   192 // (other items were commented in a header).
       
   193 // -----------------------------------------------------------------------------
       
   194 //
       
   195 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_window_numbertype_indication(
       
   196     TInt aVariety )
       
   197     {
       
   198     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   199         {
       
   200         aVariety += 2;            
       
   201         }
       
   202     return AknLayoutScalable_Apps::popup_call3_audio_in_window_g2( aVariety ).LayoutLine();
       
   203     }
       
   204     
       
   205 // -----------------------------------------------------------------------------
       
   206 // BubbleLayout3::popup_call3_audio_in_window_cipheringoff_indication
       
   207 // (other items were commented in a header).
       
   208 // -----------------------------------------------------------------------------
       
   209 //
       
   210 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_window_cipheringoff_indication(
       
   211     TInt aVariety )
       
   212     {
       
   213     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   214         {
       
   215         aVariety += 2;            
       
   216         }
       
   217     return AknLayoutScalable_Apps::popup_call3_audio_in_window_g3( aVariety ).LayoutLine();
       
   218     }
       
   219     
       
   220 // -----------------------------------------------------------------------------
       
   221 // BubbleLayout3::popup_call3_audio_in_window_separator_line
       
   222 // (other items were commented in a header).
       
   223 // -----------------------------------------------------------------------------
       
   224 //
       
   225 const TAknWindowLineLayout BubbleLayout3::popup_call3_audio_in_window_separator_line(
       
   226     TInt aVariety )
       
   227     {
       
   228     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   229         {
       
   230         aVariety += 1;            
       
   231         }
       
   232     return AknLayoutScalable_Apps::popup_call3_audio_in_window_g4( aVariety ).LayoutLine();
       
   233     }                            
       
   234 
       
   235 // -----------------------------------------------------------------------------
       
   236 // BubbleLayout3::popup_call3_audio_in_window_text_line_1
       
   237 // (other items were commented in a header).
       
   238 // -----------------------------------------------------------------------------
       
   239 //
       
   240 const TAknTextLineLayout BubbleLayout3::popup_call3_audio_in_window_text_line_1(
       
   241     TInt aVariety )
       
   242     {
       
   243     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   244         {
       
   245         aVariety += 2;            
       
   246         }
       
   247     return AknLayoutScalable_Apps::popup_call3_audio_in_window_t1( aVariety ).LayoutLine();
       
   248     }
       
   249     
       
   250 // -----------------------------------------------------------------------------
       
   251 // BubbleLayout3::popup_call3_audio_in_window_text_line_2
       
   252 // (other items were commented in a header).
       
   253 // -----------------------------------------------------------------------------
       
   254 //
       
   255 const TAknTextLineLayout BubbleLayout3::popup_call3_audio_in_window_text_line_2(
       
   256     TInt aVariety )
       
   257     {
       
   258     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   259         {
       
   260         aVariety += 2;            
       
   261         }
       
   262     return AknLayoutScalable_Apps::popup_call3_audio_in_window_t2( aVariety ).LayoutLine();
       
   263     }    
       
   264 
       
   265 // -----------------------------------------------------------------------------
       
   266 // BubbleLayout3::popup_call3_audio_in_window_text_line_3
       
   267 // (other items were commented in a header).
       
   268 // -----------------------------------------------------------------------------
       
   269 //
       
   270 const TAknTextLineLayout BubbleLayout3::popup_call3_audio_in_window_text_line_3(
       
   271     TInt aVariety )
       
   272     {
       
   273     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   274         {
       
   275         aVariety += 1;            
       
   276         }
       
   277     return AknLayoutScalable_Apps::popup_call3_audio_in_window_t3( aVariety ).LayoutLine();
       
   278     }
       
   279 
       
   280 // -----------------------------------------------------------------------------
       
   281 // BubbleLayout3::call3_video_qcif_pane
       
   282 // (other items were commented in a header).
       
   283 // -----------------------------------------------------------------------------
       
   284 //
       
   285 const TAknWindowLineLayout BubbleLayout3::call3_video_qcif_pane( 
       
   286     TInt aVariety )
       
   287     {
       
   288     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   289         {
       
   290         aVariety += 1;            
       
   291         }
       
   292         
       
   293     return AknLayoutScalable_Apps::call3_video_qcif_pane( aVariety ).LayoutLine();
       
   294     }
       
   295     
       
   296 // -----------------------------------------------------------------------------
       
   297 // BubbleLayout3::call3_video_subqcif_pane
       
   298 // (other items were commented in a header).
       
   299 // -----------------------------------------------------------------------------
       
   300 //
       
   301 const TAknWindowLineLayout BubbleLayout3::call3_video_subqcif_pane( 
       
   302     TInt aVariety )
       
   303     {
       
   304     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   305         {
       
   306         aVariety += 1;            
       
   307         }
       
   308     return AknLayoutScalable_Apps::call3_video_subqcif_pane( aVariety ).LayoutLine();
       
   309     }    
       
   310 
       
   311 // -----------------------------------------------------------------------------
       
   312 // BubbleLayout3::call3_video_qcif_uncrop_pane
       
   313 // (other items were commented in a header).
       
   314 // -----------------------------------------------------------------------------
       
   315 //
       
   316 const TAknWindowLineLayout BubbleLayout3::call3_video_qcif_uncrop_pane( 
       
   317     TInt aVariety )
       
   318     {
       
   319     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   320         {
       
   321         aVariety += 1;            
       
   322         }
       
   323         
       
   324     return AknLayoutScalable_Apps::call3_video_qcif_uncrop_pane( aVariety ).LayoutLine();
       
   325     }
       
   326     
       
   327 // -----------------------------------------------------------------------------
       
   328 // BubbleLayout3::main_call3_video_subqcif_uncrop_pane
       
   329 // (other items were commented in a header).
       
   330 // -----------------------------------------------------------------------------
       
   331 //
       
   332 const TAknWindowLineLayout BubbleLayout3::call3_video_subqcif_uncrop_pane( 
       
   333     TInt aVariety )
       
   334     {
       
   335     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   336         {
       
   337         aVariety += 1;            
       
   338         }
       
   339     return AknLayoutScalable_Apps::call3_video_subqcif_uncrop_pane( aVariety ).LayoutLine();
       
   340     }    
       
   341     
       
   342 
       
   343 // End of File
       
   344