本文整理汇总了C++中TAknLayoutRect类的典型用法代码示例。如果您正苦于以下问题:C++ TAknLayoutRect类的具体用法?C++ TAknLayoutRect怎么用?C++ TAknLayoutRect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TAknLayoutRect类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RectFromLayout
TRect AknPopupLayouts::RectFromLayout(TRect aParent, const TAknWindowComponentLayout &aComponentLayout)
{
TAknWindowLineLayout lineLayout = aComponentLayout.LayoutLine();
TAknLayoutRect layoutRect;
layoutRect.LayoutRect(aParent,lineLayout);
return layoutRect.Rect();
}
示例2: RectFromLayout
// ---------------------------------------------------------------------------
// CAknDiscreetPopupDrawer::RectFromLayout
// Returns the specified layout rectangle.
// ---------------------------------------------------------------------------
//
TRect CAknDiscreetPopupDrawer::RectFromLayout( const TRect& aParent,
const TAknWindowComponentLayout& aComponentLayout )
{
TAknLayoutRect layoutRect;
layoutRect.LayoutRect( aParent, aComponentLayout.LayoutLine() );
return layoutRect.Rect();
}
示例3: GetMaxListHeight
static TInt GetMaxListHeight()
{
TAknLayoutRect temp, layout;
TRect mainPane;
TRect statusPane;
TRect controlPane;
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EPopupParent, mainPane );
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EStatusPane, statusPane );
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EControlPane, controlPane );
// in landscape orientation popuplist can't go on top of statuspane
if ( !Layout_Meta_Data::IsLandscapeOrientation() )
{
mainPane.iTl.iY -= statusPane.Height();
}
// treat mainpane+statuspane area as popup window
// too bad we can't use this, because e.g. QVGA landscape has border-size 7
// in avkon layout and border-size 9 in skin drawing...
/*temp.LayoutRect( mainPane, AknLayoutScalable_Avkon::listscroll_menu_pane(0));
layout.LayoutRect( temp.Rect(), AknLayoutScalable_Avkon::list_menu_pane(0));
return layout.Rect().Height();*/
// shadow
TInt varietyIndex = Layout_Meta_Data::IsLandscapeOrientation();
TAknLayoutRect insideArea;
insideArea.LayoutRect(
mainPane,
AknLayoutScalable_Avkon::bg_popup_window_pane_g1(varietyIndex) );
return insideArea.Rect().Height();
}
示例4: SizeChanged
// ----------------------------------------------------------------------------
// void CChangeConnectionDlg::HandleResourceChange( TInt aType )
// Handle resource change events.
// ----------------------------------------------------------------------------
//
void CChangeConnectionDlg::HandleResourceChange( TInt aType )
{
if ( aType == KAknsMessageSkinChange )
{
CAknListQueryDialog::HandleResourceChange( aType );
SizeChanged();
}
else
{
if ( aType == KEikDynamicLayoutVariantSwitch )
{
TRect mainPaneRect;
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane,
mainPaneRect );
TAknLayoutRect layoutRect;
layoutRect.LayoutRect( TRect( TPoint( 0, 0 ),
mainPaneRect.Size() ),
AKN_LAYOUT_WINDOW_list_gen_pane( 0 ) );
ListBox()->SetRect( layoutRect.Rect() );
}
// Base call
CAknListQueryDialog::HandleResourceChange( aType );
}
}
示例5: RectFromLayout
// -----------------------------------------------------------------------------
// RectFromLayout
//
// -----------------------------------------------------------------------------
//
TRect CAknInfoPopupNote::RectFromLayout( const TRect& aParent,
const TAknWindowComponentLayout& aComponentLayout ) const
{
TAknWindowLineLayout lineLayout = aComponentLayout.LayoutLine();
TAknLayoutRect layoutRect;
layoutRect.LayoutRect(aParent, lineLayout);
return layoutRect.Rect();
}
示例6: new
CAknDialogAttributes* CAknDialog::AttributesL()
{
if ( !iAttributes )
{
iAttributes = new (ELeave) CAknDialogAttributes();
TRect windowRect = Rect();
TAknLayoutRect topLeft;
topLeft.LayoutRect(windowRect, Popup_windows_skin_placing__frame_general__Line_2());
TAknLayoutRect bottomRight;
bottomRight.LayoutRect(windowRect, ELayoutEmpty, 169, ELayoutEmpty, ELayoutEmpty, 2, 7,7);
bottomRight.LayoutRect(windowRect, Popup_windows_skin_placing__frame_general__Line_5());
TRect outerRect = TRect(topLeft.Rect().iTl, bottomRight.Rect().iBr);
TRect innerRect = TRect(topLeft.Rect().iBr, bottomRight.Rect().iTl);
iAttributes->iBgContext = CAknsFrameBackgroundControlContext::NewL(
KAknsIIDQsnFrPopup, outerRect, innerRect, ETrue );
if ( &Window() )
iAttributes->iBgContext->SetParentPos( PositionRelativeToScreen() );
}
return iAttributes;
}
示例7: SizeChanged
// ---------------------------------------------------------
// CAknChoiceListPopupList::SizeChanged()
// ---------------------------------------------------------
//
void SizeChanged()
{
CEikFormattedCellListBox::SizeChanged();
TRAP_IGNORE( SizeChangedL() );
TAknLayoutRect cellRect;
cellRect.LayoutRect( Rect(),
AknLayoutScalable_Avkon::list_single_choice_list_pane(0) );
CFormattedCellListBoxItemDrawer *itemDrawer( ItemDrawer() );
itemDrawer->SetItemCellSize( cellRect.Rect().Size() );
}
示例8: switch
EXPORT_C void AknPopupLayouts::ModifyWindowGraphicForMessageBox(TAknPopupWindowLayoutDef &aDef, TInt aNumberOfLines)
{
TInt varietyIndex = 0;
switch (aNumberOfLines)
{
case (2): varietyIndex = 1;
break;
case (3): varietyIndex = 2;
}
TAknWindowLineLayout lay = AknLayoutScalable_Apps::loc_type_pane(varietyIndex).LayoutLine();
TAknLayoutRect layout;
layout.LayoutRect( TRect(0,0,0,0), lay );
TRect messageRect( layout.Rect() );
aDef.iWindowRect.iTl.iY -= messageRect.Height();
}
示例9: cbaLocation
void CAknNoteAttributes::CreateProgressBarL()
{
if (iProgressBar)
{
return;
}
TInt numLines = iNoteText->NumberOfLines();
// New parameter added to Wait_or_progress_note_pop_up_window_elements_Line_2 layout API.
TInt tIndex = 0;
if (numLines == 3)
{
tIndex = 1;
}
if (numLines >= 4)
{
tIndex = 2;
}
TRect mainPane = iAvkonAppUi->ClientRect();
TAknLayoutRect parent;
AknLayoutUtils::TAknCbaLocation cbaLocation( AknLayoutUtils::CbaLocation() );
TInt variety( 0 );
if ( cbaLocation == AknLayoutUtils::EAknCbaLocationRight )
{
variety = 3;
}
else if ( cbaLocation == AknLayoutUtils::EAknCbaLocationLeft )
{
variety = 6;
}
else
{
variety = 0;
}
parent.LayoutRect(mainPane, AknLayoutScalable_Avkon::popup_note_wait_window( variety + tIndex ));
TAknLayoutRect layRect;
layRect.LayoutRect(parent.Rect(), AKN_LAYOUT_WINDOW_Wait_or_progress_note_pop_up_window_elements_Line_2(tIndex));
CEikProgressInfo::SInfo info;
info.iHeight = layRect.Rect().Height();//lay.iH;
info.iWidth = layRect.Rect().Width();//lay.iW;
info.iFinalValue = 1;
info.iSplitsInBlock = 0;
info.iTextType = EEikProgressTextNone;
iProgressBar = new(ELeave) CEikProgressInfo(info);
iProgressBar->ConstructL();
TransferToControlL(iProgressBar);
InvalidateLayout();
}
示例10: screen
void CAknEcsNote::SetEmergencyNumber( const TDesC& aMatchedNumber )
{
TRect screen(iAvkonAppUi->ApplicationRect());
TAknLayoutRect mainPane;
mainPane.LayoutRect(screen, AKN_LAYOUT_WINDOW_main_pane(screen, 0, 1, 1));
TAknLayoutRect popupNoteWindow;
AknLayoutUtils::TAknCbaLocation cbaLocation( AknLayoutUtils::CbaLocation() );
TInt variety( 0 );
if ( cbaLocation == AknLayoutUtils::EAknCbaLocationRight )
{
variety = 5;
}
else if ( cbaLocation == AknLayoutUtils::EAknCbaLocationLeft )
{
variety = 8;
}
else
{
variety = 2;
}
popupNoteWindow.LayoutRect(mainPane.Rect(), AknLayoutScalable_Avkon::popup_note_window( variety ));
TAknLayoutText textRect;
textRect.LayoutText(popupNoteWindow.Rect(), AKN_LAYOUT_TEXT_Note_pop_up_window_texts_Line_1(4));
// Size of a temporary buffer that contains new lines, spaces and
// emergency number for a note.
TBuf16<KAknEcsMaxMatchingLength+80> number;
number.Append('\n');
number.Append('\n');
TInt spaceCharWidthInPixels = textRect.Font()->CharWidthInPixels(' ');
if (spaceCharWidthInPixels < 1)
{
// Avoid divide by zero situation even the space char would have zero length.
spaceCharWidthInPixels = 1;
}
TInt length = (textRect.TextRect().Width() - textRect.Font()->TextWidthInPixels(aMatchedNumber))
/ spaceCharWidthInPixels;
const TInt matchedNumberLength = aMatchedNumber.Length();
const TInt numberLength = number.Length();
const TInt numberMaxLength = number.MaxLength();
if ( numberLength + length + matchedNumberLength > numberMaxLength)
{
// To make sure that buffer overflow does not happen.
length = numberMaxLength - numberLength - matchedNumberLength;
}
for (int i = 0; i < length ; i++)
{
number.Append(' ');
}
number.Append(aMatchedNumber);
TRAP_IGNORE(SetTextL(number));
}
示例11: nullRect
EXPORT_C void AknPopupLayouts::ModifyWindowGraphicForHeading(TAknPopupWindowLayoutDef &aDef)
{
TRect nullRect(0,0,0,0);
TAknLayoutRect nullHeadingRect;
// find out, how much space is needed for heading (spaceForHeading was 23)
nullHeadingRect.LayoutRect(nullRect,AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_1(nullRect));
TInt spaceForHeading = nullHeadingRect.Rect().Height();
aDef.iWindowRect.iTl.iY -= spaceForHeading; // This is necessary to position it correctly
// this is because b=0 in parent of coverrect and because
// parent's height is used in the child...
TRect window_rect = aDef.iWindowRect;
aDef.iCover.LayoutRect( window_rect, AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_1(window_rect));
aDef.iSecond.LayoutRect( window_rect, AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_2(window_rect));
aDef.iFirst.LayoutRect( window_rect, AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_3(window_rect));
aDef.iOutline.LayoutRect(window_rect, AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_4(window_rect));
aDef.iInside.LayoutRect( window_rect, AKN_LAYOUT_WINDOW_Pop_up_menu_with_heading_window_graphics_Line_5(window_rect));
aDef.iPopupMenuWindowOffset=TPoint(0,spaceForHeading);
}
示例12: StandardSettingPageLayout
EXPORT_C void CAknPasswordSettingPage::SizeChanged()
{
StandardSettingPageLayout(); // Must be part of any re-implementation
iSecretEditorLayoutRect.LayoutRect(
CAknSettingPage::SettingItemContentRect( EFalse ),
AknLayoutScalable_Avkon::setting_code_pane_copy1() );
TRect editorRect = iSecretEditorLayoutRect.Rect();
iHorizontalShadow.LayoutRect(editorRect,
AKN_LAYOUT_WINDOW_Code_time_and_date_entry_pane_elements_Line_1);
iVerticalShadow.LayoutRect(editorRect,
AKN_LAYOUT_WINDOW_Code_time_and_date_entry_pane_elements_Line_2);
iOutlineFrame.LayoutRect(editorRect,
AKN_LAYOUT_WINDOW_Code_time_and_date_entry_pane_elements_Line_3);
AknLayoutUtils::LayoutSecretEditor( ( CEikSecretEditor * )EditorControl(),
editorRect, AknLayoutScalable_Avkon::setting_code_pane_t1_copy1() );
TRAP_IGNORE(((CEikSecretEditor*)EditorControl())->SetSkinTextColorL(EAknsCIQsnTextColorsCG26));
TAknLayoutRect layoutRect;
layoutRect.LayoutRect(
editorRect,
AknLayoutScalable_Avkon::input_focus_pane_cp2_copy1() );
TRect editorFrameRect( layoutRect.Rect() );
layoutRect.LayoutRect(
editorFrameRect,
AknLayoutScalable_Avkon::set_opt_bg_pane_g1_copy1() );
SetEditedItemFrameRects( editorFrameRect, layoutRect.Rect() );
layoutRect.LayoutRect(
editorRect,
AknLayoutScalable_Avkon::indicator_popup_pane_cp6() );
SetEditorIndicatorRect( layoutRect.Rect() );
}
示例13: ProposedHeight
TReal CTouchInput::PortraitHeight()
{
iPortraitHeight = ProposedHeight();
if ( iPortraitHeight != KErrNotReady )
{
return iPortraitHeight;
}
#if defined(HAVE_SYMBIAN_INTERNAL)
TRect screenRect;
TAknLayoutRect portraitRect;
TAknLayoutRect indicatorRect;
AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EScreen, screenRect );
portraitRect.LayoutRect( screenRect, AknLayoutScalable_Avkon::popup_fep_ituss_window( 0 ).LayoutLine() );
indicatorRect.LayoutRect( screenRect, AknLayoutScalable_Avkon::icf_edit_indi_pane( 2 ).LayoutLine() );
iPortraitHeight = portraitRect.Rect().Height() + indicatorRect.Rect().Height();
#endif //HAVE_SYMBIAN_INTERNAL
return iPortraitHeight;
}
示例14: Rect
EXPORT_C void CAknDialog::SizeChanged()
{
if (iAttributes)
{
TRect windowRect = Rect();
TAknLayoutRect topLeft;
topLeft.LayoutRect(windowRect, Popup_windows_skin_placing__frame_general__Line_2());
TAknLayoutRect bottomRight;
bottomRight.LayoutRect(windowRect, Popup_windows_skin_placing__frame_general__Line_5());
TRect outerRect = TRect(topLeft.Rect().iTl, bottomRight.Rect().iBr);
TRect innerRect = TRect(topLeft.Rect().iBr, bottomRight.Rect().iTl);
iAttributes->iOuterRect = outerRect;
iAttributes->iInnerRect = innerRect;
iAttributes->iNeedsUpdate = ETrue;
iAttributes->iBgContext->SetParentPos( PositionRelativeToScreen() );
}
CEikDialog::SizeChanged();
}
示例15: Count
TBool CEikCapCArray::CalcItemIndexes(TInt &aTopItemIndex, TInt &aMiddleItemIndex, TInt &aBottomItemIndex, TSize aAreaSize)
{ // calculates last item that still fits to the area's size
TBool switchDir = EFalse;
TInt i;
TInt reservedHeight = 0;
TInt newTop = aTopItemIndex, newMiddle = 1, newBottom = aBottomItemIndex;
const TInt count = Count();
CEikCaptionedControl *firstCapCC = Count() > 0 ? (*this)[0] : NULL;
TInt num = 0;
if (newTop == -1) {
newTop = Count() - newMiddle - newBottom;
}
if (newBottom == -1) {
newBottom = Count() - newTop - newMiddle;
}
if (aTopItemIndex != -1)
{
num = count - aTopItemIndex;
}
if (aBottomItemIndex != -1)
{
num = count - aBottomItemIndex;
}
for (i = 0; i < num; i++)
{
TInt index = 0;
if (aTopItemIndex != -1)
{
index = i + aTopItemIndex;
}
else if (aBottomItemIndex != -1)
{
index = count - 1 - aBottomItemIndex - i;
}
CEikCaptionedControl* line=(*this)[index];
const CEikDialogPage *dialogPage = firstCapCC->DialogPage();
CEikDialogPage::TFormLayoutSelection ret = CEikDialogPage::ESingle;
if ( dialogPage )
ret = dialogPage->FormLayout();
TAknWindowLineLayout layout;
if (ret == CEikDialogPage::ESingle)
{
TInt height = line->NumberOfLines();
if (height < 1) height = 1;
if (IsPopupField(line))
{
layout = AknLayoutScalable_Avkon::form_field_popup_pane(height-1).LayoutLine();
}
else
{
layout = AknLayoutScalable_Avkon::form_field_data_pane(height-1).LayoutLine();
}
}
else if (ret == CEikDialogPage::EDouble)
{
TInt height = line->NumberOfLines();
if (height < 1) height = 1;
if (IsPopupField(line))
{
layout = AknLayoutScalable_Avkon::form_field_popup_wide_pane(height-1).LayoutLine();
}
else
{
layout = AknLayoutScalable_Avkon::form_field_data_wide_pane(height-1).LayoutLine();
}
}
else
{
// should Panic() here
}
TRect rect = TRect(TPoint(0,0), aAreaSize);
TAknLayoutRect layoutRect;
layoutRect.LayoutRect(rect, layout);
TInt height2 = layoutRect.Rect().Height();
reservedHeight += height2;
if (reservedHeight > aAreaSize.iHeight)
{
break;
}
newMiddle = i + 1;
if (aTopItemIndex == -1)
{
newTop = count - i - 1 - aBottomItemIndex;
}
if (aBottomItemIndex == -1)
{
newBottom = count - i - 1 - aTopItemIndex;
}
}
if (reservedHeight <= aAreaSize.iHeight)
{
// 2nd loop for case where item sizes have changed; makes sure screen is full.
//.........这里部分代码省略.........