LCOV - code coverage report
Current view: directory - layout/forms - nsIComboboxControlFrame.h (source / functions) Found Hit Coverage
Test: app.info Lines: 1 0 0.0 %
Date: 2012-06-02 Functions: 1 0 0.0 %

       1                 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2                 : /* ***** BEGIN LICENSE BLOCK *****
       3                 :  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
       4                 :  *
       5                 :  * The contents of this file are subject to the Mozilla Public License Version
       6                 :  * 1.1 (the "License"); you may not use this file except in compliance with
       7                 :  * the License. You may obtain a copy of the License at
       8                 :  * http://www.mozilla.org/MPL/
       9                 :  *
      10                 :  * Software distributed under the License is distributed on an "AS IS" basis,
      11                 :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12                 :  * for the specific language governing rights and limitations under the
      13                 :  * License.
      14                 :  *
      15                 :  * The Original Code is mozilla.org code.
      16                 :  *
      17                 :  * The Initial Developer of the Original Code is
      18                 :  * Netscape Communications Corporation.
      19                 :  * Portions created by the Initial Developer are Copyright (C) 1998
      20                 :  * the Initial Developer. All Rights Reserved.
      21                 :  *
      22                 :  * Contributor(s):
      23                 :  *
      24                 :  * Alternatively, the contents of this file may be used under the terms of
      25                 :  * either of the GNU General Public License Version 2 or later (the "GPL"),
      26                 :  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
      27                 :  * in which case the provisions of the GPL or the LGPL are applicable instead
      28                 :  * of those above. If you wish to allow use of your version of this file only
      29                 :  * under the terms of either the GPL or the LGPL, and not to allow others to
      30                 :  * use your version of this file under the terms of the MPL, indicate your
      31                 :  * decision by deleting the provisions above and replace them with the notice
      32                 :  * and other provisions required by the GPL or the LGPL. If you do not delete
      33                 :  * the provisions above, a recipient may use your version of this file under
      34                 :  * the terms of any one of the MPL, the GPL or the LGPL.
      35                 :  *
      36                 :  * ***** END LICENSE BLOCK ***** */
      37                 : 
      38                 : #ifndef nsIComboboxControlFrame_h___
      39                 : #define nsIComboboxControlFrame_h___
      40                 : 
      41                 : #include "nsQueryFrame.h"
      42                 : #include "nsFont.h"
      43                 : 
      44                 : class nsString;
      45                 : class nsIContent;
      46                 : class nsCSSFrameConstructor;
      47                 : 
      48                 : /** 
      49                 :   * nsIComboboxControlFrame is the common interface for frames of form controls. It
      50                 :   * provides a uniform way of creating widgets, resizing, and painting.
      51                 :   * @see nsLeafFrame and its base classes for more info
      52                 :   */
      53                 : class nsIComboboxControlFrame : public nsQueryFrame
      54               0 : {
      55                 : public:
      56                 :   NS_DECL_QUERYFRAME_TARGET(nsIComboboxControlFrame)
      57                 : 
      58                 :   /**
      59                 :    * Indicates whether the list is dropped down
      60                 :    */
      61                 :   virtual bool IsDroppedDown() = 0;
      62                 : 
      63                 :   /**
      64                 :    * Shows or hides the drop down
      65                 :    */
      66                 :   virtual void ShowDropDown(bool aDoDropDown) = 0;
      67                 : 
      68                 :   /**
      69                 :    * Gets the Drop Down List
      70                 :    */
      71                 :   virtual nsIFrame* GetDropDown() = 0;
      72                 : 
      73                 :   /**
      74                 :    * Sets the Drop Down List
      75                 :    */
      76                 :   virtual void SetDropDown(nsIFrame* aDropDownFrame) = 0;
      77                 : 
      78                 :   /**
      79                 :    * Tells the combobox to roll up
      80                 :    */
      81                 :   virtual void RollupFromList() = 0;
      82                 : 
      83                 :   /**
      84                 :    * Redisplay the selected text (will do nothing if text has not changed).
      85                 :    * This method might destroy this frame or any others that happen to be
      86                 :    * around.  It might even run script.
      87                 :    */
      88                 :   NS_IMETHOD RedisplaySelectedText() = 0;
      89                 : 
      90                 :   /**
      91                 :    * Method for the listbox to set and get the recent index
      92                 :    */
      93                 :   virtual PRInt32 UpdateRecentIndex(PRInt32 aIndex) = 0;
      94                 : 
      95                 :   /**
      96                 :    *
      97                 :    */
      98                 :   virtual void AbsolutelyPositionDropDown() = 0;
      99                 : 
     100                 :   /**
     101                 :    * Notification that the content has been reset
     102                 :    */
     103                 :   virtual void OnContentReset() = 0;
     104                 :   
     105                 :   /**
     106                 :    * This returns the index of the item that is currently being displayed
     107                 :    * in the display area. It may differ from what the currently Selected index
     108                 :    * is in in the dropdown.
     109                 :    *
     110                 :    * Detailed explanation: 
     111                 :    * When the dropdown is dropped down via a mouse click and the user moves the mouse 
     112                 :    * up and down without clicking, the currently selected item is being tracking inside 
     113                 :    * the dropdown, but the combobox is not being updated. When the user selects items
     114                 :    * with the arrow keys, the combobox is being updated. So when the user clicks outside
     115                 :    * the dropdown and it needs to roll up it has to decide whether to keep the current 
     116                 :    * selection or not. This method is used to get the current index in the combobox to
     117                 :    * compare it to the current index in the dropdown to see if the combox has been updated
     118                 :    * and that way it knows whether to "cancel" the current selection residing in the 
     119                 :    * dropdown. Or whether to leave the selection alone.
     120                 :    */
     121                 :   virtual PRInt32 GetIndexOfDisplayArea() = 0;
     122                 : };
     123                 : 
     124                 : #endif
     125                 : 

Generated by: LCOV version 1.7