javauis/eswt_akn/org.eclipse.ercp.swt.s60/native/inc/swtcontrolbase.h
branchRCL_3
changeset 24 6c158198356e
parent 19 71c436fe3ce0
equal deleted inserted replaced
23:e5618cc85d74 24:6c158198356e
   313     IMPORT_C TBool IsPaintingUrgently() const;
   313     IMPORT_C TBool IsPaintingUrgently() const;
   314     IMPORT_C void  HandlePointerEventL(const TPointerEvent& aPointerEvent);
   314     IMPORT_C void  HandlePointerEventL(const TPointerEvent& aPointerEvent);
   315     IMPORT_C TBool IsFocusable(TInt aReason = KSwtFocusByApi) const;
   315     IMPORT_C TBool IsFocusable(TInt aReason = KSwtFocusByApi) const;
   316     IMPORT_C TBool SetSwtFocus(TInt aReason = KSwtFocusByApi);
   316     IMPORT_C TBool SetSwtFocus(TInt aReason = KSwtFocusByApi);
   317     IMPORT_C TInt  FocusBackgroundPolicy() const;
   317     IMPORT_C TInt  FocusBackgroundPolicy() const;
       
   318     IMPORT_C TInt  PressBackgroundPolicy() const;
   318     IMPORT_C TBool GetEnabled() const;
   319     IMPORT_C TBool GetEnabled() const;
   319     IMPORT_C TBool GetVisible() const;
   320     IMPORT_C TBool GetVisible() const;
   320     IMPORT_C TBool GetVisibleRecursively() const;
   321     IMPORT_C TBool GetVisibleRecursively() const;
   321     IMPORT_C TRect GetBounds() const;
   322     IMPORT_C TRect GetBounds() const;
   322     IMPORT_C TInt  GetBorderWidth() const;
   323     IMPORT_C TInt  GetBorderWidth() const;
   332     IMPORT_C const MSwtMenu* GetControlMenu() const;
   333     IMPORT_C const MSwtMenu* GetControlMenu() const;
   333     IMPORT_C MSwtComposite* GetParent() const;
   334     IMPORT_C MSwtComposite* GetParent() const;
   334     IMPORT_C TBool IsDescentOf(const MSwtControl& aParent) const;
   335     IMPORT_C TBool IsDescentOf(const MSwtControl& aParent) const;
   335     IMPORT_C MSwtShell& GetShell() const;
   336     IMPORT_C MSwtShell& GetShell() const;
   336     IMPORT_C MSwtShell& GetTopShell() const;
   337     IMPORT_C MSwtShell& GetTopShell() const;
   337     IMPORT_C MSwtCaptionedControl* GetTopCaptionedControl() const;
   338     IMPORT_C MSwtCaptionedControl* GetNearestCaptionedControl(TBool aIncludeSelf = ETrue) const;
   338     IMPORT_C TSize GetWidgetSize() const;
   339     IMPORT_C TSize GetWidgetSize() const;
   339     IMPORT_C void  SetWidgetSize(const TSize& aSize);
   340     IMPORT_C void  SetWidgetSize(const TSize& aSize);
   340     IMPORT_C TBool IsFocusControl();
   341     IMPORT_C TBool IsFocusControl();
   341     IMPORT_C void  MoveAbove(const MSwtControl* aControl);
   342     IMPORT_C void  MoveAbove(const MSwtControl* aControl);
   342     IMPORT_C void  MoveBelow(const MSwtControl* aControl);
   343     IMPORT_C void  MoveBelow(const MSwtControl* aControl);
   363     IMPORT_C void  AddToControlStackL(TInt aPriority);
   364     IMPORT_C void  AddToControlStackL(TInt aPriority);
   364     IMPORT_C void  RemoveFromControlStack();
   365     IMPORT_C void  RemoveFromControlStack();
   365     IMPORT_C TBool IsOnControlStack() const;
   366     IMPORT_C TBool IsOnControlStack() const;
   366     IMPORT_C void  UpdateDoNotDrawFlag();
   367     IMPORT_C void  UpdateDoNotDrawFlag();
   367     IMPORT_C TBool HasDoNotDrawFlag() const;
   368     IMPORT_C TBool HasDoNotDrawFlag() const;
   368     void HideSilently() {};
   369     void  HideSilently() {};
   369     void ShowSilently() {};
   370     void  ShowSilently() {};
   370     TBool HiddenSilently() const
   371     TBool HiddenSilently() const
   371     {
   372     {
   372         return GetShell().Control()->HiddenSilently();
   373         return GetShell().Control()->HiddenSilently();
   373     };
   374     };
   374     IMPORT_C TBool IsLongTapAnimationCandidate(const TPointerEvent& aPointerEvent) const;
   375     IMPORT_C TBool IsLongTapAnimationCandidate(const TPointerEvent& aPointerEvent) const;
   375     IMPORT_C void DoControlSpecificFeedback(const TBool& aFirstTap,
   376     IMPORT_C void  DoControlSpecificFeedback(const TBool& aFirstTap,
   376                                             const TBool& aTappedToChildRect, const TPointerEvent& aPointerEvent) const;
   377             const TBool& aTappedToChildRect,
   377     IMPORT_C void PostMouseEventL(const TPointerEvent& aPointerEvent);
   378             const TPointerEvent& aPointerEvent) const;
   378     IMPORT_C void EnableFocusHighlight(TBool aEnable);
   379     IMPORT_C void  PostMouseEventL(const TPointerEvent& aPointerEvent);
       
   380     IMPORT_C void  EnableFocusHighlight(TBool aEnable);
   379     IMPORT_C TRect VisibleRect(TBool aVisibleBounds = EFalse) const;
   381     IMPORT_C TRect VisibleRect(TBool aVisibleBounds = EFalse) const;
       
   382     IMPORT_C void  SetHighlight(TBool aEnabled);
       
   383     IMPORT_C TBool HasHighlight(TBool aIncludingParents = ETrue) const;
       
   384     IMPORT_C void  HandleHighlightChange();
       
   385     TInt Pressed() const
       
   386     {
       
   387         return iPressed;
       
   388     };
       
   389     IMPORT_C void PrepareForTraverse();
   380 
   390 
   381 protected:
   391 protected:
   382     MSwtDisplay& iDisplay;
   392     MSwtDisplay& iDisplay;
   383     const TSwtPeer iPeer;           // The Java peer object
   393     const TSwtPeer iPeer;           // The Java peer object
   384     MSwtComposite* const iParent;   // The parent control, not owned, may be NULL if we are a Shell
   394     MSwtComposite* const iParent;   // The parent control, not owned, may be NULL if we are a Shell
   399     // True if control changed its focus.
   409     // True if control changed its focus.
   400     // Currently used for advanced tactile feedback.
   410     // Currently used for advanced tactile feedback.
   401     TBool iFocusChanged;
   411     TBool iFocusChanged;
   402 
   412 
   403     /**
   413     /**
   404      * Used to implement visual pressed down feedback for some controls.
   414      * Control pressed by pointer.
   405      */
   415      */
   406     TBool iPressed;
   416     TInt iPressed;
       
   417 
       
   418     /**
       
   419      * If this is true, the control should draw a highlight
       
   420      * either because it is pressed or focused.
       
   421      */
       
   422     TBool iHighlightEnabled;
   407 };
   423 };
   408 
   424 
   409 
   425 
   410 inline const MSwtFont* ASwtControlBase::Font() const
   426 inline const MSwtFont* ASwtControlBase::Font() const
   411 {
   427 {