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

# window.h

Go to the documentation of this file.

    00001
    00002
    00003 //
    00004 //      WINDOW.H                                        (c)     YoY'00                                          WEB: www.aestesis.org
    00005 //
    00008 #ifndef                                                 _WINDOW_H_
    00009 #define                                                 _WINDOW_H_
    00012 #include                                                <windows.h>
    00013 #include                                                "surface.h"
    00014 #include                                                "section.h"
    00017
    00018 //      If you use directly the variables in the class API, it's at your own risks. Prefer the methods...
    00019
    00022
    00023 #define                                                 guidWINDOW                                              (Awindow::CI.guid)
    00024
    00027
    00028 class Awindow : public Asurface
    00029 {
    00030 public:
    00031         ADLL static ACI                         CI;
    00032         virtual ACI                                     *getCI                                                  ()                                              { return &CI; }
    00033
    00034         HWND                                            hwFather;
    00035         HWND                                            hw;
    00036
    00037         ADLL                                            Awindow                                                 (char *name, int x, int y, int w, int h, bool useBlend=false);
    00038         ADLL                                            Awindow                                                 (char *name, HWND hwFather, int x, int y, int w, int h, bool useBlend=false);
    00039
    00040         ADLL virtual                            ~Awindow                                                ();
    00041
    00042                                                                 // notifications ///////////////
    00043
    00044         ADLL virtual void                       repaint                                                 (bool now=FALSE);
    00045         ADLL virtual void                       repaint                                                 (Arectangle r, bool now=FALSE);
    00046
    00047         virtual bool                            notify                                                  (Anode *o, int event, dword p=0)                        { return FALSE; }
    00048
    00049                                                                 // commands ////////////////////
    00050
    00051         ADLL virtual bool                       show                                                    (bool visible);
    00052         ADLL virtual bool                       zorder                                                  (int action);
    00053         ADLL virtual bool                       move                                                    (int x, int y);
    00054         ADLL virtual bool                       size                                                    (int w, int h);
    00055         ADLL virtual bool                       mouseCapture                                    (bool b, Aobject *o=NULL);
    00056         ADLL virtual bool                       focus                                                   (Aobject *o=NULL);
    00057
    00058                                                                 // global //////////////////////
    00059
    00060         // private /////////////////////
    00061
    00062         ADLL virtual void                       del                                                             (Anode *o);
    00063
    00064         ADLL virtual dword                      NCnotify                                                (dword m, dword wp, dword lp);
    00065         static int                                      NCmessageLoop                                   ();
    00066         static void                                     NCasyncNotify                                   (class asyncMessage *am);
    00067         static void                                     NCclearAll                                              ();
    00068
    00069         int                                                     mouseX,mouseY;
    00070         int                                                     mouseTime,mouseState;
    00071
    00072         Aobject                                         *objectTrack;
    00073
    00074         class Asection                          updateSection;
    00075         bool                                            inUpdate;
    00076
    00077         Aobject                                         *keyboardFocusOBJ;
    00078
    00079         HDC                                                     hdc;            // 4 transparency
    00080         HBITMAP                                         hbm;            // 4 transparency
    00081         bool                                            useBlend;       // 4 transparency
    00082
    00083 protected:
    00084         Aobject                                         *mouseCaptureOBJ;
    00085
    00086         ADLL virtual bool                       NCmouse                                                 (int x, int y, int state, int event);
    00087 };
    00088
    00091 // private functions (internals)
    00094
    00095 bool                                                    NCglobalTimer                                   (Aobject *o, int time);
    00096 void                                                    NCdestroy                                               (Aobject *o);
    00097
    00100
    00101 class asyncMessage
    00102 {
    00103 public:
    00104         class Anode                                     *to;
    00105         class Anode                                     *o;
    00106         int                                                     event;
    00107         dword                                           p;
    00108
    00109                                                                 asyncMessage(class Anode *to, class Anode *o, int event, dword p)
    00110                                                                 {
    00111                                                                         this->to=to;
    00112                                                                         this->o=o;
    00113                                                                         this->event=event;
    00114                                                                         this->p=p;
    00115                                                                 }
    00116 };
    00117
    00120 #endif                                                  //_WINDOW_H_