Main Page Class Hierarchy Compound List File List Compound Members File Members

# paddle.h

Go to the documentation of this file.

    00001
    00002
    00003 //
    00004 //      PADDLE.H                                        (c)     YoY'01                                          WEB: www.aestesis.org
    00005 //
    00008 #include                                                "elektrodef.h"
    00011 #ifndef                                                 _PADDLE_H_
    00012 #define                                                 _PADDLE_H_
    00015 #include                                                "control.h"
    00018
    00019 //      If you use directly the variables in the class API, it's at your own risks. Prefer the methods...
    00020
    00023
    00024 #define                                                 guidPADDLE                                              (Apaddle::CI.guid)
    00025
    00028
    00029 //                                                              paddle modes
    00030
    00031 enum
    00032 {
    00033                                                                 paddleX=0,
    00034                                                                 paddleY,
    00035                                                                 paddleXY,
    00036                                                                 paddleCURRENT
    00037 };
    00038
    00039 //                                                              paddle types
    00040
    00041 enum
    00042 {
    00043                                                                 paddleLINE=0,
    00044                                                                 paddleNOTDEFINED,
    00045                                                                 paddleBUTTON01,
    00046                                                                 paddleBUTTON02,
    00047                                                                 paddleBUTTON03,
    00048                                                                 paddleBUTTON04,
    00049                                                                 paddleBUTTON05,
    00050                                                                 paddleBUTTON06,
    00051                                                                 paddleBUTTON07,
    00052                                                                 paddleTYPE02,
    00053                                                                 paddleELEK32,
    00054                                                                 paddleELEK24,
    00055                                                                 paddleELEK16,
    00056                                                                 paddleELEK12
    00057 };
    00058
    00061
    00062 class Apaddle : public Aobject
    00063 {
    00064 public:
    00065         ELIBOBJ
    00066
    00067         EDLL                                            Apaddle                                                 (char *name, Aobject *L, int x, int y, int w, int h, Aresobj *o, int ow, int oy, int mode);
    00068         EDLL                                            Apaddle                                                 (char *name, Aobject *L, int x, int y, int type);
    00069         EDLL                                            Apaddle                                                 (char *name, Aobject *L, int x, int y, int size, dword color);
    00070         EDLL virtual                            ~Apaddle                                                ();
    00071
    00072         EDLL virtual bool                       mouse                                                   (int x, int y, int state, int event);
    00073         EDLL virtual bool                       notify                                                  (Anode *o, int event, dword p);
    00074
    00075         EDLL virtual void                       set                                                             (float v);
    00076         EDLL virtual void                       set                                                             (float x, float y);
    00077
    00078         EDLL virtual float                      get                                                             (int type=paddleCURRENT);
    00079
    00080         EDLL virtual void                       paint                                                   (Abitmap *b);
    00081
    00082         Acontrol                                        *control;
    00083
    00084 private:
    00085
    00086         int                                                     mode;
    00087         int                                                     type;
    00088         dword                                           lineColor;
    00089         Abitmap                                         *bmp;
    00090         int                                                     ow,oh;
    00091         float                                           xx,yy;
    00092         int                                                     x0,y0;
    00093         float                                           xx0,yy0;
    00094         bool                                            test;
    00095 };
    00096
    00099 #endif                                                  //_PADDLE_H_