Salome HOME
Color for background and title are taken from resource manager
authorasl <asl@opencascade.com>
Tue, 8 Nov 2005 09:05:42 +0000 (09:05 +0000)
committerasl <asl@opencascade.com>
Tue, 8 Nov 2005 09:05:42 +0000 (09:05 +0000)
19 files changed:
src/SUPERVGUI/SUPERVGUI.cxx
src/SUPERVGUI/SUPERVGUI.h
src/SUPERVGUI/SUPERVGUI_Canvas.cxx
src/SUPERVGUI/SUPERVGUI_Canvas.h
src/SUPERVGUI/SUPERVGUI_CanvasArray.cxx
src/SUPERVGUI/SUPERVGUI_CanvasArray.h
src/SUPERVGUI/SUPERVGUI_CanvasCellNodePrs.cxx
src/SUPERVGUI/SUPERVGUI_CanvasCellNodePrs.h
src/SUPERVGUI/SUPERVGUI_CanvasControlNode.cxx
src/SUPERVGUI/SUPERVGUI_CanvasControlNode.h
src/SUPERVGUI/SUPERVGUI_CanvasControlNodePrs.cxx
src/SUPERVGUI/SUPERVGUI_CanvasControlNodePrs.h
src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx
src/SUPERVGUI/SUPERVGUI_CanvasNode.h
src/SUPERVGUI/SUPERVGUI_CanvasNodePrs.cxx
src/SUPERVGUI/SUPERVGUI_CanvasNodePrs.h
src/SUPERVGUI/SUPERVGUI_Def.h
src/SUPERVGUI/SUPERVGUI_Main.cxx
src/SUPERVGUI/SUPERVGUI_Main.h

index 24e95166441b6cb70130dc611cfbcd57c1a53bb3..27243a404f9913abdc58c3e154166e0c077f26bc 100644 (file)
@@ -30,6 +30,7 @@ using namespace std;
 #include "SUPERVGUI_DataModel.h"
 #include "SUPERVGUI_Selection.h"
 
+
 #include "SALOMEDSClient.hxx"
 #include <boost/shared_ptr.hpp>
 using namespace boost;
@@ -51,6 +52,7 @@ using namespace boost;
 #include "SUIT_Study.h"
 
 #include "SUPERVGraph_ViewManager.h"
+#include "SUPERVGraph_ViewFrame.h"
 
 #include "SALOME_ListIO.hxx"
 #include "SALOME_ListIteratorOfListIO.hxx"
@@ -276,8 +278,11 @@ LightApp_Selection* SUPERVGUI::createSelection() const
 SUIT_ViewWindow* SUPERVGUI::createGraph() {
   SUPERVGraph_ViewManager* aVM = new SUPERVGraph_ViewManager( study, application()->desktop(), new SUPERVGraph_Viewer() );
   (( SalomeApp_Application* )application())->addViewManager( aVM );
-  SUIT_ViewWindow* aVW = aVM->createViewWindow();
+  SUPERVGraph_ViewFrame* aVW = dynamic_cast<SUPERVGraph_ViewFrame*>( aVM->createViewWindow() );
   if ( aVW ) {
+    QColor back = getApp()->resourceMgr()->colorValue( "SUPERVGraph", "Background", aVW->backgroundColor() );
+    qDebug( QString( "background: %1 %2 %3" ).arg( back.red() ).arg( back.green() ).arg( back.blue() ) );
+    aVW->setBackgroundColor( back );
     connect( aVM,
              SIGNAL( deleteView( SUIT_ViewWindow* ) ),
              this,
index 470a4d4a4c828ed803703228a0941c3b21c2b1f6..84e7bbcd5fb22c3aa666d1762e080f1959a20383 100644 (file)
@@ -36,6 +36,7 @@
 #include "SUPERVGUI_Main.h"
 
 #include "SalomeApp_Module.h"
+#include "SALOMEDSClient.hxx"
 
 class SUIT_Study;
 
index 156e7486c65bce437f2574897e083a8b65685a69..a299cdd2649542a0ea1014d654763499be43c0bd 100644 (file)
@@ -79,7 +79,7 @@ using namespace std;
 */
 
 
-SUPERVGUI_Canvas::SUPERVGUI_Canvas(SUPERVGUI_Main* m):
+SUPERVGUI_Canvas::SUPERVGUI_Canvas( SUPERVGUI_Main* m, SUIT_ResourceMgr* mgr ):
     QCanvas(),
     myMain(m)
 {
@@ -89,7 +89,7 @@ SUPERVGUI_Canvas::SUPERVGUI_Canvas(SUPERVGUI_Main* m):
   resize(1050, 750);
   setDoubleBuffering(true);
 
-  QColor aColor(MAIN_COLOR);
+  QColor aColor = mgr->colorValue( "SUPERVGraph", "Background", DEF_MAIN_COLOR );
   //aColor = QColor(SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorRed" ), 
   //             SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorGreen" ), 
   //             SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorBlue" ) );
index 16fe99369c615c82d745cae64ef097f8fb62bdd6..32c01aab1aac35c4313eeed1b1704ba66e5781fa 100644 (file)
@@ -17,6 +17,7 @@ class SUPERVGUI_Main;
 class SUPERVGUI_CanvasNode;
 class SUPERVGUI_CanvasPort;
 class SUPERVGUI_CanvasLink;
+class SUIT_ResourceMgr;
 
 class SUPERVGUI_Canvas: public QCanvas {
   Q_OBJECT
@@ -30,7 +31,7 @@ class SUPERVGUI_Canvas: public QCanvas {
       Rtti_Hook = 13
     };
 
-    SUPERVGUI_Canvas(SUPERVGUI_Main* m);
+    SUPERVGUI_Canvas( SUPERVGUI_Main* m, SUIT_ResourceMgr* );
     virtual ~SUPERVGUI_Canvas();
 
     void merge();
index 01aeec5cf5acbee727446acc6a8790dcc399e233..bd3d1219f669464415f3b260989c0534b9c9c6d0 100644 (file)
@@ -28,7 +28,7 @@ using namespace std;
       else x += (CELL_WIDTH  + CELL_SPACE); \
       cell = getCellNode(aCNode); \
       if (cell == NULL) { \
-        SUPERVGUI_CanvasCellNode* aNode = new SUPERVGUI_CanvasCellNode(this, myMain, aCNode); \
+        SUPERVGUI_CanvasCellNode* aNode = new SUPERVGUI_CanvasCellNode(myMgr, this, myMain, aCNode); \
         aNode->move(x, y); \
         aNode->show(); \
         aNode->sync(); \
@@ -50,12 +50,12 @@ using namespace std;
       SUPERV_CNode aCNodeEnd = SUPERV::CNode::_narrow(nodes->NodesName[co]->Coupled()); \
       cell = getCellNode(aCNode); \
       if (cell == NULL) { \
-        SUPERVGUI_CanvasCellNode* aNode = new SUPERVGUI_CanvasCellNode(this, myMain, aCNode); \
+        SUPERVGUI_CanvasCellNode* aNode = new SUPERVGUI_CanvasCellNode( myMgr, this, myMain, aCNode); \
         aNode->move(x, y); \
         aNode->show(); \
         aNode->sync(); \
         y += (CELL_HEIGHT + CELL_SPACE); \
-        SUPERVGUI_CanvasCellNode* aNodeEnd = new SUPERVGUI_CanvasCellEndNode(this, myMain, aCNodeEnd, aNode); \
+        SUPERVGUI_CanvasCellNode* aNodeEnd = new SUPERVGUI_CanvasCellEndNode( myMgr, this, myMain, aCNodeEnd, aNode); \
         aNodeEnd->move(x, y); \
         aNodeEnd->show(); \
         aNodeEnd->sync(); \
@@ -76,16 +76,17 @@ using namespace std;
 // SUPERVGUI_Array on QCanvas
 // ----------------------------------------------------------
 
-SUPERVGUI_CanvasArray::SUPERVGUI_CanvasArray(SUPERVGUI_Main* m):
+SUPERVGUI_CanvasArray::SUPERVGUI_CanvasArray(SUPERVGUI_Main* m, SUIT_ResourceMgr* mgr ):
   QCanvas(),
-  myMain(m)
+  myMain(m),
+  myMgr( mgr )
 {
   Trace("SUPERVGUI_CanvasArray::SUPERVGUI_CanvasArray");
   //resize(GRAPH_WIDTH, GRAPH_HEIGHT);
   resize(1000, 725);
   setDoubleBuffering(true);
 
-  QColor aColor(MAIN_COLOR);
+  QColor aColor = mgr->colorValue( "SUPERVGraph", "Background", DEF_MAIN_COLOR );
   //aColor = QColor(SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorRed" ), 
   //             SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorGreen" ), 
   //             SUIT_Session::session()->resourceMgr()->integerValue( "SUPERVGraph", "BackgroundColorBlue" ) );
@@ -145,7 +146,8 @@ bool SUPERVGUI_CanvasArray::create() {
 
   QPen pen(Qt::SolidLine);
   pen.setWidth(1);
-  QBrush br(MAIN_TITLE);
+
+  QBrush br( myMgr->colorValue( "SUPERVGraph", "Title", DEF_MAIN_TITLE ) );
   
   // variables to resize canvas in table view
   int aMaxWidth = 0;
@@ -256,7 +258,7 @@ SUPERVGUI_CanvasCellNode* SUPERVGUI_CanvasArray::getCellNode(SUPERV::CNode_ptr t
 
 SUPERVGUI_CanvasCellNode* SUPERVGUI_CanvasArray::addNode(SUPERV_CNode node) {
   Trace("SUPERVGUI_CanvasArray::addNode");
-  SUPERVGUI_CanvasCellNode* n = new SUPERVGUI_CanvasCellNode(this, myMain, node);
+  SUPERVGUI_CanvasCellNode* n = new SUPERVGUI_CanvasCellNode( myMgr, this, myMain, node);
   n->move(nodeX, nodeY);
   n->show();
   update();
index fc8e3ce76b3e8b0770ad63dad9b7b8bfc98cb8d6..98449da959e898e295497c1d8a00b225319770dc 100644 (file)
@@ -16,13 +16,14 @@ using namespace std;
 #include <qpopupmenu.h>
 #include <qcanvas.h>
 
+class SUIT_ResourceMgr;
 class SUPERVGUI_Main;
 
 class SUPERVGUI_CanvasArray: public QCanvas {
   Q_OBJECT
     
   public:
-    SUPERVGUI_CanvasArray(SUPERVGUI_Main* m);
+    SUPERVGUI_CanvasArray(SUPERVGUI_Main* m, SUIT_ResourceMgr* );
     virtual ~SUPERVGUI_CanvasArray();
 
     void sync();
@@ -36,6 +37,7 @@ class SUPERVGUI_CanvasArray: public QCanvas {
   private:
     
     SUPERVGUI_Main* myMain;
+    SUIT_ResourceMgr*  myMgr;
 
     int             nodeX;
     int             nodeY;
index c7a7f65e117f1ea936c8944ab83d78999067f923..b9eeaffc5d04ebd3807b59bfe8bb9d48718be83f 100644 (file)
@@ -9,16 +9,18 @@
 #include "SUPERVGUI_CanvasCellNodePrs.h"
 #include "SUPERVGUI_Canvas.h"
 
+#include "SUIT_ResourceMgr.h"
+
 #define TEXT_MARGIN 5
 
 // ----------------------------------------------------------
 // Cell widget of the table on QCanvas
 // ----------------------------------------------------------
-SUPERVGUI_CanvasCellNodePrs::SUPERVGUI_CanvasCellNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasCellNode* theNode):
+SUPERVGUI_CanvasCellNodePrs::SUPERVGUI_CanvasCellNodePrs( SUIT_ResourceMgr* mgr, QCanvas* theCanvas, SUPERVGUI_CanvasCellNode* theNode):
   myTitleWidth(CELL_WIDTH_PART),
   myLabelWidth(CELL_WIDTH_PART),
   myStatusWidth(CELL_WIDTH_PART), 
-  SUPERVGUI_CanvasNodePrs(theCanvas, theNode, true)
+  SUPERVGUI_CanvasNodePrs( mgr, theCanvas, theNode, true)
 {
   myPortVisible = false;
 }
@@ -89,7 +91,7 @@ void SUPERVGUI_CanvasCellNodePrs::drawTitle(QPainter& thePainter) {
   else if (getNode()->getEngine()->IsGOTO())
     thePainter.setBrush(Qt::green.light());
   else {
-    QBrush br(MAIN_TITLE);
+    QBrush br( resMgr()->colorValue( "SUPERVGraph", "Title", DEF_MAIN_TITLE ) );
     thePainter.setBrush(br);
   }
   drawTitleShape(thePainter);
@@ -202,7 +204,7 @@ void SUPERVGUI_CanvasCellNodePrs::setState(SUPERV::GraphState theState)
 
   default:
     setStatus("No Status");
-    setStatusColor(MAIN_BACK);
+    setStatusColor( resMgr()->colorValue( "SUPERVGraph", "Background", DEF_MAIN_BACK ) );
     break;
   }
 
index 2e217086b945861d04f7f00263762740e8b929e8..b3dd459ae95fb24ee6f6a1274aaea304cd2903c5 100644 (file)
@@ -17,7 +17,7 @@ using namespace std;
 class SUPERVGUI_CanvasCellNodePrs: public SUPERVGUI_CanvasNodePrs {
 
   public:
-    SUPERVGUI_CanvasCellNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasCellNode* theNode);
+    SUPERVGUI_CanvasCellNodePrs( SUIT_ResourceMgr*, QCanvas* theCanvas, SUPERVGUI_CanvasCellNode* theNode);
     virtual ~SUPERVGUI_CanvasCellNodePrs();
 
     virtual void moveBy(double dx, double dy);
index 71278dff4fbe9eaf85115c3acc106e042912dcb3..8e505cc5c1154e06aa46c2313f95bda29ee77e0f 100644 (file)
@@ -24,8 +24,8 @@ using namespace std;
 //=====================================================================
 // Compute node
 //=====================================================================
-SUPERVGUI_CanvasComputeNode::SUPERVGUI_CanvasComputeNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
-  SUPERVGUI_CanvasNode(theParent, theMain, theNode)
+SUPERVGUI_CanvasComputeNode::SUPERVGUI_CanvasComputeNode( SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
+  SUPERVGUI_CanvasNode( mgr, theParent, theMain, theNode)
 {
   Trace("SUPERVGUI_CanvasComputeNode::SUPERVGUI_CanvasComputeNode");
 }
@@ -51,8 +51,8 @@ QPopupMenu* SUPERVGUI_CanvasComputeNode::getPopupMenu(QWidget* theParent)
 //=====================================================================
 // Start control node
 //=====================================================================
-SUPERVGUI_CanvasStartNode::SUPERVGUI_CanvasStartNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
-  SUPERVGUI_CanvasNode(theParent, theMain, theNode), 
+SUPERVGUI_CanvasStartNode::SUPERVGUI_CanvasStartNode(SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
+  SUPERVGUI_CanvasNode( mgr, theParent, theMain, theNode), 
   myCoupled(0)
 {
   Trace("SUPERVGUI_CanvasStartNode::SUPERVGUI_CanvasStartNode");
@@ -60,8 +60,8 @@ SUPERVGUI_CanvasStartNode::SUPERVGUI_CanvasStartNode(QObject* theParent, SUPERVG
 
 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasStartNode::createPrs() const
 {
-  return new SUPERVGUI_CanvasStartNodePrs(getMain()->getCanvas(), 
-                                         (SUPERVGUI_CanvasStartNode*)this);
+  return new SUPERVGUI_CanvasStartNodePrs( resMgr(), getMain()->getCanvas(), 
+                                          (SUPERVGUI_CanvasStartNode*)this);
 }
 
 bool SUPERVGUI_CanvasStartNode::setNodeName(QString aName)
@@ -160,9 +160,9 @@ void SUPERVGUI_CanvasStartNode::pastePort()
 //=====================================================================
 // End control node
 //=====================================================================
-SUPERVGUI_CanvasEndNode::SUPERVGUI_CanvasEndNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
-                                                SUPERVGUI_CanvasStartNode* theStart):
-  SUPERVGUI_CanvasNode(theParent, theMain, theNode), 
+SUPERVGUI_CanvasEndNode::SUPERVGUI_CanvasEndNode(SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain,
+                                                SUPERV_CNode theNode, SUPERVGUI_CanvasStartNode* theStart):
+  SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode), 
   myCoupled(theStart)
 {
   Trace("SUPERVGUI_CanvasEndNode::SUPERVGUI_CanvasEndNode");
@@ -171,8 +171,8 @@ SUPERVGUI_CanvasEndNode::SUPERVGUI_CanvasEndNode(QObject* theParent, SUPERVGUI_M
 
 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasEndNode::createPrs() const
 {
-  return new SUPERVGUI_CanvasEndNodePrs(getMain()->getCanvas(), 
-                                       (SUPERVGUI_CanvasEndNode*)this);
+  return new SUPERVGUI_CanvasEndNodePrs( resMgr(), getMain()->getCanvas(), 
+                                        (SUPERVGUI_CanvasEndNode*)this);
 }
 
 QPopupMenu* SUPERVGUI_CanvasEndNode::getPopupMenu(QWidget* theParent) 
@@ -197,16 +197,16 @@ QPopupMenu* SUPERVGUI_CanvasEndNode::getPopupMenu(QWidget* theParent)
 //=====================================================================
 // Goto control node
 //=====================================================================
-SUPERVGUI_CanvasGotoNode::SUPERVGUI_CanvasGotoNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
-  SUPERVGUI_CanvasNode(theParent, theMain, theNode)
+SUPERVGUI_CanvasGotoNode::SUPERVGUI_CanvasGotoNode(SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
+  SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode)
 {
   Trace("SUPERVGUI_CanvasGotoNode::SUPERVGUI_CanvasGotoNode");
 }
 
 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasGotoNode::createPrs() const
 {
-  return new SUPERVGUI_CanvasGotoNodePrs(getMain()->getCanvas(), 
-                                        (SUPERVGUI_CanvasGotoNode*)this);
+  return new SUPERVGUI_CanvasGotoNodePrs( resMgr(), getMain()->getCanvas(), 
+                                         (SUPERVGUI_CanvasGotoNode*)this);
 }
 
 QPopupMenu* SUPERVGUI_CanvasGotoNode::getPopupMenu(QWidget* theParent) 
@@ -238,16 +238,16 @@ void SUPERVGUI_CanvasGotoNode::linkToNode() {
 //=====================================================================
 // Macro node
 //=====================================================================
-SUPERVGUI_CanvasMacroNode::SUPERVGUI_CanvasMacroNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
-  SUPERVGUI_CanvasComputeNode(theParent, theMain, theNode)
+SUPERVGUI_CanvasMacroNode::SUPERVGUI_CanvasMacroNode(SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode):
+  SUPERVGUI_CanvasComputeNode(mgr, theParent, theMain, theNode)
 {
   Trace("SUPERVGUI_CanvasMacroNode::SUPERVGUI_CanvasMacroNode");
 }
 
 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasMacroNode::createPrs() const
 {
-  return new SUPERVGUI_CanvasMacroNodePrs(getMain()->getCanvas(), 
-                                         (SUPERVGUI_CanvasMacroNode*)this);
+  return new SUPERVGUI_CanvasMacroNodePrs( resMgr(), getMain()->getCanvas(), 
+                                          (SUPERVGUI_CanvasMacroNode*)this);
 }
 
 QPopupMenu* SUPERVGUI_CanvasMacroNode::getPopupMenu(QWidget* theParent) 
@@ -305,10 +305,10 @@ void SUPERVGUI_CanvasMacroNode::exportDataflow()
 //=====================================================================
 // Cell node: node for table view
 //=====================================================================
-SUPERVGUI_CanvasCellNode::SUPERVGUI_CanvasCellNode(QObject* theParent, 
+SUPERVGUI_CanvasCellNode::SUPERVGUI_CanvasCellNode(SUIT_ResourceMgr* mgr, QObject* theParent, 
                                                   SUPERVGUI_Main* theMain, 
                                                   SUPERV_CNode theNode):
-  SUPERVGUI_CanvasNode(theParent, theMain, theNode, true)
+  SUPERVGUI_CanvasNode(mgr, theParent, theMain, theNode, true)
 {
   Trace("SUPERVGUI_CanvasCellNode::SUPERVGUI_CanvasCellNode");
   
@@ -384,16 +384,16 @@ bool SUPERVGUI_CanvasCellNode::setNodeName(QString aName)
 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasCellNode::createPrs() const
 {
   SUPERVGUI_CanvasNodePrs* aPrs = 
-    new SUPERVGUI_CanvasCellNodePrs(getMain()->getCanvasArray(), 
-                                   (SUPERVGUI_CanvasCellNode*)this);
+    new SUPERVGUI_CanvasCellNodePrs( resMgr(), getMain()->getCanvasArray(), 
+                                    (SUPERVGUI_CanvasCellNode*)this);
   return aPrs;
 }
 
-SUPERVGUI_CanvasCellEndNode::SUPERVGUI_CanvasCellEndNode( QObject* theParent, 
+SUPERVGUI_CanvasCellEndNode::SUPERVGUI_CanvasCellEndNode( SUIT_ResourceMgr* mgr, QObject* theParent, 
                                                          SUPERVGUI_Main* theMain, 
                                                          SUPERV_CNode theNode, 
                                                          SUPERVGUI_CanvasCellNode* theStart):
-  SUPERVGUI_CanvasCellNode(theParent, theMain, theNode)
+  SUPERVGUI_CanvasCellNode(mgr, theParent, theMain, theNode)
 {
   //set start cell for end cell as pair 
   myPairCell = theStart; 
index 701bdd9eb1b836a522cb39192db51ab63dddd682..fb5a50e78b015f8592504c8b8f547e0dc8c0543e 100644 (file)
@@ -19,7 +19,7 @@ class SUPERVGUI_CanvasComputeNode : public SUPERVGUI_CanvasNode {
   Q_OBJECT
 
   public:
-    SUPERVGUI_CanvasComputeNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+    SUPERVGUI_CanvasComputeNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
     virtual ~SUPERVGUI_CanvasComputeNode() {}
 
     virtual QPopupMenu* getPopupMenu(QWidget* theParent);
@@ -29,7 +29,7 @@ class SUPERVGUI_CanvasMacroNode : public SUPERVGUI_CanvasComputeNode {
   Q_OBJECT
 
   public:
-    SUPERVGUI_CanvasMacroNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+    SUPERVGUI_CanvasMacroNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
     virtual ~SUPERVGUI_CanvasMacroNode() {}
 
     virtual QPopupMenu* getPopupMenu(QWidget* theParent);
@@ -48,7 +48,7 @@ class SUPERVGUI_CanvasStartNode : public SUPERVGUI_CanvasNode {
   Q_OBJECT
 
   public:
-    SUPERVGUI_CanvasStartNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+    SUPERVGUI_CanvasStartNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
     virtual ~SUPERVGUI_CanvasStartNode() {}
 
     virtual bool setNodeName(QString aName);
@@ -84,8 +84,8 @@ class SUPERVGUI_CanvasEndNode : public SUPERVGUI_CanvasNode {
   Q_OBJECT
 
   public:
-    SUPERVGUI_CanvasEndNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
-                           SUPERVGUI_CanvasStartNode* theStart);
+    SUPERVGUI_CanvasEndNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode,
+                            SUPERVGUI_CanvasStartNode* theStart);
     virtual ~SUPERVGUI_CanvasEndNode() {}
 
     SUPERVGUI_CanvasStartNode* getCoupled() const { return myCoupled; }
@@ -109,7 +109,7 @@ class SUPERVGUI_CanvasGotoNode : public SUPERVGUI_CanvasNode {
   Q_OBJECT
 
   public:
-    SUPERVGUI_CanvasGotoNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
+    SUPERVGUI_CanvasGotoNode( SUIT_ResourceMgr*, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode);
     virtual ~SUPERVGUI_CanvasGotoNode() {}
 
     virtual QPopupMenu* getPopupMenu(QWidget* theParent);
@@ -125,9 +125,9 @@ class SUPERVGUI_CanvasCellNode : public SUPERVGUI_CanvasNode {
   Q_OBJECT
 
   public:
-    SUPERVGUI_CanvasCellNode(QObject* theParent, 
-                            SUPERVGUI_Main* theMain, 
-                            SUPERV_CNode theNode);
+    SUPERVGUI_CanvasCellNode( SUIT_ResourceMgr*, QObject* theParent, 
+                             SUPERVGUI_Main* theMain, 
+                             SUPERV_CNode theNode);
     virtual ~SUPERVGUI_CanvasCellNode();
 
     // asv : 26.01.05 : everything moved to CanvasNode::getPopupMenu()
@@ -156,10 +156,10 @@ class SUPERVGUI_CanvasCellNode : public SUPERVGUI_CanvasNode {
 class SUPERVGUI_CanvasCellEndNode: public SUPERVGUI_CanvasCellNode {
  
   public:
-    SUPERVGUI_CanvasCellEndNode(QObject* theParent, 
-                               SUPERVGUI_Main* theMain, 
-                               SUPERV_CNode theNode, 
-                               SUPERVGUI_CanvasCellNode* theStart);
+    SUPERVGUI_CanvasCellEndNode( SUIT_ResourceMgr*, QObject* theParent, 
+                                SUPERVGUI_Main* theMain, 
+                                SUPERV_CNode theNode, 
+                                SUPERVGUI_CanvasCellNode* theStart);
     virtual ~SUPERVGUI_CanvasCellEndNode() {}
 
      // asv : 26.01.05 : decided to remove all "edition" operations on nodes in Table view
index f88de0e91f0527cf08c0ce1f5cf512caa8e41c57..c8b00f631142adfbb949f53a738616c5cf68ef4a 100644 (file)
@@ -17,8 +17,8 @@ using namespace std;
 //=====================================================================
 // Control node presentation
 //=====================================================================
-SUPERVGUI_CanvasControlNodePrs::SUPERVGUI_CanvasControlNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasNode* theNode):
-  SUPERVGUI_CanvasNodePrs(theCanvas, theNode)
+SUPERVGUI_CanvasControlNodePrs::SUPERVGUI_CanvasControlNodePrs( SUIT_ResourceMgr* mgr, QCanvas* theCanvas, SUPERVGUI_CanvasNode* theNode):
+  SUPERVGUI_CanvasNodePrs( mgr, theCanvas, theNode)
 {
   Trace("SUPERVGUI_CanvasControlNodePrs::SUPERVGUI_CanvasControlNodePrs");
   setLabelVisible(false);
@@ -73,8 +73,8 @@ QRect SUPERVGUI_CanvasControlNodePrs::getGateRect() const
 //=====================================================================
 // Start control node presentation
 //=====================================================================
-SUPERVGUI_CanvasStartNodePrs::SUPERVGUI_CanvasStartNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasStartNode* theNode):
-  SUPERVGUI_CanvasControlNodePrs(theCanvas, theNode)
+SUPERVGUI_CanvasStartNodePrs::SUPERVGUI_CanvasStartNodePrs( SUIT_ResourceMgr* mgr, QCanvas* theCanvas, SUPERVGUI_CanvasStartNode* theNode):
+  SUPERVGUI_CanvasControlNodePrs( mgr, theCanvas, theNode)
 {
   Trace("SUPERVGUI_CanvasStartNodePrs::SUPERVGUI_CanvasStartNodePrs");
 }
@@ -156,8 +156,8 @@ void SUPERVGUI_CanvasStartNodePrs::setState(SUPERV::GraphState theState)
 //=====================================================================
 // End control node presentation
 //=====================================================================
-SUPERVGUI_CanvasEndNodePrs::SUPERVGUI_CanvasEndNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasEndNode* theNode):
-  SUPERVGUI_CanvasControlNodePrs(theCanvas, theNode)
+SUPERVGUI_CanvasEndNodePrs::SUPERVGUI_CanvasEndNodePrs( SUIT_ResourceMgr* mgr, QCanvas* theCanvas, SUPERVGUI_CanvasEndNode* theNode):
+  SUPERVGUI_CanvasControlNodePrs(mgr,theCanvas, theNode)
 {
   Trace("SUPERVGUI_CanvasEndNodePrs::SUPERVGUI_CanvasEndNodePrs");
 }
@@ -237,8 +237,8 @@ void SUPERVGUI_CanvasEndNodePrs::setState(SUPERV::GraphState theState)
 //=====================================================================
 // Goto control node presentation
 //=====================================================================
-SUPERVGUI_CanvasGotoNodePrs::SUPERVGUI_CanvasGotoNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasGotoNode* theNode):
-  SUPERVGUI_CanvasControlNodePrs(theCanvas, theNode)
+SUPERVGUI_CanvasGotoNodePrs::SUPERVGUI_CanvasGotoNodePrs( SUIT_ResourceMgr* mgr, QCanvas* theCanvas, SUPERVGUI_CanvasGotoNode* theNode):
+  SUPERVGUI_CanvasControlNodePrs(mgr, theCanvas, theNode)
 {
   Trace("SUPERVGUI_CanvasGotoNodePrs::SUPERVGUI_CanvasGotoNodePrs");
 }
@@ -312,8 +312,8 @@ void SUPERVGUI_CanvasGotoNodePrs::drawStatusShape(QPainter& thePainter)
 //=====================================================================
 // Macro node presentation
 //=====================================================================
-SUPERVGUI_CanvasMacroNodePrs::SUPERVGUI_CanvasMacroNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasMacroNode* theNode):
-  SUPERVGUI_CanvasNodePrs(theCanvas, theNode)
+SUPERVGUI_CanvasMacroNodePrs::SUPERVGUI_CanvasMacroNodePrs( SUIT_ResourceMgr* mgr, QCanvas* theCanvas, SUPERVGUI_CanvasMacroNode* theNode):
+  SUPERVGUI_CanvasNodePrs( mgr, theCanvas, theNode)
 {
   Trace("SUPERVGUI_CanvasControlNodePrs::SUPERVGUI_CanvasControlNodePrs");
   setNodeColor(QColor(255, 186, 149)); //QColor(255, 200, 170));
index 952ca9f1d208849fb6b87c2b9c8d6b6fbf464f55..536833dfd2fe300948eeb48532bcddadf68ccb5d 100644 (file)
@@ -17,7 +17,7 @@ using namespace std;
 class SUPERVGUI_CanvasControlNodePrs : public SUPERVGUI_CanvasNodePrs 
 {
   public:
-    SUPERVGUI_CanvasControlNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasNode* theNode);
+    SUPERVGUI_CanvasControlNodePrs( SUIT_ResourceMgr*, QCanvas* theCanvas, SUPERVGUI_CanvasNode* theNode);
     virtual ~SUPERVGUI_CanvasControlNodePrs() {}
 
     virtual void hideAll();
@@ -32,7 +32,7 @@ class SUPERVGUI_CanvasStartNode;
 class SUPERVGUI_CanvasStartNodePrs : public SUPERVGUI_CanvasControlNodePrs 
 {
   public:
-    SUPERVGUI_CanvasStartNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasStartNode* theNode);
+    SUPERVGUI_CanvasStartNodePrs( SUIT_ResourceMgr*, QCanvas* theCanvas, SUPERVGUI_CanvasStartNode* theNode);
     virtual ~SUPERVGUI_CanvasStartNodePrs() {}
     
     QPointArray areaPoints() const;
@@ -49,7 +49,7 @@ class SUPERVGUI_CanvasEndNode;
 class SUPERVGUI_CanvasEndNodePrs : public SUPERVGUI_CanvasControlNodePrs 
 {
   public:
-    SUPERVGUI_CanvasEndNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasEndNode* theNode);
+    SUPERVGUI_CanvasEndNodePrs( SUIT_ResourceMgr*, QCanvas* theCanvas, SUPERVGUI_CanvasEndNode* theNode);
     virtual ~SUPERVGUI_CanvasEndNodePrs() {}
     
     QPointArray areaPoints() const;
@@ -66,7 +66,7 @@ class SUPERVGUI_CanvasGotoNode;
 class SUPERVGUI_CanvasGotoNodePrs : public SUPERVGUI_CanvasControlNodePrs 
 {
   public:
-    SUPERVGUI_CanvasGotoNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasGotoNode* theNode);
+    SUPERVGUI_CanvasGotoNodePrs( SUIT_ResourceMgr*, QCanvas* theCanvas, SUPERVGUI_CanvasGotoNode* theNode);
     virtual ~SUPERVGUI_CanvasGotoNodePrs() {}
     
     QPointArray areaPoints() const;
@@ -82,7 +82,7 @@ class SUPERVGUI_CanvasMacroNode;
 class SUPERVGUI_CanvasMacroNodePrs : public SUPERVGUI_CanvasNodePrs 
 {
   public:
-    SUPERVGUI_CanvasMacroNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasMacroNode* theNode);
+    SUPERVGUI_CanvasMacroNodePrs( SUIT_ResourceMgr*, QCanvas* theCanvas, SUPERVGUI_CanvasMacroNode* theNode);
     virtual ~SUPERVGUI_CanvasMacroNodePrs() {}
     
     QPointArray areaPoints() const;
index 88bf2bebb6ea58e51fff9d4e0ca93c2ea6dd8c8a..8e0f8f52571a9ef81c535c37650123b042b0fee3 100644 (file)
@@ -24,7 +24,7 @@ using namespace std;
 #include "SUIT_Session.h"
 
 
-SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode, bool theIsCell):
+SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode( SUIT_ResourceMgr* mgr, QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode, bool theIsCell):
     QObject(theParent),
     myMain(theMain),
     myNode(theNode),
@@ -34,7 +34,8 @@ SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode(QObject* theParent, SUPERVGUI_Main* t
     step(true),
     trace(true),
     verbose(true),
-    myBrowseDlg(0)
+    myBrowseDlg(0),
+    myMgr( mgr )
 {
   Trace("SUPERVGUI_CanvasNode::SUPERVGUI_CanvasNode");
 
@@ -103,7 +104,7 @@ SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasNode::getPrs()
 
 SUPERVGUI_CanvasNodePrs* SUPERVGUI_CanvasNode::createPrs() const
 {
-  return new SUPERVGUI_CanvasNodePrs(myMain->getCanvas(), (SUPERVGUI_CanvasNode*)this);
+  return new SUPERVGUI_CanvasNodePrs( myMgr, myMain->getCanvas(), (SUPERVGUI_CanvasNode*)this);
 }
 
 void SUPERVGUI_CanvasNode::createPort(SUPERV::Port_ptr thePort)
index 8b60dbd681ee1f8b2a5eeb9fd83904d087bbde2e..0be086ddd806ba398cf1cf975615d046ce000ca5 100644 (file)
@@ -16,6 +16,7 @@ using namespace std;
 
 class SUPERVGUI_Main;
 class SUPERVGUI_CanvasNodePrs;
+class SUIT_ResourceMgr;
 
 class SUPERVGUI_CanvasNode : public QObject {
   friend class SUPERVGUI_ManagePortsDlg;
@@ -24,7 +25,7 @@ class SUPERVGUI_CanvasNode : public QObject {
   Q_OBJECT
 
   public:
-    SUPERVGUI_CanvasNode(QObject* theParent, SUPERVGUI_Main* theMain, SUPERV_CNode theNode, bool theIsCell=false);
+    SUPERVGUI_CanvasNode( SUIT_ResourceMgr*, QObject*, SUPERVGUI_Main*, SUPERV_CNode theNode, bool theIsCell=false);
     virtual ~SUPERVGUI_CanvasNode();
 
     // done to ignore port update when node is removed
@@ -104,6 +105,7 @@ class SUPERVGUI_CanvasNode : public QObject {
   protected:
     // redefined by most of CanvasNode successors
     virtual SUPERVGUI_CanvasNodePrs* createPrs() const;
+    SUIT_ResourceMgr* resMgr() const { return myMgr; }
     
     void createPort(SUPERV::Port_ptr thePort);
     void createStreamPort(SUPERV::StreamPort_ptr thePort);
@@ -122,6 +124,7 @@ class SUPERVGUI_CanvasNode : public QObject {
 
     QString          myLabelText;
     SUPERVGUI_CanvasNodePrs* myPrs;
+    SUIT_ResourceMgr* myMgr;
 
     bool myDestroyed;
 
index 969b433555c511a5da8d4579e324629d8d423487..736af094c3ff8962e2590ba3c504163a4a21b5e2 100644 (file)
@@ -13,6 +13,8 @@ using namespace std;
 #include "SUPERVGUI_Canvas.h"
 #include "SUPERVGUI_CanvasCellNodePrs.h"
 
+#include "SUIT_ResourceMgr.h"
+
 //#define CHECKTIME
 
 #ifdef CHECKTIME
@@ -28,11 +30,12 @@ using namespace std;
 //=====================================================================
 // Node presentation
 //=====================================================================
-SUPERVGUI_CanvasNodePrs::SUPERVGUI_CanvasNodePrs(QCanvas* theCanvas, 
-                                                SUPERVGUI_CanvasNode* theNode,
-                                                bool theCellPrs):
+SUPERVGUI_CanvasNodePrs::SUPERVGUI_CanvasNodePrs( SUIT_ResourceMgr* mgr, QCanvas* theCanvas, 
+                                                 SUPERVGUI_CanvasNode* theNode,
+                                                 bool theCellPrs):
   QCanvasPolygonalItem(theCanvas),
-  myNode(theNode)
+  myNode(theNode),
+  myMgr( mgr )
 {
   Trace("SUPERVGUI_CanvasNodePrs::SUPERVGUI_CanvasNodePrs");
   myWidth = LABEL_WIDTH;
@@ -50,7 +53,7 @@ SUPERVGUI_CanvasNodePrs::SUPERVGUI_CanvasNodePrs(QCanvas* theCanvas,
   myPortVisible = true;
   myCellPrs = theCellPrs;
 
-  myColor = MAIN_BACK;
+  myColor = mgr->colorValue( "SUPERVGraph", "Background", DEF_MAIN_BACK );
 
   if (!myCellPrs) {
     // create in/out connection points prs
@@ -595,7 +598,7 @@ void SUPERVGUI_CanvasNodePrs::drawFrame(QPainter& thePainter)
 void SUPERVGUI_CanvasNodePrs::drawTitle(QPainter& thePainter) 
 {
   QBrush saved = thePainter.brush();
-  QBrush br(MAIN_TITLE);
+  QBrush br( myMgr->colorValue( "SUPERVGraph", "Title", DEF_MAIN_TITLE ) );
   thePainter.setBrush(br);
   drawTitleShape(thePainter);
   thePainter.setBrush(saved);
@@ -747,7 +750,7 @@ void SUPERVGUI_CanvasNodePrs::setState(SUPERV::GraphState theState)
 
   default:
     myStatus = "No Status";
-    myStatusColor = MAIN_BACK;
+    myStatusColor = myMgr->colorValue( "SUPERVGraph", "Background", DEF_MAIN_BACK );
     break;
   }
 
index d8aa906e78e927607bda0b63cfb822d94d4401c0..b59bd154e3cd8f48fd4636ad13f9208adc71a95f 100644 (file)
@@ -17,6 +17,7 @@ using namespace std;
 
 class SUPERVGUI_CanvasNodePrs;
 class SUPERVGUI_CanvasPortPrs;
+class SUIT_ResourceMgr;
 class SUPERVGUI_CanvasHookPrs : public QCanvasEllipse
 {
   public:
@@ -50,7 +51,7 @@ class SUPERVGUI_CanvasNode;
 class SUPERVGUI_CanvasNodePrs: public QCanvasPolygonalItem {
 
   public:
-    SUPERVGUI_CanvasNodePrs(QCanvas* theCanvas, SUPERVGUI_CanvasNode* theNode, bool theCellPrs=false);
+    SUPERVGUI_CanvasNodePrs( SUIT_ResourceMgr*, QCanvas*, SUPERVGUI_CanvasNode*, bool theCellPrs=false);
     virtual ~SUPERVGUI_CanvasNodePrs();
 
     SUPERVGUI_CanvasNode* getNode() const { return myNode; }
@@ -122,10 +123,12 @@ class SUPERVGUI_CanvasNodePrs: public QCanvasPolygonalItem {
     virtual void drawTitleShape(QPainter& thePainter);
     virtual void drawStatusShape(QPainter& thePainter);
 
+    SUIT_ResourceMgr* resMgr() const { return myMgr; }
     bool myPortVisible;
 
   private:
     SUPERVGUI_CanvasNode* myNode;
+    SUIT_ResourceMgr* myMgr;
 
     int myWidth;
 
index 5c93893d0e5d237a2b9cb101036318b720b4ed34..1abc0b8ffaf8389f36d05fc38cd3bd015c32af6b 100644 (file)
 
 #define MAIN_NEW "aNewDataFlow"
 
-#define MAIN_COLOR QColor(144, 208, 211)
-#define MAIN_TITLE QColor( 63, 213, 255)
-#define MAIN_CTRL  QColor(255, 108, 106)
-#define MAIN_BACK  QColor(NODE_RED, NODE_GREEN, NODE_BLUE)
+//ASL: these values are default if resource manager doesn't contain corresponding values
+#define DEF_MAIN_COLOR QColor(144, 208, 211)
+#define DEF_MAIN_TITLE QColor( 63, 213, 255)
+#define DEF_MAIN_CTRL  QColor(255, 108, 106)
+#define DEF_MAIN_BACK  QColor(NODE_RED, NODE_GREEN, NODE_BLUE)
 
 // Taille du dataflow sous forme de graphe
 // ---------------------------------------
index 4bbdb9e5e2ba19273902f20ef74d800f66793daf..8deb1a8ed2683f46e517f7af18e6e0d5bd9b681b 100644 (file)
@@ -139,15 +139,17 @@ void SUPERVGUI_Main::init(SUIT_Desktop* theDesktop) {
   };
   */
 
-  objectBrowser = dynamic_cast<SalomeApp_Application*>( study->application() )->objectBrowser();
+  SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( study->application() );
+
+  objectBrowser = app->objectBrowser();
     
-  myArray = new SUPERVGUI_CanvasArray(this);
-  myArrayView = new SUPERVGUI_ArrayView(myArray, this);
+  myArray = new SUPERVGUI_CanvasArray( this, resMgr() );
+  myArrayView = new SUPERVGUI_ArrayView( myArray, this );
 
-  myCanvas = new SUPERVGUI_Canvas(this);
+  myCanvas = new SUPERVGUI_Canvas( this, resMgr() );
   myCanvasView = new SUPERVGUI_CanvasView(myCanvas, this);
   
-  message = dynamic_cast<SalomeApp_Application*>( study->application() )->logWindow();
+  message = app->logWindow();
   notification = new NOTIFICATION_Consumer();
 
   QBoxLayout * layout = new QVBoxLayout(this);
@@ -212,6 +214,12 @@ SUPERVGUI_Main::~SUPERVGUI_Main() {
   delete myArray;
 }
 
+SUIT_ResourceMgr* SUPERVGUI_Main::resMgr() const
+{
+  SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( study->application() );
+  return app ? app->resourceMgr() : 0;
+}
+
 void SUPERVGUI_Main::filterNotification() {
   Trace("SUPERVGUI_Main::filterNotification");
   SUPERVGUI_Notification* dlg = new SUPERVGUI_Notification(this);
@@ -672,7 +680,7 @@ void SUPERVGUI_Main::addComputeNode(SUPERV_CNode theNode) {
   case CANVAS:
   case CONTROLFLOW: 
     {
-      SUPERVGUI_CanvasNode* aNode = new SUPERVGUI_CanvasComputeNode(myCanvas, this, theNode);
+      SUPERVGUI_CanvasNode* aNode = new SUPERVGUI_CanvasComputeNode( resMgr(), myCanvas, this, theNode);
       aNode->move(theNode->X(), theNode->Y());
       if (myCurrentView == CONTROLFLOW) aNode->hideAll();
       aNode->show();
@@ -694,7 +702,7 @@ void SUPERVGUI_Main::addGOTONode(SUPERV_CNode theNode) {
   case CANVAS:
   case CONTROLFLOW: 
     {
-      SUPERVGUI_CanvasNode* aNode = new SUPERVGUI_CanvasGotoNode(myCanvas, this, theNode);
+      SUPERVGUI_CanvasNode* aNode = new SUPERVGUI_CanvasGotoNode( resMgr(), myCanvas, this, theNode);
       aNode->move(theNode->X(), theNode->Y());
       if (myCurrentView == CONTROLFLOW) aNode->hideAll();
       aNode->show();
@@ -716,11 +724,11 @@ void SUPERVGUI_Main::addControlNode(SUPERV_CNode theStartNode, SUPERV_CNode theE
   case CANVAS:
   case CONTROLFLOW: 
     {
-      SUPERVGUI_CanvasStartNode* aStartNode = new SUPERVGUI_CanvasStartNode(myCanvas, this, theStartNode);
+      SUPERVGUI_CanvasStartNode* aStartNode = new SUPERVGUI_CanvasStartNode( resMgr(), myCanvas, this, theStartNode);
       aStartNode->move(theStartNode->X(), theStartNode->Y());
       if (myCurrentView == CONTROLFLOW) aStartNode->hideAll();
 
-      SUPERVGUI_CanvasEndNode* aEndNode = new SUPERVGUI_CanvasEndNode(myCanvas, this, theEndNode, aStartNode);
+      SUPERVGUI_CanvasEndNode* aEndNode = new SUPERVGUI_CanvasEndNode( resMgr(), myCanvas, this, theEndNode, aStartNode);
       aEndNode->move(theEndNode->X(), theEndNode->Y());
       if (myCurrentView == CONTROLFLOW) aEndNode->hideAll();
 
@@ -745,7 +753,7 @@ void SUPERVGUI_Main::addMacroNode(SUPERV_CNode theNode) {
   case CANVAS:
   case CONTROLFLOW: 
     {
-      SUPERVGUI_CanvasNode* aNode = new SUPERVGUI_CanvasMacroNode(myCanvas, this, theNode);
+      SUPERVGUI_CanvasNode* aNode = new SUPERVGUI_CanvasMacroNode( resMgr(), myCanvas, this, theNode);
       aNode->move(theNode->X(), theNode->Y());
       if (myCurrentView == CONTROLFLOW) aNode->hideAll();
       aNode->show();
index 5d52fce86882115042e2215bcee9c0cc609e7a8c..1559b74f07e10800d43b829fcd065ffd45dd6754 100644 (file)
@@ -57,6 +57,8 @@ class SUPERVGUI_Main: public SUPERVGraph_View {
     SUPERVGUI_Main(SUPERVGraph_ViewFrame*, SUIT_Desktop*/*QAD_Desktop**/, SUPERV_Graph);
     virtual ~SUPERVGUI_Main();
 
+    SUIT_ResourceMgr* resMgr() const;
+
     void run( const bool andSuspend );
     void kill();
     void suspendResume();