webengine/osswebengine/WebKit/s60/formcontrols/WebFormFillPopup.h
changeset 0 dd21522fd290
child 67 4917f9bf7995
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  WebFormFillPopup.cpp
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __WEBFORMFILLPOPUP_H__
       
    20 #define __WEBFORMFILLPOPUP_H__
       
    21 
       
    22 //  INCLUDES
       
    23 #include "FormFillPopup.h"
       
    24 #include <fepbase.h>
       
    25 #include <eikbctrl.h>
       
    26 #include <eiklbo.h>
       
    27 
       
    28 class WebView;
       
    29 class TBrCtlSelectOptionData;
       
    30 class PopupSelectListBox;
       
    31 class MFormFillCallback;
       
    32 
       
    33 namespace WebCore
       
    34 {
       
    35     class Frame;
       
    36 }
       
    37 
       
    38 class WebFormFillPopup : public MFormFillPopup,
       
    39                      public CEikBorderedControl,
       
    40                      public MEikListBoxObserver
       
    41 {
       
    42 public:
       
    43     static WebFormFillPopup* NewL(WebView* parent, CFont* font, MFormFillCallback* callback);
       
    44     virtual ~WebFormFillPopup();
       
    45 
       
    46     // from MFormFillPopup
       
    47     void addRow(const TPtrC&);
       
    48     void invalidate();
       
    49     void clear();
       
    50     void setLocationHintInDoc(const TRect& r, WebCore::Frame* frame);
       
    51 
       
    52     // from CEikBorderedControl
       
    53     TCoeInputCapabilities InputCapabilities() const;
       
    54     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
    55     TInt CountComponentControls() const;
       
    56     CCoeControl* ComponentControl( TInt aIndex )  const;
       
    57     void SizeChanged();
       
    58     void MakeVisible(TBool aVisible);
       
    59     void HandlePointerEventL(const TPointerEvent& aPointerEvent);
       
    60     TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
       
    61 
       
    62     // from MEikListBoxObserver
       
    63     void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
       
    64 
       
    65     // other methods
       
    66     void positionListBox();
       
    67 
       
    68     // called by webkitview when main view is updated
       
    69     void reDraw();
       
    70     void handleCommandL(int command);
       
    71 
       
    72 private:
       
    73     WebFormFillPopup(WebView* parent, CFont* font, MFormFillCallback* callback);
       
    74     void ConstructL(CFont* aFont);
       
    75     void ConstructListBoxL(CFont* aFont);
       
    76     void ClearData();
       
    77 
       
    78     PopupSelectListBox*         m_listBox;
       
    79     WebView*                    m_parent;
       
    80     RPointerArray<TBrCtlSelectOptionData>  m_data;
       
    81     TPoint                      m_pos;
       
    82     bool                        m_posChanged;
       
    83     int                         m_inputHeight;
       
    84     CFont*                      m_font;
       
    85     MFormFillCallback*          m_callback;
       
    86 };
       
    87 
       
    88 #endif // __WEBFORMFILLPOPUP_H__