/* Network-Integrated Multimedia Middleware (NMM)
 * http://www.motama.com/nmm.html
 *
 * Copyright (C) 2006-2007
 * Motama GmbH, Saarbruecken, Germany
 * http://www.motama.com
 *
 * This file is part of NMM. 
 * 
 * NMM is free software; you can redistribute it and/or modify it    
 * under the terms of the GNU General Public License as published by 
 * the Free Software Foundation; only version 2 of the License.      
 * 
 * NMM is distributed in the hope that it will be useful, but WITHOUT 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 
 * License for more details.  
 * 
 * You should have received a copy of the GNU General Public License 
 * along with NMM; if not, write to the Free Software Foundation,    
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */

#include "IScrollable.idl"

module NMM {
  
  /**
   * Widget interface.
   * Interface for controlling widgets in an OSDManager.
   * The widgets are identified by integers. To get an interface, use the IOSDManager interface.
   */
  interface IWidget : IScrollable {
    
    /** Selects next button (adds 1 to buttonid). */
    void selectRight();
    
    /** Selects privious button (subs 1 to buttonid). */
    void selectLeft();
    
    /** Selects button (in privoius line, subs step to buttonid). */
    void selectUp();
    
    /** Selects button (in next line, adds step to buttonid). */
    void selectDown();
    
    /** Activates the selected button. */
    void selectPush();
    
    /** Get widget ID. */
    nmm_int32 getWidgetID() const;
    
    /**
     * Set x and y position of the widget in the window.
     * @param x x position
     * @param y x position
     */
    void setPosition( in nmm_uint32 x, in nmm_uint32 y );
    
    /**
     * Set width and height of the widget.
     * @param w width
     * @param h height
     */
    void setDimension( in nmm_uint32 w, in nmm_uint32 h );
    
    /**
     * Get x and y position of the widget.
     * @param x x position
     * @param y x position
     */
    void getPosition( out nmm_uint32 x, out nmm_uint32 y ) const;
    
    /**
     * Get width and height of the widget.
     * @param w width
     * @param h height
     */
    void getDimension( out nmm_uint32 w, out nmm_uint32 h ) const;
  };
}
