home *** CD-ROM | disk | FTP | other *** search
- #include <classes/Intuition/Requester.h>
-
- #pragma -
- #include <pragma/intuition_lib.h>
- #pragma +
-
- EasyRequesterC::EasyRequesterC(WindowC *w,
- ULONG idcmpFlags, STRPTR title, STRPTR gadgettext)
- {
- window = w;
- idcmp = idcmpFlags;
- easy.es_StructSize = sizeof(EasyStruct);
- easy.es_Flags = 0;
- easy.es_Title = title;
- easy.es_TextFormat = NULL;
- easy.es_GadgetFormat = gadgettext;
- }
-
- LONG EasyRequesterC::request(STRPTR text, APTR args)
- {
- easy.es_TextFormat = text;
- return EasyRequestArgs((window == NULL) ? NULL : window->window(),&easy,
- (idcmp == 0) ? NULL : &idcmp,args);
- }
-
- LONG EasyRequesterC::request(STRPTR text, ULONG arg1, ...)
- {
- easy.es_TextFormat = text;
- return EasyRequestArgs((window == NULL) ? NULL : window->window(),&easy,
- (idcmp == 0) ? NULL : &idcmp,&arg1);
- }
-
- // **********************************************************
-
- InfoRequesterC::InfoRequesterC(WindowC *w, STRPTR title, STRPTR gadget)
- : EasyRequesterC(w,0,title,gadget)
- {
- }
-
- VOID InfoRequesterC::request(STRPTR text, APTR args)
- {
- EasyRequesterC::request(text,args);
- }
-
- VOID InfoRequesterC::request(STRPTR text, ULONG arg1, ...)
- {
- EasyRequesterC::request(text,&arg1);
- }
-
- // ********************************************************
-
- TwoButtonRequesterC::TwoButtonRequesterC(WindowC *w, STRPTR title,
- STRPTR left, STRPTR right)
- : EasyRequesterC(w,0,title,NULL)
- {
- gadgettext = left;
- gadgettext += "|";
- gadgettext += right;
- easy.es_GadgetFormat = (char *) gadgettext;
- }
-
- BOOL TwoButtonRequesterC::request(STRPTR text, APTR args)
- {
- return EasyRequesterC::request(text,args) != 0;
- }
-
- BOOL TwoButtonRequesterC::request(STRPTR text, ULONG arg1, ...)
- {
- return EasyRequesterC::request(text,&arg1) != 0;
- }
-
- // ***********************************************************
-
- ThreeButtonRequesterC::ThreeButtonRequesterC(WindowC *w, STRPTR title,
- STRPTR left, STRPTR middle, STRPTR right)
- : EasyRequesterC(w,0,title,NULL)
- {
- gadgettext = left;
- gadgettext += "|";
- gadgettext += middle;
- gadgettext += "|";
- gadgettext += right;
- easy.es_GadgetFormat = (char *) gadgettext;
- }
-
- ULONG ThreeButtonRequesterC::request(STRPTR text, APTR args)
- {
- return EasyRequesterC::request(text,args);
- }
-
- ULONG ThreeButtonRequesterC::request(STRPTR text, ULONG arg1, ...)
- {
- return EasyRequesterC::request(text,&arg1);
- }
-