/* 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 "IImageView.idl"

module NMM {
  
  /**
   * Buttons widget interface.
   */
  interface IButtons : IImageView {
    
    /**
     * Add button.
     * @param id identifier for this button
     * @param label button label
     * @param x x position of the upper left corner of the button
     * @param y y position of the upper left corner
     * @param inactive_id bitmap identifier for using if inactive button should be drawn
     * @param active_id bitmap identifier for using if active button should be drawn
     * @param select_id bitmap identifier for using if selected button should be drawn
     */
    void addButton( in nmm_int32 buttonid, in string label, in nmm_int32 x, in nmm_int32 y,
                    in string inactive_id, in string active_id, in string select_id );
    
    /**
     * Get label of a button.
     * @param button_id button identifier
     * @return label of the button with button_id
     */
    string getButtonLabel( in nmm_int32 button_id );

    /**
     * Get label of selected button.
     * @return label of the selected button
     */
    string getSelectedButtonLabel();
    
    /**
     * Get burron state.
     * @param button_id button identifier
     * @return true, if button is active, false otherwise
     */
    nmm_bool getButtonState( in nmm_int32 button_id );

    /**
     * Delete button.
     * @param button_id button identifier
     */
    void deleteButton( in nmm_int32 button_id );
    
    /** Delete all buttons. */
    void deleteAllButtons();
    
    /**
     * Selects the given button.
     * @param buttonid id of button that should be selected
     * @return id of selected button
     */
    nmm_int32 selectButton( in nmm_int32 buttonid );
    
    /**
     * Set number of buttons per line.
     * Set number of buttons to get into next line (important for selectUp() and selectDown() calls).
     * @param value number of buttons to skip
     */
    void setStep( in nmm_uint32 value );
    
    /** Deselect selected button. */
    void deselectButton();
    
    /**
     * Activate a button.
     * @param button_id button identifier
     */
    void activateButton( in nmm_int32 button_id );
    
    /**
     * Deactivate a button.
     * @param button_id button identifier
     */
    void deactivateButton( in nmm_int32 button_id );
    
    /**
     * Deactivate all buttons.
     */
    void deactivateAllButtons();
  };
}
