Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

GUINode.h

00001 // Copyright (C) 2001 Jean-Marc Valin
00002 
00003 #ifndef GUINODE_H
00004 #define GUINODE_H
00005 
00006 #include "UINode.h"
00007 #include <gnome.h>
00008 #include <string>
00009 #include <vector>
00010 #include <string>
00011 //#include <tree>
00012 #include <fstream>
00013 #include <iostream>
00014 #include <list>
00015 #include "UINetTerminal.h"
00016 #include "UITerminal.h"
00017 
00018 namespace FD {
00019 
00020 class GUINode : public UINode {
00021 
00022 protected:
00023   
00024    GnomeCanvasGroup *group;
00025   
00026    GtkWidget *popupMenu;
00027   
00028    bool grab;
00029   
00030    bool dragging;
00031   
00032    GnomeCanvasItem *nodeRect;
00033    GnomeCanvasItem *nodeText;
00034 
00035    void initialize_widgets();
00036 
00037 public:
00038 
00039   
00040    GUINode(UINetwork* _net, std::string _name, std::string _type, double x, double y);
00041 
00042    GUINode(UINetwork* _net, xmlNodePtr def);
00043   
00044    ~GUINode();
00045   
00046    GnomeCanvasGroup * getGroup() {return group;}
00047   
00048    void createPopup();
00049   
00050    virtual void rename(const std::string &newName);
00051 
00052    gint event(GdkEvent *event);
00053   
00054    void doGrab();
00055   
00056    void move (double dx,double dy);
00057 
00058    void selectedMove(double dx,double dy);
00059 
00060    void select();
00061 
00062    void unselect();
00063   
00064    void getBounds(double &x1, double &y1, double &x2, double &y2);
00065 
00066    void propertiesShow();
00067 
00068    void help();
00069 
00070 
00071    virtual void addTerminal(const std::string &_name, UINetTerminal::NetTermType _type, 
00072                             const std::string &_objType="any", const std::string &_description="No description available");
00073    
00074 
00075    virtual UINodeParameters *newNodeParameters (UINode *_node, std::string type);
00076 
00077    virtual UILink *newLink (UITerminal *_from, UITerminal *_to);
00078 
00079    virtual UINetTerminal *newNetTerminal (UITerminal *_terminal, UINetTerminal::NetTermType _type, const std::string &_name,
00080                                           const std::string &_objType="any", const std::string &_description="No description available");
00081    
00082    virtual void notifyError(const std::string &message);
00083 
00084    virtual void redraw();
00085 
00086    friend class GUINetwork;
00087 
00088 };
00089 
00090 }//namespace FD
00091 
00092 #endif

Generated on Wed Oct 5 14:28:55 2005 for FlowDesigner by  doxygen 1.4.4