AeAssetWindow.h 3.77 KB

//////////////////////////////////////////////////////////////
//
// Header file for AeAssetWindow
//
//    This class is a ViewKit VkWindow subclass
//
// Normally, very little in this file should need to be changed.
// Create/add/modify menus using the builder.
//
// Restrict changes to those sections between
// the "//--- Start/End editable code block" markers
// Doing so will allow you to make chnages using the builder
// without losing any changes you may have made manually
//
//////////////////////////////////////////////////////////////
#ifndef AEASSETWINDOW_H
#define AEASSETWINDOW_H
#include <Vk/VkWindow.h>

class VkMenuItem;
class VkMenuToggle;
class VkMenuConfirmFirstAction;
class VkSubMenu;
class VkRadioSubMenu;

class AeBinView;
class AeAssetEditor;


class AeAssetWindow: public VkWindow { 

  public:

                        AeAssetWindow (const char * name, 
				       AeAssetEditor * editor,
				       ArgList args = NULL,
				       Cardinal argCount = 0 );
                        ~AeAssetWindow();

    const char *	className();
    virtual Boolean	okToQuit();

    AeBinView *		GetView (void) { return fView; }
    AeAssetEditor *	GetEditor (void) { return fEditor; }


  protected:

    // Classes created by this class

    AeBinView *		fView;
    AeAssetEditor *	fEditor;

    // Menu items created by this class

    VkSubMenu  *	_filePane;
    VkMenuItem *	_openButton;
    VkMenuItem *	_closeButton;
    VkMenuItem *	_saveButton;
    VkMenuItem *	_saveasButton;
    VkMenuItem *	_exitButton;

    VkSubMenu  *	_editPane;
    VkMenuItem *	_undoButton1;
    VkMenuItem *	_cutButton;
    VkMenuItem *	_copyButton;
    VkMenuItem *	_pasteButton;

    VkSubMenu  *	_assetPane;
    VkMenuItem *	_insertButton;
    VkMenuItem *	_deleteButton;
    VkMenuItem *	_insertChildButton;
    VkMenuItem *	_removeChildButton;
    VkMenuItem *	_importButton;

    VkSubMenu  *	_selectPane;
    VkMenuItem *	_parentsButton;
    VkMenuItem *	_orphansButton;

    // Menu Operations

    virtual void close ( Widget, XtPointer );
    virtual void openFile ( Widget, XtPointer );
    virtual void quit ( Widget, XtPointer );
    virtual void save ( Widget, XtPointer );
    virtual void saveas ( Widget, XtPointer );

    virtual void copy ( Widget, XtPointer );
    virtual void cut ( Widget, XtPointer );
    virtual void paste ( Widget, XtPointer );

    virtual void insertAsset ( Widget, XtPointer );
    virtual void deleteAsset ( Widget, XtPointer );
    virtual void insertChild ( Widget, XtPointer );
    virtual void removeChild ( Widget, XtPointer );
    virtual void importAsset ( Widget, XtPointer );

    virtual void selectOrphans ( Widget, XtPointer );
    virtual void selectParents ( Widget, XtPointer );

  private:


    // Callbacks to interface with Motif

    static void openFileCallback ( Widget, XtPointer, XtPointer );
    static void quitCallback ( Widget, XtPointer, XtPointer );
    static void saveCallback ( Widget, XtPointer, XtPointer );
    static void saveasCallback ( Widget, XtPointer, XtPointer );
    static void closeCallback ( Widget, XtPointer, XtPointer );

    static void copyCallback ( Widget, XtPointer, XtPointer );
    static void cutCallback ( Widget, XtPointer, XtPointer );
    static void pasteCallback ( Widget, XtPointer, XtPointer );

    static void insertAssetCallback ( Widget, XtPointer, XtPointer );
    static void deleteAssetCallback ( Widget, XtPointer, XtPointer );
    static void insertChildCallback ( Widget, XtPointer, XtPointer );
    static void removeChildCallback ( Widget, XtPointer, XtPointer );
    static void importAssetCallback ( Widget, XtPointer, XtPointer );

    static void selectOrphansCallback ( Widget, XtPointer, XtPointer );
    static void selectParentsCallback ( Widget, XtPointer, XtPointer );

    static String      _defaultResources[];
};
#endif