/***************************************************************************
                            KToggleAction.java -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program 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; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.koala;

import org.kde.qt.*;
import java.util.*;
import java.lang.Error;

/**

  Checkbox like action.

  This action provides two states: checked or not.

 See {@link KToggleActionSignals} for signals emitted by KToggleAction.

 See {@link KToggleActionEventHandling} for event handlers to override in subclasses of KToggleAction.

 @short Checkbox like action.
 
*/
public class KToggleAction extends KAction  {
	protected KToggleAction(Class dummy){super((Class) null);}

	private native void newKToggleAction( String text, KShortcut cut, QObject parent, String name);

/** 
 Constructs a toggle action with text and potential keyboard
 accelerator but nothing else. Use this only if you really
 know what you are doing.

*/
	public KToggleAction( String text, KShortcut cut, QObject parent, String name) {
		super((Class) null);
		newKToggleAction( text, cut, parent, name);
	}
	private native void newKToggleAction( String text);
	public KToggleAction( String text) {
		super((Class) null);
		newKToggleAction( text);
	}
	private native void newKToggleAction( String text, KShortcut cut, QObject receiver, String slot, QObject parent, String name);

/** 

*/
	public KToggleAction( String text, KShortcut cut, QObject receiver, String slot, QObject parent, String name) {
		super((Class) null);
		newKToggleAction( text, cut, receiver, slot, parent, name);
	}
	private native void newKToggleAction( String text, KShortcut cut, QObject receiver, String slot, QObject parent);
	public KToggleAction( String text, KShortcut cut, QObject receiver, String slot, QObject parent) {
		super((Class) null);
		newKToggleAction( text, cut, receiver, slot, parent);
	}
	private native void newKToggleAction( String text, QIconSet pix, KShortcut cut, QObject parent, String name);

/** 

*/
	public KToggleAction( String text, QIconSet pix, KShortcut cut, QObject parent, String name) {
		super((Class) null);
		newKToggleAction( text, pix, cut, parent, name);
	}
	private native void newKToggleAction( String text, QIconSet pix);
	public KToggleAction( String text, QIconSet pix) {
		super((Class) null);
		newKToggleAction( text, pix);
	}
	private native void newKToggleAction( String text, String pix, KShortcut cut, QObject parent, String name);

/** 

*/
	public KToggleAction( String text, String pix, KShortcut cut, QObject parent, String name) {
		super((Class) null);
		newKToggleAction( text, pix, cut, parent, name);
	}
	private native void newKToggleAction( String text, String pix);
	public KToggleAction( String text, String pix) {
		super((Class) null);
		newKToggleAction( text, pix);
	}
	private native void newKToggleAction( String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name);

/** 

*/
	public KToggleAction( String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name) {
		super((Class) null);
		newKToggleAction( text, pix, cut, receiver, slot, parent, name);
	}
	private native void newKToggleAction( String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent);
	public KToggleAction( String text, QIconSet pix, KShortcut cut, QObject receiver, String slot, QObject parent) {
		super((Class) null);
		newKToggleAction( text, pix, cut, receiver, slot, parent);
	}
	private native void newKToggleAction( String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name);

/** 

*/
	public KToggleAction( String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent, String name) {
		super((Class) null);
		newKToggleAction( text, pix, cut, receiver, slot, parent, name);
	}
	private native void newKToggleAction( String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent);
	public KToggleAction( String text, String pix, KShortcut cut, QObject receiver, String slot, QObject parent) {
		super((Class) null);
		newKToggleAction( text, pix, cut, receiver, slot, parent);
	}
	private native void newKToggleAction( QObject parent, String name);

/** 

*/
	public KToggleAction( QObject parent, String name) {
		super((Class) null);
		newKToggleAction( parent, name);
	}
	private native void newKToggleAction();
	public KToggleAction() {
		super((Class) null);
		newKToggleAction();
	}

/** 
 Destructor
     
*/
	protected native void finalize() throws InternalError;
	public native void dispose();
	public native boolean isDisposed();

/** 
  "Plug" or insert this action into a given widget.

  This will typically be a menu or a toolbar.  From this point
  on, you will never need to directly manipulate the item in the
  menu or toolbar.  You do all enabling/disabling/manipulation
  directly with your KToggleAction object.

*/
	public native int plug( QWidget arg1, int index);
	public native int plug( QWidget arg1);

/** 
  Returns the actual state of the action.
     
*/
	public native boolean isChecked();

/** 

*/
	public native String exclusiveGroup();

/** 
 Defines which "exclusive group" this action is part of.
 In a given exclusive group, only one toggle action can be checked
 at a any moment. Checking an action unchecks the other actions
 of the group.
     
*/
	public native void setExclusiveGroup( String name);

/** 
  Setss the state of the action.
     
*/
	public native void setChecked( boolean arg1);
	protected native void setChecked( int identifier, boolean checked);
	protected native void slotActivated();
}
