phoneuis/BubbleManager/laf/BMLayout4.cpp
changeset 0 5f000ab63145
child 19 544e34b3255a
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Layout definitions from Application LAF (Call4 layouts)
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "BMLayout4.h"
       
    21 #include "BMPanic.h"
       
    22 #include "BMBubbleManager.h"
       
    23 #include <aknenv.h>
       
    24 #include <applayout.cdl.h>
       
    25 #include <AknUtils.h>
       
    26 #include <AknLayout2ScalableDef.h>
       
    27 #include <aknlayoutscalable_apps.cdl.h>
       
    28 #include <layoutmetadata.cdl.h>
       
    29 
       
    30 
       
    31 // ============================ MEMBER FUNCTIONS ===============================
       
    32 
       
    33 
       
    34 ////////////////////////////////////////////////////////////////////////////////
       
    35 //
       
    36 // Utility functions
       
    37 //
       
    38 ////////////////////////////////////////////////////////////////////////////////
       
    39 
       
    40 // -----------------------------------------------------------------------------
       
    41 // BubbleLayout4::button_grid_row_column_count
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 void BubbleLayout4::button_grid_row_column_count( 
       
    45     TInt  aVariety,
       
    46     TInt& aRows, 
       
    47     TInt& aColumns )
       
    48     {
       
    49     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
    50         {
       
    51         // portrait 0..1 == landscape 2..3 
       
    52         aVariety += 1;    	        
       
    53     	}
       
    54     	
       
    55     TAknLayoutScalableParameterLimits parLimits =
       
    56         AknLayoutScalable_Apps::cell_call4_button_pane_ParamLimits( aVariety );
       
    57     aRows = parLimits.LastRow() + 1;        
       
    58     aColumns = parLimits.LastColumn() + 1;        
       
    59     }
       
    60 
       
    61     
       
    62 ////////////////////////////////////////////////////////////////////////////////
       
    63 //
       
    64 // Call4 Layouts
       
    65 //
       
    66 ////////////////////////////////////////////////////////////////////////////////    
       
    67 
       
    68 // -----------------------------------------------------------------------------
       
    69 // BubbleLayout4::call4_windows_pane
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 const TAknWindowLineLayout
       
    73     BubbleLayout4::call4_windows_pane( TInt aVariety )
       
    74     {
       
    75     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
    76         {
       
    77         // portrait 0..1 == landscape 2..3 
       
    78         aVariety += 1;    	        
       
    79     	} 
       
    80     	
       
    81     TAknLayoutScalableParameterLimits parLimits =
       
    82         AknLayoutScalable_Apps::call4_windows_pane_ParamLimits( aVariety );
       
    83         
       
    84     if ( aVariety < parLimits.FirstVariety() || 
       
    85          aVariety > parLimits.LastVariety() )
       
    86         {
       
    87         Panic( EBMPanicLAF );
       
    88         }   
       
    89         
       
    90     return AknLayoutScalable_Apps::call4_windows_pane( 
       
    91         aVariety ).LayoutLine();
       
    92     }
       
    93 
       
    94 // -----------------------------------------------------------------------------
       
    95 // BubbleLayout4::call4_button_grid_pane
       
    96 // -----------------------------------------------------------------------------
       
    97 //            
       
    98 const TAknWindowLineLayout
       
    99     BubbleLayout4::call4_button_grid_pane( TInt aVariety )
       
   100     {
       
   101     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   102         {
       
   103         // portrait 0..1 == landscape 2..3 
       
   104         aVariety += 1;    	        
       
   105     	} 
       
   106     	
       
   107     TAknLayoutScalableParameterLimits parLimits =
       
   108         AknLayoutScalable_Apps::grid_call4_button_pane_ParamLimits( aVariety );
       
   109         
       
   110     if ( aVariety < parLimits.FirstVariety() || 
       
   111          aVariety > parLimits.LastVariety() )
       
   112         {
       
   113         Panic( EBMPanicLAF );
       
   114         }   
       
   115         
       
   116     return AknLayoutScalable_Apps::grid_call4_button_pane( 
       
   117         aVariety ).LayoutLine();
       
   118     }
       
   119 
       
   120 // -----------------------------------------------------------------------------
       
   121 // BubbleLayout4::call4_image_pane
       
   122 // -----------------------------------------------------------------------------
       
   123 //    
       
   124 const TAknWindowLineLayout 
       
   125     BubbleLayout4::call4_image_pane( TInt aVariety )
       
   126     {
       
   127     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   128         {
       
   129         // portrait 2 == landscape 1 
       
   130         aVariety -= 1;    	        
       
   131     	} 
       
   132     	
       
   133     TAknLayoutScalableParameterLimits parLimits =
       
   134         AknLayoutScalable_Apps::call4_image_pane_ParamLimits( aVariety );
       
   135         
       
   136     if ( aVariety < parLimits.FirstVariety() || 
       
   137          aVariety > parLimits.LastVariety() )
       
   138         {
       
   139         Panic( EBMPanicLAF );
       
   140         }   
       
   141         
       
   142     return AknLayoutScalable_Apps::call4_image_pane( 
       
   143         aVariety ).LayoutLine();    
       
   144     }
       
   145 
       
   146 // -----------------------------------------------------------------------------
       
   147 // BubbleLayout4::popup_call4_audio_first_window
       
   148 // -----------------------------------------------------------------------------
       
   149 //
       
   150 const TAknWindowLineLayout 
       
   151     BubbleLayout4::popup_call4_audio_first_window( TInt aVariety )
       
   152     {
       
   153     TAknLayoutScalableParameterLimits parLimits =
       
   154         AknLayoutScalable_Apps::popup_call4_audio_first_window_ParamLimits( 
       
   155             aVariety );
       
   156         
       
   157     if ( aVariety < parLimits.FirstVariety() || 
       
   158          aVariety > parLimits.LastVariety() )
       
   159         {
       
   160         Panic( EBMPanicLAF );
       
   161         }   
       
   162         
       
   163     return AknLayoutScalable_Apps::popup_call4_audio_first_window( 
       
   164         aVariety ).LayoutLine();    
       
   165     }
       
   166     
       
   167 // -----------------------------------------------------------------------------
       
   168 // BubbleLayout4::popup_call4_audio_second_window
       
   169 // -----------------------------------------------------------------------------
       
   170 //
       
   171 const TAknWindowLineLayout 
       
   172     BubbleLayout4::popup_call4_audio_second_window( TInt aVariety )
       
   173     {
       
   174     TAknLayoutScalableParameterLimits parLimits =
       
   175         AknLayoutScalable_Apps::popup_call4_audio_second_window_ParamLimits( 
       
   176             aVariety );
       
   177         
       
   178     if ( aVariety < parLimits.FirstVariety() || 
       
   179          aVariety > parLimits.LastVariety() )
       
   180         {
       
   181         Panic( EBMPanicLAF );
       
   182         }   
       
   183         
       
   184     return AknLayoutScalable_Apps::popup_call4_audio_second_window( 
       
   185         aVariety ).LayoutLine();    
       
   186     }
       
   187     
       
   188 // -----------------------------------------------------------------------------
       
   189 // BubbleLayout4::popup_call4_audio_in_window
       
   190 // -----------------------------------------------------------------------------
       
   191 //    
       
   192 const TAknWindowLineLayout 
       
   193     BubbleLayout4::popup_call4_audio_in_window( TInt aVariety )
       
   194     {
       
   195     return AknLayoutScalable_Apps::popup_call4_audio_in_window( 
       
   196         aVariety ).LayoutLine();    
       
   197     }
       
   198     
       
   199 // -----------------------------------------------------------------------------
       
   200 // BubbleLayout4::popup_call4_audio_wait_window
       
   201 // -----------------------------------------------------------------------------
       
   202 //    
       
   203 const TAknWindowLineLayout 
       
   204     BubbleLayout4::popup_call4_audio_wait_window( TInt aVariety )
       
   205     {
       
   206     return AknLayoutScalable_Apps::popup_call4_audio_wait_window( 
       
   207         aVariety ).LayoutLine();    
       
   208     }                    
       
   209     
       
   210 // -----------------------------------------------------------------------------
       
   211 // BubbleLayout4::popup_call4_audio_conference_window
       
   212 // -----------------------------------------------------------------------------
       
   213 //
       
   214 const TAknWindowLineLayout 
       
   215     BubbleLayout4::popup_call4_audio_conference_window( TInt aVariety )
       
   216     {
       
   217     // same variety in portrait and landscape
       
   218     return AknLayoutScalable_Apps::call4_windows_conf_pane( 
       
   219         aVariety ).LayoutLine();    
       
   220     }    
       
   221 
       
   222 // -----------------------------------------------------------------------------
       
   223 // BubbleLayout4::popup_call4_audio_conference_window
       
   224 // -----------------------------------------------------------------------------
       
   225 //
       
   226 const TAknWindowLineLayout 
       
   227     BubbleLayout4::popup_call4_audio_conference_window_pane( 
       
   228         TInt aVariety,
       
   229         TInt aRow )
       
   230     {
       
   231     // same variety in portrait and landscape
       
   232     TAknLayoutScalableParameterLimits parLimits =
       
   233         AknLayoutScalable_Apps::popup_call4_audio_conf_window_ParamLimits(
       
   234             aVariety );
       
   235         
       
   236     if ( aVariety < parLimits.FirstVariety() || 
       
   237          aVariety > parLimits.LastVariety() )
       
   238         {
       
   239         Panic( EBMPanicLAF );
       
   240         }    
       
   241 
       
   242     return AknLayoutScalable_Apps::popup_call4_audio_conf_window( 
       
   243         aVariety, 0, aRow ).LayoutLine();    
       
   244     }
       
   245     
       
   246 // -----------------------------------------------------------------------------
       
   247 // BubbleLayout4::popup_call4_conf_pane_bg
       
   248 // -----------------------------------------------------------------------------
       
   249 //
       
   250 const TAknWindowLineLayout 
       
   251     BubbleLayout4::popup_call4_conf_pane_background()
       
   252     {
       
   253     return AknLayoutScalable_Apps::bg_popup_call2_act_pane_cp02().LayoutLine();
       
   254     }
       
   255     
       
   256 // -----------------------------------------------------------------------------
       
   257 // BubbleLayout4::popup_call4_conf_cli_list
       
   258 // -----------------------------------------------------------------------------
       
   259 //
       
   260 const TAknWindowLineLayout 
       
   261     BubbleLayout4::popup_call4_conf_cli_list()
       
   262     {
       
   263     return AknLayoutScalable_Apps::call4_list_conf_pane().LayoutLine();
       
   264     }
       
   265     
       
   266 // -----------------------------------------------------------------------------
       
   267 // BubbleLayout4::popup_call4_conf_single_list_graphic_pane
       
   268 // -----------------------------------------------------------------------------
       
   269 //
       
   270 const TAknWindowLineLayout 
       
   271     BubbleLayout4::popup_call4_conf_single_list_graphic_pane( TInt aRow )
       
   272     {
       
   273     TAknLayoutScalableParameterLimits parLimits =
       
   274         AknLayoutScalable_Apps::list_single_graphic_popup_conf4_pane_ParamLimits();
       
   275 
       
   276     /*if ( aRow < parLimits.FirstVariety() || aRow > parLimits.LastVariety() )
       
   277         {
       
   278         Panic( EBMPanicLAF );
       
   279         }*/
       
   280     
       
   281     return AknLayoutScalable_Apps::
       
   282         list_single_graphic_popup_conf4_pane( 0, 0, aRow ).LayoutLine();    
       
   283     }        
       
   284     
       
   285 // -----------------------------------------------------------------------------
       
   286 // BubbleLayout4::popup_call4_conf_single_list_highlight_pane
       
   287 // -----------------------------------------------------------------------------
       
   288 //
       
   289 const TAknWindowLineLayout 
       
   290     BubbleLayout4::popup_call4_conf_single_list_highlight_pane()
       
   291     {
       
   292     return AknLayoutScalable_Apps::list_highlight_pane_cp022().LayoutLine();
       
   293     }
       
   294     
       
   295 // -----------------------------------------------------------------------------
       
   296 // BubbleLayout4::popup_call2_conf_single_list_pane_call_status_icon
       
   297 // -----------------------------------------------------------------------------
       
   298 //
       
   299 const TAknWindowLineLayout 
       
   300     BubbleLayout4::popup_call4_conf_single_list_pane_call_status_icon()
       
   301     {
       
   302     return AknLayoutScalable_Apps::list_single_graphic_popup_conf4_pane_g1().LayoutLine();
       
   303     }
       
   304     
       
   305 // -----------------------------------------------------------------------------
       
   306 // BubbleLayout4::popup_call4_conf_single_list_pane_ciphering_icon
       
   307 // -----------------------------------------------------------------------------
       
   308 //
       
   309 const TAknWindowLineLayout 
       
   310     BubbleLayout4::popup_call4_conf_single_list_pane_ciphering_icon()
       
   311     {
       
   312     return AknLayoutScalable_Apps::list_single_graphic_popup_conf4_pane_g2().LayoutLine();
       
   313     }
       
   314     
       
   315 // -----------------------------------------------------------------------------
       
   316 // BubbleLayout4::popup_call2_conf_single_list_pane_cli_text
       
   317 // -----------------------------------------------------------------------------
       
   318 //
       
   319 const TAknTextLineLayout 
       
   320     BubbleLayout4::popup_call4_conf_single_list_pane_cli_text()
       
   321     {
       
   322     return AknLayoutScalable_Apps::list_single_graphic_popup_conf4_pane_t1().LayoutLine();
       
   323     }    
       
   324 
       
   325 // -----------------------------------------------------------------------------
       
   326 // BubbleLayout4::cell_call4_button_pane
       
   327 // -----------------------------------------------------------------------------
       
   328 //
       
   329 const TAknWindowLineLayout 
       
   330     BubbleLayout4::cell_call4_button_pane( TInt aVariety, TInt aCol, TInt aRow )
       
   331     {
       
   332     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   333         {
       
   334         // portrait 0..1 == landscape 2..3 
       
   335         aVariety += 1;    	        
       
   336     	}
       
   337     
       
   338     TAknLayoutScalableParameterLimits parLimits =
       
   339         AknLayoutScalable_Apps::cell_call4_button_pane_ParamLimits( aVariety );
       
   340         
       
   341     if ( aVariety < parLimits.FirstVariety() || 
       
   342          aVariety > parLimits.LastVariety() )
       
   343         {
       
   344         Panic( EBMPanicLAF );
       
   345         }   
       
   346         
       
   347     return AknLayoutScalable_Apps::cell_call4_button_pane( 
       
   348         aVariety, aCol, aRow ).LayoutLine();    
       
   349     }
       
   350 
       
   351 // -----------------------------------------------------------------------------
       
   352 // BubbleLayout4::button_call4_background_graphics
       
   353 // -----------------------------------------------------------------------------
       
   354 //
       
   355 const TAknWindowLineLayout 
       
   356     BubbleLayout4::button_call4_background_graphics( TInt aVariety )
       
   357     {
       
   358     TAknLayoutScalableParameterLimits parLimits =
       
   359         AknLayoutScalable_Apps::bg_button_pane_cp09_ParamLimits( aVariety );
       
   360         
       
   361     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   362         {
       
   363         // portrait 0..1 == landscape 2..3 
       
   364         aVariety += 2;    	        
       
   365     	}        
       
   366         
       
   367     if ( aVariety < parLimits.FirstVariety() || 
       
   368          aVariety > parLimits.LastVariety() )
       
   369         {
       
   370         Panic( EBMPanicLAF );
       
   371         }   
       
   372         
       
   373     return AknLayoutScalable_Apps::bg_button_pane_cp09( 
       
   374         aVariety ).LayoutLine();    
       
   375     }
       
   376 
       
   377 // -----------------------------------------------------------------------------
       
   378 // BubbleLayout4::button_call4_function_graphics
       
   379 // -----------------------------------------------------------------------------
       
   380 //            
       
   381 const TAknWindowLineLayout 
       
   382     BubbleLayout4::button_call4_function_graphics( TInt aVariety )
       
   383     {
       
   384     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   385         {
       
   386         // portrait 0..1 == landscape 2..3 
       
   387         aVariety += 2;    	        
       
   388     	}
       
   389     
       
   390     TAknLayoutScalableParameterLimits parLimits =
       
   391         AknLayoutScalable_Apps::cell_call4_button_pane_g1_ParamLimits( 
       
   392             aVariety );
       
   393         
       
   394     if ( aVariety < parLimits.FirstVariety() || 
       
   395          aVariety > parLimits.LastVariety() )
       
   396         {
       
   397         Panic( EBMPanicLAF );
       
   398         }   
       
   399         
       
   400     return AknLayoutScalable_Apps::cell_call4_button_pane_g1( 
       
   401         aVariety ).LayoutLine();    
       
   402     }
       
   403 
       
   404 // -----------------------------------------------------------------------------
       
   405 // BubbleLayout4::button_call4_function_text
       
   406 // -----------------------------------------------------------------------------
       
   407 //            
       
   408 const TAknTextLineLayout 
       
   409     BubbleLayout4::button_call4_function_text( TInt aVariety )
       
   410     {
       
   411     if ( Layout_Meta_Data::IsLandscapeOrientation() )
       
   412         {
       
   413         // portrait 0..1 == landscape 2..3 
       
   414         aVariety += 2;    	        
       
   415     	}
       
   416     
       
   417     TAknLayoutScalableParameterLimits parLimits =
       
   418         AknLayoutScalable_Apps::cell_call4_button_pane_t1_ParamLimits( 
       
   419             aVariety );
       
   420         
       
   421     if ( aVariety < parLimits.FirstVariety() || 
       
   422          aVariety > parLimits.LastVariety() )
       
   423         {
       
   424         Panic( EBMPanicLAF );
       
   425         }   
       
   426         
       
   427     return AknLayoutScalable_Apps::cell_call4_button_pane_t1( 
       
   428         aVariety ).LayoutLine();    
       
   429     }
       
   430 
       
   431 
       
   432     
       
   433 
       
   434 // End of File