From 62e509e9c90d728c9f65145947276f79112ab48c Mon Sep 17 00:00:00 2001 From: "Christian A. Weber" Date: Tue, 2 Nov 1993 18:53:33 +0000 Subject: Initial revision --- Stubs.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 Stubs.c (limited to 'Stubs.c') diff --git a/Stubs.c b/Stubs.c new file mode 100644 index 0000000..fab0209 --- /dev/null +++ b/Stubs.c @@ -0,0 +1,93 @@ +#include +#include +#include + +#include "Bobi.h" + +extern struct NewWindow ToolNW; +extern struct Screen *mainscreen; +extern struct Window *mainwindow,*toolwindow; +extern struct RastPort *toolrastport; +extern WORD mainpalette[]; +extern struct MenuItem ToolWindowMenuItem; + +/*************************************************************************/ + +void ClearAllFunc() +{ + if(ShowRequest2("Do you really want to\ndelete all bobs?","OF COURSE!")) + ClearAll(); +} + +/*************************************************************************/ + +void QuitFunc() +{ + if(ShowRequest2("Do you really want to quit ?","JAJA!")) + Cleanup(TRUE); + else ShowMonoReq2("Da hast du nochmals Glück gehabt!"); +} + +/*************************************************************************/ + +void GrabDPaintFunc() +{ + ShowMonoReq2("Can't find the DPaint screen :-)"); +} + +/*************************************************************************/ + +void GrabScreenFunc() +{ + ShowMonoReq2("Sorry, this function will\nnever be implemented!"); +} + +/*************************************************************************/ + +void SaveIFFAnimFunc() +{ + ShowMonoReq2("Sorry, this function is not\nyet implemented!"); +} + +/*************************************************************************/ + +void EditPaletteFunc() +{ + Snooze(mainwindow); /* nicht LockWindows() wegen Farbpalette! */ + if(toolwindow) Snooze(toolwindow); + CopyMem(RequestColor(mainscreen),mainpalette,2*32); + if(toolwindow) UnSnooze(toolwindow); + UnSnooze(mainwindow); +} + +/*************************************************************************/ + +void ToolWindowFunc() +{ + if(ToolWindowMenuItem.Flags & CHECKED) + { + if(!toolwindow) + { + ToolNW.Screen = mainscreen; + if(ToolNW.TopEdge>mainscreen->Height-ToolNW.Height) + ToolNW.TopEdge=mainscreen->Height-ToolNW.Height; + if(!(toolwindow = OpenWindow(&ToolNW))) + { + ShowMonoReq2("Can't open tool window!\n"); + } + toolrastport = toolwindow->RPort; + } + } + else + { + if(toolwindow) + { + ToolNW.TopEdge=toolwindow->TopEdge; + ClearMenuStrip(toolwindow); + CloseWindow(toolwindow); + toolwindow=0; toolrastport=0; + ActivateWindow(mainwindow); + } + } +} + -- cgit v1.2.3