layout/forms/nsIListControlFrame.h

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsIListControlFrame_h___
     7 #define nsIListControlFrame_h___
     9 #include "nsQueryFrame.h"
    11 class nsAString;
    13 namespace mozilla {
    14 namespace dom {
    15 class HTMLOptionElement;
    16 } // namespace dom
    17 } // namespace mozilla
    19 /** 
    20   * nsIListControlFrame is the interface for frame-based listboxes.
    21   */
    22 class nsIListControlFrame : public nsQueryFrame
    23 {
    24 public:
    25   NS_DECL_QUERYFRAME_TARGET(nsIListControlFrame)
    27   /**
    28    * Sets the ComboBoxFrame
    29    *
    30    */
    31   virtual void SetComboboxFrame(nsIFrame* aComboboxFrame) = 0;
    33   /**
    34    * Get the display string for an item
    35    */
    36   virtual void GetOptionText(uint32_t aIndex, nsAString& aStr) = 0;
    38   /**
    39    * Get the Selected Item's index
    40    *
    41    */
    42   virtual int32_t GetSelectedIndex() = 0;
    44   /**
    45    * Return current option. The current option is the option displaying
    46    * the focus ring when the listbox is focused.
    47    */
    48   virtual mozilla::dom::HTMLOptionElement* GetCurrentOption() = 0;
    50   /**
    51    * Initiates mouse capture for the listbox
    52    *
    53    */
    54   virtual void CaptureMouseEvents(bool aGrabMouseEvents) = 0;
    56   /**
    57    * Returns the height of a single row in the list.  This is the
    58    * maximum of the heights of all the options/optgroups.
    59    */
    60   virtual nscoord GetHeightOfARow() = 0;
    62   /**
    63    * Returns the number of options in the listbox
    64    */
    66   virtual uint32_t GetNumberOfOptions() = 0;
    68   /**
    69    * Called by combobox when it's about to drop down
    70    */
    71   virtual void AboutToDropDown() = 0;
    73   /**
    74    * Called by combobox when it's about to roll up
    75    */
    76   virtual void AboutToRollup() = 0;
    78   /**
    79    * Fire on change (used by combobox)
    80    */
    81   virtual void FireOnChange() = 0;
    83   /**
    84    * Tell the selected list to roll up and ensure that the proper index is
    85    * selected, possibly firing onChange if the index has changed
    86    *
    87    * @param aIndex the index to actually select
    88    */
    89   virtual void ComboboxFinish(int32_t aIndex) = 0;
    91   /**
    92    * Notification that the content has been reset
    93    */
    94   virtual void OnContentReset() = 0;
    95 };
    97 #endif

mercurial