本文整理汇总了C++中CEikLabel::Rect方法的典型用法代码示例。如果您正苦于以下问题:C++ CEikLabel::Rect方法的具体用法?C++ CEikLabel::Rect怎么用?C++ CEikLabel::Rect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEikLabel
的用法示例。
在下文中一共展示了CEikLabel::Rect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CalculatePortraitLayout
void CGuideContainer::CalculatePortraitLayout()
{
#ifdef NAV2_CLIENT_SERIES60_V3
ActivateGc();
CWindowGc& gc = SystemGc();
gc.Clear(iCurrStreetLabel->Rect());
SetLabelExtent(iCurrStreetLabel, CURRSTREET_LABEL_POS, ETrue);
gc.Clear(iNextStreetLabel->Rect());
SetLabelExtent(iNextStreetLabel, NEXTSTREET_LABEL_POS, ETrue);
gc.Clear(iDistanceLabel->Rect());
SetLabelExtent(iDistanceLabel, DISTANCE_LABEL_POS);
CEikLabel* instructionLabel = GetTalkingLabel();
// Resets the Edwin control for the screen reader
gc.Clear(instructionLabel->Rect());
SetLabelExtent(instructionLabel, TEXT_INSTRUCTION_POS);
DeactivateGc();
if (iProgressBar) {
iProgressBar->SetSizeAndPosition(TRect( WFLayoutUtils::
CalculatePosUsingMainPane( PROGRESS_BAR_POS ),
WFLayoutUtils::
CalculateSizeUsingMainPane( 40, 90 ) ) );
} else {
iProgressBar =
CGuideProgressBar::NewL(*this,
TRect( WFLayoutUtils::CalculatePosUsingMainPane( PROGRESS_BAR_POS ),
WFLayoutUtils::CalculateSizeUsingMainPane( 40, 90 ) ),
iView->GetMbmName(),
EMbmWficonsProgress_triangle_grey,
EMbmWficonsProgress_triangle_blue,
EMbmWficonsProgress_triangle_grey_mask,
EMbmWficonsProgress_bar_grey,
EMbmWficonsProgress_bar_blue,
EMbmWficonsProgress_bar_grey_mask);
}
TRect rect = WFLayoutUtils::GetMainPaneRect();
CreatePictureL(iGuidePicture, rect, GUIDE_PICTURE_POS, 100, 100);
// CreatePictureL(iNextTurnPicture, rect, NEXT_TURN_PICTURE_POS, 24, 24);
// CreatePictureL(iDetourPicture, rect, DETOUR_PICTURE_POS, 24, 24);
SetImage(iNextTurnPicture,
iGuidePicture->GetRect(),
&TopRight, 0.24, 0.24,
-WFLayoutUtils::CalculateXValue(IMAGE_PADDING),
WFLayoutUtils::CalculateYValueUsingMainPane(IMAGE_PADDING));
SetImage(iDetourPicture,
iGuidePicture->GetRect(),
&LowerLeft, 0.24, 0.24,
WFLayoutUtils::CalculateXValue(IMAGE_PADDING),
-WFLayoutUtils::CalculateYValueUsingMainPane(IMAGE_PADDING));
SetImage(iSpeedCamPicture,
iGuidePicture->GetRect(),
&LowerRight, 0.24, 0.24,
-WFLayoutUtils::CalculateXValue(IMAGE_PADDING),
-WFLayoutUtils::CalculateYValueUsingMainPane(IMAGE_PADDING));
iDetourPicture->SetShow(EFalse);
iSpeedCamPicture->SetShow(EFalse);
iDetourPicture->CreateIconL(iView->GetMbmName(),
EMbmWficonsDetour_square,
EMbmWficonsDetour_square_mask);
iSpeedCamPicture->CreateIconL(iView->GetMbmName(),
EMbmWficonsSpeedcamera_square,
EMbmWficonsSpeedcamera_square);
TRect exitRect = Center(iGuidePicture->GetRect(),
TRect(TPoint(),
WFLayoutUtils::
CalculateSizeUsingSize(iGuidePicture->GetSize(),
0.26, 0.16)));
if (iExitPicture) {
iExitPicture->SetImageRect(exitRect);
} else {
iExitPicture = CImageHandler::NewL(exitRect);
}
iExitPicture->SetShow(EFalse);
// XXX Temporary removed until the above lines are tested.
// CreatePictureL(iExitPicture, rect, EXIT_PICTURE_POS, 26, 16);
#endif
}
示例2: CalculateLandscapeLayout
void CGuideContainer::CalculateLandscapeLayout()
{
#ifdef NAV2_CLIENT_SERIES60_V3
// Landscape mode!
// Clear all labeltexts before setting the new extent,
// by doing this we will get rid of the text in the
// old positions.
ActivateGc();
CWindowGc& gc = SystemGc();
gc.Clear(iCurrStreetLabel->Rect());
SetLabelExtent(iCurrStreetLabel,
CURR_STREET_LABEL_X_LS,
CURR_STREET_LABEL_Y_LS,
ETrue);
gc.Clear(iNextStreetLabel->Rect());
SetLabelExtent(iNextStreetLabel,
NEXT_STREET_LABEL_X_LS,
NEXT_STREET_LABEL_Y_LS,
ETrue);
gc.Clear(iDistanceLabel->Rect());
SetLabelExtent(iDistanceLabel,
DIST_STREET_LABEL_X_LS,
DIST_STREET_LABEL_Y_LS);
// Resets the Edwin control for the screen reader
CEikLabel* instructionLabel = GetTalkingLabel();
gc.Clear(instructionLabel->Rect());
SetLabelExtent(instructionLabel,
TEXT_INSTRUCTION_X_LS,
TEXT_INSTRUCTION_Y_LS);
DeactivateGc();
if (iGuidePicture) {
// Recalculate
iGuidePicture->SetImageRect(TRect(WFLayoutUtils::CalculatePosUsingMainPaneFloat(0.1, 0.15),
WFLayoutUtils::CalculateSizeUsingMainPaneFloat(0.45, 0.70)));
} else {
iGuidePicture =
CImageHandler::NewL(TRect(WFLayoutUtils::CalculatePosUsingMainPaneFloat(0.1, 0.15),
WFLayoutUtils::CalculateSizeUsingMainPaneFloat(0.45, 0.70)));
}
if (iProgressBar) {
iProgressBar->SetSizeAndPosition(TRect(WFLayoutUtils::CalculatePosUsingMainPaneFloat(0.7, 0.15),
WFLayoutUtils::CalculateSizeUsingMainPaneFloat(0.20, 0.6)));
} else {
iProgressBar =
CGuideProgressBar::NewL(*this,
TRect( WFLayoutUtils::CalculatePosUsingMainPaneFloat(0.7, 0.15),
WFLayoutUtils::CalculateSizeUsingMainPaneFloat(0.20, 0.6)),
iView->GetMbmName(),
EMbmWficonsProgress_triangle_grey,
EMbmWficonsProgress_triangle_blue,
EMbmWficonsProgress_triangle_grey_mask,
EMbmWficonsProgress_bar_grey,
EMbmWficonsProgress_bar_blue,
EMbmWficonsProgress_bar_grey_mask);
}
SetImage(iNextTurnPicture,
iGuidePicture->GetRect(),
&TopRight, 0.24, 0.24,
-WFLayoutUtils::CalculateXValue(IMAGE_PADDING),
WFLayoutUtils::CalculateYValueUsingMainPane(IMAGE_PADDING));
SetImage(iDetourPicture,
iGuidePicture->GetRect(),
&LowerLeft, 0.24, 0.24,
WFLayoutUtils::CalculateXValue(IMAGE_PADDING),
-WFLayoutUtils::CalculateYValueUsingMainPane(IMAGE_PADDING));
SetImage(iSpeedCamPicture,
iGuidePicture->GetRect(),
&LowerRight, 0.24, 0.24,
-WFLayoutUtils::CalculateXValue(IMAGE_PADDING),
-WFLayoutUtils::CalculateYValueUsingMainPane(IMAGE_PADDING));
iDetourPicture->SetShow(EFalse);
iSpeedCamPicture->SetShow(EFalse);
iDetourPicture->CreateIconL(iView->GetMbmName(),
EMbmWficonsDetour_square,
EMbmWficonsDetour_square_mask);
iSpeedCamPicture->CreateIconL(iView->GetMbmName(),
EMbmWficonsSpeedcamera_square,
EMbmWficonsSpeedcamera_square);
TRect exitRect = Center(iGuidePicture->GetRect(),
TRect(TPoint(),
WFLayoutUtils::
CalculateSizeUsingSize(iGuidePicture->GetSize(),
0.26, 0.16)));
if (iExitPicture) {
iExitPicture->SetImageRect(exitRect);
} else {
iExitPicture = CImageHandler::NewL(exitRect);
}
iExitPicture->SetShow(EFalse);
#endif
}