Main Page   Packages   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

Dialog.h

Go to the documentation of this file.
00001 /*
00002  * $Id: Dialog.h,v 1.5 2002/08/09 04:52:08 virtualcasino Exp $
00003  */
00004 #ifndef __VCASINO_DIALOG_H__
00005 #define __VCASINO_DIALOG_H__
00006 #include<Window.h>
00007 #include<TextButton.h>
00008 #include<List.h>
00009 
00010 namespace clawsoft{
00011 
00012         enum DialogType{
00013                 DLG_OK,
00014                 DLG_OK_CANCEL,
00015                 DLG_OK_CANCEL_HELP,
00016                 DLG_CANCEL
00017         };
00018 
00019         class OKButton;
00020         class HelpButton;
00021         class CancelButton;
00022 
00023         class Dialog:public Window{
00024                 public:
00025                         class OKButton:public TextButton{
00026                                 public:
00027                                         OKButton();
00028                                         void action(int xx, int yy, int bb);
00029                         };
00030                 
00031                         class CancelButton:public TextButton{
00032                                 public:
00033                                         CancelButton();
00034                                         void action(int xx, int yy, int bb);
00035                         };
00036                 
00037                         class HelpButton:public TextButton{
00038                                 public:
00039                                         HelpButton();
00040                                         void action(int xx, int yy, int bb);
00041                         };
00042                 protected:
00043                         virtual void drawContents(){}
00044                         void drawComponents();
00045                         OKButton        okBtn;
00046                         CancelButton    cancelBtn;
00047                         HelpButton      helpBtn;
00048                         DialogType      dType;
00049                 public:
00050                         Dialog();
00051                         Dialog(Rect &r, DialogType t = DLG_OK_CANCEL);
00052                         Dialog(Rect &r, const char *ccaption, DialogType t = DLG_OK_CANCEL);
00053                         Dialog(Rect &r, String ccaption, DialogType t = DLG_OK_CANCEL);
00054                         ~Dialog();                      
00055                         void map();
00056                         virtual void okAction(int xx, int yy, int bb){}
00057                         virtual void cancelAction(int xx, int yy, int bb){}
00058                         virtual void helpAction(int xx, int yy, int bb){}
00059                         bool checkMouseEvents();
00060         };
00061 
00062 
00063 }
00064 
00065 #endif

Powered by:

SourceForge Logo