/***************************************************************************
                            KStdAction.java -  description
                             -------------------
    begin                : Fri Mar 15 15:59:58 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar 15 15:59:58 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;

/**

 Convenience methods to access all standard KDE actions.

 These actions should be used instead of hardcoding menubar and
 toolbar items.  Using these actions helps your application easily
 conform to the KDE UI Style Guide

 All of the documentation for {@link KAction} holds for KStdAction
 also.  When in doubt on how things work, check the {@link KAction}
 documention first.

 In general, using standard actions should be a drop in replacement
 for regular actions.  For example, if you previously had:

 <PRE>
 static KAction newAct = new KAction(i18n("&New"), QIconSet(BarIcon("filenew")),
                               KStdAccel.key(KStdAccel.New), this,
                               SLOT("fileNew()"), actionCollection());
 </PRE>

 You could drop that and replace it with:

 <PRE>
 static KAction newAct = KStdAction.openNew(this, SLOT("fileNew()"),
                                       actionCollection());
 </PRE>

 It is possible to use the standard actions in various
 non-recommended ways.  Say, for instance, you wanted to have a
 standard action (with the associated correct text and icon and
 accelerator, etc) but you didn't want it to go in the standard
 place (this is not recommended, by the way).  One way to do this is
 to simply not use the XML UI framework and plug it into wherever
 you want.  If you do want to use the XML UI framework (good!), then
 it is still possible.

 Basically, the XML building code matches names in the XML code with
 the internal names of the actions.  You can find out the internal
 names of each of the standard actions by using the {@link stdName}
 action like so: {@link KStdAction#stdName} would return
 'edit_cut'.  The XML building code will match 'edit_cut' to the
 attribute in the global XML file and place your action there.

 However, you can change the internal name.  In this example, just
 do something like:

 <PRE>
 (void)KStdAction.cut(this, SLOT("editCut()"), actionCollection(), "my_cut");
 </PRE>

 Now, in your local XML resource file (e.g., yourappui.rc), simply
 put 'my_cut' where you want it to go.

 Another non-standard usage concerns getting a pointer to an
 existing action if, say, you want to enable or disable the action.
 You could do it the recommended way and just grab a pointer when
 you instantiate it as in the the 'openNew' example above... or you
 could do it the hard way:

 <pre>
 static KAction cut = actionCollection().action(KStdAction.stdName(KStdAction.Cut));
 </pre>

 Another non-standard usage concerns instantiating the action in the
 first place.  Usually, you would use the member functions as
 shown above (e.g., KStdAction.cut(this, SLOT, parent)).  You
 may, however, do this using the enums provided.  This author can't
 think of a reason why you would want to, but, hey, if you do,
 here's how:

 <pre>
 (void)KStdAction.action(KStdAction.New, this, SLOT("fileNew()"), actionCollection());
 (void)KStdAction.action(KStdAction.Cut, this, SLOT("editCut()"), actionCollection());
 </pre>

 @author Kurt Granroth <granroth@kde.org>
 
 @short 
 Convenience methods to access all standard KDE actions.
*/
public class  KStdAction implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;

	protected KStdAction(Class dummy){}


/** 
 Creates an action corresponding to the
 {@link KStdAction#StdAction} enum.
	 
*/
	public static native KAction create( int identifier, String name, QObject recvr, String slot, KActionCollection parent);
	public static native KAction create( int identifier, QObject recvr, String slot, KActionCollection parent);

/** 
 @obsolete. Creates an action corresponding to the
 {@link KStdAction#StdAction} enum.
	
*/
	public static native KAction action( int act_enum, QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction action( int act_enum, QObject recvr, String slot, KActionCollection parent);

/** 
 This will return the internal name of a given standard action.
	 
*/
	public static native String name( int identifier);
	public static native String stdName( int act_enum);

/** 
 Create a new document or window.
	 
*/
	public static native KAction openNew( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction openNew( QObject recvr, String slot, KActionCollection parent);

/** 
 Open an existing file.
	 
*/
	public static native KAction open( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction open( QObject recvr, String slot, KActionCollection parent);

/** 
 Open a recently used document.

*/
	public static native KRecentFilesAction openRecent( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KRecentFilesAction openRecent( QObject recvr, String slot, KActionCollection parent);

/** 
 Save the current document.
	 
*/
	public static native KAction save( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction save( QObject recvr, String slot, KActionCollection parent);

/** 
 Save the current document under a different name.
	
*/
	public static native KAction saveAs( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction saveAs( QObject recvr, String slot, KActionCollection parent);

/** 
 Revert the current document to the last saved version
 (essentially will undo all changes).
	
*/
	public static native KAction revert( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction revert( QObject recvr, String slot, KActionCollection parent);

/** 
 Close the current document.
	
*/
	public static native KAction close( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction close( QObject recvr, String slot, KActionCollection parent);

/** 
 Print the current document.
	
*/
	public static native KAction print( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction print( QObject recvr, String slot, KActionCollection parent);

/** 
 Show a print preview of the current document.
	
*/
	public static native KAction printPreview( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction printPreview( QObject recvr, String slot, KActionCollection parent);

/** 
 Mail this document.
	
*/
	public static native KAction mail( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction mail( QObject recvr, String slot, KActionCollection parent);

/** 
 Quit the program.
	
*/
	public static native KAction quit( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction quit( QObject recvr, String slot, KActionCollection parent);

/** 
 Undo the last operation.
	
*/
	public static native KAction undo( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction undo( QObject recvr, String slot, KActionCollection parent);

/** 
 Redo the last operation.
	
*/
	public static native KAction redo( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction redo( QObject recvr, String slot, KActionCollection parent);

/** 
 Cut selected area and store it in the clipboard.
	
*/
	public static native KAction cut( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction cut( QObject recvr, String slot, KActionCollection parent);

/** 
 Copy the selected area into the clipboard.
	
*/
	public static native KAction copy( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction copy( QObject recvr, String slot, KActionCollection parent);

/** 
 Paste the contents of clipboard at the current mouse or cursor
 position.
	
*/
	public static native KAction paste( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction paste( QObject recvr, String slot, KActionCollection parent);

/** 
 Select all elements in the current document.
	
*/
	public static native KAction selectAll( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction selectAll( QObject recvr, String slot, KActionCollection parent);

/** 
 Deselect any selected elements in the current document.
	
*/
	public static native KAction deselect( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction deselect( QObject recvr, String slot, KActionCollection parent);

/** 
 Initiate a 'find' request in the current document.
	
*/
	public static native KAction find( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction find( QObject recvr, String slot, KActionCollection parent);

/** 
 Find the next instance of a stored 'find'.
	
*/
	public static native KAction findNext( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction findNext( QObject recvr, String slot, KActionCollection parent);

/** 
 Find a previous instance of a stored 'find'.
	
*/
	public static native KAction findPrev( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction findPrev( QObject recvr, String slot, KActionCollection parent);

/** 
 Find and replace matches.
	
*/
	public static native KAction replace( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction replace( QObject recvr, String slot, KActionCollection parent);

/** 
 View the document at its actual size.
	
*/
	public static native KAction actualSize( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction actualSize( QObject recvr, String slot, KActionCollection parent);

/** 
 Fit the document view to the size of the current window.
	
*/
	public static native KAction fitToPage( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction fitToPage( QObject recvr, String slot, KActionCollection parent);

/** 
 Fit the document view to the width of the current window.
	
*/
	public static native KAction fitToWidth( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction fitToWidth( QObject recvr, String slot, KActionCollection parent);

/** 
 Fit the document view to the height of the current window.
	
*/
	public static native KAction fitToHeight( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction fitToHeight( QObject recvr, String slot, KActionCollection parent);

/** 
 Zoom in.
	
*/
	public static native KAction zoomIn( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction zoomIn( QObject recvr, String slot, KActionCollection parent);

/** 
 Zoom out.
	
*/
	public static native KAction zoomOut( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction zoomOut( QObject recvr, String slot, KActionCollection parent);

/** 
 Popup a zoom dialog.
	
*/
	public static native KAction zoom( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction zoom( QObject recvr, String slot, KActionCollection parent);

/** 
 Redisplay or redraw the document.
	
*/
	public static native KAction redisplay( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction redisplay( QObject recvr, String slot, KActionCollection parent);

/** 
 Move up (web style menu).
	
*/
	public static native KAction up( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction up( QObject recvr, String slot, KActionCollection parent);

/** 
 Move back (web style menu).
	
*/
	public static native KAction back( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction back( QObject recvr, String slot, KActionCollection parent);

/** 
 Move forward (web style menu).
	
*/
	public static native KAction forward( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction forward( QObject recvr, String slot, KActionCollection parent);

/** 
 Go to the "Home" position or document.
	
*/
	public static native KAction home( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction home( QObject recvr, String slot, KActionCollection parent);

/** 
 Scroll up one page.
	
*/
	public static native KAction prior( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction prior( QObject recvr, String slot, KActionCollection parent);

/** 
 Scroll down one page.
	
*/
	public static native KAction next( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction next( QObject recvr, String slot, KActionCollection parent);

/** 
 Go to somewhere in general.
	
*/
	public static native KAction goTo( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction goTo( QObject recvr, String slot, KActionCollection parent);

/** 
 Go to a specific page (dialog).
	
*/
	public static native KAction gotoPage( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction gotoPage( QObject recvr, String slot, KActionCollection parent);

/** 
 Go to a specific line (dialog).
	
*/
	public static native KAction gotoLine( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction gotoLine( QObject recvr, String slot, KActionCollection parent);

/** 
 Jump to the first page.
	
*/
	public static native KAction firstPage( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction firstPage( QObject recvr, String slot, KActionCollection parent);

/** 
 Jump to the last page.
	
*/
	public static native KAction lastPage( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction lastPage( QObject recvr, String slot, KActionCollection parent);

/** 
 Add the current page to the bookmarks tree.
	
*/
	public static native KAction addBookmark( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction addBookmark( QObject recvr, String slot, KActionCollection parent);

/** 
 Edit the application bookmarks.
	
*/
	public static native KAction editBookmarks( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction editBookmarks( QObject recvr, String slot, KActionCollection parent);

/** 
 Pop up the spell checker.
	
*/
	public static native KAction spelling( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction spelling( QObject recvr, String slot, KActionCollection parent);

/** 
 Show/Hide the menubar.
	
*/
	public static native KToggleAction showMenubar( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KToggleAction showMenubar( QObject recvr, String slot, KActionCollection parent);

/** 
 Show/Hide the primary toolbar.
	
*/
	public static native KToggleAction showToolbar( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KToggleAction showToolbar( QObject recvr, String slot, KActionCollection parent);

/** 
 Show/Hide the statusbar.
	
*/
	public static native KToggleAction showStatusbar( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KToggleAction showStatusbar( QObject recvr, String slot, KActionCollection parent);

/** 
 Display the save options dialog.
	
*/
	public static native KAction saveOptions( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction saveOptions( QObject recvr, String slot, KActionCollection parent);

/** 
 Display the configure key bindings dialog.
	
*/
	public static native KAction keyBindings( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction keyBindings( QObject recvr, String slot, KActionCollection parent);

/** 
 Display the preferences/options dialog.
	
*/
	public static native KAction preferences( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction preferences( QObject recvr, String slot, KActionCollection parent);

/** 
 The Customize Toolbar dialog.
	
*/
	public static native KAction configureToolbars( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction configureToolbars( QObject recvr, String slot, KActionCollection parent);

/** 
 Display the help.
	
*/
	public static native KAction help( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction help( QObject recvr, String slot, KActionCollection parent);

/** 
 Display the help contents.
	
*/
	public static native KAction helpContents( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction helpContents( QObject recvr, String slot, KActionCollection parent);

/** 
 Trigger the What's This cursor.
	
*/
	public static native KAction whatsThis( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction whatsThis( QObject recvr, String slot, KActionCollection parent);

/** 
 Open up the Report Bug dialog.
	
*/
	public static native KAction reportBug( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction reportBug( QObject recvr, String slot, KActionCollection parent);

/** 
 Display the application's About box.
	
*/
	public static native KAction aboutApp( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction aboutApp( QObject recvr, String slot, KActionCollection parent);

/** 
 Display the About KDE dialog.
	
*/
	public static native KAction aboutKDE( QObject recvr, String slot, KActionCollection parent, String name);
	public static native KAction aboutKDE( QObject recvr, String slot, KActionCollection parent);
	public static final int ActionNone = 0;
	public static final int New = 1;
	public static final int Open = 2;
	public static final int OpenRecent = 3;
	public static final int Save = 4;
	public static final int SaveAs = 5;
	public static final int Revert = 6;
	public static final int Close = 7;
	public static final int Print = 8;
	public static final int PrintPreview = 9;
	public static final int Mail = 10;
	public static final int Quit = 11;
	public static final int Undo = 12;
	public static final int Redo = 13;
	public static final int Cut = 14;
	public static final int Copy = 15;
	public static final int Paste = 16;
	public static final int SelectAll = 17;
	public static final int Deselect = 18;
	public static final int Find = 19;
	public static final int FindNext = 20;
	public static final int FindPrev = 21;
	public static final int Replace = 22;
	public static final int ActualSize = 23;
	public static final int FitToPage = 24;
	public static final int FitToWidth = 25;
	public static final int FitToHeight = 26;
	public static final int ZoomIn = 27;
	public static final int ZoomOut = 28;
	public static final int Zoom = 29;
	public static final int Redisplay = 30;
	public static final int Up = 31;
	public static final int Back = 32;
	public static final int Forward = 33;
	public static final int Home = 34;
	public static final int Prior = 35;
	public static final int Next = 36;
	public static final int Goto = 37;
	public static final int GotoPage = 38;
	public static final int GotoLine = 39;
	public static final int FirstPage = 40;
	public static final int LastPage = 41;
	public static final int AddBookmark = 42;
	public static final int EditBookmarks = 43;
	public static final int Spelling = 44;
	public static final int ShowMenubar = 45;
	public static final int ShowToolbar = 46;
	public static final int ShowStatusbar = 47;
	public static final int SaveOptions = 48;
	public static final int KeyBindings = 49;
	public static final int Preferences = 50;
	public static final int ConfigureToolbars = 51;
	public static final int Help = 52;
	public static final int HelpContents = 53;
	public static final int WhatsThis = 54;
	public static final int ReportBug = 55;
	public static final int AboutApp = 56;
	public static final int AboutKDE = 57;
}
