Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

displaylist.h

Go to the documentation of this file.
00001 
00002 // Flash Plugin and Player
00003 // Copyright (C) 1998 Olivier Debon
00004 // 
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 // 
00020 #ifndef _DISPLAYLIST_H_
00021 #define _DISPLAYLIST_H_
00022 
00023 class Character;
00024 class Program;
00025 
00026 struct DisplayList;
00027 
00028 // Display List management
00029 struct DisplayListEntry {
00030     Character           *character;
00031     long                 depth;
00032     Matrix              *matrix;
00033     Cxform              *cxform;
00034     char                *instanceName;
00035     
00036     /* button state */
00037     ButtonState          renderState;
00038     ButtonState          oldState;
00039     Character           *buttonCharacter;
00040     Matrix               buttonMatrix;
00041     Matrix renderMatrix; /* last render matrix */
00042 
00043     DisplayListEntry    *next;
00044 
00045     DisplayList         *owner; // Parent
00046 };
00047 
00048 struct DisplayList {
00049     DisplayListEntry    *list;
00050     FlashMovie          *movie;
00051     Rect                 bbox;          // Delta clipping region
00052     int                  isSprite;
00053 public:
00054     DisplayList(FlashMovie *movie);
00055     ~DisplayList();
00056     DisplayListEntry    *getList();
00057     void                 clearList();
00058     void                 placeObject(GraphicDevice *gd,Character *character, long depth, Matrix *matrix = 0, Cxform *cxform = 0, char *name = 0);
00059     Character           *removeObject(GraphicDevice *gd, Character *character, long depth);
00060 
00061     int                  render(GraphicDevice *gd, Matrix *m = 0, Cxform *cxform = 0);
00062     void                 updateBoundingBox(DisplayListEntry *);
00063     void                 updateButtons (FlashMovie *);
00064     void                 getBoundary(Rect *bb); // Returns boundary of current displayed objects
00065     int                  updateSprites();       // Update sprites in the display list
00066 };
00067 
00068 typedef void (*DisplayListFunc)(DisplayListEntry *e, void *opaque);
00069 
00070 void             updateButtons(FlashMovie *m);
00071 int              computeActions(FlashMovie *m, Program **prog, ActionRecord **ar);
00072 void             renderFocus(FlashMovie *movie);
00073 
00074 typedef int (*ExploreButtonFunc)(void *opaque, Program *prg, DisplayListEntry *e);
00075 int              exploreButtons(FlashMovie *movie, void *opaque, ExploreButtonFunc func);
00076 void             updateBoundingBox(DisplayListEntry *e);
00077 void             transformBoundingBox(Rect *bb, Matrix *matrix, Rect *boundary, int reset);
00078 void             updateButtonState(DisplayListEntry *e, ButtonState state);
00079 
00080 #endif /* _DISPLAYLIST_H_ */

Generated on Sat Nov 5 16:15:35 2005 for OPIE by  doxygen 1.4.2