1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/forms/nsISelectControlFrame.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsISelectControlFrame_h___ 1.10 +#define nsISelectControlFrame_h___ 1.11 + 1.12 +#include "nsQueryFrame.h" 1.13 + 1.14 +/** 1.15 + * nsISelectControlFrame is the interface for combo boxes and listboxes 1.16 + */ 1.17 +class nsISelectControlFrame : public nsQueryFrame 1.18 +{ 1.19 +public: 1.20 + NS_DECL_QUERYFRAME_TARGET(nsISelectControlFrame) 1.21 + 1.22 + /** 1.23 + * Adds an option to the list at index 1.24 + */ 1.25 + 1.26 + NS_IMETHOD AddOption(int32_t index) = 0; 1.27 + 1.28 + /** 1.29 + * Removes the option at index. The caller must have a live script 1.30 + * blocker while calling this method. 1.31 + */ 1.32 + NS_IMETHOD RemoveOption(int32_t index) = 0; 1.33 + 1.34 + /** 1.35 + * Sets whether the parser is done adding children 1.36 + * @param aIsDone whether the parser is done adding children 1.37 + */ 1.38 + NS_IMETHOD DoneAddingChildren(bool aIsDone) = 0; 1.39 + 1.40 + /** 1.41 + * Notify the frame when an option is selected 1.42 + */ 1.43 + NS_IMETHOD OnOptionSelected(int32_t aIndex, bool aSelected) = 0; 1.44 + 1.45 + /** 1.46 + * Notify the frame when selectedIndex was changed. This might 1.47 + * destroy the frame. 1.48 + */ 1.49 + NS_IMETHOD OnSetSelectedIndex(int32_t aOldIndex, int32_t aNewIndex) = 0; 1.50 + 1.51 +}; 1.52 + 1.53 +#endif