AeBinView.c++ 3.74 KB

/////////////////////////////////////////////////////////////
//
// Source file for AeBinView
//
//    This file is generated by RapidApp 1.1
//
/////////////////////////////////////////////////////////////

#include <Vk/VkEZ.h>
#include <Xm/Form.h> 
#include <Xm/ScrollBar.h> 
#include <Xm/TextF.h> 
#include <Vk/VkResource.h>
#include <Vk/VkWindow.h>
#include <Vk/VkMenuBar.h>
#include <Vk/VkSubMenu.h>
#include <assert.h>
#include <stdio.h>

#include "AeBinView.h"


extern void VkUnimplemented(Widget, const char *);


String  AeBinView::_defaultResources[] = {
        (char*)NULL
};




AeBinView::AeBinView (const char *name, AeBinEditor * editor, Widget parent)
    : VkComponent (name) 
{ 
    // store a reference to the view's editor
    fEditor = editor;
    
    setDefaultResources (parent, _defaultResources);


    // Create an unmanaged widget as the top of the widget hierarchy
    _baseWidget = fView = XtVaCreateWidget (_name,
                                            xmFormWidgetClass,
                                            parent, 
                                            XmNresizePolicy, XmRESIZE_GROW, 
                                            (XtPointer) NULL ); 

    // install a callback to guard against unexpected widget destruction
    installDestroyHandler();


    // Create widgets used in this component
    TabCreate ();
    ListCreate ();
    PopupCreate ();
}



AeBinView::~AeBinView()
{
    // The base class destructors are responsible for
    // destroying all widgets and objects used in this component.
    // Only additional items created directly in this class
    // need to be freed here.
}


const char * AeBinView::className() // classname
{
    return ("AeBinView");

} // End className()


void AeBinView::setParent( VkWindow  * parent )
{
    fParent = parent;
}


void AeBinView::setTitle (char * title)
{
    assert (title);
    fParent->setTitle (title);
}



#ifdef RAPID_APP
//////////////////////////////////////////////////////////////////
// C-callable creation function, for importing class into rapidapp
///////////////////////////////////////////////////////////////////


extern "C" VkComponent * CreateForm( const char *name, Widget parent ) 
{  
    VkComponent *obj =  new AeBinForm ( name, NULL, parent );
    obj->show();

    return ( obj );
} // End CreateForm


///////////////////////////////////////////////////////////////////
// Function for importing this class into rapidapp
// This function is only used by RapidApp.
///////////////////////////////////////////////////////////////////


typedef void (AeBinForm::*Method) (void);
struct FunctionMap {
  char  *resource;  Method method;  char  *code;
  char  *type;
};


extern "C" void* RegisterFormInterface()
{ 
    // This structure registers information about this class
    // that allows RapidApp to create and manipulate an instance.
    // Each entry provides a resource name that will appear in the
    // resource manager palette when an instance of this class is
    // selected, the relative address of the member function that
    // should be invoked when the resource is set, the name of the
    // member function as a string, and the type of the single 
    // argument to this function. All functions must have the form
    //  
    //  void memberFunction(Type);
    //
    // where "Type" is one of const char *, Boolean, or int. Use
    // XmRString, XmRBoolean, or XmRInt to describe the argument type


    static FunctionMap map[] = {
    //---- Start editable code block: AeBinFormUI resource table

      // { "resourceName", (Method) &AeBinForm::setAttribute, "setAttribute", XmRString},
    //---- End editable code block: AeBinFormUI resource table
      { NULL }, // MUST be NULL terminated
    };

    return map;
} // End RegisterFormInterface()
#endif