Main Page | Namespace List | Class Hierarchy | Data Structures | File List | Data Fields | Globals

containernode.h

Go to the documentation of this file.
00001 //--- < CONTAINERNODE.H > ------| ViewGraph - A Flexible Graph view Framework |
00002 //
00003 // Very simplistic selection group holding
00004 // only one selection node. Generates
00005 // SelectionChangedEvent's when selection
00006 // was changed.
00007 // 
00008 // $Author: botik32 $
00009 // $Revision: 1.1 $
00010 // $Date: 2004/05/05 07:10:14 $
00011 //-----------------------------------------------------------------------------/
00012 
00013 #ifndef CONTAINERNODE_H
00014 #define CONTAINERNODE_H
00015 
00016 #include <cZUI/widgetevent.h>
00017 #include <cZUI/message.h>
00018 #include <cZUI/basescenenode.h>
00019 #include <cZUI/groupnode.h>
00020 
00021 class ContainerNode : public GroupNode
00022 {
00023 protected:
00024         BaseSceneNode *selection;
00025 public:
00026         ContainerNode();
00027         // see which child got the click event
00028         // to add/remove it from selection
00029         bool handle_event( Event *e );
00030         BaseSceneNode* get_selection( void )
00031         {
00032                 return selection;
00033         };
00034 
00035         // remove the selection on blur
00036         void blur( Camera *c )
00037         {
00038                 if( selection )
00039                 {
00040                         UnselectMessage um( 
00041                                 c, selection 
00042                         );
00043                         selection->handle_message( &um );
00044                 }
00045                 selection = NULL;
00046         };
00047 };
00048 
00049 #endif

Generated on Wed Jun 23 18:47:21 2004 for cZUI by doxygen 1.3.5