The simplified IE library


Library: /IE library (simple)/IE.a



Overview

One should not call this a library since it consists of a single class: IEWindow. The simple library shows you a way how to instantiate archived windows from the resource file. You can use this library only if you don't need the variable handling capabilities of views. If you do, have a look at the somewhat more complex IE library.

IEWindow can instantiate windows from the application executable file, or from a BResource if you provide one.
It can handle a window list of child windows, which it closes in the Quit method.



Constructor and Destructor


IEWindow()

   IEWindow(char *windowname, BResources *from_resources=NULL);
Calls the BWindow constructor with the window archive. The constructor calls FindWindowResource to find the window by name in the resources.
If from_resources is NULL the resources of the application executable will be used.



~IEWindow()

    virtual ~IEWindow(void);
Deletes the window dependancy list.



Member Functions


AddDependantWindow()

      void AddDependantWindow(BWindow *window);

You can add a window to the dependancy list. The window will be closed when this window is closed in the Quit method.


FindWindowResource()

      BMessage *FindWindowResource(char *windowname, BResources *from_resources=NULL);

FindWindowResource tries to locate a resource called windowname of type B_ARCHIVED_OBJECT in from_resources or in the application executable if from_resources is NULL.

If the window is not found, FindWindowResource will return a default window archive with the error in the window title. (This method cannot return NULL because the BWindow constructor is called with the return value.) Such an error can happen only during application development.


Quit()

      virtual	void Quit(void);

Closes the windows in the dependancy list. The list items are BMessengers, whose validity is checked before locking and quitting the child windows.