00001 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). 00002 // All rights reserved. 00003 // This component and the accompanying materials are made available 00004 // under the terms of "Eclipse Public License v1.0" 00005 // which accompanies this distribution, and is available 00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html". 00007 // 00008 // Initial Contributors: 00009 // Nokia Corporation - initial contribution. 00010 // 00011 // Contributors: 00012 // 00013 // Description: 00014 // ControlFramework_View.h 00015 // 00016 00017 #ifndef __CONTROLFRAMEWORKVIEW_H 00018 #define __CONTROLFRAMEWORKVIEW_H 00019 00020 #include <coecntrl.h> 00021 #include <coeview.h> 00022 #include <babitflags.h> 00023 00024 class CControlFrameworkAppUi; 00025 00026 //View class 00027 class CControlFrameworkView : public CCoeControl, public MCoeView 00028 { 00029 public: 00030 static CControlFrameworkView* NewLC(CControlFrameworkAppUi& iAppUi); 00031 ~CControlFrameworkView(); 00032 00033 TBool IsBold() const; 00034 TBool IsItalic() const; 00035 TBool IsUnderline() const; 00036 TBool IsStrikethrough() const; 00037 void ToggleBold(); 00038 void ToggleItalic(); 00039 void ToggleUnderline(); 00040 void ToggleStrikethrough(); 00041 00042 // from MCoeView 00043 TVwsViewId ViewId() const; 00044 00045 protected: 00046 CControlFrameworkView(CControlFrameworkAppUi& iAppUi); 00047 void DrawBorder(TRect& aRect) const; 00048 void DrawMessage(const TRect& aRect) const; 00049 00050 // from MCoeView 00051 void ViewConstructL(); 00052 void ViewActivatedL(const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage); 00053 void ViewDeactivated(); 00054 00055 // from CCoeControl 00056 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); 00057 void HandlePointerEventL(const TPointerEvent& aPointerEvent); 00058 void Draw( const TRect& /*aRect*/ ) const; 00059 00060 private: 00061 CControlFrameworkAppUi& iAppUi; 00062 TBidiText* iBidiText; 00063 00064 RRunInfoArray iRunInfoArray; 00065 TCoeFont iFont; 00066 00067 enum TCommandBools 00068 { 00069 EBold, 00070 EItalic, 00071 EUnderline, 00072 EStrikethrough 00073 }; 00074 TBitFlags iFontFlags; 00075 }; 00076 00077 00078 00079 #endif // __CONTROLFRAMEWORKVIEW_H 00080
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.