Dany Thinnes
9b77a59866
* Fehler aus Video 0.3-1 behoben * Menü "Projekt" hinzugefügt * ASL Requester implementiert * Funktion zu Menüpunkt "Neu" implementiert * Funktion zu Menüpunkt "Laden ..." implementiert * Funktion zu Menüpunkt "Speichern" implementiert * Funktion zu Menüpunkt "Speichern als ..." implementiert * Funktion zu Menüpunkt "Beenden" implementiert Planung für Version 0.4 - Titel dem Dateinamen anpasst - Bei Änderung "*" hinter den Dateinamen - Menüpunkt für Zeilennummer einfügen
54 lines
1.1 KiB
C
54 lines
1.1 KiB
C
static const char *version = "$VER: phED Version 0.3";
|
|
|
|
enum
|
|
{
|
|
GID_TEXTEDITOR = 0,
|
|
GID_LAST
|
|
};
|
|
|
|
struct phED
|
|
{
|
|
char dateiname[256];
|
|
} phed;
|
|
|
|
struct Library *WindowBase = NULL,
|
|
*LayoutBase = NULL,
|
|
*RequesterBase = NULL,
|
|
*AslBase = NULL,
|
|
*TextFieldBase = NULL;
|
|
|
|
void closeLibraries()
|
|
{
|
|
if(WindowBase) CloseLibrary((struct Library *) WindowBase);
|
|
if(TextFieldBase) CloseLibrary((struct Library *) TextFieldBase);
|
|
if(LayoutBase) CloseLibrary((struct Library *) LayoutBase);
|
|
if(RequesterBase) CloseLibrary((struct Library *) RequesterBase);
|
|
if(AslBase) CloseLibrary((struct Library *) AslBase);
|
|
}
|
|
|
|
|
|
BOOL openLibraries()
|
|
{
|
|
BOOL ret = FALSE;
|
|
|
|
if(WindowBase = (struct Library *) OpenLibrary("window.class", 0L))
|
|
{
|
|
if(TextFieldBase = (struct Library *) OpenLibrary("gadgets/texteditor.gadget", 0L))
|
|
{
|
|
if(LayoutBase = (struct Library *) OpenLibrary("gadgets/layout.gadget", 0L))
|
|
{
|
|
if(RequesterBase = (struct Library *) OpenLibrary("requester.class", 0L))
|
|
{
|
|
if(AslBase = (struct Library *) OpenLibrary("asl.library", 0L))
|
|
{
|
|
ret = TRUE;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if(!ret) closeLibraries();
|
|
|
|
return ret;
|
|
}
|