javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtlink.h
branchRCL_3
changeset 60 6c158198356e
parent 24 0fd27995241b
equal deleted inserted replaced
59:e5618cc85d74 60:6c158198356e
    52 private:
    52 private:
    53     CSwtLink(MSwtDisplay& aDisplay, TSwtPeer aPeer, MSwtComposite& aParent,
    53     CSwtLink(MSwtDisplay& aDisplay, TSwtPeer aPeer, MSwtComposite& aParent,
    54              TInt aStyle);
    54              TInt aStyle);
    55     void ConstructL();
    55     void ConstructL();
    56     void SwtHandleResourceChangeL(TInt aType);
    56     void SwtHandleResourceChangeL(TInt aType);
    57     void UpdateSkinColor();
       
    58     void UpdateDefaultFontL();
    57     void UpdateDefaultFontL();
    59     void UpdateMarginValues();
    58     void UpdateMarginValues();
    60     TRect TextRect() const;
    59     TRect TextRect() const;
    61     TInt BuildFragmentListL(const CDesCArray* aTextFragments,
    60     TInt BuildFragmentListL(const CDesCArray* aTextFragments,
    62                             const CDesCArray* aLinkTargets);
    61                             const CDesCArray* aLinkTargets);
    98                                        const TDesC& aText, const TInt aLinePosition, const TInt aLength,
    97                                        const TDesC& aText, const TInt aLinePosition, const TInt aLength,
    99                                        const TInt aAvailableWidth, const TInt aXOffset, const TInt aYOffset,
    98                                        const TInt aAvailableWidth, const TInt aXOffset, const TInt aYOffset,
   100                                        const TInt aCurrentLineIndex) const;
    99                                        const TInt aCurrentLineIndex) const;
   101     void SetFocusedFragment();
   100     void SetFocusedFragment();
   102     TBool IsRtl() const;
   101     TBool IsRtl() const;
   103 
   102     TRgb TextColor() const;
       
   103     TRgb LinkColor() const;
       
   104     TRgb LinkBgColor() const;
       
   105     TRgb PressedLinkColor() const;
   104 
   106 
   105 // From base class CCoeControl
   107 // From base class CCoeControl
   106 public:
   108 public:
   107     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
   109     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
   108     void HandleResourceChange(TInt aType);
   110     void HandleResourceChange(TInt aType);
   124 public:
   126 public:
   125     void SetForegroundL(const MSwtColor* aColor);
   127     void SetForegroundL(const MSwtColor* aColor);
   126     TSize ComputeSizeL(TInt aWHint, TInt aHHint);
   128     TSize ComputeSizeL(TInt aWHint, TInt aHHint);
   127     void  SetFontL(const MSwtFont* aFont);
   129     void  SetFontL(const MSwtFont* aFont);
   128     TBool SetSwtFocus(TInt aReason = KSwtFocusByApi);
   130     TBool SetSwtFocus(TInt aReason = KSwtFocusByApi);
       
   131     TInt PressBackgroundPolicy() const;
   129 
   132 
   130 // From base class ASwtControlBase
   133 // From base class ASwtControlBase
   131 protected:
   134 protected:
   132     const MSwtFont& DefaultFont() const;
   135     const MSwtFont& DefaultFont() const;
   133     HBufC* MSKLabelL() const;
   136     HBufC* MSKLabelL() const;
   171      * Line height in pixels
   174      * Line height in pixels
   172      */
   175      */
   173     TInt iLineHeight;
   176     TInt iLineHeight;
   174 
   177 
   175     /**
   178     /**
   176      * Plain text fragment text color.
   179      * Custom foreground color used by the text and non pressed links.
   177      */
   180      * Not own.
   178     TRgb iTextColor;
   181      */
   179 
   182     const MSwtColor* iCustomFg;
   180     /**
       
   181      * Link fragment text color.
       
   182      */
       
   183     TRgb iLinkColor;
       
   184 
       
   185     /**
       
   186      * Link fragment text color when highlighted.
       
   187      */
       
   188     TRgb iHighlightedLinkColor;
       
   189 
       
   190     /**
       
   191      * Link fragment back highlight color.
       
   192      */
       
   193     TRgb iHighlightColor;
       
   194 
       
   195     /**
       
   196      * True if currently used text color is a color set by the Java application.
       
   197      */
       
   198     TBool iCustomTextColor;
       
   199 
   183 
   200     /**
   184     /**
   201      * The margins used for text positioning when drawing.
   185      * The margins used for text positioning when drawing.
   202      */
   186      */
   203     TInt iHorizontalMargin;
   187     TInt iHorizontalMargin;
   224      * Own.
   208      * Own.
   225      */
   209      */
   226     const CSwtLinkFragmentDescriptor* iFocusedFragment;
   210     const CSwtLinkFragmentDescriptor* iFocusedFragment;
   227 
   211 
   228     /**
   212     /**
   229      * True for as long as pressed by pointer.
       
   230      * Eclipses ASwtControlBase::iPressed!
       
   231      */
       
   232     TBool iPressed;
       
   233 
       
   234     /**
       
   235      * True if 2 or more targets.
   213      * True if 2 or more targets.
   236      */
   214      */
   237     TBool iMultipleTargets;
   215     TBool iMultipleTargets;
   238 };
   216 };
   239 
   217